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

Commit cba9a259 authored by Rajeev Kumar's avatar Rajeev Kumar Committed by Android (Google) Code Review
Browse files

Merge "Update financed device info screen"

parents 0ee078d3 2dd111b3
Loading
Loading
Loading
Loading
+38 −14
Original line number Diff line number Diff line
@@ -12032,20 +12032,44 @@
    <!-- Title of setting on security settings screen on a financed device. This will take the user to a screen with information about what a device administrator can control and their impact on the user's privacy on a financed device. Shown on financed-managed devices only. [CHAR LIMIT=NONE] -->
    <string name="financed_privacy_settings">Financed device info</string>
    <!-- Section header. This section shows what information a device administrator can see on a financed device. [CHAR LIMIT=60] -->
    <string name="financed_privacy_exposure_category">Types of information your device administrator can see</string>
    <!-- Label explaining that the device administrator can see data associated on the user's financed device. [CHAR LIMIT=NONE] -->
    <string name="financed_privacy_data">Data associated with your account, such as email and calendar info</string>
    <!-- Section header. This section shows what changes a device administrator made to a financed device. [CHAR LIMIT=60] -->
    <string name="financed_privacy_exposure_changes_category">Changes made by your device administrator</string>
    <!-- Label explaining that the device admin can lock the device and change the user's password on their financed device. [CHAR LIMIT=NONE] -->
    <string name="financed_privacy_lock_device">Device administrator can lock this device and reset password</string>
    <!-- Label explaining that the device admin can wipe the device remotely for a financed device. [CHAR LIMIT=NONE] -->
    <string name="financed_privacy_wipe_device">Device administrator can delete all device data</string>
    <!-- Label explaining that the device admin configured the device to wipe itself when an incorrect password is entered too many times on a financed device. [CHAR LIMIT=NONE] -->
    <string name="financed_privacy_failed_password_wipe_device">Failed password attempts before deleting device data</string>
    <!-- Financed Privacy settings activity header, summarizing the changes a credit provider can make to a financed device. [CHAR LIMIT=NONE] -->
    <string name="financed_privacy_header">Your credit provider can change settings and install software on this device.\n\nTo learn more, contact your creditor provider.</string>
    <!-- Top introduction on the financed device privacy settings, summarizing the changes a credit provider can make to a financed device. [CHAR LIMIT=NONE] -->
    <string name="financed_privacy_intro">Your credit provider can change settings and install software on this device.\n\nIf you miss a payment, your device will be locked.\n\nTo learn more, contact your credit provider.</string>
    <!-- Section header. This section shows what restrictions will be enforced on the device when it is financed. [CHAR LIMIT=60] -->
    <string name="financed_privacy_restrictions_category">If your device is financed, you can\u2019t:</string>
    <!-- Label explaining that installing apps from unknown sources beyond Play Store. [CHAR LIMIT=60]-->
    <string name="financed_privacy_install_apps">Install apps from outside the Play Store</string>
    <!-- Label explaining that rebooting the device into safe mode. [CHAR LIMIT=60]-->
    <string name="financed_privacy_safe_mode">Reboot your device into safe mode</string>
    <!-- Label explaining that adding more than one user into the device. [CHAR LIMIT=60]-->
    <string name="financed_privacy_multi_users">Add multiple users to your device</string>
    <!-- Label explaining that updating the date and time on the device. [CHAR LIMIT=60] -->
    <string name="financed_privacy_config_date_time">Change date, time, and time zones</string>
    <!-- Label explaining that turning on the developer options on the device. [CHAR LIMIT=40]-->
    <string name="financed_privacy_developer_options">Use developer options</string>
    <!-- Section header. This section shows how credit provider would control the device. [CHAR LIMIT=40]-->
    <string name="financed_privacy_credit_provider_capabilities_category">Your credit provider can:</string>
    <!-- Label explaining that IMEI can be access by the credit provider. [CHAR LIMIT=40] -->
    <string name="financed_privacy_IMEI">Access your IMEI number</string>
    <!-- Label explaining that device can be reset and data can be deleted. [CHAR LIMIT=40]-->
    <string name="financed_privacy_factory_reset">Factory reset your device</string>
    <!-- Section header. This section shows what the user can do if the device is locked by the credit provider. [CHAR LIMIT=100] -->
    <string name="financed_privacy_locked_mode_category">If your device is locked, you can only use it to:</string>
    <!-- Label explaining that calling emergency numbers. [CHAR LIMIT=40]-->
    <string name="financed_privacy_emergency_calls">Make emergency calls</string>
    <!-- Label explaining that access basic system level data including date, time, network status, and battery info. [CHAR LIMIT=100]-->
    <string name="financed_privacy_system_info">View system info like date, time, network status, and battery</string>
    <!-- Label explaining that powering on or off the device. [CHAR LIMIT=60]-->
    <string name="financed_privacy_turn_on_off_device">Turn your device on or off</string>
    <!-- Label explaining that accessing notifications and text messages. [CHAR LIMIT=60]-->
    <string name="financed_privacy_notifications">View notifications &amp; text messages</string>
    <!-- Label explaining that using apps that are allowed to be used by the credit provider when the device is locked. [CHAR LIMIT=100]-->
    <string name="financed_privacy_allowlisted_apps">Access apps that are allowed by the credit provider</string>
    <!-- Section header. This sections shows what would happen if the device is fully paid. [CHAR LIMIT=60] -->
    <string name="financed_privacy_fully_paid_category">Once you pay the full amount:</string>
    <!-- Label explaining that all previously restrictions enforce by the credit provider will be revoked. [CHAR LIMIT=100]-->
    <string name="financed_privacy_restrictions_removed">All restrictions are removed from the device</string>
    <!-- Label explaining that the app installed by credit provider can be uninstalled. [CHAR LIMIT=60]-->
    <string name="financed_privacy_uninstall_creditor_app">You can uninstall the creditor app</string>
    <!-- Strings for displaying which applications were set as default for specific actions. -->
    <!-- Title for the apps that have been set as default handlers of camera-related intents. [CHAR LIMIT=30] -->
