Merge "Properly read vibration setting on boot." into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2c324042df
@@ -575,8 +575,8 @@ public final class NotificationChannel implements Parcelable {
|
||||
setSound(safeUri(parser, ATT_SOUND), safeAudioAttributes(parser));
|
||||
enableLights(safeBool(parser, ATT_LIGHTS, false));
|
||||
setLightColor(safeInt(parser, ATT_LIGHT_COLOR, DEFAULT_LIGHT_COLOR));
|
||||
enableVibration(safeBool(parser, ATT_VIBRATION_ENABLED, false));
|
||||
setVibrationPattern(safeLongArray(parser, ATT_VIBRATION, null));
|
||||
enableVibration(safeBool(parser, ATT_VIBRATION_ENABLED, false));
|
||||
setShowBadge(safeBool(parser, ATT_SHOW_BADGE, false));
|
||||
setDeleted(safeBool(parser, ATT_DELETED, false));
|
||||
setGroup(parser.getAttributeValue(null, ATT_GROUP));
|
||||
|
||||
@@ -364,11 +364,14 @@ public class RankingHelperTest extends NotificationTestCase {
|
||||
channel2.enableVibration(false);
|
||||
channel2.setGroup(ncg.getId());
|
||||
channel2.setLightColor(Color.BLUE);
|
||||
NotificationChannel channel3 = new NotificationChannel("id3", "NAM3", IMPORTANCE_HIGH);
|
||||
channel3.enableVibration(true);
|
||||
|
||||
mHelper.createNotificationChannelGroup(PKG, UID, ncg, true);
|
||||
mHelper.createNotificationChannelGroup(PKG, UID, ncg2, true);
|
||||
mHelper.createNotificationChannel(PKG, UID, channel1, true);
|
||||
mHelper.createNotificationChannel(PKG, UID, channel2, false);
|
||||
mHelper.createNotificationChannel(PKG, UID, channel3, false);
|
||||
mHelper.createNotificationChannel(UPDATED_PKG, UID2, getChannel(), true);
|
||||
|
||||
mHelper.setShowBadge(PKG, UID, true);
|
||||
@@ -376,8 +379,9 @@ public class RankingHelperTest extends NotificationTestCase {
|
||||
mHelper.setImportance(UPDATED_PKG, UID2, IMPORTANCE_NONE);
|
||||
|
||||
ByteArrayOutputStream baos = writeXmlAndPurge(PKG, UID, true, channel1.getId(),
|
||||
channel2.getId(), NotificationChannel.DEFAULT_CHANNEL_ID);
|
||||
mHelper.onPackagesChanged(true, UserHandle.myUserId(), new String[]{PKG, UPDATED_PKG}, new int[]{UID, UID2});
|
||||
channel2.getId(), channel3.getId(), NotificationChannel.DEFAULT_CHANNEL_ID);
|
||||
mHelper.onPackagesChanged(true, UserHandle.myUserId(), new String[]{PKG, UPDATED_PKG},
|
||||
new int[]{UID, UID2});
|
||||
|
||||
mHelper.setShowBadge(UPDATED_PKG, UID2, true);
|
||||
|
||||
@@ -388,6 +392,8 @@ public class RankingHelperTest extends NotificationTestCase {
|
||||
assertEquals(channel1, mHelper.getNotificationChannel(PKG, UID, channel1.getId(), false));
|
||||
compareChannels(channel2,
|
||||
mHelper.getNotificationChannel(PKG, UID, channel2.getId(), false));
|
||||
compareChannels(channel3,
|
||||
mHelper.getNotificationChannel(PKG, UID, channel3.getId(), false));
|
||||
|
||||
List<NotificationChannelGroup> actualGroups =
|
||||
mHelper.getNotificationChannelGroups(PKG, UID, false).getList();
|
||||
|
||||
Reference in New Issue
Block a user