本文整理汇总了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);
}