Merge "Add taskbarIconSize to GridOption/DisplayOptions" into tm-qpr-dev
diff --git a/quickstep/res/layout/taskbar_edu_tooltip.xml b/quickstep/res/layout/taskbar_edu_tooltip.xml
index 29f4956..3fcd713 100644
--- a/quickstep/res/layout/taskbar_edu_tooltip.xml
+++ b/quickstep/res/layout/taskbar_edu_tooltip.xml
@@ -21,6 +21,8 @@
android:clipChildren="false"
android:clipToPadding="false"
android:fitsSystemWindows="true"
+ android:focusable="true"
+ android:importantForAccessibility="yes"
android:gravity="center"
android:orientation="vertical">
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
index 681ae53..547f462 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
@@ -30,8 +30,7 @@
import static com.android.launcher3.taskbar.TaskbarAutohideSuspendController.FLAG_AUTOHIDE_SUSPEND_FULLSCREEN;
import static com.android.launcher3.taskbar.TaskbarManager.FLAG_HIDE_NAVBAR_WINDOW;
import static com.android.launcher3.testing.shared.ResourceUtils.getBoolByName;
-import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
-import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
+import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
import android.animation.AnimatorSet;
@@ -568,9 +567,8 @@
public void updateSysuiStateFlags(int systemUiStateFlags, boolean fromInit) {
mControllers.navbarButtonsViewController.updateStateForSysuiFlags(systemUiStateFlags,
fromInit);
- int shadeExpandedFlags = SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED
- | SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
- onNotificationShadeExpandChanged((systemUiStateFlags & shadeExpandedFlags) != 0, fromInit);
+ boolean isShadeVisible = (systemUiStateFlags & SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE) != 0;
+ onNotificationShadeExpandChanged(isShadeVisible, fromInit);
mControllers.taskbarViewController.setRecentsButtonDisabled(
mControllers.navbarButtonsViewController.isRecentsDisabled()
|| isNavBarKidsModeActive());
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt
index 580d391..0215a3f 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarBackgroundRenderer.kt
@@ -22,6 +22,7 @@
import android.graphics.Path
import android.graphics.RectF
import com.android.launcher3.R
+import com.android.launcher3.Utilities
import com.android.launcher3.Utilities.mapRange
import com.android.launcher3.Utilities.mapToRange
import com.android.launcher3.anim.Interpolators
@@ -31,6 +32,9 @@
/** Helps draw the taskbar background, made up of a rectangle plus two inverted rounded corners. */
class TaskbarBackgroundRenderer(context: TaskbarActivityContext) {
+ private val DARK_THEME_SHADOW_ALPHA = 51f
+ private val LIGHT_THEME_SHADOW_ALPHA = 25f
+
val paint = Paint()
val lastDrawnTransientRect = RectF()
var backgroundHeight = context.deviceProfile.taskbarHeight.toFloat()
@@ -42,6 +46,7 @@
private val isTransientTaskbar = DisplayController.isTransientTaskbar(context)
+ private val shadowAlpha: Float
private var shadowBlur = 0f
private var keyShadowDistance = 0f
private var bottomMargin = 0
@@ -73,6 +78,10 @@
keyShadowDistance = res.getDimension(R.dimen.transient_taskbar_key_shadow_distance)
}
+ shadowAlpha =
+ if (Utilities.isDarkTheme(context)) DARK_THEME_SHADOW_ALPHA
+ else LIGHT_THEME_SHADOW_ALPHA
+
setCornerRoundness(DEFAULT_ROUNDNESS)
}
@@ -142,13 +151,13 @@
-mapRange(1f - progress, 0f, stashedHandleHeight / 2f)
// Draw shadow.
- val shadowAlpha =
- mapToRange(paint.alpha.toFloat(), 0f, 255f, 0f, 25f, Interpolators.LINEAR)
+ val newShadowAlpha =
+ mapToRange(paint.alpha.toFloat(), 0f, 255f, 0f, shadowAlpha, Interpolators.LINEAR)
paint.setShadowLayer(
shadowBlur,
0f,
keyShadowDistance,
- setColorAlphaBound(Color.BLACK, Math.round(shadowAlpha))
+ setColorAlphaBound(Color.BLACK, Math.round(newShadowAlpha))
)
lastDrawnTransientRect.set(
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltipController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltipController.kt
index b6a7998..bd8e346 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltipController.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltipController.kt
@@ -17,10 +17,13 @@
import android.graphics.PorterDuff.Mode.SRC_ATOP
import android.graphics.PorterDuffColorFilter
+import android.os.Bundle
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.ViewGroup
+import android.view.accessibility.AccessibilityEvent
+import android.view.accessibility.AccessibilityNodeInfo
import androidx.annotation.IntDef
import androidx.annotation.LayoutRes
import com.airbnb.lottie.LottieAnimationView
@@ -153,6 +156,7 @@
FLAG_AUTOHIDE_SUSPEND_EDU_OPEN,
true
)
+
tooltip.onCloseCallback = {
this.tooltip = null
controllers.taskbarAutohideSuspendController.updateFlag(
@@ -161,11 +165,47 @@
)
controllers.taskbarStashController.updateAndAnimateTransientTaskbar(true)
}
+ tooltip.accessibilityDelegate = createAccessibilityDelegate()
overlayContext.layoutInflater.inflate(contentResId, tooltip.content, true)
this.tooltip = tooltip
}
+ private fun createAccessibilityDelegate() =
+ object : View.AccessibilityDelegate() {
+ override fun performAccessibilityAction(
+ host: View?,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ if (action == R.id.close) {
+ hide()
+ return true
+ }
+ return super.performAccessibilityAction(host, action, args)
+ }
+
+ override fun onPopulateAccessibilityEvent(host: View?, event: AccessibilityEvent?) {
+ super.onPopulateAccessibilityEvent(host, event)
+ if (event?.eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
+ event.text?.add(host?.context?.getText(R.string.taskbar_edu_a11y_title))
+ }
+ }
+
+ override fun onInitializeAccessibilityNodeInfo(
+ host: View?,
+ info: AccessibilityNodeInfo?
+ ) {
+ super.onInitializeAccessibilityNodeInfo(host, info)
+ info?.addAction(
+ AccessibilityNodeInfo.AccessibilityAction(
+ R.id.close,
+ host?.context?.getText(R.string.taskbar_edu_close)
+ )
+ )
+ }
+ }
+
override fun dumpLogs(prefix: String?, pw: PrintWriter?) {
pw?.println(prefix + "TaskbarEduTooltipController:")
pw?.println("$prefix\tisTooltipEnabled=$isTooltipEnabled")
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarKeyguardController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarKeyguardController.java
index 8cc8965..edcd4c8 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarKeyguardController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarKeyguardController.java
@@ -5,6 +5,7 @@
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BACK_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_DEVICE_DOZING;
+import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_DEVICE_DREAMING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_ON;
@@ -34,7 +35,8 @@
// locked.
public static final int MASK_ANY_SYSUI_LOCKED = SYSUI_STATE_BOUNCER_SHOWING
| SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING
- | SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED;
+ | SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING_OCCLUDED
+ | SYSUI_STATE_DEVICE_DREAMING;
private final TaskbarActivityContext mContext;
private int mKeyguardSysuiFlags;
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
index d997f56..cf8148e 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
@@ -457,8 +457,13 @@
animatorSet.play(mTaskbarCornerRoundness.animateToValue(cornerRoundness));
}
- if (hasAnyFlag(changedFlags, FLAG_DEVICE_LOCKED)) {
- // When transitioning between locked/unlocked, there is no stashing animation.
+ // Keep isUnlockTransition in sync with its counterpart in
+ // TaskbarStashController#createAnimToIsStashed.
+ boolean isUnlockTransition =
+ hasAnyFlag(changedFlags, FLAG_DEVICE_LOCKED) && !hasAnyFlag(FLAG_DEVICE_LOCKED);
+ if (isUnlockTransition) {
+ // When transitioning to unlocked, ensure the hotseat is fully visible from the
+ // beginning. The hotseat itself is animated by LauncherUnlockAnimationController.
mIconAlignment.cancelAnimation();
// updateValue ensures onIconAlignmentRatioChanged will be called if there is an actual
// change in value
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
index b1f984f..41d35cf 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
@@ -32,8 +32,7 @@
import static com.android.launcher3.util.FlagDebugUtils.formatFlagChange;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_SHOWING;
-import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
-import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
+import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
import android.animation.Animator;
@@ -570,9 +569,12 @@
// already stashed Taskbar.
boolean hotseatTopElement = mControllers.uiController.isHotseatIconOnTopWhenAligned()
|| !hasAnyFlag(changedFlags, FLAG_IN_APP);
- // If transitioning between locked/unlocked device, do not play a stash animation.
- boolean unLockedTransition = hasAnyFlag(changedFlags, FLAG_STASHED_DEVICE_LOCKED);
- boolean skipStashAnimation = !hotseatTopElement || unLockedTransition;
+ // If transitioning to unlocked device, do not play a stash animation.
+ // Keep isUnlockTransition in sync with its counterpart in
+ // TaskbarLauncherStateController#onStateChangeApplied.
+ boolean isUnlockTransition = hasAnyFlag(changedFlags, FLAG_STASHED_DEVICE_LOCKED)
+ && !hasAnyFlag(FLAG_STASHED_DEVICE_LOCKED);
+ boolean skipStashAnimation = !hotseatTopElement || isUnlockTransition;
if (isTransientTaskbar) {
createTransientAnimToIsStashed(mAnimator, isStashed, duration, animateBg, changedFlags,
@@ -891,12 +893,20 @@
long startDelay = 0;
updateStateForFlag(FLAG_STASHED_IN_APP_SYSUI, hasAnyFlag(systemUiStateFlags,
- SYSUI_STATE_QUICK_SETTINGS_EXPANDED
- | SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED));
+ SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE));
updateStateForFlag(FLAG_STASHED_SYSUI,
hasAnyFlag(systemUiStateFlags, SYSUI_STATE_SCREEN_PINNING));
- updateStateForFlag(FLAG_STASHED_DEVICE_LOCKED,
- hasAnyFlag(systemUiStateFlags, MASK_ANY_SYSUI_LOCKED));
+
+ boolean isLocked = hasAnyFlag(systemUiStateFlags, MASK_ANY_SYSUI_LOCKED);
+ boolean wasLocked = hasAnyFlag(FLAG_STASHED_DEVICE_LOCKED);
+ updateStateForFlag(FLAG_STASHED_DEVICE_LOCKED, isLocked);
+
+ if (isLocked && !wasLocked && DisplayController.isTransientTaskbar(mActivity)) {
+ // Stash the transient taskbar when locking the device. This improves the transition
+ // to AoD (otherwise the taskbar stays a bit too long above the collapsing AoD scrim),
+ // and ensures the taskar state is reset when unlocking the device afterwards.
+ updateStateForFlag(FLAG_STASHED_IN_APP_AUTO, true);
+ }
// Only update FLAG_STASHED_IN_APP_IME when system gesture is not in progress.
mIsImeShowing = hasAnyFlag(systemUiStateFlags, SYSUI_STATE_IME_SHOWING);
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
index 13de470..1b888c9 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -20,10 +20,11 @@
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_OPTIMIZE_MEASURE;
import static android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED;
+import static com.android.launcher3.LauncherSettings.Animation.DEFAULT_NO_ICON;
+import static com.android.launcher3.LauncherSettings.Animation.VIEW_BACKGROUND;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT;
-import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_SEARCH_ACTION;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
@@ -1068,7 +1069,8 @@
activityOptions.options.setSourceInfo(ActivityOptions.SourceInfo.TYPE_LAUNCHER,
mLastTouchUpTime);
}
- if (item != null && item.itemType == ITEM_TYPE_SEARCH_ACTION) {
+ if (item != null && (item.animationType == DEFAULT_NO_ICON
+ || item.animationType == VIEW_BACKGROUND)) {
activityOptions.options.setSplashScreenStyle(
SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR);
} else {
diff --git a/res/values/id.xml b/res/values/id.xml
index dc81944..7b812de 100644
--- a/res/values/id.xml
+++ b/res/values/id.xml
@@ -28,6 +28,7 @@
<item type="id" name="home" />
<item type="id" name="recent_apps" />
<item type="id" name="back" />
+ <item type="id" name="close"/>
<item type="id" name="ime_switcher" />
<item type="id" name="accessibility_button" />
<item type="id" name="rotate_suggestion" />
@@ -41,4 +42,5 @@
<item type="id" name="saved_floating_widget_foreground" />
<item type="id" name="saved_floating_widget_background" />
+
</resources>
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 4472383..ad95f7e 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -285,6 +285,10 @@
Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE.equals(action) ||
Intent.ACTION_MANAGED_PROFILE_UNLOCKED.equals(action)) {
UserHandle user = intent.getParcelableExtra(Intent.EXTRA_USER);
+ if (TestProtocol.sDebugTracing) {
+ Log.d(TestProtocol.WORK_TAB_MISSING, "onBroadcastIntent intentAction: " + action +
+ " user: " + user);
+ }
if (user != null) {
if (Intent.ACTION_MANAGED_PROFILE_AVAILABLE.equals(action) ||
Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE.equals(action)) {
diff --git a/src/com/android/launcher3/LauncherSettings.java b/src/com/android/launcher3/LauncherSettings.java
index cef00d9..6e3e96c 100644
--- a/src/com/android/launcher3/LauncherSettings.java
+++ b/src/com/android/launcher3/LauncherSettings.java
@@ -41,6 +41,10 @@
* An animation using the view's background.
*/
public static final int VIEW_BACKGROUND = 1;
+ /**
+ * The default animation for a given view/item info type, but without the splash icon.
+ */
+ public static final int DEFAULT_NO_ICON = 2;
}
/**
diff --git a/src/com/android/launcher3/graphics/GridCustomizationsProvider.java b/src/com/android/launcher3/graphics/GridCustomizationsProvider.java
index 2c8f1f3..ae5d8d4 100644
--- a/src/com/android/launcher3/graphics/GridCustomizationsProvider.java
+++ b/src/com/android/launcher3/graphics/GridCustomizationsProvider.java
@@ -66,6 +66,9 @@
private static final String KEY_SURFACE_PACKAGE = "surface_package";
private static final String KEY_CALLBACK = "callback";
+ public static final String KEY_HIDE_BOTTOM_ROW = "hide_bottom_row";
+
+ private static final int MESSAGE_ID_UPDATE_PREVIEW = 1337;
private final ArrayMap<IBinder, PreviewLifecycleObserver> mActivePreviews = new ArrayMap<>();
@@ -79,7 +82,7 @@
String[] selectionArgs, String sortOrder) {
switch (uri.getPath()) {
case KEY_LIST_OPTIONS: {
- MatrixCursor cursor = new MatrixCursor(new String[] {
+ MatrixCursor cursor = new MatrixCursor(new String[]{
KEY_NAME, KEY_ROWS, KEY_COLS, KEY_PREVIEW_COUNT, KEY_IS_DEFAULT});
InvariantDeviceProfile idp = InvariantDeviceProfile.INSTANCE.get(getContext());
for (GridOption gridOption : idp.parseAllGridOptions(getContext())) {
@@ -95,7 +98,7 @@
}
case GET_ICON_THEMED:
case ICON_THEMED: {
- MatrixCursor cursor = new MatrixCursor(new String[] {BOOLEAN_VALUE});
+ MatrixCursor cursor = new MatrixCursor(new String[]{BOOLEAN_VALUE});
cursor.newRow().add(BOOLEAN_VALUE, isThemedIconEnabled(getContext()) ? 1 : 0);
return cursor;
}
@@ -224,7 +227,14 @@
@Override
public boolean handleMessage(Message message) {
- destroyObserver(this);
+ if (destroyed) {
+ return true;
+ }
+ if (message.what == MESSAGE_ID_UPDATE_PREVIEW) {
+ renderer.hideBottomRow(message.getData().getBoolean(KEY_HIDE_BOTTOM_ROW));
+ } else {
+ destroyObserver(this);
+ }
return true;
}
diff --git a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
index b061f8f..7f49aa9 100644
--- a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
+++ b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
@@ -344,6 +344,25 @@
return mHotseat;
}
+ /**
+ * Hides the components in the bottom row.
+ *
+ * @param hide True to hide and false to show.
+ */
+ public void hideBottomRow(boolean hide) {
+ mUiHandler.post(() -> {
+ if (mDp.isTaskbarPresent) {
+ // hotseat icons on bottom
+ mHotseat.setIconsAlpha(hide ? 0 : 1);
+ if (mDp.isQsbInline) {
+ mHotseat.setQsbAlpha(hide ? 0 : 1);
+ }
+ } else {
+ mHotseat.setQsbAlpha(hide ? 0 : 1);
+ }
+ });
+ }
+
@Override
public CellLayout getScreenWithId(int screenId) {
return mWorkspaceScreens.get(screenId);
diff --git a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
index 85c0a7a..0767e69 100644
--- a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
+++ b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
@@ -87,6 +87,8 @@
private final SurfaceControlViewHost mSurfaceControlViewHost;
private boolean mDestroyed = false;
+ private LauncherPreviewRenderer mRenderer;
+ private boolean mHideQsb;
public PreviewSurfaceRenderer(Context context, Bundle bundle) throws Exception {
mContext = context;
@@ -97,6 +99,7 @@
gridName = InvariantDeviceProfile.getCurrentGridName(context);
}
mWallpaperColors = bundle.getParcelable(KEY_COLORS);
+ mHideQsb = bundle.getBoolean(GridCustomizationsProvider.KEY_HIDE_BOTTOM_ROW);
mIdp = new InvariantDeviceProfile(context, gridName);
mHostToken = bundle.getBinder(KEY_HOST_TOKEN);
@@ -174,6 +177,17 @@
MODEL_EXECUTOR.execute(this::loadModelData);
}
+ /**
+ * Hides the components in the bottom row.
+ *
+ * @param hide True to hide and false to show.
+ */
+ public void hideBottomRow(boolean hide) {
+ if (mRenderer != null) {
+ mRenderer.hideBottomRow(hide);
+ }
+ }
+
@WorkerThread
private void loadModelData() {
final boolean migrated = doGridMigrationIfNecessary();
@@ -209,8 +223,8 @@
DeviceProfile deviceProfile = mIdp.getDeviceProfile(previewContext);
String query =
LauncherSettings.Favorites.SCREEN + " = " + Workspace.FIRST_SCREEN_ID
- + " or " + LauncherSettings.Favorites.CONTAINER + " = "
- + LauncherSettings.Favorites.CONTAINER_HOTSEAT;
+ + " or " + LauncherSettings.Favorites.CONTAINER + " = "
+ + LauncherSettings.Favorites.CONTAINER_HOTSEAT;
if (deviceProfile.isTwoPanels) {
query += " or " + LauncherSettings.Favorites.SCREEN + " = "
+ Workspace.SECOND_SCREEN_ID;
@@ -254,8 +268,10 @@
if (mDestroyed) {
return;
}
- View view = new LauncherPreviewRenderer(inflationContext, mIdp, mWallpaperColors,
- launcherWidgetSpanInfo).getRenderedView(dataModel, widgetProviderInfoMap);
+ mRenderer = new LauncherPreviewRenderer(inflationContext, mIdp,
+ mWallpaperColors, launcherWidgetSpanInfo);
+ mRenderer.hideBottomRow(mHideQsb);
+ View view = mRenderer.getRenderedView(dataModel, widgetProviderInfoMap);
// This aspect scales the view to fit in the surface and centers it
final float scale = Math.min(mWidth / (float) view.getMeasuredWidth(),
mHeight / (float) view.getMeasuredHeight());
diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java
index b6f6223..10f40b7 100644
--- a/src/com/android/launcher3/views/ActivityContext.java
+++ b/src/com/android/launcher3/views/ActivityContext.java
@@ -45,6 +45,7 @@
import android.view.WindowInsetsController;
import android.view.inputmethod.InputMethodManager;
import android.widget.Toast;
+import android.window.SplashScreen;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -320,7 +321,14 @@
return false;
}
- Bundle optsBundle = (v != null) ? getActivityLaunchOptions(v, item).toBundle() : null;
+ Bundle optsBundle = null;
+ if (v != null) {
+ optsBundle = getActivityLaunchOptions(v, item).toBundle();
+ } else if (item != null && item.animationType == LauncherSettings.Animation.DEFAULT_NO_ICON
+ && Utilities.ATLEAST_T) {
+ optsBundle = ActivityOptions.makeBasic()
+ .setSplashScreenStyle(SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR).toBundle();
+ }
UserHandle user = item == null ? null : item.user;
// Prepare intent
diff --git a/tests/src/com/android/launcher3/ui/WorkProfileTest.java b/tests/src/com/android/launcher3/ui/WorkProfileTest.java
index 9eeea24..c22f93d 100644
--- a/tests/src/com/android/launcher3/ui/WorkProfileTest.java
+++ b/tests/src/com/android/launcher3/ui/WorkProfileTest.java
@@ -72,7 +72,8 @@
}
updateWorkProfileSetupSuccessful("am start-user", output);
- Log.d(WORK_TAB_MISSING, "workProfileSuccessful? " + mWorkProfileSetupSuccessful);
+ Log.d(WORK_TAB_MISSING, "workProfileSuccessful? " + mWorkProfileSetupSuccessful +
+ " shellCmd: " + logStr);
if (!mWorkProfileSetupSuccessful) {
return; // no need to setup launcher since all tests will skip.
}