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

Commit eb3d3719 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update strings and layout for enterprise privacy"

parents fea4b7ef ba66a0ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1506,7 +1506,7 @@
        </activity>

        <activity android:name="Settings$EnterprisePrivacySettingsActivity"
                android:label="@string/enterprise_privacy_settings_title"
                android:label="@string/enterprise_privacy_settings"
                android:taskAffinity="com.android.settings"
                android:parentActivityName="Settings$SecuritySettingsActivity">
            <intent-filter>
+16 −13
Original line number Diff line number Diff line
@@ -1304,10 +1304,13 @@
    <string name="device_admin_title">Device administration</string>
    <!-- Title of preference to manage device admins -->
    <string name="manage_device_admin">Device administrators</string>
    <string name="manage_device_admin">Device admin apps</string>
    <!-- Summary of preference to manage device policies -->
    <string name="manage_device_admin_summary">View or deactivate device administrators</string>
    <!-- Summary of preference to manage device administrators, informing the user how many device administrator apps are installed and active -->
    <plurals name="number_of_device_admins">
        <item quantity="one"><xliff:g id="count">%d</xliff:g> active app</item>
        <item quantity="other"><xliff:g id="count">%d</xliff:g> active apps</item>
    </plurals>
    <!-- Title of preference to manage trust agents -->
    <string name="manage_trust_agents">Trust agents</string>
@@ -8135,13 +8138,13 @@
    <!-- Enterprise Privacy --> <skip />
    <!-- Title of setting on security settings screen. This will take the user to a screen with information about admin powers and their impact on the user's privacy on a managed device. Shown on enterprise-managed devices only. -->
    <string name="enterprise_privacy_settings">Device management</string>
    <string name="enterprise_privacy_settings">Managed device details</string>
    <!-- Summary for Enterprise Privacy settings, explaining what the user can expect to find under it [CHAR LIMIT=NONE]-->
    <string name="enterprise_privacy_settings_summary_generic">Changes &amp; settings managed by your organization</string>
    <!-- Summary for Enterprise Privacy settings, explaining what the user can expect to find under it [CHAR LIMIT=NONE]-->
    <string name="enterprise_privacy_settings_summary">View all settings applied by your admin</string>
    <!-- Enterprise Privacy settings activity title -->
    <string name="enterprise_privacy_settings_title">Device management</string>
    <!-- Enterprise Privacy settings activity footer, summarizing the powers that the admin has. [CHAR LIMIT=NONE] -->
    <string name="enterprise_privacy_footer">To provide access to your work data, your organization may change settings and install software on your device. \n\nFor more details, contact your organization\'s admin.</string>
    <string name="enterprise_privacy_settings_summary_with_name">Changes &amp; settings managed by <xliff:g id="organization_name" example="Foo, Inc.">%s</xliff:g></string>
    <!-- Enterprise Privacy settings activity header, summarizing the powers that the admin has. [CHAR LIMIT=NONE] -->
    <string name="enterprise_privacy_header">To provide access to your work data, your organization may change settings and install software on your device.\n\nFor more details, contact your organization\'s admin.</string>
    <!-- Title for the 'Types of information your organization can see' preference category. [CHAR LIMIT=60] -->
    <string name="enterprise_privacy_exposure_category">Types of information your organization can see</string>
    <!-- Title for the 'Changes made by your organization’s admin' preference category. [CHAR LIMIT=60] -->
@@ -8201,8 +8204,8 @@
    </plurals>
    <!-- Label explaining that the admin installed trusted CA certificates for the personal profile. [CHAR LIMIT=NONE] -->
    <plurals name="enterprise_privacy_ca_certs_personal">
        <item quantity="one">Trusted CA Certificate installed in the personal profile</item>
        <item quantity="other">Trusted CA Certificates installed in the personal profile</item>
        <item quantity="one">Trusted CA Certificate installed in your personal profile</item>
        <item quantity="other">Trusted CA Certificates installed in your personal profile</item>
    </plurals>
    <!-- Summary indicating the number of trusted CA certificates installed by the admin. [CHAR LIMIT=NONE] -->
    <plurals name="enterprise_privacy_number_ca_certs">
@@ -8216,8 +8219,8 @@
    </plurals>
    <!-- Label explaining that the admin installed trusted CA certificates for the work profile. [CHAR LIMIT=NONE] -->
    <plurals name="enterprise_privacy_ca_certs_work">
        <item quantity="one">Trusted CA Certificate installed in the work profile</item>
        <item quantity="other">Trusted CA Certificates installed in the work profile</item>
        <item quantity="one">Trusted CA Certificate installed in your work profile</item>
        <item quantity="other">Trusted CA Certificates installed in your work profile</item>
    </plurals>
    <!-- Label explaining that the admin can lock the device and change the user's password. [CHAR LIMIT=NONE] -->
    <string name="enterprise_privacy_lock_device">Admin can lock the device and reset password</string>
