summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-03-20 23:07:10 +0000
committerSunny Goyal <sunnygoyal@google.com>2017-03-20 16:08:17 -0700
commit46103242610be2bab2c6f1c8277555750b003fce (patch)
treeb0c444664a68f1055f13e935bb5f54e7b9e0cc7f
parent3dc60c6e3932e9770f3b8f48ba3004596a93a9d8 (diff)
downloadpackages_apps_Trebuchet-46103242610be2bab2c6f1c8277555750b003fce.tar.gz
packages_apps_Trebuchet-46103242610be2bab2c6f1c8277555750b003fce.tar.bz2
packages_apps_Trebuchet-46103242610be2bab2c6f1c8277555750b003fce.zip
Revert "Adding some logging around launcher grid when device profile changes"
Bug: 35425060 This reverts commit c29de857807680bf72ebd386cbec716b33d64780. Change-Id: I4320be3473f914289f88c8cbb376a68af006d7de
-rw-r--r--src/com/android/launcher3/InvariantDeviceProfile.java18
-rw-r--r--src/com/android/launcher3/LauncherAppState.java3
-rw-r--r--src/com/android/launcher3/model/GridSizeMigrationTask.java18
3 files changed, 0 insertions, 39 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index 2dd3198f9..9e214d1ec 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -29,7 +29,6 @@ import android.view.WindowManager;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.config.ProviderConfig;
-import com.android.launcher3.logging.FileLog;
import com.android.launcher3.util.Thunk;
import org.xmlpull.v1.XmlPullParser;
@@ -188,23 +187,6 @@ public class InvariantDeviceProfile {
}
}
- public void dumpDisplayInfo(Context context) {
- WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
- Display display = wm.getDefaultDisplay();
- DisplayMetrics dm = new DisplayMetrics();
- display.getMetrics(dm);
-
- Point smallestSize = new Point();
- Point largestSize = new Point();
- display.getCurrentSizeRange(smallestSize, largestSize);
-
- FileLog.e("DisplayInfo", "Default Density: " + DisplayMetrics.DENSITY_DEFAULT);
- FileLog.e("DisplayInfo", "Density: " + dm.densityDpi);
- FileLog.e("DisplayInfo", "Smallest size: " + smallestSize);
- FileLog.e("DisplayInfo", "Largest size: " + largestSize);
- FileLog.e("DisplayInfo", "minWidth/Height DPS: " + minWidthDps + ", " + minHeightDps);
- }
-
ArrayList<InvariantDeviceProfile> getPredefinedDeviceProfiles(Context context) {
ArrayList<InvariantDeviceProfile> profiles = new ArrayList<>();
try (XmlResourceParser parser = context.getResources().getXml(R.xml.device_profiles)) {
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 2e75579ca..180c202fa 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -28,7 +28,6 @@ import com.android.launcher3.compat.PackageInstallerCompat;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.config.ProviderConfig;
import com.android.launcher3.dynamicui.ExtractionUtils;
-import com.android.launcher3.model.GridSizeMigrationTask;
import com.android.launcher3.util.ConfigMonitor;
import com.android.launcher3.util.Preconditions;
import com.android.launcher3.util.TestingUtils;
@@ -54,8 +53,6 @@ public class LauncherAppState {
if (INSTANCE == null) {
if (Looper.myLooper() == Looper.getMainLooper()) {
INSTANCE = new LauncherAppState(context.getApplicationContext());
- GridSizeMigrationTask.logDeviceProfileIfChanged(
- INSTANCE.getInvariantDeviceProfile(), context);
} else {
try {
return new MainThreadExecutor().submit(new Callable<LauncherAppState>() {
diff --git a/src/com/android/launcher3/model/GridSizeMigrationTask.java b/src/com/android/launcher3/model/GridSizeMigrationTask.java
index e50b912f6..221798b07 100644
--- a/src/com/android/launcher3/model/GridSizeMigrationTask.java
+++ b/src/com/android/launcher3/model/GridSizeMigrationTask.java
@@ -27,7 +27,6 @@ import com.android.launcher3.Workspace;
import com.android.launcher3.compat.AppWidgetManagerCompat;
import com.android.launcher3.compat.PackageInstallerCompat;
import com.android.launcher3.config.FeatureFlags;
-import com.android.launcher3.logging.FileLog;
import com.android.launcher3.util.GridOccupancy;
import com.android.launcher3.util.LongArrayMap;
@@ -890,23 +889,6 @@ public class GridSizeMigrationTask {
.apply();
}
- public static void logDeviceProfileIfChanged(InvariantDeviceProfile idp, Context context) {
- SharedPreferences prefs = Utilities.getPrefs(context);
- String gridSizeString = getPointString(idp.numColumns, idp.numRows);
-
- int oldHotseatCount = prefs.getInt(KEY_MIGRATION_SRC_HOTSEAT_COUNT, idp.numHotseatIcons);
- String oldSize = prefs.getString(KEY_MIGRATION_SRC_WORKSPACE_SIZE, gridSizeString);
- if (gridSizeString.equals(oldSize) && idp.numHotseatIcons == oldHotseatCount) {
- // Skip if workspace and hotseat sizes have not changed.
- return;
- }
-
- FileLog.e(TAG, "Grid size changed" + gridSizeString);
- FileLog.e(TAG, " oldSize: " + oldSize + " , hotseat: " + oldHotseatCount);
- FileLog.e(TAG, " newSize: " + gridSizeString + " , hotseat: " + idp.numHotseatIcons);
- idp.dumpDisplayInfo(context);
- }
-
/**
* Migrates the workspace and hotseat in case their sizes changed.
* @return false if the migration failed.