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

Commit f6077f47 authored by Clara Bayarri's avatar Clara Bayarri
Browse files

Make Lockscreen Notification Content work for profiles

The settings for the Notification Content is user-dependent
and the correct values are used in the lock screen.

Bug: 26709332
Change-Id: I7acf94014771dacc2841da336bed645fdb948541
parent 0c7bce82
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
        android:paddingEnd="?attr/side_margin">

    <TextView
            android:id="@+id/message"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/redaction_vertical_margins"
+20 −0
Original line number Diff line number Diff line
@@ -5829,6 +5829,26 @@
    <!-- Security > Choose PIN/PW/Pattern > Notification redaction interstitial: Title for the screen asking the user how they want their notifications to appear when the device is locked [CHAR LIMIT=30] -->
    <string name="lock_screen_notifications_interstitial_title">Notifications</string>
    <!-- Configure Notifications: Value for lockscreen notifications:  all information will be
         shown in profile notifications shown on a secure lock screen
         [CHAR LIMIT=50] -->
    <string name="lock_screen_notifications_summary_show_profile">Show all profile notification content</string>
    <!-- Configure Notifications: Value for lockscreen notifications: sensitive information will be
         hidden or redacted from profile notifications shown on a secure lock screen
         [CHAR LIMIT=50] -->
    <string name="lock_screen_notifications_summary_hide_profile">Hide sensitive profile notification content</string>
    <!-- Configure Notifications: Value for lockscreen notifications: profile notifications will not appear on a secure lock screen
         [CHAR LIMIT=50] -->
    <string name="lock_screen_notifications_summary_disable_profile">Don\u2019t show profile notifications at all</string>
    <!-- Security > Choose PIN/PW/Pattern > Notification redaction interstitial: Message asking the user how they want their profile notifications to appear when the device is locked [CHAR LIMIT=NONE] -->
    <string name="lock_screen_notifications_interstitial_message_profile">When your device is locked, how do you want profile notifications to show?</string>
    <!-- Security > Choose PIN/PW/Pattern > Notification redaction interstitial: Title for the screen asking the user how they want their profile notifications to appear when the device is locked [CHAR LIMIT=30] -->
    <string name="lock_screen_notifications_interstitial_title_profile">Profile notifications</string>
    <!-- Notification Settings: Title for the option managing notifications per application. [CHAR LIMIT=30] -->
    <string name="app_notifications_title">Notifications</string>
+1 −1
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ public class ChooseLockPassword extends SettingsActivity {
        }

        protected Intent getRedactionInterstitialIntent(Context context) {
            return RedactionInterstitial.createStartIntent(context);
            return RedactionInterstitial.createStartIntent(context, mUserId);
        }

        protected void updateStage(Stage stage) {
+1 −1
Original line number Diff line number Diff line
@@ -465,7 +465,7 @@ public class ChooseLockPattern extends SettingsActivity {
        }

        protected Intent getRedactionInterstitialIntent(Context context) {
            return RedactionInterstitial.createStartIntent(context);
            return RedactionInterstitial.createStartIntent(context, mUserId);
        }

        public void handleLeftButton() {
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.UserHandle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -39,7 +40,7 @@ import com.android.setupwizardlib.view.NavigationBar;
public class SetupRedactionInterstitial extends RedactionInterstitial {

    public static Intent createStartIntent(Context ctx) {
        Intent startIntent = RedactionInterstitial.createStartIntent(ctx);
        Intent startIntent = RedactionInterstitial.createStartIntent(ctx, UserHandle.myUserId());
        if (startIntent != null) {
            startIntent.setClass(ctx, SetupRedactionInterstitial.class);
            startIntent.putExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)
Loading