Loading packages/SystemUI/src/com/android/systemui/recents/Recents.java +6 −1 Original line number Diff line number Diff line Loading @@ -500,6 +500,8 @@ public class Recents extends SystemUI mStatusBarHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); mNavBarHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height); mNavBarWidth = res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_width); // TODO: We can't rely on this anymore since the activity context will yield different // resources while multiwindow is enabled mConfig = RecentsConfiguration.reinitialize(mContext, mSystemServicesProxy); mConfig.updateOnConfigurationChange(); Rect searchBarBounds = new Rect(); Loading Loading @@ -735,7 +737,10 @@ public class Recents extends SystemUI /** Starts the recents activity */ void startRecentsActivity(ActivityManager.RunningTaskInfo topTask, boolean isTopTaskHome) { RecentsTaskLoader loader = RecentsTaskLoader.getInstance(); RecentsConfiguration.reinitialize(mContext, mSystemServicesProxy); // Don't reinitialize the configuration completely here, since it has the wrong context, // only update the parts that we can get from any context RecentsConfiguration config = RecentsConfiguration.getInstance(); config.reinitializeWithApplicationContext(mContext, mSystemServicesProxy); if (sInstanceLoadPlan == null) { // Create a new load plan if onPreloadRecents() was never triggered Loading packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +3 −3 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ public class RecentsConfiguration { sInstance.update(context); sPrevConfigurationHashCode = configHashCode; } sInstance.updateOnReinitialize(context, ssp); sInstance.reinitializeWithApplicationContext(context.getApplicationContext(), ssp); return sInstance; } Loading Loading @@ -276,8 +276,8 @@ public class RecentsConfiguration { systemInsets.set(insets); } /** Updates the states that need to be re-read whenever we re-initialize. */ void updateOnReinitialize(Context context, SystemServicesProxy ssp) { /** Updates the states that need to be re-read from the application context. */ void reinitializeWithApplicationContext(Context context, SystemServicesProxy ssp) { // Check if the developer options are enabled developerOptionsEnabled = ssp.getGlobalSetting(context, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED) != 0; Loading Loading
packages/SystemUI/src/com/android/systemui/recents/Recents.java +6 −1 Original line number Diff line number Diff line Loading @@ -500,6 +500,8 @@ public class Recents extends SystemUI mStatusBarHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); mNavBarHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height); mNavBarWidth = res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_width); // TODO: We can't rely on this anymore since the activity context will yield different // resources while multiwindow is enabled mConfig = RecentsConfiguration.reinitialize(mContext, mSystemServicesProxy); mConfig.updateOnConfigurationChange(); Rect searchBarBounds = new Rect(); Loading Loading @@ -735,7 +737,10 @@ public class Recents extends SystemUI /** Starts the recents activity */ void startRecentsActivity(ActivityManager.RunningTaskInfo topTask, boolean isTopTaskHome) { RecentsTaskLoader loader = RecentsTaskLoader.getInstance(); RecentsConfiguration.reinitialize(mContext, mSystemServicesProxy); // Don't reinitialize the configuration completely here, since it has the wrong context, // only update the parts that we can get from any context RecentsConfiguration config = RecentsConfiguration.getInstance(); config.reinitializeWithApplicationContext(mContext, mSystemServicesProxy); if (sInstanceLoadPlan == null) { // Create a new load plan if onPreloadRecents() was never triggered Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +3 −3 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ public class RecentsConfiguration { sInstance.update(context); sPrevConfigurationHashCode = configHashCode; } sInstance.updateOnReinitialize(context, ssp); sInstance.reinitializeWithApplicationContext(context.getApplicationContext(), ssp); return sInstance; } Loading Loading @@ -276,8 +276,8 @@ public class RecentsConfiguration { systemInsets.set(insets); } /** Updates the states that need to be re-read whenever we re-initialize. */ void updateOnReinitialize(Context context, SystemServicesProxy ssp) { /** Updates the states that need to be re-read from the application context. */ void reinitializeWithApplicationContext(Context context, SystemServicesProxy ssp) { // Check if the developer options are enabled developerOptionsEnabled = ssp.getGlobalSetting(context, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED) != 0; Loading