Saturday, 6 May 2023

Is there a way to enable 'Clear All Notification' button while config_showRecentAndOldHeaders is set to true

I'm working on Automotive AOSP Android 12.

I'm trying to enable the button "Clear All Notification" by overlaying the SystemUI config but it seems impossible while "config_showRecentAndOldHeaders = true". Based on what I found under Notification module (android/packages/apps/Car/Notification/src/com/android/car/notification/template/CarNotificationFooterViewHolder.java), if "config_showRecentAndOldHeaders = true", the "mClearAllButton" is transformed to "ManageButton".

if (mShowRecentsAndOlderHeaders) {
                mClearAllButton.setText(R.string.manage_text);
                if (!mClearAllButton.hasOnClickListeners()) {
                    mClearAllButton.setOnClickListener(this::manageButtonOnClickListener);
                }
            } else {
                if (!mClearAllButton.hasOnClickListeners()) {
                    mClearAllButton.setOnClickListener(view -> {
                        mNotificationItemController.clearAllNotifications();
                    });
                }
            }

Thank you.



from Is there a way to enable 'Clear All Notification' button while config_showRecentAndOldHeaders is set to true

No comments:

Post a Comment