summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/AndroidManifest.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java9
-rwxr-xr-xpackages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java10
4 files changed, 16 insertions, 14 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index d45b52b..4b49196 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -109,6 +109,7 @@
<uses-permission android:name="android.permission.TRUST_LISTENER" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" />
+ <uses-permission android:name="android.permission.REBOOT" />
<!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index 5a6f3c9..b4634ab 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -60,6 +60,7 @@ public class ImageWallpaper extends WallpaperService {
private static final String GL_LOG_TAG = "ImageWallpaperGL";
private static final boolean DEBUG = false;
private static final String PROPERTY_KERNEL_QEMU = "ro.kernel.qemu";
+ private static final String PROPERTY_RENDERING_SOFTWARE = "ro.softwaregl";
static final boolean FIXED_SIZED_SURFACE = true;
static final boolean USE_OPENGL = true;
@@ -77,7 +78,7 @@ public class ImageWallpaper extends WallpaperService {
//noinspection PointlessBooleanExpression,ConstantConditions
if (FIXED_SIZED_SURFACE && USE_OPENGL) {
- if (!isEmulator()) {
+ if (!isEmulator() && !needsSoftwareRendering()) {
mIsHwAccelerated = ActivityManager.isHighEndGfx();
}
}
@@ -94,6 +95,10 @@ public class ImageWallpaper extends WallpaperService {
return "1".equals(SystemProperties.get(PROPERTY_KERNEL_QEMU, "0"));
}
+ private static boolean needsSoftwareRendering() {
+ return "1".equals(SystemProperties.get(PROPERTY_RENDERING_SOFTWARE, "0"));
+ }
+
@Override
public Engine onCreateEngine() {
mEngine = new DrawableEngine();
@@ -701,7 +706,7 @@ public class ImageWallpaper extends WallpaperService {
mEglConfig = chooseEglConfig();
if (mEglConfig == null) {
- throw new RuntimeException("eglConfig not initialized");
+ return false;
}
mEglContext = createContext(mEgl, mEglDisplay, mEglConfig);
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;
}