Merge branch 'android14-release' into 14-dev
This commit is contained in:
1 parent
5931c9afec
commit
32700b0100
994 files changed
+36404
-15826
No files matched your search
@@ -40,9 +40,7 @@ import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.icons.BitmapInfo;
|
||||
import com.android.launcher3.icons.IconCache;
|
||||
import com.android.launcher3.icons.LauncherIcons;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
@@ -50,6 +48,7 @@ import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
import com.android.launcher3.pm.PackageInstallInfo;
|
||||
import com.android.launcher3.pm.UserCache;
|
||||
import com.android.launcher3.shortcuts.ShortcutRequest;
|
||||
import com.android.launcher3.testing.shared.TestProtocol;
|
||||
import com.android.launcher3.util.FlagOp;
|
||||
import com.android.launcher3.util.IntSet;
|
||||
import com.android.launcher3.util.ItemInfoMatcher;
|
||||
@@ -76,7 +75,7 @@ import app.lawnchair.preferences.PreferenceManager;
|
||||
*/
|
||||
public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
private static boolean DEBUG = false;
|
||||
private static final String TAG = "PackageUpdatedTask";
|
||||
|
||||
public static final int OP_NONE = 0;
|
||||
@@ -101,6 +100,11 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
mOp = op;
|
||||
mUser = user;
|
||||
mPackages = packages;
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.WORK_TAB_MISSING, "PackageUpdatedTask mOp: " + mOp +
|
||||
" packageCount: " + mPackages.length + " user: " + user);
|
||||
DEBUG = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -146,6 +150,9 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
// The update may have changed which shortcuts/widgets are available.
|
||||
// Refresh the widgets for the package if we have an activity running.
|
||||
Launcher launcher = Launcher.ACTIVITY_TRACKER.getCreatedActivity();
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.WORK_TAB_MISSING, "launcher: " + launcher);
|
||||
}
|
||||
if (launcher != null) {
|
||||
launcher.refreshAndBindWidgetsForPackageUser(
|
||||
new PackageUserKey(packages[i], mUser));
|
||||
@@ -229,18 +236,6 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
boolean infoUpdated = false;
|
||||
boolean shortcutUpdated = false;
|
||||
|
||||
// Update shortcuts which use iconResource.
|
||||
if ((si.iconResource != null)
|
||||
&& packageSet.contains(si.iconResource.packageName)) {
|
||||
LauncherIcons li = LauncherIcons.obtain(context);
|
||||
BitmapInfo iconInfo = li.createIconBitmap(si.iconResource);
|
||||
li.recycle();
|
||||
if (iconInfo != null) {
|
||||
si.bitmap = iconInfo;
|
||||
infoUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
ComponentName cn = si.getTargetComponent();
|
||||
if (cn != null && matcher.test(si)) {
|
||||
String packageName = cn.getPackageName();
|
||||
|
||||
Reference in new issue
Block a user