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

Commit be90341c authored by Stuart Scott's avatar Stuart Scott
Browse files

Add option to reset network settings to factory

bug:16161518
Change-Id: I7c0cc58d5385352c6c9af2b27af23a744b5df977
parent 792343b2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
-keep class com.android.settings.bluetooth.*
-keep class com.android.settings.applications.*
-keep class com.android.settings.inputmethod.*
-keep class com.android.settings.ResetNetwork
-keep class com.android.settings.ResetNetworkConfirm
-keep class com.android.settings.MasterClear
-keep class com.android.settings.MasterClearConfirm
-keep class com.android.settings.accounts.*
+60 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginTop="12dp"
        android:layout_weight="1">

        <LinearLayout android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textSize="18sp"
                android:text="@string/reset_network_desc" />

        </LinearLayout>

    </ScrollView>

    <Spinner android:id="@+id/reset_network_subscription"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="20dip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <Button
        android:id="@+id/initiate_reset_network"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="20dip"
        android:layout_marginBottom="12dip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/reset_network_button_text"
        android:gravity="center" />

</LinearLayout>
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginTop="12dp"
        android:textSize="20sp"
        android:text="@string/reset_network_final_desc" />

    <Button android:id="@+id/execute_reset_network"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="40dip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/reset_network_final_button_text"
        android:gravity="center" />

</LinearLayout>
+18 −8
Original line number Diff line number Diff line
@@ -2359,15 +2359,29 @@
    <!-- APNs screen toast message to inform reset default APN settings is completed -->
    <string name="restore_default_apn_completed">Reset default APN settings completed.</string>

    <!-- Reset Network -->
    <!-- SD card & phone storage settings screen, setting option name under Backup & Restore heading -->
    <string name="reset_network_title">Network settings reset</string>
    <!-- SD card & phone storage settings screen, message on screen after user selects Reset network settings [CHAR LIMIT=NONE] -->
    <string name="reset_network_desc">This will reset all settings related to networking to the factory defaults, including:\n\n<li>Wifi</li>\n<li>Mobile data</li>\n<li>Bluetooth</li>"</string>
    <!-- SD card & phone storage settings screen, button on screen after user selects Reset network settings -->
    <string name="reset_network_button_text">Reset settings</string>
    <!-- SD card & phone storage settings screen, message on screen after user selects Reset settings button -->
    <string name="reset_network_final_desc">Reset all network settings? You can\'t reverse this action!</string>
    <!-- SD card & phone storage settings screen, button on screen after user selects Reset settings button -->
    <string name="reset_network_final_button_text">Reset settings</string>
    <!-- Explanation of drawing unlock pattern to reset settings -->
    <string name="reset_network_gesture_explanation">You need to draw your unlock pattern to confirm a network settings reset.</string>
    <!-- Reset settings confirmation screen title [CHAR LIMIT=30] -->
    <string name="reset_network_confirm_title">Reset?</string>
    <!-- Reset settings complete toast text [CHAR LIMIT=75] -->
    <string name="reset_network_complete_toast">Network settings reset</string>

    <!-- Master Clear -->
    <!-- SD card & phone storage settings screen, setting option name under Internal phone storage heading [CHAR LIMIT=30] -->
    <string name="device_reset_title">Reset device</string>
    <!-- SD card & phone storage settings screen, setting option name under Internal phone storage heading -->
    <string name="master_clear_title">Factory data reset</string>
    <!-- SD card & phone storage settings screen, setting option summary text under Internal phone storage heading -->
    <string name="master_clear_summary" product="tablet">Erases all data on tablet</string>
    <!-- SD card & phone storage settings screen, setting option summary text under Internal phone storage heading -->
    <string name="master_clear_summary" product="default">Erases all data on phone</string>
    <!-- SD card & phone storage settings screen, message on screen after user selects Factory data reset [CHAR LIMIT=NONE] -->
    <string name="master_clear_desc" product="tablet">"This will erase all data from your tablet\'s <b>internal storage</b>, including:\n\n<li>Your Google account</li>\n<li>System and app data and settings</li>\n<li>Downloaded apps</li>"</string>
    <!-- SD card & phone storage settings screen, message on screen after user selects Factory data reset [CHAR LIMIT=NONE] -->
@@ -4326,8 +4340,6 @@
    <string name="backup_data_summary">Back up app data, Wi\u2011Fi passwords, and other settings to Google servers</string>
    <!-- Configure backup account options menu title [CHAR LIMIT=25]-->
    <string name="backup_configure_account_title">Backup account</string>
    <!-- Default summary text of the "Configure backup account" setting [CHAR LIMIT=80]-->
    <string name="backup_configure_account_default_summary">No account is currently storing backed up data</string>
    <!-- Auto-restore menu title [CHAR LIMIT=30] -->
    <string name="include_app_data_title">Include app data</string>
    <!-- Auto-restore menu title -->
@@ -4336,8 +4348,6 @@
    <string name="auto_restore_summary">When reinstalling an app, restore backed up settings and data</string>
    <!-- Title of the preference informing the user about the backup service being inactive [CHAR LIMIT=50]-->
    <string name="backup_inactive_title">Backup service is inactive.</string>
    <!-- Summary text of the preference informing the user about the backup service being inactive, explaining that this is likely set by device policy [CHAR LIMIT=150]-->
    <string name="backup_inactive_summary">This is set by your device policy.</string>

    <!-- Local (desktop) backup password menu title [CHAR LIMIT=25] -->
    <string name="local_backup_password_title">Desktop backup password</string>
+42 −49
Original line number Diff line number Diff line
@@ -18,9 +18,6 @@
    xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
    android:title="@string/privacy_settings_title">

    <PreferenceCategory android:key="backup_category"
            android:title="@string/backup_section_title">

    <!-- Backup settings -->
    <SwitchPreference
        android:key="backup_data"
@@ -31,7 +28,6 @@
    <PreferenceScreen
        android:key="configure_account"
        android:title="@string/backup_configure_account_title"
                android:summary="@string/backup_configure_account_default_summary"
        android:persistent="false">
        <!-- the Intent declared here is always overwritten by a real one -->
        <intent android:action="dummy" />
@@ -46,23 +42,20 @@
    <Preference
        android:key="backup_inactive"
        android:title="@string/backup_inactive_title"
                android:summary="@string/backup_inactive_summary"
        android:persistent="false"
        android:enabled="false"
        android:selectable="false" />

    </PreferenceCategory>

    <PreferenceCategory android:key="personal_data_category"
            android:title="@string/personal_data_section_title">
    <!-- Network reset -->
    <PreferenceScreen
        android:title="@string/reset_network_title"
        android:fragment="com.android.settings.ResetNetwork" />

    <!-- Factory reset -->
    <PreferenceScreen
        android:key="factory_reset"
        android:title="@string/master_clear_title"
            android:summary="@string/master_clear_summary"
        settings:keywords="@string/keywords_factory_data_reset"
        android:fragment="com.android.settings.MasterClear" />

    </PreferenceCategory>

</PreferenceScreen>
Loading