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

Commit 25b27f52 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Update appearance of proxied notifications in guts

Test: manual
Fixes: 131174114
Change-Id: I8725d34e7f2e43c17a1d16fba8ecbe20a0a3d3c9
parent e23b3677
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@
            android:layout_marginStart="2dp"
            android:layout_marginEnd="2dp"
            android:ellipsize="end"
            android:text="@string/notification_delegate_header"
            android:layout_toEndOf="@id/pkg_divider"
            android:maxLines="1" />
        <!-- Optional link to app. Only appears if the channel is not disabled and the app
+1 −1
Original line number Diff line number Diff line
@@ -1679,7 +1679,7 @@
    <string name="notification_multichannel_desc">This group of notifications cannot be configured here</string>

    <!-- Notification: Control panel: Label for the app that posted this notification, if it's not the package that the notification was posted for -->
    <string name="notification_delegate_header">via <xliff:g id="app_name" example="YouTube">%1$s</xliff:g></string>
    <string name="notification_delegate_header">Proxied notification</string>

    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
    <string name="appops_camera">This app is using the camera.</string>
+0 −16
Original line number Diff line number Diff line
@@ -448,22 +448,6 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G
        CharSequence delegatePkg = null;
        if (!TextUtils.equals(mPackageName, mDelegatePkg)) {
            // this notification was posted by a delegate!
            ApplicationInfo info;
            try {
                info = mPm.getApplicationInfo(
                        mDelegatePkg,
                        PackageManager.MATCH_UNINSTALLED_PACKAGES
                                | PackageManager.MATCH_DISABLED_COMPONENTS
                                | PackageManager.MATCH_DIRECT_BOOT_UNAWARE
                                | PackageManager.MATCH_DIRECT_BOOT_AWARE);
                if (info != null) {
                    delegatePkg = String.valueOf(mPm.getApplicationLabel(info));
                }
            } catch (PackageManager.NameNotFoundException e) { }
        }
        if (delegatePkg != null) {
            delegateView.setText(mContext.getResources().getString(
                    R.string.notification_delegate_header, delegatePkg));
            delegateView.setVisibility(View.VISIBLE);
            dividerView.setVisibility(View.VISIBLE);
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ public class NotificationInfoTest extends SysuiTestCase {
                IMPORTANCE_DEFAULT, true);
        final TextView nameView = mNotificationInfo.findViewById(R.id.delegate_name);
        assertEquals(VISIBLE, nameView.getVisibility());
        assertTrue(nameView.getText().toString().contains("Other"));
        assertTrue(nameView.getText().toString().contains("Proxied"));
        final TextView dividerView = mNotificationInfo.findViewById(R.id.pkg_divider);
        assertEquals(VISIBLE, dividerView.getVisibility());
    }