diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2014-10-16 09:24:19 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2014-10-28 09:27:10 -0700 |
commit | 33d443897658e6ad8b76bd2e58e3598161fd3ead (patch) | |
tree | 2205d9f2b6c9ce04a1fbb47495b45eae04345a11 /src/com/android/launcher3/Launcher.java | |
parent | 09ae4aef52b4486b97ecc77feeb64307bcbd3993 (diff) | |
download | android_packages_apps_Trebuchet-33d443897658e6ad8b76bd2e58e3598161fd3ead.tar.gz android_packages_apps_Trebuchet-33d443897658e6ad8b76bd2e58e3598161fd3ead.tar.bz2 android_packages_apps_Trebuchet-33d443897658e6ad8b76bd2e58e3598161fd3ead.zip |
Updating backup restore logic
> Adding DeviceProfile information in the backup
> Removing SharedPreference backup
> Adding helper methods to abort backup in the middle
> Comparing keys against the backup journal during restore
to avoid restoring corrupt/lost entries
> Old backups are still compatible, but lost keys verification
will be ignored in that case.
Bug: 17937935
Bug: 17951775
Bug: 17260941
Change-Id: Iad48646cfdd69abaff5c163b2055f3b8a9b39b19
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index b357e7a41..bb7265e44 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -53,7 +53,6 @@ import android.database.ContentObserver; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; -import android.graphics.Point; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.drawable.Drawable; @@ -71,7 +70,6 @@ import android.text.Selection; import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.text.method.TextKeyListener; -import android.util.DisplayMetrics; import android.util.Log; import android.view.Display; import android.view.Gravity; @@ -418,22 +416,9 @@ public class Launcher extends Activity LauncherAppState.setApplicationContext(getApplicationContext()); LauncherAppState app = LauncherAppState.getInstance(); LauncherAppState.getLauncherProvider().setLauncherProviderChangeListener(this); - // Determine the dynamic grid properties - Point smallestSize = new Point(); - Point largestSize = new Point(); - Point realSize = new Point(); - Display display = getWindowManager().getDefaultDisplay(); - display.getCurrentSizeRange(smallestSize, largestSize); - display.getRealSize(realSize); - DisplayMetrics dm = new DisplayMetrics(); - display.getMetrics(dm); // Lazy-initialize the dynamic grid - DeviceProfile grid = app.initDynamicGrid(this, - Math.min(smallestSize.x, smallestSize.y), - Math.min(largestSize.x, largestSize.y), - realSize.x, realSize.y, - dm.widthPixels, dm.heightPixels); + DeviceProfile grid = app.initDynamicGrid(this); // the LauncherApplication should call this, but in case of Instrumentation it might not be present yet mSharedPrefs = getSharedPreferences(LauncherAppState.getSharedPreferencesKey(), |