summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-10-23 20:57:41 (GMT)
committerDanesh M <daneshm90@gmail.com>2015-09-28 01:55:56 (GMT)
commite8e3e71f40ba9154fafafb59e93babaddd0e512b (patch)
treed13898673fb86da0318e4d8c389f91167eb54de6
parent6cc6efbf2352a591755d6993c381b08502b0a634 (diff)
downloadandroid_packages_apps_Trebuchet-e8e3e71f40ba9154fafafb59e93babaddd0e512b.zip
android_packages_apps_Trebuchet-e8e3e71f40ba9154fafafb59e93babaddd0e512b.tar.gz
android_packages_apps_Trebuchet-e8e3e71f40ba9154fafafb59e93babaddd0e512b.tar.bz2
Disabling restore for below L devices
Change-Id: I262f52e88421637e0d50c048f6d53c6b5754da4e
-rw-r--r--src/com/android/launcher3/LauncherBackupAgentHelper.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherBackupAgentHelper.java b/src/com/android/launcher3/LauncherBackupAgentHelper.java
index c20c693..09ad22b 100644
--- a/src/com/android/launcher3/LauncherBackupAgentHelper.java
+++ b/src/com/android/launcher3/LauncherBackupAgentHelper.java
@@ -78,6 +78,12 @@ public class LauncherBackupAgentHelper extends BackupAgentHelper {
@Override
public void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)
throws IOException {
+ if (!Utilities.isLmpOrAbove()) {
+ // No restore for old devices.
+ Log.i(TAG, "You shall not pass!!!");
+ Log.d(TAG, "Restore is only supported on devices running Lollipop and above.");
+ return;
+ }
super.onRestore(data, appVersionCode, newState);
// If no favorite was migrated, clear the data and start fresh.