static final boolean DEBUG_WIDGETS = false;
static final boolean DEBUG_STRICT_MODE = false;
static final boolean DEBUG_RESUME_TIME = false;
+ static final boolean DEBUG_DUMP_LOG = false;
private static final int REQUEST_CREATE_SHORTCUT = 1;
private static final int REQUEST_CREATE_APPWIDGET = 5;
if (DEBUG_RESUME_TIME) {
Log.d(TAG, "Time spent in onResume: " + (System.currentTimeMillis() - startTime));
}
-
- // Write all the logs to disk
- Launcher.addDumpLog(TAG, "10249126 - onResume() - dumping logs to disk", true);
- dumpLogsToLocalData(false);
}
@Override
mPaused = true;
mDragController.cancelDrag();
mDragController.resetLastGestureUpTime();
-
- // Write all the logs to disk
- Launcher.addDumpLog(TAG, "10249126 - onPause() - dumping logs to disk", true);
- dumpLogsToLocalData(false);
}
protected void onFinishBindingItems() {
public void bindAddScreens(ArrayList<Long> orderedScreenIds) {
int count = orderedScreenIds.size();
for (int i = 0; i < count; i++) {
- Launcher.addDumpLog(TAG, "10249126 - bindAddScreens(" + orderedScreenIds.get(i) + ")", true);
mWorkspace.insertNewWorkspaceScreenBeforeEmptyScreen(orderedScreenIds.get(i));
}
}
return;
}
- Launcher.addDumpLog(TAG, "10249126 - bindAppsAdded(" + newScreens.size() + ")", true);
-
// Add the new screens
bindAddScreens(newScreens);
onFinishBindingItems();
}
});
-
- // Write all the logs to disk
- Launcher.addDumpLog(TAG, "10249126 - finishBindingItems() - dumping logs to disk", true);
- dumpLogsToLocalData(false);
}
private boolean canRunNewAppsAnimation() {
}
public static void dumpDebugLogsToConsole() {
- synchronized (sDumpLogs) {
- Log.d(TAG, "");
- Log.d(TAG, "*********************");
- Log.d(TAG, "Launcher debug logs: ");
- for (int i = 0; i < sDumpLogs.size(); i++) {
- Log.d(TAG, " " + sDumpLogs.get(i));
+ if (DEBUG_DUMP_LOG) {
+ synchronized (sDumpLogs) {
+ Log.d(TAG, "");
+ Log.d(TAG, "*********************");
+ Log.d(TAG, "Launcher debug logs: ");
+ for (int i = 0; i < sDumpLogs.size(); i++) {
+ Log.d(TAG, " " + sDumpLogs.get(i));
+ }
+ Log.d(TAG, "*********************");
+ Log.d(TAG, "");
}
- Log.d(TAG, "*********************");
- Log.d(TAG, "");
}
}
if (debugLog) {
Log.d(tag, log);
}
- sDateStamp.setTime(System.currentTimeMillis());
- synchronized (sDumpLogs) {
- sDumpLogs.add(sDateFormat.format(sDateStamp) + ": " + tag + ", " + log);
+ if (DEBUG_DUMP_LOG) {
+ sDateStamp.setTime(System.currentTimeMillis());
+ synchronized (sDumpLogs) {
+ sDumpLogs.add(sDateFormat.format(sDateStamp) + ": " + tag + ", " + log);
+ }
}
}
- public void dumpLogsToLocalData(final boolean email) {
- new Thread("DumpLogsToLocalData") {
- @Override
- public void run() {
- boolean success = false;
- sDateStamp.setTime(sRunStart);
- String FILENAME = sDateStamp.getMonth() + "-"
- + sDateStamp.getDay() + "_"
- + sDateStamp.getHours() + "-"
- + sDateStamp.getMinutes() + "_"
- + sDateStamp.getSeconds() + ".txt";
-
- FileOutputStream fos = null;
- File outFile = null;
- try {
- outFile = new File(getFilesDir(), FILENAME);
- outFile.createNewFile();
- fos = new FileOutputStream(outFile);
- } catch (Exception e) {
- e.printStackTrace();
- }
- if (fos != null) {
- PrintWriter writer = new PrintWriter(fos);
-
- writer.println(" ");
- writer.println("Debug logs: ");
- synchronized (sDumpLogs) {
- for (int i = 0; i < sDumpLogs.size(); i++) {
- writer.println(" " + sDumpLogs.get(i));
- }
+ public void dumpLogsToLocalData() {
+ if (DEBUG_DUMP_LOG) {
+ new Thread("DumpLogsToLocalData") {
+ @Override
+ public void run() {
+ boolean success = false;
+ sDateStamp.setTime(sRunStart);
+ String FILENAME = sDateStamp.getMonth() + "-"
+ + sDateStamp.getDay() + "_"
+ + sDateStamp.getHours() + "-"
+ + sDateStamp.getMinutes() + "_"
+ + sDateStamp.getSeconds() + ".txt";
+
+ FileOutputStream fos = null;
+ File outFile = null;
+ try {
+ outFile = new File(getFilesDir(), FILENAME);
+ outFile.createNewFile();
+ fos = new FileOutputStream(outFile);
+ } catch (Exception e) {
+ e.printStackTrace();
}
- writer.close();
- }
- try {
if (fos != null) {
- fos.close();
- success = true;
+ PrintWriter writer = new PrintWriter(fos);
+
+ writer.println(" ");
+ writer.println("Debug logs: ");
+ synchronized (sDumpLogs) {
+ for (int i = 0; i < sDumpLogs.size(); i++) {
+ writer.println(" " + sDumpLogs.get(i));
+ }
+ }
+ writer.close();
}
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- if (success && email) {
- if (!emailSent()) {
- emailFile(outFile);
+ try {
+ if (fos != null) {
+ fos.close();
+ success = true;
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
}
}
- }
- }.start();
- }
-
- private void emailFile(File file) {
- File publicCopy = new File(Environment.getExternalStorageDirectory(), file.getName());
- try {
- copyFile(file, publicCopy);
- } catch (IOException e) {
- e.printStackTrace();
- return;
- }
-
- Intent intent = new Intent(Intent.ACTION_SEND);
- intent.setType("text/plain");
- intent.putExtra(Intent.EXTRA_EMAIL, new String[] {"adamcohen@google.com, winsonc@google.com," +
- "mikejurka@google"});
- intent.putExtra(Intent.EXTRA_SUBJECT, "Data corruption " + file.getName());
- intent.putExtra(Intent.EXTRA_TEXT, "Data corruption has occurred, logs attached");
-
- if (!file.exists() || !file.canRead()) {
- Toast.makeText(this, "Attachment Error", Toast.LENGTH_SHORT).show();
- finish();
- return;
- }
-
- Toast.makeText(this, "Data corruption has occurred, please send e-mail", Toast.LENGTH_LONG);
- Uri uri = Uri.fromFile(publicCopy);
- intent.putExtra(Intent.EXTRA_STREAM, uri);
- startActivity(Intent.createChooser(intent, "Please send logs, consider clearing data"));
-
- setEmailSent(true);
- }
-
- public void copyFile(File src, File dst) throws IOException {
- InputStream in = new FileInputStream(src);
- OutputStream out = new FileOutputStream(dst);
-
- // Transfer bytes from in to out
- byte[] buf = new byte[1024];
- int len;
- while ((len = in.read(buf)) > 0) {
- out.write(buf, 0, len);
+ }.start();
}
- in.close();
- out.close();
}
}
public void bindPackagesUpdated(ArrayList<Object> widgetsAndShortcuts);
public void bindSearchablesChanged();
public void onPageBoundSynchronously(int page);
- public void dumpLogsToLocalData(boolean email);
+ public void dumpLogsToLocalData();
}
public interface ItemInfoFilter {
}
public void addAndBindAddedApps(final Context context, final ArrayList<ItemInfo> added,
final Callbacks callbacks, final ArrayList<AppInfo> addedApps) {
- Launcher.addDumpLog(TAG, "10249126 - addAndBindAddedApps()", true);
if (added.isEmpty()) {
return;
}
workspaceScreens.size());
while (numPagesToAdd > 0) {
long screenId = lp.generateNewScreenId();
- Launcher.addDumpLog(TAG, "10249126 - addAndBindAddedApps(" + screenId + ")", true);
// Save the screen id for binding in the workspace
workspaceScreens.add(screenId);
addedWorkspaceScreensFinal.add(screenId);
}
}
- Launcher.addDumpLog(TAG, "10249126 - addAndBindAddedApps - updateWorkspaceScreenOrder(" + workspaceScreens.size() + ")", true);
-
// Update the workspace screens
updateWorkspaceScreenOrder(context, workspaceScreens);
String msg = "item: " + item + " container being set to: " +
item.container + ", not in the list of folders";
Log.e(TAG, msg);
- Launcher.dumpDebugLogsToConsole();
}
}
*/
static void moveItemInDatabase(Context context, final ItemInfo item, final long container,
final long screenId, final int cellX, final int cellY) {
- String transaction = "DbDebug Modify item (" + item.title + ") in db, id: " + item.id +
- " (" + item.container + ", " + item.screenId + ", " + item.cellX + ", " + item.cellY +
- ") --> " + "(" + container + ", " + screenId + ", " + cellX + ", " + cellY + ")";
- Launcher.addDumpLog(TAG, transaction, true);
-
item.container = container;
item.cellX = cellX;
item.cellY = cellY;
for (int i = 0; i < count; i++) {
ItemInfo item = items.get(i);
- String transaction = "DbDebug Modify item (" + item.title + ") in db, id: "
- + item.id + " (" + item.container + ", " + item.screenId + ", " + item.cellX
- + ", " + item.cellY + ") --> " + "(" + container + ", " + screen + ", "
- + item.cellX + ", " + item.cellY + ")";
- Launcher.addDumpLog(TAG, transaction, true);
item.container = container;
// We store hotseat items in canonical form which is this orientation invariant position
*/
static void modifyItemInDatabase(Context context, final ItemInfo item, final long container,
final long screenId, final int cellX, final int cellY, final int spanX, final int spanY) {
- String transaction = "DbDebug Modify item (" + item.title + ") in db, id: " + item.id +
- " (" + item.container + ", " + item.screenId + ", " + item.cellX + ", " + item.cellY +
- ") --> " + "(" + container + ", " + screenId + ", " + cellX + ", " + cellY + ")";
- Launcher.addDumpLog(TAG, transaction, true);
-
item.cellX = cellX;
item.cellY = cellY;
item.spanX = spanX;
Runnable r = new Runnable() {
public void run() {
- String transaction = "DbDebug Add item (" + item.title + ") to db, id: "
- + item.id + " (" + container + ", " + screenId + ", " + cellX + ", "
- + cellY + ")";
- Launcher.addDumpLog(TAG, transaction, true);
-
cr.insert(notify ? LauncherSettings.Favorites.CONTENT_URI :
LauncherSettings.Favorites.CONTENT_URI_NO_NOTIFICATION, values);
String msg = "adding item: " + item + " to a folder that " +
" doesn't exist";
Log.e(TAG, msg);
- Launcher.dumpDebugLogsToConsole();
}
}
break;
Runnable r = new Runnable() {
public void run() {
- String transaction = "DbDebug Delete item (" + item.title + ") from db, id: "
- + item.id + " (" + item.container + ", " + item.screenId + ", " + item.cellX +
- ", " + item.cellY + ")";
- Launcher.addDumpLog(TAG, transaction, true);
-
cr.delete(uriToDelete, null, null);
// Lock on mBgLock *after* the db operation
String msg = "deleting a folder (" + item + ") which still " +
"contains items (" + info + ")";
Log.e(TAG, msg);
- Launcher.dumpDebugLogsToConsole();
}
}
sBgWorkspaceItems.remove(item);
* a list of screen ids in the order that they should appear.
*/
void updateWorkspaceScreenOrder(Context context, final ArrayList<Long> screens) {
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder()", true);
final ArrayList<Long> screensCopy = new ArrayList<Long>(screens);
final ContentResolver cr = context.getContentResolver();
final Uri uri = LauncherSettings.WorkspaceScreens.CONTENT_URI;
while (iter.hasNext()) {
long id = iter.next();
if (id < 0) {
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder - remove: " + id + ")", true);
iter.remove();
}
}
- // Dump the screens copy
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder - screensCopy", true);
- for (Long l : screensCopy) {
- Launcher.addDumpLog(TAG, "10249126\t- " + l, true);
- }
-
Runnable r = new Runnable() {
@Override
public void run() {
long screenId = screensCopy.get(i);
v.put(LauncherSettings.WorkspaceScreens._ID, screenId);
v.put(LauncherSettings.WorkspaceScreens.SCREEN_RANK, i);
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder(" + screenId + ", " + i + ")", true);
values[i] = v;
}
cr.bulkInsert(uri, values);
synchronized (sBgLock) {
- // Dump the sBgWorkspaceScreens
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder - sBgWorkspaceScreens - pre clear", true);
- for (Long l : sBgWorkspaceScreens) {
- Launcher.addDumpLog(TAG, "10249126\t- " + l, true);
- }
-
sBgWorkspaceScreens.clear();
sBgWorkspaceScreens.addAll(screensCopy);
-
- // Dump the sBgWorkspaceScreens
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder - sBgWorkspaceScreens - post clear", true);
- for (Long l : sBgWorkspaceScreens) {
- Launcher.addDumpLog(TAG, "10249126\t- " + l, true);
- }
}
}
};
try {
long screenId = sc.getLong(idIndex);
int rank = sc.getInt(rankIndex);
-
- Launcher.addDumpLog(TAG, "10249126 - loadWorkspaceScreensDb(" + screenId + ", " + rank + ")", true);
-
orderedScreens.put(rank, screenId);
} catch (Exception e) {
Launcher.addDumpLog(TAG, "Desktop items loading interrupted - invalid screens: " + e, true);
isUpgradePath = loadWorkspace();
synchronized (LoaderTask.this) {
if (mStopped) {
- Launcher.addDumpLog(TAG, "10249126 - loadAndBindWorkspace() stopped", true);
return isUpgradePath;
}
mWorkspaceLoaded = true;
if (AppsCustomizePagedView.DISABLE_ALL_APPS) {
// Ensure that all the applications that are in the system are
// represented on the home screen.
- Launcher.addDumpLog(TAG, "10249126 - verifyApplications - useMoreApps="
- + UPGRADE_USE_MORE_APPS_FOLDER + " isUpgrade=" + isUpgrade, true);
if (!UPGRADE_USE_MORE_APPS_FOLDER || !isUpgrade) {
- Launcher.addDumpLog(TAG, "10249126 - verifyApplications(" + isUpgrade + ")", true);
verifyApplications();
}
}
public void stopLocked() {
synchronized (LoaderTask.this) {
- Launcher.addDumpLog(TAG, "10249126 - STOPPED", true);
mStopped = true;
this.notify();
}
synchronized (sBgLock) {
for (AppInfo app : mBgAllAppsList.data) {
tmpInfos = getItemInfoForComponentName(app.componentName);
- Launcher.addDumpLog(TAG, "10249126 - \t" + app.componentName.getPackageName() + ", " + tmpInfos.isEmpty(), true);
if (tmpInfos.isEmpty()) {
// We are missing an application icon, so add this to the workspace
added.add(app);
synchronized (sBgLock) {
clearSBgDataStructures();
- Launcher.addDumpLog(TAG, "10249126 - loadWorkspace()", true);
final ArrayList<Long> itemsToRemove = new ArrayList<Long>();
final Uri contentUri = LauncherSettings.Favorites.CONTENT_URI;
long id;
Intent intent;
- Launcher.addDumpLog(TAG, "10249126 - Num rows: " + c.getCount(), true);
while (!mStopped && c.moveToNext()) {
try {
int itemType = c.getInt(itemTypeIndex);
Uri uri = LauncherSettings.Favorites.getContentUri(id,
false);
contentResolver.delete(uri, null, null);
- Launcher.addDumpLog(TAG, "Invalid package removed: " + cn, true);
} else {
// If apps can be on external storage, then we just
// leave them for the user to remove (maybe add
// Break early if we've stopped loading
if (mStopped) {
- Launcher.addDumpLog(TAG, "10249126 - loadWorkspace() - Stopped", true);
clearSBgDataStructures();
return false;
}
}
if (loadedOldDb) {
- Launcher.addDumpLog(TAG, "10249126 - loadWorkspace - loadedOldDb", true);
long maxScreenId = 0;
// If we're importing we use the old screen order.
for (ItemInfo item: sBgItemsIdMap.values()) {
long screenId = item.screenId;
if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP &&
!sBgWorkspaceScreens.contains(screenId)) {
- Launcher.addDumpLog(TAG, "10249126 - loadWorkspace-loadedOldDb(" + screenId + ")", true);
sBgWorkspaceScreens.add(screenId);
if (screenId > maxScreenId) {
maxScreenId = screenId;
}
Collections.sort(sBgWorkspaceScreens);
- // Dump the sBgWorkspaceScreens
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder - sBgWorkspaceScreens", true);
- for (Long l : sBgWorkspaceScreens) {
- Launcher.addDumpLog(TAG, "10249126\t- " + l, true);
- }
-
LauncherAppState.getLauncherProvider().updateMaxScreenId(maxScreenId);
updateWorkspaceScreenOrder(context, sBgWorkspaceScreens);
}
LauncherAppState.getLauncherProvider().updateMaxItemId(maxItemId);
} else {
- Launcher.addDumpLog(TAG, "10249126 - loadWorkspace - !loadedOldDb [" + sWorkerThread.getThreadId() + ", " + Process.myTid() + "]", true);
TreeMap<Integer, Long> orderedScreens = loadWorkspaceScreensDb(mContext);
for (Integer i : orderedScreens.keySet()) {
- Launcher.addDumpLog(TAG, "10249126 - adding to sBgWorkspaceScreens: " + orderedScreens.get(i), true);
sBgWorkspaceScreens.add(orderedScreens.get(i));
}
// Remove any empty screens
ArrayList<Long> unusedScreens = new ArrayList<Long>(sBgWorkspaceScreens);
- for (Long l : unusedScreens) {
- Launcher.addDumpLog(TAG, "10249126 - unused screens: " + l, true);
- }
-
- Launcher.addDumpLog(TAG, "10249126 - sBgItemsIdMap [" + sWorkerThread.getThreadId() + ", " + Process.myTid() + "]", true);
for (ItemInfo item: sBgItemsIdMap.values()) {
long screenId = item.screenId;
- Launcher.addDumpLog(TAG, "10249126 - \t" + item.container + ", " + screenId + " - " + unusedScreens.contains(screenId) + " | " + item, true);
-
if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP &&
unusedScreens.contains(screenId)) {
unusedScreens.remove(screenId);
- Launcher.addDumpLog(TAG, "10249126 - \t\tRemoving " + screenId, true);
- for (Long l : unusedScreens) {
- Launcher.addDumpLog(TAG, "10249126 - \t\t\t unused screens: " + l, true);
- }
}
}
// If there are any empty screens remove them, and update.
if (unusedScreens.size() != 0) {
- // Dump the sBgWorkspaceScreens
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder - sBgWorkspaceScreens - pre removeAll", true);
- for (Long l : sBgWorkspaceScreens) {
- Launcher.addDumpLog(TAG, "10249126\t- " + l, true);
- }
-
sBgWorkspaceScreens.removeAll(unusedScreens);
-
- // Dump the sBgWorkspaceScreens
- Launcher.addDumpLog(TAG, "10249126 - updateWorkspaceScreenOrder - sBgWorkspaceScreens - post removeAll", true);
- for (Long l : sBgWorkspaceScreens) {
- Launcher.addDumpLog(TAG, "10249126\t- " + l, true);
- }
-
updateWorkspaceScreenOrder(context, sBgWorkspaceScreens);
}
}
private void bindWorkspaceScreens(final Callbacks oldCallbacks,
final ArrayList<Long> orderedScreens) {
- Launcher.addDumpLog(TAG, "10249126 - bindWorkspaceScreens()", true);
-
- // Dump the orderedScreens
- synchronized (sBgLock) {
- Launcher.addDumpLog(TAG, "10249126 - orderedScreens", true);
- for (Long l : sBgWorkspaceScreens) {
- Launcher.addDumpLog(TAG, "10249126\t- " + l, true);
- }
- }
-
final Runnable r = new Runnable() {
@Override
public void run() {
* Binds all loaded data to actual views on the main thread.
*/
private void bindWorkspace(int synchronizeBindPage, final boolean isUpgradePath) {
- Launcher.addDumpLog(TAG, "10249126 - bindWorkspace(" + synchronizeBindPage + ", " + isUpgradePath + ")", true);
final long t = SystemClock.uptimeMillis();
Runnable r;
});
// Write all the logs to disk
- Launcher.addDumpLog(TAG, "10249126 - PackageUpdatedTask - dumping logs to disk", true);
mHandler.post(new Runnable() {
public void run() {
Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
if (callbacks == cb && cb != null) {
- callbacks.dumpLogsToLocalData(false);
+ callbacks.dumpLogsToLocalData();
}
}
});
}
public void removeAllWorkspaceScreens() {
- Launcher.addDumpLog(TAG, "10249126 - removeAllWorkspaceScreens()", true);
// Remove the pages and clear the screen models
removeAllViews();
mScreenOrder.clear();
// Find the index to insert this view into. If the empty screen exists, then
// insert it before that.
int insertIndex = mScreenOrder.indexOf(EXTRA_EMPTY_SCREEN_ID);
- Launcher.addDumpLog(TAG, "10249126 - insertNewWorkspaceScreenBeforeEmptyScreen(" + insertIndex + ")", true);
if (insertIndex < 0) {
insertIndex = mScreenOrder.size();
}
}
public long insertNewWorkspaceScreen(long screenId, int insertIndex) {
- String log = "10249126 - insertNewWorkspaceScreen(" + screenId + ", " + insertIndex + ")";
- Launcher.addDumpLog(TAG, log, true);
-
if (mWorkspaceScreens.containsKey(screenId)) {
throw new RuntimeException("Screen id " + screenId + " already exists!");
}
}
public void createCustomContentPage() {
- Launcher.addDumpLog(TAG, "10249126 - createCustomContentPage()", true);
CellLayout customScreen = (CellLayout)
mLauncher.getLayoutInflater().inflate(R.layout.workspace_screen, null);
}
public void removeCustomContentPage() {
- Launcher.addDumpLog(TAG, "10249126 - removeCustomContentPage()", true);
-
CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
if (customScreen == null) {
throw new RuntimeException("Expected custom content screen to exist");
}
public long commitExtraEmptyScreen() {
- Launcher.addDumpLog(TAG, "10249126 - commitExtraEmptyScreen()", true);
-
- // Write all the logs to disk
- Launcher.addDumpLog(TAG, "10249126 - commitExtraEmptyScreen() - dumping logs to disk", true);
- mLauncher.dumpLogsToLocalData(false);
-
CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
mWorkspaceScreens.remove(EXTRA_EMPTY_SCREEN_ID);
mScreenOrder.remove(EXTRA_EMPTY_SCREEN_ID);
public CellLayout getScreenWithId(long screenId) {
- Launcher.addDumpLog(TAG, "10249126 - getScreenWithId(" + screenId + ")", true);
CellLayout layout = mWorkspaceScreens.get(screenId);
return layout;
}
public long getIdForScreen(CellLayout layout) {
- Launcher.addDumpLog(TAG, "10249126 - getIdForScreen()", true);
Iterator<Long> iter = mWorkspaceScreens.keySet().iterator();
while (iter.hasNext()) {
long id = iter.next();
}
public int getPageIndexForScreenId(long screenId) {
- Launcher.addDumpLog(TAG, "10249126 - getPageIndexForScreenId(" + screenId + ")", true);
return indexOfChild(mWorkspaceScreens.get(screenId));
}
return;
}
- Launcher.addDumpLog(TAG, "10249126 - stripEmptyScreens()", true);
-
int currentPage = getNextPage();
ArrayList<Long> removeScreens = new ArrayList<Long>();
for (Long id: mWorkspaceScreens.keySet()) {
int pageShift = 0;
for (Long id: removeScreens) {
- Launcher.addDumpLog(TAG, "10249126 - \tremove(" + id + ")", true);
CellLayout cl = mWorkspaceScreens.get(id);
mWorkspaceScreens.remove(id);
mScreenOrder.remove(id);
mScreenOrder.add(getIdForScreen(cl));
}
- Launcher.addDumpLog(TAG, "10249126 - onEndReordering()", true);
mLauncher.getModel().updateWorkspaceScreenOrder(mLauncher, mScreenOrder);
// Re-enable auto layout transitions for page deletion.