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

Commit 3441abdd authored by cretin45's avatar cretin45
Browse files

SetupWizard: Add backup restore

Change-Id: Ide7149eee903cce11dfeb7fb919b707c614c8735
parent 7e9af47d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
    <uses-permission android:name="android.permission.ACCESS_THEME_MANAGER"/>
    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
    <uses-permission android:name="android.permission.HARDWARE_ABSTRACTION_ACCESS" />
    <uses-permission android:name="android.permission.BACKUP" />
    <uses-permission android:name="org.whispersystems.whisperpush.permissions.REGISTER" />

    <permission
+47 −0
Original line number Diff line number Diff line
@@ -36,6 +36,53 @@
                android:layout_height="match_parent"
                style="@style/PageContent">


                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textSize="15sp"
                    android:textStyle="bold"
                    android:paddingLeft="@dimen/content_margin_left"
                    android:paddingRight="@dimen/content_margin_right"
                    style="@style/PageSummaryText"
                    android:text="@string/backup_data_title" />

                <LinearLayout
                    android:id="@+id/backup"
                    android:orientation="horizontal"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingLeft="@dimen/location_margin_left"
                    android:paddingRight="@dimen/content_margin_right"
                    android:background="?android:attr/selectableItemBackground"
                    android:clickable="true">


                    <CheckBox
                        android:id="@+id/backup_checkbox"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="top"
                        android:layout_marginTop="5dp"
                        android:duplicateParentState="true"
                        android:clickable="false" />

                    <TextView
                        android:id="@+id/backup_summary"
                        android:layout_width="0px"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:textSize="15sp"
                        android:lineSpacingExtra="@dimen/setup_line_spacing"
                        android:gravity="top"
                        android:layout_marginLeft="@dimen/location_text_margin_left"
                        android:layout_marginRight="@dimen/location_text_margin_right"
                        android:paddingBottom="@dimen/content_margin_bottom"
                        android:text="@string/backup_data_summary"
                        android:maxLines="5" />

                </LinearLayout>

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
+2 −2
Original line number Diff line number Diff line
@@ -83,8 +83,8 @@
                        android:gravity="center_vertical"
                        android:duplicateParentState="true"
                        android:clickable="false"
                        android:textOff="@string/enable_mobile_off"
                        android:textOn="@string/enable_mobile_on"/>
                        android:textOff="@string/no"
                        android:textOn="@string/yes"/>
                </LinearLayout>

                <include layout="@layout/divider" />
+6 −2
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
    <string name="setup_gms_account">GMS account</string>
    <string name="setup_choose_data_sim">Choose a SIM for Data</string>
    <string name="setup_location">Location Services</string>
    <string name="setup_other">Other Services</string>
    <string name="setup_datetime">Date &amp; time</string>
    <string name="setup_current_date">Current date</string>
    <string name="setup_current_time">Current time</string>
@@ -51,6 +52,9 @@

    <string name="date_time_summary">Set your time zone and adjust current date and time if needed</string>

    <string name="backup_data_title">Back up my data</string>
    <string name="backup_data_summary">Back up app data, Wi-Fi passwords, and other settings to Google servers</string>

    <string name="location_services_summary">Location services allows Maps and other apps to gather and use data such as your approximate location. For example, Maps may use your approximate location to locate nearby coffee shops.</string>
    <string name="location_access_summary"><b>Allow apps that have asked your permission</b> to use your location information. This may include your current location and past locations.</string>
    <string name="location_gps"><b>Improve location accuracy</b> by allowing apps to use the GPS on your phone.</string>
@@ -60,8 +64,8 @@
    <string name="setup_mobile_data_no_service">No service</string>
    <string name="setup_mobile_data_emergency_only">Emergency calls only</string>
    <string name="enable_mobile_data_summary">Do you want to use mobile data during setup? Turning on mobile data may be subject to data charges.</string>
    <string name="enable_mobile_off">No</string>
    <string name="enable_mobile_on">Yes</string>
    <string name="no">No</string>
    <string name="yes">Yes</string>

    <string name="data_sim_name">SIM <xliff:g id="sub">%d</xliff:g> - <xliff:g id="name">%s</xliff:g></string>

+4 −1
Original line number Diff line number Diff line
@@ -38,10 +38,13 @@ public class SetupWizardApp extends Application {
    public static final String EXTRA_AUTO_FINISH = "wifi_auto_finish_on_connect";
    public static final String EXTRA_SHOW_BUTTON_BAR = "extra_prefs_show_button_bar";
    public static final String EXTRA_USE_IMMERSIVE = "useImmersiveMode";
    public static final String EXTRA_THEME = "theme";
    public static final String EXTRA_MATERIAL_LIGHT = "material_light";

    public static final int REQUEST_CODE_SETUP_WIFI = 0;
    public static final int REQUEST_CODE_SETUP_GMS= 1;
    public static final int REQUEST_CODE_SETUP_CYANOGEN= 2;
    public static final int REQUEST_CODE_RESTORE_GMS= 2;
    public static final int REQUEST_CODE_SETUP_CYANOGEN= 3;

    private StatusBarManager mStatusBarManager;

Loading