Loading core/java/android/provider/MediaStore.java +5 −0 Original line number Diff line number Diff line Loading @@ -684,6 +684,11 @@ public final class MediaStore { return null; } filePath = c.getString(1); // this DB query can return null under some synchronization issue, // returning NULL bitmap in such cases. if (filePath == null) { return null; } } if (isVideo) { bitmap = ThumbnailUtils.createVideoThumbnail(filePath, kind); Loading core/java/android/view/View.java +3 −3 Original line number Diff line number Diff line Loading @@ -13159,12 +13159,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, info.mHardwareRenderer.safelyRun(new Runnable() { @Override public void run() { // cancelLayerUpdate() is not called here because the // glCanvas is null when HardwareRender is disabled // cancelLayerUpdate is actually done in the glCanvas. mHardwareLayer.destroy(); mHardwareLayer = null; if (mDisplayList != null) { mDisplayList.reset(); } invalidate(true); invalidateParentCaches(); } Loading packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Diff line number Diff line Loading @@ -207,4 +207,7 @@ <!-- Default value of Settings.System.NOISE_SUPPRESSION --> <bool name="def_noise_suppression">false</bool> <!-- Default value of Settings.System.SCREEN_ANIMATION_STYLE --> <integer name="def_screen_animation_style">0</integer> </resources> packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +24 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion' // is properly propagated through your change. Not doing so will result in a loss of user // settings. private static final int DATABASE_VERSION = 99; private static final int DATABASE_VERSION = 100; private Context mContext; private int mUserHandle; Loading Loading @@ -1617,6 +1617,14 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 99; } if (upgradeVersion == 99) { if (mUserHandle == UserHandle.USER_OWNER) { loadScreenAnimationStyle(db); } upgradeVersion = 100; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Loading Loading @@ -2036,6 +2044,21 @@ public class DatabaseHelper extends SQLiteOpenHelper { } } private void loadScreenAnimationStyle(SQLiteDatabase db) { db.beginTransaction(); SQLiteStatement stmt = null; try { stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)" + " VALUES(?,?);"); loadIntegerSetting(stmt, Settings.System.SCREEN_ANIMATION_STYLE, R.integer.def_screen_animation_style); db.setTransactionSuccessful(); } finally { db.endTransaction(); if (stmt != null) stmt.close(); } } private void loadSettings(SQLiteDatabase db) { loadSystemSettings(db); loadSecureSettings(db); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +26 −3 Original line number Diff line number Diff line Loading @@ -370,6 +370,7 @@ public class NavigationBarView extends LinearLayout { ViewGroup container = (ViewGroup) mRotatedViews[i]; if (container != null) { updateKeyButtonViewResources(container); updateLightsOutResources(container); } } } Loading @@ -377,18 +378,40 @@ public class NavigationBarView extends LinearLayout { private void updateKeyButtonViewResources(ViewGroup container) { ViewGroup midNavButtons = (ViewGroup) container.findViewById(R.id.mid_nav_buttons); if (midNavButtons != null) { final int nChildern = midNavButtons.getChildCount(); for (int i = 0; i < nChildern; i++) { final int nChildren = midNavButtons.getChildCount(); for (int i = 0; i < nChildren; i++) { final View child = midNavButtons.getChildAt(i); if (child instanceof KeyButtonView) { ((KeyButtonView) child).updateResources(); } } } KeyButtonView kbv = (KeyButtonView) findViewById(R.id.six); KeyButtonView kbv = (KeyButtonView) findViewById(R.id.one); if (kbv != null) { kbv.updateResources(); } kbv = (KeyButtonView) findViewById(R.id.six); if (kbv != null) { kbv.updateResources(); } } private void updateLightsOutResources(ViewGroup container) { ViewGroup lightsOut = (ViewGroup) container.findViewById(R.id.lights_out); if (lightsOut != null) { final int nChildren = lightsOut.getChildCount(); for (int i = 0; i < nChildren; i++) { final View child = lightsOut.getChildAt(i); if (child instanceof ImageView) { final ImageView iv = (ImageView) child; // clear out the existing drawable, this is required since the // ImageView keeps track of the resource ID and if it is the same // it will not update the drawable. iv.setImageDrawable(null); iv.setImageResource(R.drawable.ic_sysbar_lights_out_dot_large); } } } } @Override Loading Loading
core/java/android/provider/MediaStore.java +5 −0 Original line number Diff line number Diff line Loading @@ -684,6 +684,11 @@ public final class MediaStore { return null; } filePath = c.getString(1); // this DB query can return null under some synchronization issue, // returning NULL bitmap in such cases. if (filePath == null) { return null; } } if (isVideo) { bitmap = ThumbnailUtils.createVideoThumbnail(filePath, kind); Loading
core/java/android/view/View.java +3 −3 Original line number Diff line number Diff line Loading @@ -13159,12 +13159,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, info.mHardwareRenderer.safelyRun(new Runnable() { @Override public void run() { // cancelLayerUpdate() is not called here because the // glCanvas is null when HardwareRender is disabled // cancelLayerUpdate is actually done in the glCanvas. mHardwareLayer.destroy(); mHardwareLayer = null; if (mDisplayList != null) { mDisplayList.reset(); } invalidate(true); invalidateParentCaches(); } Loading
packages/SettingsProvider/res/values/defaults.xml +3 −0 Original line number Diff line number Diff line Loading @@ -207,4 +207,7 @@ <!-- Default value of Settings.System.NOISE_SUPPRESSION --> <bool name="def_noise_suppression">false</bool> <!-- Default value of Settings.System.SCREEN_ANIMATION_STYLE --> <integer name="def_screen_animation_style">0</integer> </resources>
packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +24 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion' // is properly propagated through your change. Not doing so will result in a loss of user // settings. private static final int DATABASE_VERSION = 99; private static final int DATABASE_VERSION = 100; private Context mContext; private int mUserHandle; Loading Loading @@ -1617,6 +1617,14 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 99; } if (upgradeVersion == 99) { if (mUserHandle == UserHandle.USER_OWNER) { loadScreenAnimationStyle(db); } upgradeVersion = 100; } // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { Loading Loading @@ -2036,6 +2044,21 @@ public class DatabaseHelper extends SQLiteOpenHelper { } } private void loadScreenAnimationStyle(SQLiteDatabase db) { db.beginTransaction(); SQLiteStatement stmt = null; try { stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)" + " VALUES(?,?);"); loadIntegerSetting(stmt, Settings.System.SCREEN_ANIMATION_STYLE, R.integer.def_screen_animation_style); db.setTransactionSuccessful(); } finally { db.endTransaction(); if (stmt != null) stmt.close(); } } private void loadSettings(SQLiteDatabase db) { loadSystemSettings(db); loadSecureSettings(db); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +26 −3 Original line number Diff line number Diff line Loading @@ -370,6 +370,7 @@ public class NavigationBarView extends LinearLayout { ViewGroup container = (ViewGroup) mRotatedViews[i]; if (container != null) { updateKeyButtonViewResources(container); updateLightsOutResources(container); } } } Loading @@ -377,18 +378,40 @@ public class NavigationBarView extends LinearLayout { private void updateKeyButtonViewResources(ViewGroup container) { ViewGroup midNavButtons = (ViewGroup) container.findViewById(R.id.mid_nav_buttons); if (midNavButtons != null) { final int nChildern = midNavButtons.getChildCount(); for (int i = 0; i < nChildern; i++) { final int nChildren = midNavButtons.getChildCount(); for (int i = 0; i < nChildren; i++) { final View child = midNavButtons.getChildAt(i); if (child instanceof KeyButtonView) { ((KeyButtonView) child).updateResources(); } } } KeyButtonView kbv = (KeyButtonView) findViewById(R.id.six); KeyButtonView kbv = (KeyButtonView) findViewById(R.id.one); if (kbv != null) { kbv.updateResources(); } kbv = (KeyButtonView) findViewById(R.id.six); if (kbv != null) { kbv.updateResources(); } } private void updateLightsOutResources(ViewGroup container) { ViewGroup lightsOut = (ViewGroup) container.findViewById(R.id.lights_out); if (lightsOut != null) { final int nChildren = lightsOut.getChildCount(); for (int i = 0; i < nChildren; i++) { final View child = lightsOut.getChildAt(i); if (child instanceof ImageView) { final ImageView iv = (ImageView) child; // clear out the existing drawable, this is required since the // ImageView keeps track of the resource ID and if it is the same // it will not update the drawable. iv.setImageDrawable(null); iv.setImageResource(R.drawable.ic_sysbar_lights_out_dot_large); } } } } @Override Loading