mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Adding logs to track down missing workspace screen. (Bug 11683562)
Change-Id: I12ef3331ab81004c75229d33afa0a8dd0fa8521c
This commit is contained in:
@@ -534,6 +534,10 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
|
||||
public long insertNewWorkspaceScreen(long screenId, int insertIndex) {
|
||||
// Log to disk
|
||||
Launcher.addDumpLog(TAG, "11683562 - insertNewWorkspaceScreen(): " + screenId +
|
||||
" at index: " + insertIndex, true);
|
||||
|
||||
if (mWorkspaceScreens.containsKey(screenId)) {
|
||||
throw new RuntimeException("Screen id " + screenId + " already exists!");
|
||||
}
|
||||
@@ -627,6 +631,9 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
|
||||
public void addExtraEmptyScreenOnDrag() {
|
||||
// Log to disk
|
||||
Launcher.addDumpLog(TAG, "11683562 - addExtraEmptyScreenOnDrag()", true);
|
||||
|
||||
boolean lastChildOnScreen = false;
|
||||
boolean childOnFinalScreen = false;
|
||||
|
||||
@@ -653,6 +660,9 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
|
||||
public boolean addExtraEmptyScreen() {
|
||||
// Log to disk
|
||||
Launcher.addDumpLog(TAG, "11683562 - addExtraEmptyScreen()", true);
|
||||
|
||||
if (!mWorkspaceScreens.containsKey(EXTRA_EMPTY_SCREEN_ID)) {
|
||||
insertNewWorkspaceScreen(EXTRA_EMPTY_SCREEN_ID);
|
||||
return true;
|
||||
@@ -661,6 +671,9 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
|
||||
private void convertFinalScreenToEmptyScreenIfNecessary() {
|
||||
// Log to disk
|
||||
Launcher.addDumpLog(TAG, "11683562 - convertFinalScreenToEmptyScreenIfNecessary()", true);
|
||||
|
||||
if (hasExtraEmptyScreen() || mScreenOrder.size() == 0) return;
|
||||
long finalScreenId = mScreenOrder.get(mScreenOrder.size() - 1);
|
||||
|
||||
@@ -676,6 +689,9 @@ public class Workspace extends SmoothPagedView
|
||||
// if this is the last non-custom content screen, convert it to the empty screen
|
||||
mWorkspaceScreens.put(EXTRA_EMPTY_SCREEN_ID, finalScreen);
|
||||
mScreenOrder.add(EXTRA_EMPTY_SCREEN_ID);
|
||||
|
||||
// XXX: Do we need to update LM workspace screens here?
|
||||
Launcher.addDumpLog(TAG, "11683562 - extra empty screen: " + finalScreenId, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,6 +701,8 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
public void removeExtraEmptyScreen(final boolean animate, final Runnable onComplete,
|
||||
final int delay, final boolean stripEmptyScreens) {
|
||||
// Log to disk
|
||||
Launcher.addDumpLog(TAG, "11683562 - removeExtraEmptyScreen()", true);
|
||||
if (delay > 0) {
|
||||
postDelayed(new Runnable() {
|
||||
@Override
|
||||
@@ -716,6 +734,9 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
private void fadeAndRemoveEmptyScreen(int delay, int duration, final Runnable onComplete,
|
||||
final boolean stripEmptyScreens) {
|
||||
// Log to disk
|
||||
// XXX: Do we need to update LM workspace screens below?
|
||||
Launcher.addDumpLog(TAG, "11683562 - fadeAndRemoveEmptyScreen()", true);
|
||||
PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat("alpha", 0f);
|
||||
PropertyValuesHolder bgAlpha = PropertyValuesHolder.ofFloat("backgroundAlpha", 0f);
|
||||
|
||||
@@ -759,6 +780,9 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
|
||||
public long commitExtraEmptyScreen() {
|
||||
// Log to disk
|
||||
Launcher.addDumpLog(TAG, "11683562 - commitExtraEmptyScreen()", true);
|
||||
|
||||
int index = getPageIndexForScreenId(EXTRA_EMPTY_SCREEN_ID);
|
||||
CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
|
||||
mWorkspaceScreens.remove(EXTRA_EMPTY_SCREEN_ID);
|
||||
@@ -811,6 +835,9 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
|
||||
public void stripEmptyScreens() {
|
||||
// Log to disk
|
||||
Launcher.addDumpLog(TAG, "11683562 - stripEmptyScreens()", true);
|
||||
|
||||
if (isPageMoving()) {
|
||||
mStripScreensOnPageStopMoving = true;
|
||||
return;
|
||||
@@ -831,6 +858,7 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
int pageShift = 0;
|
||||
for (Long id: removeScreens) {
|
||||
Launcher.addDumpLog(TAG, "11683562 - removing id: " + id, true);
|
||||
CellLayout cl = mWorkspaceScreens.get(id);
|
||||
mWorkspaceScreens.remove(id);
|
||||
mScreenOrder.remove(id);
|
||||
|
||||
Reference in New Issue
Block a user