Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -583,6 +583,7 @@ java_library { "documents-ui-compat-config", "calendar-provider-compat-config", "contacts-provider-platform-compat-config", "SystemUI-core-compat-config", ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), { "true": [], default: [ Loading packages/SystemUI/Android.bp +9 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ filegroup { "tests/src/**/systemui/statusbar/notification/row/NotificationConversationInfoTest.java", "tests/src/**/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt", "tests/src/**/systemui/statusbar/notification/row/wrapper/NotificationTemplateViewWrapperTest.kt", "tests/src/**/systemui/statusbar/notification/row/NotificationCustomContentMemoryVerifierTest.java", "tests/src/**/systemui/statusbar/notification/row/NotificationCustomContentMemoryVerifierDisabledTest.java", "tests/src/**/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java", "tests/src/**/systemui/statusbar/phone/CentralSurfacesImplTest.java", "tests/src/**/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java", Loading Loading @@ -553,6 +555,11 @@ android_library { }, } platform_compat_config { name: "SystemUI-core-compat-config", src: ":SystemUI-core", } filegroup { name: "AAA-src", srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"], Loading Loading @@ -755,6 +762,7 @@ android_library { "kosmos", "testables", "androidx.test.rules", "platform-compat-test-rules", ], libs: [ "android.test.runner.stubs.system", Loading Loading @@ -889,6 +897,7 @@ android_robolectric_test { static_libs: [ "RoboTestLibraries", "androidx.compose.runtime_runtime", "platform-compat-test-rules", ], libs: [ "android.test.runner.impl", Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +4 −0 Original line number Diff line number Diff line Loading @@ -643,6 +643,10 @@ public final class NotificationEntry extends ListEntry { return row.isMediaRow(); } public boolean containsCustomViews() { return getSbn().getNotification().containsCustomViews(); } public void resetUserExpansion() { if (row != null) row.resetUserExpansion(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationMemoryViewWalker.kt +9 −5 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.util.children /** Walks view hiearchy of a given notification to estimate its memory use. */ internal object NotificationMemoryViewWalker { object NotificationMemoryViewWalker { private const val TAG = "NotificationMemory" Loading @@ -26,9 +26,13 @@ internal object NotificationMemoryViewWalker { private var softwareBitmaps = 0 fun addSmallIcon(smallIconUse: Int) = apply { smallIcon += smallIconUse } fun addLargeIcon(largeIconUse: Int) = apply { largeIcon += largeIconUse } fun addSystem(systemIconUse: Int) = apply { systemIcons += systemIconUse } fun addStyle(styleUse: Int) = apply { style += styleUse } fun addSoftwareBitmapPenalty(softwareBitmapUse: Int) = apply { softwareBitmaps += softwareBitmapUse } Loading Loading @@ -67,14 +71,14 @@ internal object NotificationMemoryViewWalker { getViewUsage(ViewType.PRIVATE_EXPANDED_VIEW, row.privateLayout?.expandedChild), getViewUsage( ViewType.PRIVATE_CONTRACTED_VIEW, row.privateLayout?.contractedChild row.privateLayout?.contractedChild, ), getViewUsage(ViewType.PRIVATE_HEADS_UP_VIEW, row.privateLayout?.headsUpChild), getViewUsage( ViewType.PUBLIC_VIEW, row.publicLayout?.expandedChild, row.publicLayout?.contractedChild, row.publicLayout?.headsUpChild row.publicLayout?.headsUpChild, ), ) .filterNotNull() Loading Loading @@ -107,14 +111,14 @@ internal object NotificationMemoryViewWalker { row.publicLayout?.expandedChild, row.publicLayout?.contractedChild, row.publicLayout?.headsUpChild, seenObjects = seenObjects seenObjects = seenObjects, ) } private fun getViewUsage( type: ViewType, vararg rootViews: View?, seenObjects: HashSet<Int> = hashSetOf() seenObjects: HashSet<Int> = hashSetOf(), ): NotificationViewUsage? { val usageBuilder = lazy { UsageBuilder() } rootViews.forEach { rootView -> Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java +7 −0 Original line number Diff line number Diff line Loading @@ -901,6 +901,13 @@ public class NotificationContentInflater implements NotificationRowContentBinder if (!satisfiesMinHeightRequirement(view, entry, resources)) { return "inflated notification does not meet minimum height requirement"; } if (NotificationCustomContentMemoryVerifier.requiresImageViewMemorySizeCheck(entry)) { if (!NotificationCustomContentMemoryVerifier.satisfiesMemoryLimits(view, entry)) { return "inflated notification does not meet maximum memory size requirement"; } } return null; } Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -583,6 +583,7 @@ java_library { "documents-ui-compat-config", "calendar-provider-compat-config", "contacts-provider-platform-compat-config", "SystemUI-core-compat-config", ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), { "true": [], default: [ Loading
packages/SystemUI/Android.bp +9 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ filegroup { "tests/src/**/systemui/statusbar/notification/row/NotificationConversationInfoTest.java", "tests/src/**/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt", "tests/src/**/systemui/statusbar/notification/row/wrapper/NotificationTemplateViewWrapperTest.kt", "tests/src/**/systemui/statusbar/notification/row/NotificationCustomContentMemoryVerifierTest.java", "tests/src/**/systemui/statusbar/notification/row/NotificationCustomContentMemoryVerifierDisabledTest.java", "tests/src/**/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java", "tests/src/**/systemui/statusbar/phone/CentralSurfacesImplTest.java", "tests/src/**/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java", Loading Loading @@ -553,6 +555,11 @@ android_library { }, } platform_compat_config { name: "SystemUI-core-compat-config", src: ":SystemUI-core", } filegroup { name: "AAA-src", srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"], Loading Loading @@ -755,6 +762,7 @@ android_library { "kosmos", "testables", "androidx.test.rules", "platform-compat-test-rules", ], libs: [ "android.test.runner.stubs.system", Loading Loading @@ -889,6 +897,7 @@ android_robolectric_test { static_libs: [ "RoboTestLibraries", "androidx.compose.runtime_runtime", "platform-compat-test-rules", ], libs: [ "android.test.runner.impl", Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +4 −0 Original line number Diff line number Diff line Loading @@ -643,6 +643,10 @@ public final class NotificationEntry extends ListEntry { return row.isMediaRow(); } public boolean containsCustomViews() { return getSbn().getNotification().containsCustomViews(); } public void resetUserExpansion() { if (row != null) row.resetUserExpansion(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationMemoryViewWalker.kt +9 −5 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.util.children /** Walks view hiearchy of a given notification to estimate its memory use. */ internal object NotificationMemoryViewWalker { object NotificationMemoryViewWalker { private const val TAG = "NotificationMemory" Loading @@ -26,9 +26,13 @@ internal object NotificationMemoryViewWalker { private var softwareBitmaps = 0 fun addSmallIcon(smallIconUse: Int) = apply { smallIcon += smallIconUse } fun addLargeIcon(largeIconUse: Int) = apply { largeIcon += largeIconUse } fun addSystem(systemIconUse: Int) = apply { systemIcons += systemIconUse } fun addStyle(styleUse: Int) = apply { style += styleUse } fun addSoftwareBitmapPenalty(softwareBitmapUse: Int) = apply { softwareBitmaps += softwareBitmapUse } Loading Loading @@ -67,14 +71,14 @@ internal object NotificationMemoryViewWalker { getViewUsage(ViewType.PRIVATE_EXPANDED_VIEW, row.privateLayout?.expandedChild), getViewUsage( ViewType.PRIVATE_CONTRACTED_VIEW, row.privateLayout?.contractedChild row.privateLayout?.contractedChild, ), getViewUsage(ViewType.PRIVATE_HEADS_UP_VIEW, row.privateLayout?.headsUpChild), getViewUsage( ViewType.PUBLIC_VIEW, row.publicLayout?.expandedChild, row.publicLayout?.contractedChild, row.publicLayout?.headsUpChild row.publicLayout?.headsUpChild, ), ) .filterNotNull() Loading Loading @@ -107,14 +111,14 @@ internal object NotificationMemoryViewWalker { row.publicLayout?.expandedChild, row.publicLayout?.contractedChild, row.publicLayout?.headsUpChild, seenObjects = seenObjects seenObjects = seenObjects, ) } private fun getViewUsage( type: ViewType, vararg rootViews: View?, seenObjects: HashSet<Int> = hashSetOf() seenObjects: HashSet<Int> = hashSetOf(), ): NotificationViewUsage? { val usageBuilder = lazy { UsageBuilder() } rootViews.forEach { rootView -> Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java +7 −0 Original line number Diff line number Diff line Loading @@ -901,6 +901,13 @@ public class NotificationContentInflater implements NotificationRowContentBinder if (!satisfiesMinHeightRequirement(view, entry, resources)) { return "inflated notification does not meet minimum height requirement"; } if (NotificationCustomContentMemoryVerifier.requiresImageViewMemorySizeCheck(entry)) { if (!NotificationCustomContentMemoryVerifier.satisfiesMemoryLimits(view, entry)) { return "inflated notification does not meet maximum memory size requirement"; } } return null; } Loading