diff options
| author | doc HD <doc.divxm@gmail.com> | 2021-04-02 19:57:34 +0300 |
|---|---|---|
| committer | Ali B <abittin@gmail.com> | 2021-04-11 20:01:44 +0300 |
| commit | 8a4bb0b4066722b5625cb5374301d995808271a3 (patch) | |
| tree | eaddd0018e3b464a40f28a665b8a37503a691c1c | |
| parent | 1a8861a8dd13cd0910a7e19acf19c627e72c7174 (diff) | |
Revert "Add an activity for launching a restore from backup"
This reverts commit fc026fcadc2f02bdb3319644ab91e37e35f5539c.
Change-Id: I0ed6c782a18c5d6596001e739b26f1d64ab1028e
| -rw-r--r-- | AndroidManifest.xml | 13 | ||||
| -rw-r--r-- | res/drawable/ic_restore.xml | 8 | ||||
| -rw-r--r-- | res/layout/intro_restore_activity.xml | 76 | ||||
| -rw-r--r-- | res/raw/lineage_wizard_script.xml | 4 | ||||
| -rw-r--r-- | res/values/strings.xml | 6 | ||||
| -rw-r--r-- | src/org/lineageos/setupwizard/SetupWizardApp.java | 2 | ||||
| -rw-r--r-- | src/org/lineageos/setupwizard/backup/RestoreIntroActivity.java | 56 |
7 files changed, 0 insertions, 165 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 602c40f..7d86600 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -272,19 +272,6 @@ </intent-filter> </activity> - <activity android:name=".backup.RestoreIntroActivity" - android:label="@string/activity_label_empty" - android:excludeFromRecents="true" - android:configChanges="mcc|mnc" - android:immersive="true" - android:exported="false" - android:windowSoftInputMode="stateAlwaysHidden"> - <intent-filter> - <action android:name="org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP"/> - <category android:name="android.intent.category.DEFAULT"/> - </intent-filter> - </activity> - <activity android:name=".FinishActivity" android:label="@string/activity_label_empty" android:excludeFromRecents="true" diff --git a/res/drawable/ic_restore.xml b/res/drawable/ic_restore.xml deleted file mode 100644 index 0f922df..0000000 --- a/res/drawable/ic_restore.xml +++ /dev/null @@ -1,8 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" - android:width="24dp" - android:viewportWidth="24" - android:viewportHeight="24"> - <path android:fillColor="#000" - android:pathData="M17,13L12,18L7,13H10V9H14V13M19.35,10.03C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.03C2.34,8.36 0,10.9 0,14A6,6 0 0,0 6,20H19A5,5 0 0,0 24,15C24,12.36 21.95,10.22 19.35,10.03Z"/> -</vector>
\ No newline at end of file diff --git a/res/layout/intro_restore_activity.xml b/res/layout/intro_restore_activity.xml deleted file mode 100644 index fd8cadc..0000000 --- a/res/layout/intro_restore_activity.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2015 The CyanogenMod Project - Copyright (C) 2017 The LineageOS Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/primary"> - - <include layout="@layout/header_condensed" /> - - <FrameLayout android:id="@+id/page" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1"> - - <ScrollView android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingStart="@dimen/content_margin_left" - android:paddingEnd="@dimen/content_margin_left" - style="@style/PageContent"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - style="@style/PageSummaryText" - android:textSize="16sp" - android:layout_marginBottom="@dimen/summary_margin_bottom" - android:paddingRight="@dimen/location_text_margin_right" - android:text="@string/intro_restore_subtitle" /> - - <Button - android:id="@+id/intro_restore_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="@dimen/content_margin_left" - android:paddingRight="@dimen/location_text_margin_right" - android:gravity="center" - android:textSize="16sp" - android:textAllCaps="true" - android:textColor="@color/white" - android:background="@color/accent" - android:maxLines="1" - android:ellipsize="end" - android:text="@string/intro_restore_button"/> - - </LinearLayout> - </ScrollView> - </FrameLayout> - - <com.google.android.setupdesign.view.NavigationBar - android:id="@+id/navigation_bar" - style="@style/SudNavBarTheme" - android:layout_width="match_parent" - android:layout_height="@dimen/sud_navbar_height" /> -</LinearLayout> diff --git a/res/raw/lineage_wizard_script.xml b/res/raw/lineage_wizard_script.xml index fb8bde6..fb48e3a 100644 --- a/res/raw/lineage_wizard_script.xml +++ b/res/raw/lineage_wizard_script.xml @@ -70,10 +70,6 @@ </WizardAction> <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCKSCREEN_SETTINGS;end" id="lockscreen_settings"> - <result wizard:action="restore" /> - </WizardAction> - - <WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP;end" id="restore"> <result wizard:action="finish" /> </WizardAction> diff --git a/res/values/strings.xml b/res/values/strings.xml index 0fde63a..bef9ee0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -101,12 +101,6 @@ <string name="lockscreen_setup_summary"><b>Protect this device</b> and require a PIN, pattern, or password to unlock the screen</string> <string name="lockscreen_setup_screen_lock_setup">Set up</string> - <!-- Backup Restore --> - <string name="intro_restore_title">Restore apps and data</string> - <string name="intro_restore_subtitle" product="tablet">If you have a backup from your last AICP tablet, you can restore it here.</string> - <string name="intro_restore_subtitle" product="default">If you have a backup from your last AICP phone, you can restore it here.</string> - <string name="intro_restore_button">Restore from backup</string> - <!-- Update Recovery --> <string name="update_recovery_title">Update Recovery</string> <string name="update_recovery_description">Updates Recovery on first boot subsequent to every update.</string> diff --git a/src/org/lineageos/setupwizard/SetupWizardApp.java b/src/org/lineageos/setupwizard/SetupWizardApp.java index 807c5ba..6f73c21 100644 --- a/src/org/lineageos/setupwizard/SetupWizardApp.java +++ b/src/org/lineageos/setupwizard/SetupWizardApp.java @@ -40,7 +40,6 @@ public class SetupWizardApp extends Application { public static final String ACTION_SETUP_WIFI = "android.net.wifi.PICK_WIFI_NETWORK"; public static final String ACTION_SETUP_BIOMETRIC = "android.settings.BIOMETRIC_ENROLL"; public static final String ACTION_SETUP_LOCKSCREEN = "com.android.settings.SETUP_LOCK_SCREEN"; - public static final String ACTION_RESTORE_FROM_BACKUP = "com.stevesoltys.seedvault.RESTORE_BACKUP"; public static final String ACTION_EMERGENCY_DIAL = "com.android.phone.EmergencyDialer.DIAL"; public static final String ACTION_NEXT = "com.android.wizard.NEXT"; public static final String ACTION_LOAD = "com.android.wizard.LOAD"; @@ -71,7 +70,6 @@ public class SetupWizardApp extends Application { public static final int REQUEST_CODE_SETUP_BLUETOOTH= 5; public static final int REQUEST_CODE_SETUP_BIOMETRIC = 7; public static final int REQUEST_CODE_SETUP_LOCKSCREEN = 9; - public static final int REQUEST_CODE_RESTORE = 10; public static final int RADIO_READY_TIMEOUT = 10 * 1000; diff --git a/src/org/lineageos/setupwizard/backup/RestoreIntroActivity.java b/src/org/lineageos/setupwizard/backup/RestoreIntroActivity.java deleted file mode 100644 index 3ced83d..0000000 --- a/src/org/lineageos/setupwizard/backup/RestoreIntroActivity.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2019-2020 The Calyx Institute - * Copyright (C) 2020 The LineageOS Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -package org.lineageos.setupwizard.backup; - -import android.content.Intent; -import org.lineageos.setupwizard.R; -import org.lineageos.setupwizard.SubBaseActivity; - -import static org.lineageos.setupwizard.SetupWizardApp.ACTION_RESTORE_FROM_BACKUP; -import static org.lineageos.setupwizard.SetupWizardApp.REQUEST_CODE_RESTORE; - -public class RestoreIntroActivity extends SubBaseActivity { - - @Override - protected void onStartSubactivity() { - setNextAllowed(true); - - findViewById(R.id.intro_restore_button).setOnClickListener(v -> launchRestore()); - } - - @Override - protected int getLayoutResId() { - return R.layout.intro_restore_activity; - } - - @Override - protected int getTitleResId() { - return R.string.intro_restore_title; - } - - @Override - protected int getIconResId() { - return R.drawable.ic_restore; - } - - private void launchRestore() { - Intent intent = new Intent(ACTION_RESTORE_FROM_BACKUP); - startSubactivity(intent, REQUEST_CODE_RESTORE); - } - -} |
