当前位置: 首页>>代码示例>>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;未经允许,请勿转载。