當前位置: 首頁>>代碼示例>>Java>>正文


Java LockManager類代碼示例

本文整理匯總了Java中com.github.orangegangsters.lollipin.lib.managers.LockManager的典型用法代碼示例。如果您正苦於以下問題:Java LockManager類的具體用法?Java LockManager怎麽用?Java LockManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LockManager類屬於com.github.orangegangsters.lollipin.lib.managers包,在下文中一共展示了LockManager類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import com.github.orangegangsters.lollipin.lib.managers.LockManager; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));

    if (getResources().getBoolean(R.bool.portrait_only)){
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

    setTitle("");

    settingsprefs = getSharedPreferences("settings", 0);

    LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
    //Log.d("AutoOff", "should lock: "+lockManager.getAppLock().shouldLockSceen(LockedNotificationActions.this));

    // pin protection
    if (lockManager.getAppLock().isPasscodeSet() && lockManager.getAppLock().shouldLockSceen(LockedNotificationActions.this)) {
        Intent intent = new Intent(LockedNotificationActions.this, CustomPinActivity.class);
        intent.putExtra(AppLock.EXTRA_TYPE, AppLock.UNLOCK_PIN);
        startActivity(intent);
    }
}
 
開發者ID:jonathansautter,項目名稱:AutoOff,代碼行數:24,代碼來源:LockedNotificationActions.java

示例2: onCreate

import com.github.orangegangsters.lollipin.lib.managers.LockManager; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }
    mRefWatcher = LeakCanary.install(this);
    LockManager<MoonlightPinActivity> lockManager = LockManager.getInstance();
    lockManager.enableAppLock(this, MoonlightPinActivity.class);
    lockManager.getAppLock().setLogoId(R.drawable.ic_screen_lock_portrait_black_24dp);

    File file = new File(this.getCacheDir(), "okttp");
    OkHttpClient client = new OkHttpClient
            .Builder()
            .addInterceptor(new MInterceptor())
            .cache(new Cache(file, 1024 * 1024 * 100)).build();

    Picasso picasso = new Picasso.Builder(this)
            .downloader(new OkHttpDownloader(client))
            .build();
    Picasso.setSingletonInstance(picasso);

    Picasso.with(mContext).setIndicatorsEnabled(true);
}
 
開發者ID:Art2Cat,項目名稱:MoonlightNote,代碼行數:27,代碼來源:MoonlightApplication.java

示例3: onResume

import com.github.orangegangsters.lollipin.lib.managers.LockManager; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
protected void onResume() {
    super.onResume();
    LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
    //Log.d("AutoOff", "should lock: "+lockManager.getAppLock().shouldLockSceen(MainActivity.this));

    // pin protection
    if (lockManager.getAppLock().isPasscodeSet() && lockManager.getAppLock().shouldLockSceen(MainActivity.this)) {
        Intent intent = new Intent(MainActivity.this, CustomPinActivity.class);
        intent.putExtra(AppLock.EXTRA_TYPE, AppLock.UNLOCK_PIN);
        startActivity(intent);
    }
}
 
開發者ID:jonathansautter,項目名稱:AutoOff,代碼行數:15,代碼來源:MainActivity.java

示例4: onCreate

import com.github.orangegangsters.lollipin.lib.managers.LockManager; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public void onCreate() {
    super.onCreate();

    LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
    lockManager.enableAppLock(this, CustomPinActivity.class);
    lockManager.getAppLock().setLogoId(R.mipmap.ic_launcher);
    lockManager.getAppLock().setShouldShowForgot(false);
}
 
開發者ID:jonathansautter,項目名稱:AutoOff,代碼行數:11,代碼來源:AutoOff.java


注:本文中的com.github.orangegangsters.lollipin.lib.managers.LockManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。