+7 −5
Original line number Diff line number Diff line
@@ -17,7 +17,13 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
        android:key="enterprise_privacy_settings"
        android:title="@string/enterprise_privacy_settings_title">
        android:title="@string/enterprise_privacy_settings">

    <!-- Header -->
    <Preference
            android:icon="@drawable/ic_info_outline_24dp"
            android:summary="@string/enterprise_privacy_header"
            android:selectable="false"/>

    <PreferenceCategory android:title="@string/enterprise_privacy_exposure_category">
        <com.android.settings.DividerPreference
@@ -107,8 +113,4 @@
                android:key="failed_password_wipe_managed_profile"
                settings:multiLine="true"/>
    </PreferenceCategory>

    <com.android.settings.widget.FooterPreference
            android:title="@string/enterprise_privacy_footer"
            android:selectable="false"/>
</PreferenceScreen>
+0 −2
Original line number Diff line number Diff line
@@ -39,13 +39,11 @@

        <Preference android:key="manage_device_admin"
                android:title="@string/manage_device_admin"
                android:summary="@string/manage_device_admin_summary"
                android:persistent="false"
                android:fragment="com.android.settings.DeviceAdminSettings"/>

        <Preference android:key="enterprise_privacy"
                android:title="@string/enterprise_privacy_settings"
                android:summary="@string/enterprise_privacy_settings_summary"
                android:persistent="false"
                android:fragment="com.android.settings.enterprise.EnterprisePrivacySettings"/>

+22 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ import com.android.settings.TrustAgentUtils.TrustAgentComponentInfo;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import com.android.settings.dashboard.DashboardFeatureProvider;
import com.android.settings.dashboard.SummaryLoader;
import com.android.settings.enterprise.EnterprisePrivacyPreferenceController;
import com.android.settings.enterprise.ManageDeviceAdminPreferenceController;
import com.android.settings.fingerprint.FingerprintSettings;
import com.android.settings.location.LocationPreferenceController;
import com.android.settings.overlay.FeatureFactory;
@@ -128,6 +130,10 @@ public class SecuritySettings extends SettingsPreferenceFragment
    static final String KEY_PACKAGE_VERIFIER_STATUS = "security_status_package_verifier";
    private static final int PACKAGE_VERIFIER_STATE_ENABLED = 1;

    // Device management settings
    private static final String KEY_ENTERPRISE_PRIVACY = "enterprise_privacy";
    private static final String KEY_MANAGE_DEVICE_ADMIN = "manage_device_admin";

    // These switch preferences need special handling since they're not all stored in Settings.
    private static final String SWITCH_PREFERENCE_KEYS[] = {
            KEY_SHOW_PASSWORD, KEY_UNIFICATION, KEY_VISIBLE_PATTERN_PROFILE
@@ -164,6 +170,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
    private String mCurrentProfilePassword;

    private LocationPreferenceController mLocationcontroller;
    private ManageDeviceAdminPreferenceController mManageDeviceAdminPreferenceController;
    private EnterprisePrivacyPreferenceController mEnterprisePrivacyPreferenceController;

    @Override
    public int getMetricsCategory() {
@@ -201,6 +209,10 @@ public class SecuritySettings extends SettingsPreferenceFragment
        }

        mLocationcontroller = new LocationPreferenceController(activity);
        mManageDeviceAdminPreferenceController
                = new ManageDeviceAdminPreferenceController(activity);
        mEnterprisePrivacyPreferenceController
                = new EnterprisePrivacyPreferenceController(activity, null /* lifecycle */);
    }

    private static int getResIdForLockUnlockScreen(Context context,
@@ -394,6 +406,11 @@ public class SecuritySettings extends SettingsPreferenceFragment
        }

        mLocationcontroller.displayPreference(root);
        mManageDeviceAdminPreferenceController.updateState(
                root.findPreference(KEY_MANAGE_DEVICE_ADMIN));
        mEnterprisePrivacyPreferenceController.displayPreference(root);
        mEnterprisePrivacyPreferenceController.onResume();

        return root;
    }

@@ -895,6 +912,11 @@ public class SecuritySettings extends SettingsPreferenceFragment
                keys.add(KEY_MANAGE_TRUST_AGENTS);
            }

            if (!(new EnterprisePrivacyPreferenceController(context, null /* lifecycle */))
                    .isAvailable()) {
                keys.add(KEY_ENTERPRISE_PRIVACY);
            }

            return keys;
        }
    }
Loading