Fixing preview rendering in device search mode
When the flag is disabled, search box may not show in preview
Bug: 177500166
Test: Presubmit
Change-Id: I064ba6ca22e71030056a4ceafea27e6ef0517d01
(cherry picked from commit e733e79946)
This commit is contained in:
1 parent
13fd59d769
commit
70e2d12ef2
2 files changed
+2
-28
No files matched your search
@@ -29,23 +29,8 @@
|
||||
launcher:containerType="workspace"
|
||||
launcher:pageIndicator="@+id/page_indicator"/>
|
||||
|
||||
<com.android.launcher3.Hotseat
|
||||
<include
|
||||
android:id="@+id/hotseat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:importantForAccessibility="no"
|
||||
android:theme="@style/HomeScreenElementTheme"
|
||||
launcher:containerType="hotseat" />
|
||||
|
||||
<com.android.launcher3.InsettableFrameLayout
|
||||
android:id="@+id/apps_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<include
|
||||
android:id="@id/search_container_all_apps"
|
||||
layout="@layout/search_container_all_apps"/>
|
||||
|
||||
</com.android.launcher3.InsettableFrameLayout>
|
||||
layout="@layout/hotseat" />
|
||||
|
||||
</com.android.launcher3.InsettableFrameLayout>
|
||||
@@ -64,7 +64,6 @@ import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.WorkspaceLayoutManager;
|
||||
import com.android.launcher3.allapps.SearchUiManager;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.folder.FolderIcon;
|
||||
import com.android.launcher3.icons.BaseIconFactory;
|
||||
@@ -512,16 +511,6 @@ public class LauncherPreviewRenderer extends ContextThemeWrapper
|
||||
mWorkspace.addViewToCellLayout(qsb, 0, R.id.search_container_workspace, lp, true);
|
||||
}
|
||||
|
||||
// Setup search view
|
||||
SearchUiManager searchUiManager = mRootView.findViewById(R.id.search_container_all_apps);
|
||||
mRootView.findViewById(R.id.apps_view).setTranslationY(
|
||||
mDp.heightPx - searchUiManager.getScrollRangeDelta(mInsets));
|
||||
ViewGroup searchView = (ViewGroup) searchUiManager;
|
||||
searchView.setEnabled(false);
|
||||
for (int i = 0; i < searchView.getChildCount(); i++) {
|
||||
searchView.getChildAt(i).setEnabled(false);
|
||||
}
|
||||
|
||||
measureView(mRootView, mDp.widthPx, mDp.heightPx);
|
||||
dispatchVisibilityAggregated(mRootView, true);
|
||||
measureView(mRootView, mDp.widthPx, mDp.heightPx);
|
||||
|
||||
Reference in new issue
Block a user