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

Commit a16257db authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Format as public/private; follow refactoring.

Offer to format an empty disk as public/private.

Bug: 19993667
Change-Id: I69fafaed524f3ef5e65d04a9e3a94789fcfc3087
parent 02c89944
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -1490,7 +1490,7 @@
        </activity>

        <activity
                android:name="Settings$StorageVolumeSettingsActivity"
                android:name="Settings$PublicVolumeSettingsActivity"
                android:label="@string/storage_settings_title"
                android:taskAffinity="com.android.settings"
                android:parentActivityName="Settings$StorageSettingsActivity">
@@ -1508,6 +1508,19 @@
                android:resource="@id/storage_settings" />
        </activity>

        <activity
                android:name="Settings$PrivateVolumeForgetActivity"
                android:label="@string/storage_settings_title"
                android:taskAffinity="com.android.settings"
                android:parentActivityName="Settings$StorageSettingsActivity"
                android:exported="true"
                android:permission="android.permission.MOUNT_UNMOUNT_FILESYSTEMS">
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.deviceinfo.PrivateVolumeForget" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/storage_settings" />
        </activity>

        <!-- Exported for SystemUI to launch into -->
        <activity android:name=".deviceinfo.StorageWizardInit"
                android:theme="@style/SuwThemeMaterial.Light"
+51 −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="0dp"
        android:layout_weight="1">
        <TextView
            android:id="@+id/body"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="@dimen/suw_description_margin_top"
            android:paddingBottom="@dimen/suw_description_margin_bottom"
            android:paddingStart="@dimen/suw_layout_margin_sides"
            android:paddingEnd="@dimen/suw_layout_margin_sides"
            android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
            android:textAppearance="@android:style/TextAppearance.Material.Body1"
            android:textColor="?android:attr/textColorPrimary" />
    </ScrollView>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="4dp">
        <Button
            android:id="@+id/confirm"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/storage_menu_forget" />
    </FrameLayout>

</LinearLayout>
+16 −0
Original line number Diff line number Diff line
@@ -2287,6 +2287,8 @@
    <string name="storage_menu_format_internal">Erase &amp; format as internal storage</string>
    <!-- Storage setting.  Menu option for USB transfer settings [CHAR LIMIT=30]-->
    <string name="storage_menu_usb">USB computer connection</string>
    <!-- Storage setting.  Menu option for forgetting a storage device [CHAR LIMIT=30]-->
    <string name="storage_menu_forget">Forget</string>

    <!-- Storage setting.  Title for USB transfer settings [CHAR LIMIT=30]-->
    <string name="storage_title_usb">USB computer connection</string>
@@ -2346,6 +2348,12 @@
    <string name="storage_internal_unmount_details"><b>When you eject this <xliff:g id="name" example="SD card">^1</xliff:g>, apps stored on it will stop working, and media files stored on it will not be available until it is reinserted.</b>
\n\nThis <xliff:g id="name" example="SD card">^1</xliff:g> is formatted to work on this device only.  It won\'t work on any others.</string>

    <!-- Body of dialog informing user about consequences of forgetting an internal storage device [CHAR LIMIT=NONE]-->
    <string name="storage_internal_forget_details">To use the apps, photos, or data this <xliff:g id="name" example="SD card">^1</xliff:g> contains, reinsert it.
\n\nAlternatively, you can choose to forget this storage if the device isn\'t available.
\n\nIf you choose to forget, all the data the device contains will be lost forever.
\n\nYou can reinstall the apps later, but their data stored on this device will be lost.</string>

    <!-- Title of wizard step prompting user to setup a storage device [CHAR LIMIT=32] -->
    <string name="storage_wizard_init_title">Set up your <xliff:g id="name" example="SD card">^1</xliff:g></string>
    <!-- Title of wizard choice to use storage device as external storage [CHAR LIMIT=64] -->
@@ -2364,6 +2372,14 @@
\n\nAfter formatting, this <xliff:g id="name" example="SD card">^1</xliff:g> will only work in this device.
\n\n<b>Formatting erases all data currently stored on the <xliff:g id="name" example="SD card">^1</xliff:g>.</b> To avoid losing the data, consider backing it up.
    </string>

    <!-- Title of wizard step prompting user to format a storage device [CHAR LIMIT=32] -->
    <string name="storage_wizard_format_confirm_public_title">Format as portable storage</string>
    <!-- Body of wizard step prompting user to format a storage device [CHAR LIMIT=NONE] -->
    <string name="storage_wizard_format_confirm_public_body">This requires the <xliff:g id="name" example="SD card">^1</xliff:g> to be formatted.
\n\n<b>Formatting erases all data currently stored on the <xliff:g id="name" example="SD card">^1</xliff:g>.</b> To avoid losing the data, consider backing it up.
    </string>

    <!-- Next button text of wizard step prompting user to format a storage device [CHAR LIMIT=32] -->
    <string name="storage_wizard_format_confirm_next">Erase &amp; format</string>

+2 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ public class Settings extends SettingsActivity {
    public static class VpnSettingsActivity extends SettingsActivity { /* empty */ }
    public static class DateTimeSettingsActivity extends SettingsActivity { /* empty */ }
    public static class StorageSettingsActivity extends SettingsActivity { /* empty */ }
    public static class StorageVolumeSettingsActivity extends SettingsActivity { /* empty */ }
    public static class PublicVolumeSettingsActivity extends SettingsActivity { /* empty */ }
    public static class PrivateVolumeForgetActivity extends SettingsActivity { /* empty */ }
    public static class WifiSettingsActivity extends SettingsActivity { /* empty */ }
    public static class WifiP2pSettingsActivity extends SettingsActivity { /* empty */ }
    public static class InputMethodAndLanguageSettingsActivity extends SettingsActivity { /* empty */ }
+2 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ import com.android.settings.dashboard.DashboardSummary;
import com.android.settings.dashboard.DashboardTile;
import com.android.settings.dashboard.NoHomeDialogFragment;
import com.android.settings.dashboard.SearchResultsSummary;
import com.android.settings.deviceinfo.PrivateVolumeForget;
import com.android.settings.deviceinfo.PublicVolumeSettings;
import com.android.settings.deviceinfo.StorageSettings;
import com.android.settings.deviceinfo.UsbSettings;
@@ -310,6 +311,7 @@ public class SettingsActivity extends Activity
            TextToSpeechSettings.class.getName(),
            StorageSettings.class.getName(),
            PublicVolumeSettings.class.getName(),
            PrivateVolumeForget.class.getName(),
            DevelopmentSettings.class.getName(),
            UsbSettings.class.getName(),
            AndroidBeam.class.getName(),
Loading