Merge branch 'android15-release' into merge-aosp15

This commit is contained in:
MrSluffy committed 2024-09-14 17:29:57 +08:00
commit eeb7416bfe
1401 files changed
+86072 -39248

No files matched your search

@@ -26,6 +26,7 @@ import android.util.Log;
import androidx.annotation.NonNull;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherModel.ModelUpdateTask;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.shortcuts.ShortcutKey;
@@ -43,7 +44,7 @@ import java.util.Iterator;
/**
* Task to handle changing of lock state of the user
*/
public class UserLockStateChangedTask extends BaseModelUpdateTask {
public class UserLockStateChangedTask implements ModelUpdateTask {
@NonNull
private final UserHandle mUser;
@@ -55,8 +56,9 @@ public class UserLockStateChangedTask extends BaseModelUpdateTask {
}
@Override
public void execute(@NonNull final LauncherAppState app, @NonNull final BgDataModel dataModel,
@NonNull final AllAppsList apps) {
public void execute(@NonNull ModelTaskController taskController, @NonNull BgDataModel dataModel,
@NonNull AllAppsList apps) {
LauncherAppState app = taskController.getApp();
Context context = app.getContext();
HashMap<ShortcutKey, ShortcutInfo> pinnedShortcuts = new HashMap<>();
@@ -108,9 +110,10 @@ public class UserLockStateChangedTask extends BaseModelUpdateTask {
}
});
}
bindUpdatedWorkspaceItems(updatedWorkspaceItemInfos);
taskController.bindUpdatedWorkspaceItems(updatedWorkspaceItemInfos);
if (!removedKeys.isEmpty()) {
deleteAndBindComponentsRemoved(ItemInfoMatcher.ofShortcutKeys(removedKeys),
taskController.deleteAndBindComponentsRemoved(
ItemInfoMatcher.ofShortcutKeys(removedKeys),
"removed during unlock because it's no longer available"
+ " (possibly due to clear data)");
}
@@ -128,6 +131,6 @@ public class UserLockStateChangedTask extends BaseModelUpdateTask {
null, mUser,
new ShortcutRequest(context, mUser).query(ShortcutRequest.ALL));
}
bindDeepShortcuts(dataModel);
taskController.bindDeepShortcuts(dataModel);
}
}