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

Commit 65e18a57 authored by Bartosz Fabianowski's avatar Bartosz Fabianowski
Browse files

Finalize strings for enterprise privacy

A few final string tweaks for the enterprise privacy page.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: I7957263e768a588188e98f298eaae25ec77abeca
parent 5dc168af
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1306,6 +1306,9 @@
    <!-- Title of preference to manage device admins -->
    <string name="manage_device_admin">Device admin apps</string>
    <!-- Summary of preference to manage device administrators, informing the user that currently no device administrator apps are installed and active -->
    <string name="number_of_device_admins_none">No active apps</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>
@@ -8168,7 +8171,7 @@
    <!-- 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. Note: "Device" is singular and refers to the device (e.g. phone or tablet) that the user is holding in their hand. -->
    <string name="enterprise_privacy_settings">Managed device details</string>
    <string name="enterprise_privacy_settings">Managed device info</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]-->
@@ -8229,13 +8232,13 @@
    <string name="enterprise_privacy_global_http_proxy">Global HTTP proxy set</string>
    <!-- Label explaining that the admin installed trusted CA certificates for the current user. [CHAR LIMIT=NONE] -->
    <plurals name="enterprise_privacy_ca_certs_user">
        <item quantity="one">Trusted CA Certificate installed</item>
        <item quantity="other">Trusted CA Certificates installed</item>
        <item quantity="one">Trusted CA certificate installed</item>
        <item quantity="other">Trusted CA certificates installed</item>
    </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 your personal profile</item>
        <item quantity="other">Trusted CA Certificates installed in your 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">
+4 −2
Original line number Diff line number Diff line
@@ -36,8 +36,10 @@ public class ManageDeviceAdminPreferenceController extends PreferenceController
    public void updateState(Preference preference) {
        final int activeAdmins
                = mFeatureProvider.getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile();
        preference.setSummary(mContext.getResources().getQuantityString(
                R.plurals.number_of_device_admins, activeAdmins, activeAdmins));
        preference.setSummary(activeAdmins == 0
                ? mContext.getResources().getString(R.string.number_of_device_admins_none)
                : mContext.getResources().getQuantityString(R.plurals.number_of_device_admins,
                        activeAdmins, activeAdmins));
    }

    @Override
+7 −0
Original line number Diff line number Diff line
@@ -61,6 +61,13 @@ public final class ManageDeviceAdminPreferenceControllerTest {
    public void testUpdateState() {
        final Preference preference = new Preference(mContext, null, 0, 0);

        when(mFeatureFactory.enterprisePrivacyFeatureProvider
                .getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile()).thenReturn(0);
        when(mContext.getResources().getString(R.string.number_of_device_admins_none))
                .thenReturn("no apps");
        mController.updateState(preference);
        assertThat(preference.getSummary()).isEqualTo("no apps");

        when(mFeatureFactory.enterprisePrivacyFeatureProvider
                .getNumberOfActiveDeviceAdminsForCurrentUserAndManagedProfile()).thenReturn(5);
        when(mContext.getResources().getQuantityString(R.plurals.number_of_device_admins, 5, 5))