Merge "Move companion device check to the handler" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-04-21 16:43:20 +00:00
committed by Android (Google) Code Review

View File

@@ -5089,14 +5089,14 @@ public class NotificationManagerService extends SystemService {
if (!serviceInfo.enabledAndUserMatches(UserHandle.getCallingUserId())) {
continue;
}
if (!hasCompanionDevice(serviceInfo)) {
continue;
}
mHandler.post(new Runnable() {
@Override
public void run() {
notifyNotificationChannelChanged(
serviceInfo, pkg, user, channel, modificationType);
if (hasCompanionDevice(serviceInfo)) {
notifyNotificationChannelChanged(
serviceInfo, pkg, user, channel, modificationType);
}
}
});
}
@@ -5112,14 +5112,14 @@ public class NotificationManagerService extends SystemService {
if (!serviceInfo.enabledAndUserMatches(UserHandle.getCallingUserId())) {
continue;
}
if (!hasCompanionDevice(serviceInfo)) {
continue;
}
mHandler.post(new Runnable() {
@Override
public void run() {
notifyNotificationChannelGroupChanged(
serviceInfo, pkg, user, group, modificationType);
if (hasCompanionDevice(serviceInfo)) {
notifyNotificationChannelGroupChanged(
serviceInfo, pkg, user, group, modificationType);
}
}
});
}