mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Fix issue where custom content would show up on boot (issue 10713745)
Change-Id: I1c03784970fe1a88e2561f1c5367979cda825973
This commit is contained in:
@@ -538,10 +538,14 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
// Ensure that the current page and default page are maintained.
|
||||
mDefaultPage = mOriginalDefaultPage + 1;
|
||||
setCurrentPage(getCurrentPage() + 1);
|
||||
|
||||
// Update the custom content hint
|
||||
mLauncher.updateCustomContentHintVisibility();
|
||||
if (mRestorePage != INVALID_RESTORE_PAGE) {
|
||||
mRestorePage = mRestorePage + 1;
|
||||
} else {
|
||||
setCurrentPage(getCurrentPage() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeCustomContentPage() {
|
||||
@@ -557,10 +561,14 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
// Ensure that the current page and default page are maintained.
|
||||
mDefaultPage = mOriginalDefaultPage - 1;
|
||||
setCurrentPage(getCurrentPage() - 1);
|
||||
|
||||
// Update the custom content hint
|
||||
mLauncher.updateCustomContentHintVisibility();
|
||||
if (mRestorePage != INVALID_RESTORE_PAGE) {
|
||||
mRestorePage = mRestorePage - 1;
|
||||
} else {
|
||||
setCurrentPage(getCurrentPage() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void addToCustomContentPage(View customContent, CustomContentCallbacks callbacks,
|
||||
@@ -3722,6 +3730,10 @@ public class Workspace extends SmoothPagedView
|
||||
return mDragInfo;
|
||||
}
|
||||
|
||||
public int getRestorePage() {
|
||||
return getNextPage() - numCustomPages();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the nearest cell where the given object would be dropped.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user