+86 −50
Original line number Diff line number Diff line
@@ -19,66 +19,102 @@
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:title="@string/financed_privacy_settings">

    <PreferenceCategory android:key="exposure_category"
        android:order="200"
        android:title="@string/financed_privacy_exposure_category"
        android:contentDescription="@string/financed_privacy_exposure_category">
        <Preference android:key="enterprise_privacy_enterprise_data"
            android:order="210"
    <com.android.settingslib.widget.TopIntroPreference
        android:title="@string/financed_privacy_intro"
        settings:searchable="false" />

    <PreferenceCategory android:key="restrictions_category"
        android:order="100"
        android:title="@string/financed_privacy_restrictions_category"
        android:contentDescription="@string/financed_privacy_restrictions_category">
        <Preference android:key="financed_privacy_install_apps"
            android:order="110"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_data"
            android:title="@string/financed_privacy_install_apps"
            android:selectable="false" />
        <Preference android:key="enterprise_privacy_installed_packages"
            android:order="220"
            android:title="@string/enterprise_privacy_installed_packages"
        <Preference android:key="financed_privacy_safe_mode"
            android:order="120"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_safe_mode"
            android:selectable="false" />
        <Preference android:key="enterprise_privacy_usage_stats"
            android:order="230"
            android:title="@string/enterprise_privacy_usage_stats"
        <Preference android:key="financed_privacy_multi_users"
            android:order="130"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_multi_users"
            android:selectable="false" />
        <Preference android:key="network_logs"
            android:order="240"
            android:title="@string/enterprise_privacy_network_logs"
        <Preference android:key="financed_privacy_config_date_time"
            android:order="140"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_config_date_time"
            android:selectable="false" />
        <Preference android:key="bug_reports"
            android:order="250"
            android:title="@string/enterprise_privacy_bug_reports"
        <Preference android:key="financed_privacy_developer_options"
            android:order="150"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_developer_options"
            android:selectable="false" />
        <Preference android:key="security_logs"
            android:order="260"
            android:title="@string/enterprise_privacy_security_logs"
    </PreferenceCategory>

    <PreferenceCategory android:key="credit_provider_capabilities_category"
        android:order="200"
        android:title="@string/financed_privacy_credit_provider_capabilities_category"
        android:contentDescription="@string/financed_privacy_credit_provider_capabilities_category">
        <Preference android:key="financed_privacy_IMEI"
            android:order="210"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_IMEI"
            android:selectable="false" />
        <Preference android:key="financed_privacy_factory_reset"
            android:order="220"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_factory_reset"
            android:selectable="false" />
    </PreferenceCategory>

    <PreferenceCategory android:title="@string/financed_privacy_exposure_changes_category"
    <PreferenceCategory android:key="locked_mode_category"
        android:order="300"
        android:key="exposure_changes_category">
        <Preference android:fragment="com.android.settings.enterprise.ApplicationListFragment$EnterpriseInstalledPackages"
        android:title="@string/financed_privacy_locked_mode_category"
        android:contentDescription="@string/financed_privacy_locked_mode_category">
        <Preference android:key="financed_privacy_emergency_calls"
            android:order="310"
            android:key="number_enterprise_installed_packages"
            android:title="@string/enterprise_privacy_enterprise_installed_packages"/>
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_emergency_calls"
            android:selectable="false" />
        <Preference android:key="financed_privacy_system_info"
            android:order="320"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_system_info"
            android:selectable="false" />
        <Preference android:key="financed_privacy_turn_on_off_device"
            android:order="330"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_turn_on_off_device"
            android:selectable="false" />
        <Preference android:key="financed_privacy_notifications"
            android:order="340"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_notifications"
            android:selectable="false" />
        <Preference android:key="financed_privacy_allowlisted_apps"
            android:order="350"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_allowlisted_apps"
            android:selectable="false" />
    </PreferenceCategory>

    <PreferenceCategory android:key="device_access_category"
        android:order="500"
        android:title="@string/enterprise_privacy_device_access_category">
        <Preference android:key="enterprise_privacy_lock_device"
            android:order="510"
            android:title="@string/financed_privacy_lock_device"
            android:selectable="false"/>
        <Preference android:key="enterprise_privacy_wipe_device"
            android:order="520"
            android:title="@string/financed_privacy_wipe_device"
    <PreferenceCategory android:key="fully_paid_category"
        android:order="400"
        android:title="@string/financed_privacy_fully_paid_category"
        android:contentDescription="@string/financed_privacy_fully_paid_category">
        <Preference android:key="financed_privacy_restrictions_removed"
            android:order="410"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_restrictions_removed"
            android:selectable="false" />
        <Preference android:key="failed_password_wipe_current_user"
            android:order="530"
            android:title="@string/financed_privacy_failed_password_wipe_device"
        <Preference android:key="financed_privacy_uninstall_creditor_app"
            android:order="420"
            android:layout_height="wrap_content"
            android:title="@string/financed_privacy_uninstall_creditor_app"
            android:selectable="false" />
    </PreferenceCategory>

    <com.android.settingslib.widget.FooterPreference
        android:key="financed_privacy_footer"
        android:title="@string/financed_privacy_header"
        android:selectable="false"
        settings:searchable="false"/>
