Loading src/com/android/launcher3/widget/LauncherAppWidgetHostView.java +0 −27 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.launcher3.widget; import android.annotation.TargetApi; import android.appwidget.AppWidgetProviderInfo; import android.content.Context; import android.content.res.Configuration; import android.graphics.Rect; import android.os.Build; import android.os.Handler; Loading @@ -32,7 +31,6 @@ import android.util.SparseBooleanArray; import android.util.SparseIntArray; import android.view.MotionEvent; import android.view.View; import android.view.ViewDebug; import android.view.ViewGroup; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.AdapterView; Loading Loading @@ -79,9 +77,6 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView private final CheckLongPressHelper mLongPressHelper; protected final Launcher mLauncher; @ViewDebug.ExportedProperty(category = "launcher") private boolean mReinflateOnConfigChange; // Maintain the color manager. private final LocalColorExtractor mColorExtractor; Loading Loading @@ -176,17 +171,6 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView // The provider info or the views might have changed. checkIfAutoAdvance(); // It is possible that widgets can receive updates while launcher is not in the foreground. // Consequently, the widgets will be inflated for the orientation of the foreground activity // (framework issue). On resuming, we ensure that any widgets are inflated for the current // orientation. mReinflateOnConfigChange = !isSameOrientation(); } private boolean isSameOrientation() { return mLauncher.getResources().getConfiguration().orientation == mLauncher.getOrientation(); } private boolean checkScrollableRecursively(ViewGroup viewGroup) { Loading Loading @@ -450,17 +434,6 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView scheduleNextAdvance(); } @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); // Only reinflate when the final configuration is same as the required configuration if (mReinflateOnConfigChange && isSameOrientation()) { mReinflateOnConfigChange = false; reInflate(); } } public void reInflate() { if (!isAttachedToWindow()) { return; Loading Loading
src/com/android/launcher3/widget/LauncherAppWidgetHostView.java +0 −27 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.launcher3.widget; import android.annotation.TargetApi; import android.appwidget.AppWidgetProviderInfo; import android.content.Context; import android.content.res.Configuration; import android.graphics.Rect; import android.os.Build; import android.os.Handler; Loading @@ -32,7 +31,6 @@ import android.util.SparseBooleanArray; import android.util.SparseIntArray; import android.view.MotionEvent; import android.view.View; import android.view.ViewDebug; import android.view.ViewGroup; import android.view.accessibility.AccessibilityNodeInfo; import android.widget.AdapterView; Loading Loading @@ -79,9 +77,6 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView private final CheckLongPressHelper mLongPressHelper; protected final Launcher mLauncher; @ViewDebug.ExportedProperty(category = "launcher") private boolean mReinflateOnConfigChange; // Maintain the color manager. private final LocalColorExtractor mColorExtractor; Loading Loading @@ -176,17 +171,6 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView // The provider info or the views might have changed. checkIfAutoAdvance(); // It is possible that widgets can receive updates while launcher is not in the foreground. // Consequently, the widgets will be inflated for the orientation of the foreground activity // (framework issue). On resuming, we ensure that any widgets are inflated for the current // orientation. mReinflateOnConfigChange = !isSameOrientation(); } private boolean isSameOrientation() { return mLauncher.getResources().getConfiguration().orientation == mLauncher.getOrientation(); } private boolean checkScrollableRecursively(ViewGroup viewGroup) { Loading Loading @@ -450,17 +434,6 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView scheduleNextAdvance(); } @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); // Only reinflate when the final configuration is same as the required configuration if (mReinflateOnConfigChange && isSameOrientation()) { mReinflateOnConfigChange = false; reInflate(); } } public void reInflate() { if (!isAttachedToWindow()) { return; Loading