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

Commit 9be477cf authored by Alison Cichowlas's avatar Alison Cichowlas
Browse files

RONs: Log demotion via long-press guts.

Bug: 388796830
Flag: android.app.ui_rich_ongoing
Test: verified with atom tester
Change-Id: I712b81ad49de0ea98daf0f521d5a61812a0d3683
parent 6fa85799
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ public class PromotedNotificationInfo extends NotificationInfo {
    private static final String TAG = "PromotedNotifInfoGuts";
    private INotificationManager mNotificationManager;
    private PackageDemotionInteractor mPackageDemotionInteractor;
    private UiEventLogger mUiEventLogger;

    public PromotedNotificationInfo(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -90,6 +91,8 @@ public class PromotedNotificationInfo extends NotificationInfo {

        mPackageDemotionInteractor = packageDemotionInteractor;

        mUiEventLogger = uiEventLogger;

        bindDemote(sbn, pkg);

        // Override the visibility of elements we don't want for the promoted notification
@@ -134,10 +137,12 @@ public class PromotedNotificationInfo extends NotificationInfo {
                mNotificationManager.setCanBePromoted(packageName, sbn.getUid(), false, true);
                mPackageDemotionInteractor.onPackageDemoted(packageName, sbn.getUid());
                mGutsContainer.closeControls(v, true);
                mUiEventLogger.logWithInstanceId(
                        NotificationControlsEvent.NOTIFICATION_DEMOTION_COMMIT, sbn.getUid(),
                        packageName, sbn.getInstanceId());
            } catch (RemoteException e) {
                Log.e(TAG, "Couldn't revoke live update permission", e);
            }
        });
    }
}