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

Commit fc026fca authored by Torsten Grote's avatar Torsten Grote Committed by Michael Bestas
Browse files

Add an activity for launching a restore from backup

Change-Id: Ibd73f8549bb3ec9e829ad9082399dbbf0a6ca4f5
parent a96ccce7
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -257,6 +257,19 @@
            </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"
+8 −0
Original line number Diff line number Diff line
<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
+76 −0
Original line number Diff line number Diff line
<?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>
+4 −0
Original line number Diff line number Diff line
@@ -66,6 +66,10 @@
    </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>

+5 −0
Original line number Diff line number Diff line
@@ -98,4 +98,9 @@
    <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 LineageOS tablet, you can restore it here.</string>
    <string name="intro_restore_subtitle" product="default">If you have a backup from your last LineageOS phone, you can restore it here.</string>
    <string name="intro_restore_button">Restore from backup</string>
</resources>
Loading