Merge "Reinflating QBS on resume, if the widget orientation is not same as launcher orientation" into ub-launcher3-burnaby
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user