diff options
Diffstat (limited to 'src')
8 files changed, 23 insertions, 30 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 617afcb292..c20494d604 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -20,6 +20,8 @@ import static android.app.admin.DevicePolicyManager.ACTION_DEVICE_POLICY_RESOURC import static com.android.launcher3.LauncherAppState.ACTION_FORCE_ROLOAD; import static com.android.launcher3.config.FeatureFlags.IS_STUDIO_BUILD; +import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING; +import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; @@ -560,6 +562,7 @@ public class LauncherModel extends LauncherApps.Callback implements InstallSessi synchronized (mLock) { // Everything loaded bind the data. mModelLoaded = true; + testLogD(WORK_TAB_MISSING, "launcher model loaded"); } } diff --git a/src/com/android/launcher3/folder/FolderAnimationManager.java b/src/com/android/launcher3/folder/FolderAnimationManager.java index 2ce6c785c2..dd82ecfb95 100644 --- a/src/com/android/launcher3/folder/FolderAnimationManager.java +++ b/src/com/android/launcher3/folder/FolderAnimationManager.java @@ -273,6 +273,8 @@ public class FolderAnimationManager { // {@link #onAnimationEnd} before B reads new UI state from {@link #onAnimationStart}. a.addListener(new AnimatorListenerAdapter() { private CellLayout mCellLayout; + + private boolean mFolderClipChildren; private boolean mFolderClipToPadding; private boolean mContentClipChildren; private boolean mContentClipToPadding; @@ -283,12 +285,14 @@ public class FolderAnimationManager { public void onAnimationStart(Animator animator) { super.onAnimationStart(animator); mCellLayout = mContent.getCurrentCellLayout(); + mFolderClipChildren = mFolder.getClipChildren(); mFolderClipToPadding = mFolder.getClipToPadding(); mContentClipChildren = mContent.getClipChildren(); mContentClipToPadding = mContent.getClipToPadding(); mCellLayoutClipChildren = mCellLayout.getClipChildren(); mCellLayoutClipPadding = mCellLayout.getClipToPadding(); + mFolder.setClipChildren(false); mFolder.setClipToPadding(false); mContent.setClipChildren(false); mContent.setClipToPadding(false); @@ -309,6 +313,7 @@ public class FolderAnimationManager { mFolder.mFooter.setTranslationX(0f); mFolder.mFolderName.setAlpha(1f); + mFolder.setClipChildren(mFolderClipChildren); mFolder.setClipToPadding(mFolderClipToPadding); mContent.setClipChildren(mContentClipChildren); mContent.setClipToPadding(mContentClipToPadding); diff --git a/src/com/android/launcher3/logging/StatsLogManager.java b/src/com/android/launcher3/logging/StatsLogManager.java index 15f353827e..17d3302e69 100644 --- a/src/com/android/launcher3/logging/StatsLogManager.java +++ b/src/com/android/launcher3/logging/StatsLogManager.java @@ -642,6 +642,9 @@ public class StatsLogManager implements ResourceBasedOverride { @UiEvent(doc = "User has swiped upwards from the gesture handle to show transient taskbar.") LAUNCHER_TRANSIENT_TASKBAR_SHOW(1331), + + @UiEvent(doc = "App launched through pending intent") + LAUNCHER_APP_LAUNCH_PENDING_INTENT(1394), ; // ADD MORE diff --git a/src/com/android/launcher3/model/BaseModelUpdateTask.java b/src/com/android/launcher3/model/BaseModelUpdateTask.java index 70c98022fe..44d32d902a 100644 --- a/src/com/android/launcher3/model/BaseModelUpdateTask.java +++ b/src/com/android/launcher3/model/BaseModelUpdateTask.java @@ -16,6 +16,7 @@ package com.android.launcher3.model; import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING; +import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import android.util.Log; @@ -72,7 +73,9 @@ public abstract class BaseModelUpdateTask implements ModelUpdateTask { @Override public final void run() { - if (!Objects.requireNonNull(mModel).isModelLoaded()) { + boolean isModelLoaded = Objects.requireNonNull(mModel).isModelLoaded(); + testLogD(WORK_TAB_MISSING, "modelLoaded: " + isModelLoaded + " forTask: " + this); + if (!isModelLoaded) { if (DEBUG_TASKS) { Log.d(TAG, "Ignoring model task since loader is pending=" + this); } diff --git a/src/com/android/launcher3/util/ContentWriter.java b/src/com/android/launcher3/util/ContentWriter.java index 7c5ef4db0c..9910dc2e70 100644 --- a/src/com/android/launcher3/util/ContentWriter.java +++ b/src/com/android/launcher3/util/ContentWriter.java @@ -106,7 +106,7 @@ public class ContentWriter { public int commit() { if (mCommitParams != null) { - mCommitParams.mDbController.update( + return mCommitParams.mDbController.update( Favorites.TABLE_NAME, getValues(mContext), mCommitParams.mWhere, mCommitParams.mSelectionArgs); } diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java index 515a2d81a5..4b319e5b61 100644 --- a/src/com/android/launcher3/views/ActivityContext.java +++ b/src/com/android/launcher3/views/ActivityContext.java @@ -20,6 +20,7 @@ import static android.window.SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR; import static com.android.launcher3.LauncherSettings.Animation.DEFAULT_NO_ICON; import static com.android.launcher3.logging.KeyboardStateManager.KeyboardState.HIDE; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_KEYBOARD_CLOSED; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_PENDING_INTENT; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP; import static com.android.launcher3.model.WidgetsModel.GO_DISABLE_WIDGETS; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; @@ -305,6 +306,11 @@ public interface ActivityContext { ActivityOptionsWrapper options = getActivityLaunchOptions(v, item); try { intent.send(null, 0, null, null, null, null, options.toBundle()); + if (item != null) { + InstanceId instanceId = new InstanceIdSequence().newInstanceId(); + getStatsLogManager().logger().withItemInfo(item).withInstanceId(instanceId) + .log(LAUNCHER_APP_LAUNCH_PENDING_INTENT); + } return options.onEndCallback; } catch (PendingIntent.CanceledException e) { Toast.makeText(v.getContext(), diff --git a/src/com/android/launcher3/widget/BaseLauncherAppWidgetHostView.java b/src/com/android/launcher3/widget/BaseLauncherAppWidgetHostView.java index 2742882b1f..580b4f11ea 100644 --- a/src/com/android/launcher3/widget/BaseLauncherAppWidgetHostView.java +++ b/src/com/android/launcher3/widget/BaseLauncherAppWidgetHostView.java @@ -105,6 +105,7 @@ public abstract class BaseLauncherAppWidgetHostView extends NavigableAppWidgetHo mEnforcedRectangle); setOutlineProvider(mCornerRadiusEnforcementOutline); setClipToOutline(true); + invalidateOutline(); } /** Returns the corner radius currently enforced, in pixels. */ diff --git a/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java b/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java index 723ea17147..8dd1de4ac8 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java +++ b/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java @@ -42,7 +42,6 @@ import androidx.recyclerview.widget.RecyclerView.Adapter; import androidx.recyclerview.widget.RecyclerView.ViewHolder; import com.android.launcher3.R; -import com.android.launcher3.model.data.PackageItemInfo; import com.android.launcher3.recyclerview.ViewHolderBinder; import com.android.launcher3.util.LabelComparator; import com.android.launcher3.util.PackageUserKey; @@ -58,7 +57,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; -import java.util.Map; import java.util.OptionalInt; import java.util.function.IntSupplier; import java.util.function.Predicate; @@ -174,9 +172,6 @@ public class WidgetsListAdapter extends Adapter<ViewHolder> implements OnHeaderC mAllEntries.clear(); mAllEntries.add(new WidgetListSpaceEntry()); tempEntries.stream().sorted(mRowComparator).forEach(mAllEntries::add); - if (shouldClearVisibleEntries()) { - mVisibleEntries.clear(); - } updateVisibleEntries(); } @@ -426,29 +421,6 @@ public class WidgetsListAdapter extends Adapter<ViewHolder> implements OnHeaderC updateVisibleEntries(); } - /** - * Returns {@code true} if there is a change in {@link #mAllEntries} that results in an - * invalidation of {@link #mVisibleEntries}. e.g. there is change in the device language. - */ - private boolean shouldClearVisibleEntries() { - Map<PackageUserKey, PackageItemInfo> packagesInfo = - mAllEntries.stream() - .filter(entry -> entry instanceof WidgetsListHeaderEntry) - .map(entry -> entry.mPkgItem) - .collect(Collectors.toMap( - entry -> PackageUserKey.fromPackageItemInfo(entry), - entry -> entry)); - for (WidgetsListBaseEntry visibleEntry: mVisibleEntries) { - PackageUserKey key = PackageUserKey.fromPackageItemInfo(visibleEntry.mPkgItem); - PackageItemInfo packageItemInfo = packagesInfo.get(key); - if (packageItemInfo != null - && !visibleEntry.mPkgItem.title.equals(packageItemInfo.title)) { - return true; - } - } - return false; - } - /** Comparator for sorting WidgetListRowEntry based on package title. */ public static class WidgetListBaseRowEntryComparator implements Comparator<WidgetsListBaseEntry> { |