Merge remote-tracking branch 'aosp/android12L-release' into 12.1-dev
This commit is contained in:
commit
11e1a2fdc8
825 files changed
+38322
-29268
No files matched your search
@@ -17,10 +17,15 @@
|
||||
package com.android.launcher3.uioverrides;
|
||||
|
||||
import android.app.Person;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.view.Display;
|
||||
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.quickstep.SysUINavigationMode;
|
||||
import com.android.quickstep.SysUINavigationMode.Mode;
|
||||
|
||||
public class ApiWrapper {
|
||||
|
||||
@@ -38,4 +43,31 @@ public class ApiWrapper {
|
||||
public static boolean isInternalDisplay(Display display) {
|
||||
return display.getType() == Display.TYPE_INTERNAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a unique ID representing the display
|
||||
*/
|
||||
public static String getUniqueId(Display display) {
|
||||
return display.getUniqueId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum space that should be left empty at the end of hotseat
|
||||
*/
|
||||
public static int getHotseatEndOffset(Context context) {
|
||||
if (SysUINavigationMode.INSTANCE.get(context).getMode() == Mode.THREE_BUTTONS) {
|
||||
Resources res = context.getResources();
|
||||
/*
|
||||
* 3 nav buttons +
|
||||
* Little space at the end for contextual buttons +
|
||||
* Little space between icons and nav buttons
|
||||
*/
|
||||
return 3 * res.getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size)
|
||||
+ res.getDimensionPixelSize(R.dimen.taskbar_contextual_button_margin)
|
||||
+ res.getDimensionPixelSize(R.dimen.taskbar_hotseat_nav_spacing);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user