OSDN Git Service

Fix crashes after notifying bad notification
authordooyoung.hwang <dooyoung.hwang@lge.com>
Tue, 4 Oct 2016 09:55:31 +0000 (18:55 +0900)
committerSelim Cinek <cinek@google.com>
Wed, 12 Oct 2016 00:37:23 +0000 (17:37 -0700)
commit78c4114101bdbd5cb4520ef4958b7b77d583bd4b
treee56a4d49b28877ce6bda9a3696d2888f919b0302
parent73c46f060908d58e1adcade3ee4ee121dc4a8f39
Fix crashes after notifying bad notification

If applications whose targetSDK is below N build notification
without contentView, contentView is created at inside of build()
function in Notification.Builder. If application apply
removeAllViews to this contentView, Notification View can have
id 'status_bar_latest_event_content' without standard layout of
notification. When inflating this notification, SystemUI try to wrap
it with NotificationTemplateViewWrapper(its id is
'status_bar_latest_event_content'), and crash, because it does not
have expected views.

Test: Install & launch attached apk in below BUG url to N devices,
and try to make notification by clicking 'do it' button.

https://code.google.com/p/android/issues/detail?id=223479

Bug:31948446
Change-Id: Ifcdc79a117613e8afd2e8ed098afd211cceabf88
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java