Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8cec094 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Disabling restore for below L devices

Change-Id: I262f52e88421637e0d50c048f6d53c6b5754da4e
parent 4a080dca
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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.