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

Commit fd544a6a authored by Olivier Nshimiye's avatar Olivier Nshimiye Committed by Android (Google) Code Review
Browse files

Merge "Add a custom message to prompt user to set up screenlock before PS reset" into main

parents ced9ebc3 d02bb11e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ public class SetScreenLockDialogActivity extends AlertActivity
            LAUNCH_REASON_PRIVATE_SPACE_SETTINGS_ACCESS,
            LAUNCH_REASON_DISABLE_QUIET_MODE,
            LAUNCH_REASON_UNKNOWN,
            LAUNCH_REASON_RESET_PRIVATE_SPACE_SETTINGS_ACCESS,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface LaunchReason {
@@ -67,6 +68,7 @@ public class SetScreenLockDialogActivity extends AlertActivity
    public static final int LAUNCH_REASON_UNKNOWN = -1;
    public static final int LAUNCH_REASON_DISABLE_QUIET_MODE = 1;
    public static final int LAUNCH_REASON_PRIVATE_SPACE_SETTINGS_ACCESS = 2;
    public static final int LAUNCH_REASON_RESET_PRIVATE_SPACE_SETTINGS_ACCESS = 3;
    private @LaunchReason int mReason;
    private int mOriginUserId;

@@ -139,7 +141,11 @@ public class SetScreenLockDialogActivity extends AlertActivity
            // Always set private space message if launch reason is specific to private space
            builder.setMessage(R.string.private_space_set_up_screen_lock_message);
            return;
        } else if (mReason == LAUNCH_REASON_RESET_PRIVATE_SPACE_SETTINGS_ACCESS) {
            builder.setMessage(R.string.private_space_set_up_screen_lock_for_reset);
            return;
        }

        final UserManager userManager = getApplicationContext().getSystemService(UserManager.class);
        if (userManager != null) {
            UserInfo userInfo = userManager.getUserInfo(mOriginUserId);
+3 −0
Original line number Diff line number Diff line
@@ -5509,6 +5509,9 @@
    <!-- Message shown in the dialog prompting the user to set up a screen lock to access private space [CHAR LIMIT=120] -->
    <string name="private_space_set_up_screen_lock_message">To use your private space, set a screen lock on this device</string>

    <!-- Message shown in the dialog prompting the user to set up a screen lock to delete private space from Reset Options [CHAR LIMIT=120] -->
    <string name="private_space_set_up_screen_lock_for_reset">To delete private space, set a screen lock on this device</string>

    <!-- Title of the dialog that is shown when the user tries to launch a blocked application [CHAR LIMIT=50] -->
    <string name="app_blocked_title">App is not available</string>
    <!-- Default message shown in the dialog that is shown when the user tries to launch a blocked application [CHAR LIMIT=NONE] -->
+2 −0
Original line number Diff line number Diff line
@@ -3299,6 +3299,8 @@
  <java-symbol type="string" name="set_up_screen_lock_action_label" />
  <!-- Message for the alert dialog prompting the user to set up a screen lock to access private space -->
  <java-symbol type="string" name="private_space_set_up_screen_lock_message" />
  <!-- Message shown in the dialog prompting the user to set up a screen lock to delete private space from Reset Options [CHAR LIMIT=120] -->
  <java-symbol type="string" name="private_space_set_up_screen_lock_for_reset" />

  <java-symbol type="string" name="deprecated_target_sdk_message" />
  <java-symbol type="string" name="deprecated_target_sdk_app_store" />