summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml1
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java9
3 files changed, 14 insertions, 9 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 9ecbfdd..a3a5aaa 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -41,6 +41,7 @@
<bool name="def_screen_brightness_automatic_mode">false</bool>
<fraction name="def_window_animation_scale">100%</fraction>
<fraction name="def_window_transition_scale">100%</fraction>
+ <fraction name="def_animator_duration_scale">100%</fraction>
<bool name="def_haptic_feedback">true</bool>
<bool name="def_dozeEnabledByDefault">false</bool>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index e4b2409..68fde92 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -441,7 +441,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
+ Settings.System.TRANSITION_ANIMATION_SCALE + "'");
stmt = db.compileStatement("INSERT INTO system(name,value)"
+ " VALUES(?,?);");
- loadDefaultAnimationSettings(stmt);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
@@ -572,7 +571,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
+ Settings.System.TRANSITION_ANIMATION_SCALE + "'");
stmt = db.compileStatement("INSERT INTO system(name,value)"
+ " VALUES(?,?);");
- loadDefaultAnimationSettings(stmt);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
@@ -978,7 +976,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
+ Settings.System.TRANSITION_ANIMATION_SCALE + "'");
stmt = db.compileStatement("INSERT INTO system(name,value)"
+ " VALUES(?,?);");
- loadDefaultAnimationSettings(stmt);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
@@ -2588,8 +2585,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
loadBooleanSetting(stmt, Settings.System.SCREEN_BRIGHTNESS_MODE,
R.bool.def_screen_brightness_automatic_mode);
- loadDefaultAnimationSettings(stmt);
-
loadBooleanSetting(stmt, Settings.System.ACCELEROMETER_ROTATION,
R.bool.def_accelerometer_rotation);
@@ -2644,10 +2639,12 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
private void loadDefaultAnimationSettings(SQLiteStatement stmt) {
- loadFractionSetting(stmt, Settings.System.WINDOW_ANIMATION_SCALE,
+ loadFractionSetting(stmt, Settings.Global.WINDOW_ANIMATION_SCALE,
R.fraction.def_window_animation_scale, 1);
- loadFractionSetting(stmt, Settings.System.TRANSITION_ANIMATION_SCALE,
+ loadFractionSetting(stmt, Settings.Global.TRANSITION_ANIMATION_SCALE,
R.fraction.def_window_transition_scale, 1);
+ loadFractionSetting(stmt, Settings.Global.ANIMATOR_DURATION_SCALE,
+ R.fraction.def_animator_duration_scale, 1);
}
private void loadDefaultHapticSettings(SQLiteStatement stmt) {
@@ -2837,6 +2834,8 @@ class DatabaseHelper extends SQLiteOpenHelper {
loadSetting(stmt, Settings.Global.MODE_RINGER,
AudioManager.RINGER_MODE_NORMAL);
+ loadDefaultAnimationSettings(stmt);
+
// --- Previously in 'secure'
loadBooleanSetting(stmt, Settings.Global.PACKAGE_VERIFIER_ENABLE,
R.bool.def_package_verifier_enable);
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);