本文整理匯總了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);
}
}
示例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);
}
示例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);
}
}
示例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);
}