diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-04-03 09:23:43 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-04-03 09:26:48 -0700 |
commit | 22235bcb40071af464fc9accf0fbf082056182f7 (patch) | |
tree | 0c739da9040bfe8ce238d0420a05c6c9f46fbad6 | |
parent | 1d4a2df091e2b5928406ea503321563a0ec8a01e (diff) | |
download | android_packages_apps_Trebuchet-22235bcb40071af464fc9accf0fbf082056182f7.tar.gz android_packages_apps_Trebuchet-22235bcb40071af464fc9accf0fbf082056182f7.tar.bz2 android_packages_apps_Trebuchet-22235bcb40071af464fc9accf0fbf082056182f7.zip |
Reinflating QBS on resume, if the widget orientation is not same as launcher orientation
Bug: 20044969
Change-Id: I5c285ddb09fc8b5d8444795eda64cd28486ab81d
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 8a21d624c..c040d93f2 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -1047,6 +1047,7 @@ public class Launcher extends Activity // (framework issue). On resuming, we ensure that any widgets are inflated for the current // orientation. getWorkspace().reinflateWidgetsIfNecessary(); + reinflateQSBIfNecessary(); // Process any items that were added while Launcher was away. InstallShortcutReceiver.disableAndFlushInstallQueue(this); @@ -3505,6 +3506,15 @@ public class Launcher extends Activity return mQsb; } + private void reinflateQSBIfNecessary() { + if (mQsb instanceof LauncherAppWidgetHostView && + ((LauncherAppWidgetHostView) mQsb).isReinflateRequired()) { + mSearchDropTargetBar.removeView(mQsb); + mQsb = null; + mSearchDropTargetBar.setQsbSearchBar(getOrCreateQsbBar()); + } + } + @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { final boolean result = super.dispatchPopulateAccessibilityEvent(event); |