Commit 94a4ced7 authored by Pavel Shmakov's avatar Pavel Shmakov Committed by Commit Bot

Blacklist Lenovo M devices for showing notification status bar icons as bitmap

The crash is in the NotificationManagerService, only on Lenovo Marshmallow devices,
and from error message it's clear that the Icon class is used incorrectly:
type of Icon is not checked before calling getResId(). We can't do much except
blacklisting lenovo along with samsung and yulong.

Bug: 894361
Change-Id: Iee094561227ab83cffb6cf913a4eb31961bf35b5
Reviewed-on: https://chromium-review.googlesource.com/c/1278847
Commit-Queue: Pavel Shmakov <pshmakov@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600000}
parent ac76aa5a
......@@ -506,12 +506,15 @@ public abstract class NotificationBuilderBase {
// The Icon class was only added in Android M.
return false;
}
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M
&& (Build.MANUFACTURER.equalsIgnoreCase("samsung")
|| Build.MANUFACTURER.equalsIgnoreCase("yulong"))) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) {
// Updating a notification with a bitmap status bar icon leads to a crash on Samsung
// and Coolpad (Yulong) devices on Marshmallow, see https://crbug.com/829367.
return false;
// Also, there are crashes on Lenovo M devices: https://crbug.com/894361.
for (String name : new String[] {"samsung", "yulong", "lenovo"}) {
if (Build.MANUFACTURER.equalsIgnoreCase(name)) {
return false;
}
}
}
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment