diff options
author | Winson Chung <winsonc@google.com> | 2014-09-18 23:50:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-18 23:50:38 +0000 |
commit | 56eef1c5c6dd78fd6e9b0ad0190af8b808dc74e5 (patch) | |
tree | b18a3cac3a4a1fdc66c659a5ee9bdf73fa5d08a7 /packages/SystemUI/src/com/android/systemui/recents | |
parent | f7dd908171a12f6a3f91575ac9fd1ef8ba7fefe6 (diff) | |
parent | d751c01aa044014024a7298eb0d08e2e73c65c08 (diff) | |
download | frameworks_base-56eef1c5c6dd78fd6e9b0ad0190af8b808dc74e5.zip frameworks_base-56eef1c5c6dd78fd6e9b0ad0190af8b808dc74e5.tar.gz frameworks_base-56eef1c5c6dd78fd6e9b0ad0190af8b808dc74e5.tar.bz2 |
Merge "Try and bind search widget before initial calculations of transition rects. (Bug 17456094)" into lmp-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java index 702f59a..5caf1ac 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +++ b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java @@ -19,6 +19,7 @@ package com.android.systemui.recents; import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityOptions; +import android.appwidget.AppWidgetHost; import android.appwidget.AppWidgetProviderInfo; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; @@ -32,6 +33,7 @@ import android.graphics.Canvas; import android.graphics.Rect; import android.os.Handler; import android.os.UserHandle; +import android.util.Pair; import android.view.LayoutInflater; import android.view.View; import com.android.systemui.R; @@ -118,6 +120,22 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta // Load the header bar layout reloadHeaderBarLayout(); mBootCompleted = true; + + // Try and pre-emptively bind the search widget on startup to ensure that we + // have the right thumbnail bounds to animate to. + if (Constants.DebugFlags.App.EnableSearchLayout) { + // If there is no id, then bind a new search app widget + if (mConfig.searchBarAppWidgetId < 0) { + AppWidgetHost host = new RecentsAppWidgetHost(mContext, + Constants.Values.App.AppWidgetHostId); + Pair<Integer, AppWidgetProviderInfo> widgetInfo = + mSystemServicesProxy.bindSearchAppWidget(host); + if (widgetInfo != null) { + // Save the app widget id into the settings + mConfig.updateSearchBarAppWidgetId(mContext, widgetInfo.first); + } + } + } } /** Shows the recents */ |