From 3e9c576bb8334f4bc1b25569eb913b7cf64045e2 Mon Sep 17 00:00:00 2001 From: Yi-Ling Chuang Date: Fri, 14 May 2021 16:11:03 +0800 Subject: [PATCH] Apply transition on the back arrow on NotificationHistory page When clicking on the back arrow from the action bar in the Notification History page, the shared x-axis transition won't work. The onOptionsItemSelected() overriden in the parent activity was removed, so onNavigateUp() will get called. In the NotificationHistoryActivity, onNavigateUp() has been overriden, and so it will just call finish without any transition applied. Hence, remove the override and just use the one define in CollapsingToolbarBaseActivity where finishAfterTransition() is called. Test: rebuild and click on the back arrow to see the transition Fixes: 188126675 Change-Id: I34ff38ffcfb37d0471d325f2c31b726809fbd91f --- .../notification/history/NotificationHistoryActivity.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/com/android/settings/notification/history/NotificationHistoryActivity.java b/src/com/android/settings/notification/history/NotificationHistoryActivity.java index bbe36d13b6e..2c806688d1c 100644 --- a/src/com/android/settings/notification/history/NotificationHistoryActivity.java +++ b/src/com/android/settings/notification/history/NotificationHistoryActivity.java @@ -306,12 +306,6 @@ public class NotificationHistoryActivity extends CollapsingToolbarBaseActivity { super.onDestroy(); } - @Override - public boolean onNavigateUp() { - finish(); - return true; - } - private @ColorInt int obtainThemeColor(@AttrRes int attrRes) { Resources.Theme theme = new ContextThemeWrapper(this, android.R.style.Theme_DeviceDefault_DayNight).getTheme();