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

Commit d52ea0c2 authored by Dan Sandler's avatar Dan Sandler Committed by Daniel Sandler
Browse files

Show "Android System" instead of "System UI" in screenshot notifications.

Bug: 26517701
Change-Id: I0f4a58531066c49fed90bcdd78c92a4f212ada3b
parent b02d51b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -162,6 +162,9 @@
    <!-- It's like, reality, but, you know, virtual -->
    <uses-permission android:name="android.permission.ACCESS_VR_MANAGER" />

    <!-- the ability to rename notifications posted by other apps -->
    <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />

    <application
        android:name=".SystemUIApplication"
        android:persistent="true"
+10 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.graphics.Rect;
import android.media.MediaActionSound;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.os.Process;
import android.provider.MediaStore;
@@ -164,6 +165,11 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
        c.drawColor(overlayColor);
        c.setBitmap(null);

        // swap "System UI" out for "Android System"
        final Bundle extras = new Bundle();
        extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME,
                context.getString(com.android.internal.R.string.android_system_label));

        // Show the intermediate notification
        mTickerAddSpace = !mTickerAddSpace;
        mNotificationManager = nManager;
@@ -180,6 +186,8 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
                .setSmallIcon(R.drawable.stat_notify_image)
                .setCategory(Notification.CATEGORY_PROGRESS)
                .setWhen(now)
                .setShowWhen(true)
                .addExtras(extras)
                .setColor(r.getColor(
                        com.android.internal.R.color.system_notification_accent_color));

@@ -190,6 +198,8 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
            .setContentText(r.getString(R.string.screenshot_saving_text))
            .setSmallIcon(R.drawable.stat_notify_image)
            .setWhen(now)
            .setShowWhen(true)
            .addExtras(extras)
            .setColor(r.getColor(com.android.internal.R.color.system_notification_accent_color))
            .setStyle(mNotificationStyle)
            .setPublicVersion(mPublicNotificationBuilder.build());