Merge "Prevent two pane widget picker code from reaching foldables" into udc-dev am: b326859f27
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22480859 Change-Id: I66d73610edbc68f2b8cbe0750c974b5fb67a14cd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -198,7 +198,9 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher>
|
||||
int widthUsed;
|
||||
if (deviceProfile.isTablet) {
|
||||
int margin = deviceProfile.allAppsLeftRightMargin;
|
||||
if (deviceProfile.isLandscape && LARGE_SCREEN_WIDGET_PICKER.get()) {
|
||||
if (deviceProfile.isLandscape
|
||||
&& LARGE_SCREEN_WIDGET_PICKER.get()
|
||||
&& !deviceProfile.isTwoPanels) {
|
||||
margin = getResources().getDimensionPixelSize(
|
||||
R.dimen.widget_picker_landscape_tablet_left_right_margin);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet
|
||||
super(context, attrs, defStyleAttr);
|
||||
mDeviceProfile = Launcher.getLauncher(context).getDeviceProfile();
|
||||
mHasWorkProfile = context.getSystemService(LauncherApps.class).getProfiles().size() > 1;
|
||||
mOrientation = Launcher.getLauncher(context).getOrientation();
|
||||
mOrientation = context.getResources().getConfiguration().orientation;
|
||||
mAdapters.put(AdapterHolder.PRIMARY, new AdapterHolder(AdapterHolder.PRIMARY));
|
||||
mAdapters.put(AdapterHolder.WORK, new AdapterHolder(AdapterHolder.WORK));
|
||||
mAdapters.put(AdapterHolder.SEARCH, new AdapterHolder(AdapterHolder.SEARCH));
|
||||
@@ -799,7 +799,8 @@ public class WidgetsFullSheet extends BaseWidgetSheet
|
||||
// Checks the orientation of the screen
|
||||
if (LARGE_SCREEN_WIDGET_PICKER.get()
|
||||
&& mOrientation != newConfig.orientation
|
||||
&& mDeviceProfile.isTablet) {
|
||||
&& mDeviceProfile.isTablet
|
||||
&& !mDeviceProfile.isTwoPanels) {
|
||||
mOrientation = newConfig.orientation;
|
||||
handleClose(false);
|
||||
show(Launcher.getLauncher(getContext()), false);
|
||||
|
||||
Reference in New Issue
Block a user