Merge "Fixing preview rendering in device search mode"

This commit is contained in:
Sunny Goyal 2021-01-15 19:20:26 +00:00 committed by Android (Google) Code Review
commit b18501402c
2 changed files with 2 additions and 28 deletions

View File

@ -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>

View File

@ -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);