Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CloseLockerActivity extends BaseActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_close_locker);
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
- /** Window flag: when set the window will cause the keyguard to
- * be dismissed, only if it is not a secure lock keyguard. Because such
- * a keyguard is not needed for security, it will never re-appear if
- * the user navigates to another window (in contrast to
- * {@link #FLAG_SHOW_WHEN_LOCKED}, which will only temporarily
- * hide both secure and non-secure keyguards but ensure they reappear
- * when the user moves to another UI that doesn't hide them).
- * If the keyguard is currently active and is secure (requires an
- * unlock pattern) than the user will still need to confirm it before
- * seeing this window, unless {@link #FLAG_SHOW_WHEN_LOCKED} has
- * also been set.
- *
- * public static final int FLAG_DISMISS_KEYGUARD = 0x00400000;
- */
- getWindow().addFlags((WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD));
- MainHandler.getInstance().postDelayed(this::finish, 1000);
- }
- public static void open(Context context) {
- Intent intent = new Intent(context, CloseLockerActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- context.startActivity(intent);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement