Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 779237e3 authored by Suprabh Shukla's avatar Suprabh Shukla Committed by android-build-merger
Browse files

Disabling the activate button when paused

am: de5df8b0

Change-Id: I7878f3f3addbb0f47f3c145a34977a9ebb62a055
parents 840b78e1 de5df8b0
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settings;

import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;

import org.xmlpull.v1.XmlPullParserException;

import android.app.Activity;
@@ -88,7 +90,7 @@ public class DeviceAdminAdd extends Activity {
    @Override
    protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
        mHandler = new Handler(getMainLooper());
        
        mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);
@@ -268,9 +270,16 @@ public class DeviceAdminAdd extends Activity {
    @Override
    protected void onResume() {
        super.onResume();
        mActionButton.setEnabled(true);
        updateInterface();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mActionButton.setEnabled(false);
    }

    @Override
    protected Dialog onCreateDialog(int id, Bundle args) {
        switch (id) {