</PreferenceScreen>
+1 −15
Original line number Diff line number Diff line
@@ -20,10 +20,8 @@ import android.content.Context;
import android.provider.SearchIndexableResource;

import com.android.settings.R;
import com.android.settings.widget.PreferenceCategoryController;
import com.android.settingslib.core.AbstractPreferenceController;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@@ -61,18 +59,6 @@ public class PrivacySettingsFinancedPreference implements PrivacySettingsPrefere
     */
    @Override
    public List<AbstractPreferenceController> createPreferenceControllers(boolean async) {
        final List<AbstractPreferenceController> controllers = new ArrayList<>();
        controllers.add(new NetworkLogsPreferenceController(mContext));
        controllers.add(new BugReportsPreferenceController(mContext));
        controllers.add(new SecurityLogsPreferenceController(mContext));
        final List<AbstractPreferenceController> exposureChangesCategoryControllers =
                new ArrayList<>();
        exposureChangesCategoryControllers.add(new EnterpriseInstalledPackagesPreferenceController(
                mContext, async));
        controllers.addAll(exposureChangesCategoryControllers);
        controllers.add(new PreferenceCategoryController(mContext, KEY_EXPOSURE_CHANGES_CATEGORY)
                .setChildren(exposureChangesCategoryControllers));
        controllers.add(new FailedPasswordWipeCurrentUserPreferenceController(mContext));
        return controllers;
        return Collections.emptyList();
    }
}
+1 −13
Original line number Diff line number Diff line
@@ -84,18 +84,6 @@ public abstract class AbsBasePrivacySettingsPreference {

    protected void verifyFinancedPreferenceControllers(
            List<AbstractPreferenceController> controllers) {
        assertThat(controllers).isNotNull();
        assertThat(controllers.size()).isEqualTo(6);
        int position = 0;
        assertThat(controllers.get(position++)).isInstanceOf(NetworkLogsPreferenceController.class);
        assertThat(controllers.get(position++)).isInstanceOf(BugReportsPreferenceController.class);
        assertThat(controllers.get(position++)).isInstanceOf(
                SecurityLogsPreferenceController.class);
        assertThat(controllers.get(position++)).isInstanceOf(
                EnterpriseInstalledPackagesPreferenceController.class);
        assertThat(controllers.get(position++)).isInstanceOf(
                PreferenceCategoryController.class);
        assertThat(controllers.get(position)).isInstanceOf(
                FailedPasswordWipeCurrentUserPreferenceController.class);
        assertThat(controllers).isEmpty();
    }
}