Commit 52cd0a6e authored by wanglei's avatar wanglei

...

parent d8d2a736
......@@ -19,7 +19,10 @@ public class ScreenStatusReceiver extends BroadcastReceiver {
private static boolean isDeviceInteractive = true;
private static boolean isSecureLockActive = false;
static boolean haveRegister = false;
public static void setupScreenStatusListener(Context context) {
if (haveRegister) return;
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
intentFilter.addAction(Intent.ACTION_SCREEN_ON);
......@@ -31,6 +34,7 @@ public class ScreenStatusReceiver extends BroadcastReceiver {
} else {
applicationContext.registerReceiver(new ScreenStatusReceiver(), intentFilter);
}
haveRegister = true;
}
@Override
......@@ -49,7 +53,7 @@ public class ScreenStatusReceiver extends BroadcastReceiver {
if (isDeviceInteractive() && !isSecureLockActive()) {
int secureSetting = Integer.parseInt(AppPreferences.getInstance().getString("lockS", "1"));
if (secureSetting == 1) {
Log.d("glc","lockS");
Log.d("glc", "lockS");
NotificationPushUtil.INSTANCE.sendNotificationWhere(context, null, PUSH_WHERE_UNLOCK);
}
}
......
......@@ -83,6 +83,7 @@ class BookmarkActivity : BaseActivity<ActivityBookmarkBinding>() {
if (bookmarkFragment.bookmarkAdapter.canBeforeFolder()) {
bookmarkFragment.bookmarkAdapter.beforeFolder()
} else {
finishToMain()
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment