當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。