summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 17:27:39 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 17:27:39 +0100
commit652ad25a777d0a6196b7a3d6f34a7d23ac9e69f1 (patch)
treed00fbc8c84b1a040e4f16e2a1317ab3ff4b37137
parentb7043f96c4deb8173e4f4c3a3293bbd646b59f12 (diff)
downloadframeworks_base-652ad25a777d0a6196b7a3d6f34a7d23ac9e69f1.zip
frameworks_base-652ad25a777d0a6196b7a3d6f34a7d23ac9e69f1.tar.gz
frameworks_base-652ad25a777d0a6196b7a3d6f34a7d23ac9e69f1.tar.bz2
Revert "Keyguard: switch to cm-specific device provisioned flag"
This reverts commit ab5c226f688080d714f3eee987bd97e13cc348d5.
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java8
-rwxr-xr-xpackages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java10
3 files changed, 11 insertions, 17 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index e67ad20..33f8da8 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -69,8 +69,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
-import cyanogenmod.providers.CMSettings;
-
import static android.os.BatteryManager.BATTERY_HEALTH_UNKNOWN;
import static android.os.BatteryManager.BATTERY_STATUS_FULL;
import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
@@ -1132,8 +1130,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
private boolean isDeviceProvisionedInSettingsDb() {
- return CMSettings.Secure.getInt(mContext.getContentResolver(),
- CMSettings.Secure.CM_SETUP_WIZARD_COMPLETED, 0) != 0;
+ return Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.DEVICE_PROVISIONED, 0) != 0;
}
private void watchForDeviceProvisioning() {
@@ -1150,7 +1148,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
};
mContext.getContentResolver().registerContentObserver(
- CMSettings.System.getUriFor(CMSettings.Secure.CM_SETUP_WIZARD_COMPLETED),
+ Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONED),
false, mDeviceProvisionedObserver);
// prevent a race condition between where we check the flag and where we register the
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index e958ee1..8511107 100755
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -118,8 +118,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
-import cyanogenmod.providers.CMSettings;
-
import static com.android.keyguard.KeyguardHostView.OnDismissAction;
public abstract class BaseStatusBar extends SystemUI implements
@@ -270,8 +268,8 @@ public abstract class BaseStatusBar extends SystemUI implements
protected final ContentObserver mSettingsObserver = new ContentObserver(mHandler) {
@Override
public void onChange(boolean selfChange) {
- final boolean provisioned = 0 != CMSettings.Secure.getInt(
- mContext.getContentResolver(), CMSettings.Secure.CM_SETUP_WIZARD_COMPLETED, 0);
+ final boolean provisioned = 0 != Settings.Global.getInt(
+ mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0);
if (provisioned != mDeviceProvisioned) {
mDeviceProvisioned = provisioned;
updateNotifications();
@@ -582,8 +580,8 @@ public abstract class BaseStatusBar extends SystemUI implements
mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
mContext.getContentResolver().registerContentObserver(
- CMSettings.Secure.getUriFor(CMSettings.Secure.CM_SETUP_WIZARD_COMPLETED), false,
- mSettingsObserver, UserHandle.USER_ALL);
+ Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONED), true,
+ mSettingsObserver);
mContext.getContentResolver().registerContentObserver(
Settings.Global.getUriFor(Settings.Global.ZEN_MODE), false,
mSettingsObserver);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 7df8346..6b44688 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -3600,12 +3600,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
} else if (cyanogenmod.content.Intent.ACTION_SCREEN_CAMERA_GESTURE.equals(action)) {
boolean userSetupComplete = Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.USER_SETUP_COMPLETE, 0) != 0;
- if (!userSetupComplete || !isDeviceProvisioned()) {
- if (DEBUG) {
- Log.d(TAG, String.format("userSetupComplete = $1%s, " +
- "deviceProvisioned = $2%s, ignoring camera launch gesture.",
- userSetupComplete, isDeviceProvisioned()));
- }
+ if (!userSetupComplete) {
+ if (DEBUG) Log.d(TAG, String.format(
+ "userSetupComplete = %s, ignoring camera launch gesture.",
+ userSetupComplete));
return;
}