当前位置: 首页>>代码示例>>Java>>正文


Java LockScreenManager类代码示例

本文整理汇总了Java中com.smartdevicelink.proxy.LockScreenManager的典型用法代码示例。如果您正苦于以下问题:Java LockScreenManager类的具体用法?Java LockScreenManager怎么用?Java LockScreenManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LockScreenManager类属于com.smartdevicelink.proxy包,在下文中一共展示了LockScreenManager类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testHmiLevelStatus

import com.smartdevicelink.proxy.LockScreenManager; //导入依赖的package包/类
/**
* This is a unit test for the following methods : 
* {@link com.smartdevicelink.proxy.LockScreenManager#setHMILevel(HMILevel)}
*/
  public void testHmiLevelStatus(){
      LockScreenManager lockMan = new LockScreenManager();
      lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
      assertEquals(Test.MATCH, HMILevel.HMI_BACKGROUND, lockMan.getLockObj().getHMILevel());

      lockMan.setHMILevel(HMILevel.HMI_FULL);
      assertEquals(Test.MATCH, HMILevel.HMI_FULL, lockMan.getLockObj().getHMILevel());

      lockMan.setHMILevel(HMILevel.HMI_LIMITED);
      assertEquals(Test.MATCH, HMILevel.HMI_LIMITED, lockMan.getLockObj().getHMILevel());

      lockMan.setHMILevel(HMILevel.HMI_NONE);
      assertEquals(Test.MATCH, HMILevel.HMI_NONE, lockMan.getLockObj().getHMILevel());

      lockMan.setHMILevel(null);
      assertNull(Test.NULL, lockMan.getLockObj().getHMILevel());
  }
 
开发者ID:smartdevicelink,项目名称:sdl_android,代码行数:22,代码来源:LockScreenManagerTest.java

示例2: testLockScreenStatusDriverDistNull

import com.smartdevicelink.proxy.LockScreenManager; //导入依赖的package包/类
/**
 * Test the invalid settings of lock screen status.
 */
public void testLockScreenStatusDriverDistNull(){
    LockScreenManager lockMan = new LockScreenManager();
  
    OnLockScreenStatus result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_NONE);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_FULL);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_LIMITED);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());
}
 
开发者ID:smartdevicelink,项目名称:sdl_android,代码行数:26,代码来源:LockScreenManagerTest.java

示例3: testLockScreenStatusDriverDistEnabled

import com.smartdevicelink.proxy.LockScreenManager; //导入依赖的package包/类
/**
 * Test the enabled settings of lock screen status.
 */
public void testLockScreenStatusDriverDistEnabled(){
    LockScreenManager lockMan = new LockScreenManager();
    lockMan.setDriverDistStatus(true);

    // HMI level is null
    OnLockScreenStatus result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_NONE);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_FULL);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_LIMITED);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());
}
 
开发者ID:smartdevicelink,项目名称:sdl_android,代码行数:28,代码来源:LockScreenManagerTest.java

示例4: testLockScreenStatusDriverDistDisabled

import com.smartdevicelink.proxy.LockScreenManager; //导入依赖的package包/类
/**
 * Test the disabled settings of lock screen status.
 */
public void testLockScreenStatusDriverDistDisabled(){
    LockScreenManager lockMan = new LockScreenManager();
    lockMan.setDriverDistStatus(false);

    OnLockScreenStatus result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_NONE);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_FULL);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OPTIONAL, result.getShowLockScreen());

    lockMan.setHMILevel(HMILevel.HMI_LIMITED);
    result = lockMan.getLockObj();
    assertEquals(Test.MATCH, LockScreenStatus.OPTIONAL, result.getShowLockScreen());
}
 
开发者ID:smartdevicelink,项目名称:sdl_android,代码行数:27,代码来源:LockScreenManagerTest.java

示例5: testDriverDistStatus

import com.smartdevicelink.proxy.LockScreenManager; //导入依赖的package包/类
/**
* This is a unit test for the following methods : 
* {@link com.smartdevicelink.proxy.LockScreenManager#setDriverDistStatus(boolean)}
*/
  public void testDriverDistStatus(){
      LockScreenManager lockMan = new LockScreenManager();
      lockMan.setDriverDistStatus(true);
      assertEquals(Test.MATCH, true, (boolean) lockMan.getLockObj().getDriverDistractionStatus());

      lockMan.setDriverDistStatus(false);
      assertEquals(Test.MATCH, false, (boolean) lockMan.getLockObj().getDriverDistractionStatus());
  }
 
开发者ID:smartdevicelink,项目名称:sdl_android,代码行数:13,代码来源:LockScreenManagerTest.java

示例6: testLockScreenStatusNull

import com.smartdevicelink.proxy.LockScreenManager; //导入依赖的package包/类
/**
 * Test the lock screen status when no setter methods are called.
 */
public void testLockScreenStatusNull(){
    LockScreenManager lockMan = new LockScreenManager();
    OnLockScreenStatus result = lockMan.getLockObj();
    assertNotNull(Test.NOT_NULL, result);
    assertEquals(Test.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
}
 
开发者ID:smartdevicelink,项目名称:sdl_android,代码行数:10,代码来源:LockScreenManagerTest.java

示例7: getLockScreenMan

import com.smartdevicelink.proxy.LockScreenManager; //导入依赖的package包/类
public LockScreenManager getLockScreenMan() {
	return lockScreenMan;
}
 
开发者ID:smartdevicelink,项目名称:sdl_android,代码行数:4,代码来源:SdlSession.java


注:本文中的com.smartdevicelink.proxy.LockScreenManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。