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

Commit 7fb91855 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Show more settings and add restrictions/dialogs for secondary users" into jb-mr1-dev

parents 0e9cf8a7 9627a8ea
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -590,6 +590,10 @@
    <string name="roaming_turn_it_on_button">Turn it on</string>
    <!-- mobile network settings screen, message in dialog box that appears when you select the "Data roaming" check box -->
    <string name="roaming_warning">When you allow data roaming, you may incur significant roaming charges!</string>
    <!-- mobile network settings screen, message in dialog box that appears when you select the "Data roaming" check box. This is for multiuser tablets [CHAR LIMIT=none] -->
    <string name="roaming_warning_multiuser" product="tablet">When you allow data roaming, you may incur significant roaming charges!\n\nThis setting affects all users on this tablet.</string>
    <!-- mobile network settings screen, message in dialog box that appears when you select the "Data roaming" check box. This is for multiuser phones [CHAR LIMIT=none] -->
    <string name="roaming_warning_multiuser" product="default">When you allow data roaming, you may incur significant roaming charges!\n\nThis setting affects all users on this phone.</string>
    <!-- mobile network settings screen, title of dialog box that appears when you select the "Data roaming" check box -->
    <string name="roaming_reenable_title">Allow data roaming?</string>
    <!-- mobile network settings screen, setting option name -->
@@ -4081,6 +4085,10 @@
    <string name="data_usage_restrict_background_title">Restrict background data?</string>
    <!-- Body of dialog shown before user restricts background data usage. [CHAR LIMIT=NONE] -->
    <string name="data_usage_restrict_background">If you restrict background mobile data, some apps and services won\'t work unless you\'re connected to a Wi-Fi network.</string>
    <!-- Body of dialog shown before user restricts background data usage. This is for multiuser tablets. [CHAR LIMIT=NONE] -->
    <string name="data_usage_restrict_background_multiuser" product="tablet">If you restrict background mobile data, some apps and services won\'t work unless you\'re connected to a Wi-Fi network.\n\nThis setting affects all users on this tablet.</string>
    <!-- Body of dialog shown before user restricts background data usage. This is for multiuser phones. [CHAR LIMIT=NONE] -->
    <string name="data_usage_restrict_background_multiuser" product="default">If you restrict background mobile data, some apps and services won\'t work unless you\'re connected to a Wi-Fi network.\n\nThis setting affects all users on this phone.</string>

    <!-- Label displaying current network data usage warning threshold. [CHAR LIMIT=18] -->
    <string name="data_usage_sweep_warning"><font size="21"><xliff:g id="number" example="128">^1</xliff:g></font> <font size="9"><xliff:g id="unit" example="KB">^2</xliff:g></font>\n<font size="12">warning</font></string>
@@ -4286,6 +4294,15 @@
    <!-- Spoken content description for delete icon beside a user [CHAR LIMIT=none] -->
    <string name="user_delete_user_description">Delete user</string>

    <!-- Warning message when changing a global setting for a tablet.[CHAR LIMIT=none] -->
    <string name="global_change_warning" product="tablet">This setting affects all users on this tablet.</string>
    <!-- Warning message when changing a global setting for a phone.[CHAR LIMIT=none] -->
    <string name="global_change_warning" product="default">This setting affects all users on this phone.</string>
    <!-- Warning message title for global locale change [CHAR LIMIT=40] -->
    <string name="global_locale_change_title">Change language</string>
    <!-- Warning message title for global font change [CHAR LIMIT=40] -->
    <string name="global_font_change_title">Change font size</string>

    <!-- Label for are-notifications-enabled checkbox in app details [CHAR LIMIT=20] -->
    <string name="app_notifications_switch_label">Show notifications</string>

+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
                android:title="@string/screensaver_settings_title"
                android:fragment="com.android.settings.DreamSettings" />

        <ListPreference
        <com.android.settings.WarnedListPreference
                android:key="font_size"
                android:title="@string/title_font_size"
                android:summary="@string/summary_font_size"
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
    <Preference
            android:key="user_me"
            android:summary="@string/user_owner" />
    <EditTextPreference
    <com.android.settings.SelectableEditTextPreference
            android:key="user_nickname"
            android:title="@string/user_nickname"
            android:icon="@drawable/empty_icon" />
+11 −4
Original line number Diff line number Diff line
@@ -452,7 +452,6 @@ public class DataUsageSummary extends Fragment {
        mMenuDataRoaming = menu.findItem(R.id.data_usage_menu_roaming);
        mMenuDataRoaming.setVisible(hasReadyMobileRadio(context) && !appDetailMode);
        mMenuDataRoaming.setChecked(getDataRoaming());
        mMenuDataRoaming.setVisible(isOwner);

        mMenuRestrictBackground = menu.findItem(R.id.data_usage_menu_restrict_background);
        mMenuRestrictBackground.setVisible(hasReadyMobileRadio(context) && !appDetailMode);
@@ -485,7 +484,7 @@ public class DataUsageSummary extends Fragment {

        final MenuItem metered = menu.findItem(R.id.data_usage_menu_metered);
        if (hasReadyMobileRadio(context) || hasWifiRadio(context)) {
            metered.setVisible(isOwner && !appDetailMode);
            metered.setVisible(!appDetailMode);
        } else {
            metered.setVisible(false);
        }
@@ -1936,7 +1935,11 @@ public class DataUsageSummary extends Fragment {

            final AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.setTitle(R.string.roaming_reenable_title);
            if (Utils.hasMultipleUsers(context)) {
                builder.setMessage(R.string.roaming_warning_multiuser);
            } else {
                builder.setMessage(R.string.roaming_warning);
            }

            builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                @Override
@@ -1972,7 +1975,11 @@ public class DataUsageSummary extends Fragment {

            final AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.setTitle(R.string.data_usage_restrict_background_title);
            builder.setMessage(getString(R.string.data_usage_restrict_background));
            if (Utils.hasMultipleUsers(context)) {
                builder.setMessage(R.string.data_usage_restrict_background_multiuser);
            } else {
                builder.setMessage(R.string.data_usage_restrict_background);
            }

            builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                @Override
+9 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.os.Bundle;
import android.os.SELinux;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
@@ -126,9 +127,14 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {

        // These are contained by the root preference screen
        parentPreference = getPreferenceScreen();
        if (UserHandle.myUserId() == UserHandle.USER_OWNER) {
            Utils.updatePreferenceToSpecificActivityOrRemove(act, parentPreference,
                    KEY_SYSTEM_UPDATE_SETTINGS,
                    Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
        } else {
            // Remove for secondary users
            removePreference(KEY_SYSTEM_UPDATE_SETTINGS);
        }
        Utils.updatePreferenceToSpecificActivityOrRemove(act, parentPreference, KEY_CONTRIBUTORS,
                Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);

Loading