List of usage examples for android.app Activity stopLockTask
public void stopLockTask()
From source file:org.wso2.iot.agent.services.kiosk.KioskAlarmReceiver.java
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) @Override//from w w w . j a v a2 s. c o m public void onReceive(Context context, Intent intent) { Intent service; Activity currentlyLockedActivity; if (intent.getBooleanExtra(Constants.Operation.ENABLE_LOCK, false)) { Log.d(TAG, "OnReceive EnableLock false."); currentlyLockedActivity = new KioskActivity(); currentlyLockedActivity.stopLockTask(); service = new Intent(context, KioskLockDownService.class); buildAlarm(context, false, false); startWakefulService(context, service); } else if (!intent.getBooleanExtra(Constants.Operation.ENABLE_LOCK, true)) { Log.d(TAG, "OnReceive enableLock true"); currentlyLockedActivity = new KioskRestrictionActivity(); currentlyLockedActivity.stopLockTask(); service = new Intent(context, KioskUnlockService.class); buildAlarm(context, true, false); startWakefulService(context, service); } }