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

Commit 5c95b3de authored by Dan Sandler's avatar Dan Sandler Committed by Android (Google) Code Review
Browse files

Merge "Clean up autoredaction text." into lmp-dev

parents 6e0a9fa6 18bb4f99
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -691,4 +691,7 @@

    <!-- Battery level for expanded quick settings [CHAR LIMIT=2] -->
    <string name="battery_level_template"><xliff:g id="level" example="45">%d</xliff:g>%%</string>

    <!-- Text shown in place of notification contents when the notification is hidden on a secure lockscreen -->
    <string name="notification_hidden_text">Contents hidden</string>
</resources>
+6 −0
Original line number Diff line number Diff line
@@ -270,4 +270,10 @@
        <item name="android:windowEnterAnimation">@*android:anim/dock_top_enter</item>
        <item name="android:windowExitAnimation">@*android:anim/dock_top_exit</item>
    </style>

    <style name="TextAppearance.StatusBar.Material.EventContent.Parenthetical"
           parent="@*android:style/TextAppearance.StatusBar.Material.EventContent">
        <item name="android:textStyle">italic</item>
        <item name="android:textColor">#60000000</item>
    </style>
</resources>
+17 −3
Original line number Diff line number Diff line
@@ -62,8 +62,10 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewStub;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import android.widget.DateTimeView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
@@ -1075,12 +1077,24 @@ public abstract class BaseStatusBar extends SystemUI implements
                }
            }

            final View privateTime = contentViewLocal.findViewById(com.android.internal.R.id.time);
            if (privateTime != null && privateTime.getVisibility() == View.VISIBLE) {
                final View timeStub = publicViewLocal.findViewById(com.android.internal.R.id.time);
                timeStub.setVisibility(View.VISIBLE);
                final DateTimeView dateTimeView = (DateTimeView)
                        publicViewLocal.findViewById(com.android.internal.R.id.time);
                dateTimeView.setTime(entry.notification.getNotification().when);
            }

            final TextView text = (TextView) publicViewLocal.findViewById(
                com.android.internal.R.id.text);
            text.setText("Unlock your device to see this notification.");
            if (text != null) {
                text.setText(R.string.notification_hidden_text);
                text.setTextAppearance(mContext,
                        R.style.TextAppearance_StatusBar_Material_EventContent_Parenthetical);
            }

            entry.autoRedacted = true;
            // TODO: fill out "time" as well
        }

        row.setDrawingCacheEnabled(true);