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

Commit 603d19a3 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Additional logs to track down missing workspace screen. (Bug 11683562)"...

Merge "Additional logs to track down missing workspace screen. (Bug 11683562)" into jb-ub-now-jolly-elf
parents 28b690ab 9f9f00bc
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1616,6 +1616,9 @@ public class LauncherModel extends BroadcastReceiver {

        /** Returns whether this is an upgradge path */
        private boolean loadWorkspace() {
            // Log to disk
            Launcher.addDumpLog(TAG, "11683562 - loadWorkspace()", true);

            final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;

            final Context context = mContext;
@@ -1634,6 +1637,8 @@ public class LauncherModel extends BroadcastReceiver {

            // Check if we need to do any upgrade-path logic
            boolean loadedOldDb = LauncherAppState.getLauncherProvider().justLoadedOldDb();
            // Log to disk
            Launcher.addDumpLog(TAG, "11683562 -   loadedOldDb: " + loadedOldDb, true);

            synchronized (sBgLock) {
                clearSBgDataStructures();
@@ -1950,6 +1955,10 @@ public class LauncherModel extends BroadcastReceiver {
                        }
                    }
                    Collections.sort(sBgWorkspaceScreens);
                    // Log to disk
                    Launcher.addDumpLog(TAG, "11683562 -   maxScreenId: " + maxScreenId, true);
                    Launcher.addDumpLog(TAG, "11683562 -   sBgWorkspaceScreens: " +
                            TextUtils.join(", ", sBgWorkspaceScreens), true);

                    LauncherAppState.getLauncherProvider().updateMaxScreenId(maxScreenId);
                    updateWorkspaceScreenOrder(context, sBgWorkspaceScreens);
@@ -1966,6 +1975,9 @@ public class LauncherModel extends BroadcastReceiver {
                    for (Integer i : orderedScreens.keySet()) {
                        sBgWorkspaceScreens.add(orderedScreens.get(i));
                    }
                    // Log to disk
                    Launcher.addDumpLog(TAG, "11683562 -   sBgWorkspaceScreens: " +
                            TextUtils.join(", ", sBgWorkspaceScreens), true);

                    // Remove any empty screens
                    ArrayList<Long> unusedScreens = new ArrayList<Long>(sBgWorkspaceScreens);
@@ -1979,6 +1991,10 @@ public class LauncherModel extends BroadcastReceiver {

                    // If there are any empty screens remove them, and update.
                    if (unusedScreens.size() != 0) {
                        // Log to disk
                        Launcher.addDumpLog(TAG, "11683562 -   unusedScreens (to be removed): " +
                                TextUtils.join(", ", unusedScreens), true);

                        sBgWorkspaceScreens.removeAll(unusedScreens);
                        updateWorkspaceScreenOrder(context, sBgWorkspaceScreens);
                    }