Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 513edaeb authored by Sameer Padala's avatar Sameer Padala
Browse files

Modify code so it compiles on google3

The diamond operator isn't supported on google3 Android projects.

Change-Id: Ie7298b051330bb2cd32426d4c537882faa2f8ebd
parent 04c969ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ public class AppWidgetsRestoredReceiver extends BroadcastReceiver {
     */
    static void restoreAppWidgetIds(Context context, int[] oldWidgetIds, int[] newWidgetIds) {
        final ContentResolver cr = context.getContentResolver();
        final List<Integer> idsToRemove = new ArrayList<>();
        final List<Integer> idsToRemove = new ArrayList<Integer>();
        final AppWidgetManager widgets = AppWidgetManager.getInstance(context);

        for (int i = 0; i < oldWidgetIds.length; i++) {
+4 −3
Original line number Diff line number Diff line
@@ -166,7 +166,8 @@ public class LauncherModel extends BroadcastReceiver
    static final ArrayList<Long> sBgWorkspaceScreens = new ArrayList<Long>();

    // sPendingPackages is a set of packages which could be on sdcard and are not available yet
    static final HashMap<UserHandleCompat, HashSet<String>> sPendingPackages = new HashMap<>();
    static final HashMap<UserHandleCompat, HashSet<String>> sPendingPackages =
            new HashMap<UserHandleCompat, HashSet<String>>();

    // </ only access in worker thread >

@@ -1988,7 +1989,7 @@ public class LauncherModel extends BroadcastReceiver
                                                    + " (check again later)", true);
                                            HashSet<String> pkgs = sPendingPackages.get(user);
                                            if (pkgs == null) {
                                                pkgs = new HashSet<>();
                                                pkgs = new HashSet<String>();
                                                sPendingPackages.put(user, pkgs);
                                            }
                                            pkgs.add(cn.getPackageName());
@@ -2826,7 +2827,7 @@ public class LauncherModel extends BroadcastReceiver
                ArrayList<String> packagesRemoved;
                for (Entry<UserHandleCompat, HashSet<String>> entry : sPendingPackages.entrySet()) {
                    UserHandleCompat user = entry.getKey();
                    packagesRemoved = new ArrayList<>();
                    packagesRemoved = new ArrayList<String>();
                    for (String pkg : entry.getValue()) {
                        if (!launcherApps.isPackageEnabledForProfile(pkg, user)) {
                            Launcher.addDumpLog(TAG, "Package not found: " + pkg, true);
+2 −2
Original line number Diff line number Diff line
@@ -4829,7 +4829,7 @@ public class Workspace extends SmoothPagedView
    void updateShortcutsAndWidgets(ArrayList<AppInfo> apps) {
        // Create a map of the apps to test against
        final HashMap<ComponentName, AppInfo> appsMap = new HashMap<ComponentName, AppInfo>();
        final HashSet<String> pkgNames = new HashSet<>();
        final HashSet<String> pkgNames = new HashSet<String>();
        for (AppInfo ai : apps) {
            appsMap.put(ai.componentName, ai);
            pkgNames.add(ai.componentName.getPackageName());
@@ -4881,7 +4881,7 @@ public class Workspace extends SmoothPagedView

        if (state == ShortcutInfo.PACKAGE_STATE_DEFAULT) {
            // Update any pending widget
            HashSet<String> packages = new HashSet<>();
            HashSet<String> packages = new HashSet<String>();
            packages.add(pkgName);
            restorePendingWidgets(packages);
        }