Merge "Fix issue that default dialer change is broadcasted unintentionally" am: b36985d523 am: 4677f77316 am: 5a110fbefe

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telecomm/+/1533045

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2dfe3500dec44b33f76323831af97ee4acc67aee
This commit is contained in:
Treehugger Robot 2021-01-07 03:17:11 +00:00 committed by Automerger Merge Worker
commit 07beea22a7
1 changed files with 5 additions and 2 deletions

View File

@ -85,8 +85,11 @@ public class RoleManagerAdapterImpl implements RoleManagerAdapter {
@Override
public void observeDefaultDialerApp(Executor executor, IntConsumer observer) {
mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, (roleName, user) ->
observer.accept(user.getIdentifier()), UserHandle.ALL);
mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, (roleName, user) -> {
if (ROLE_DIALER.equals(roleName)) {
observer.accept(user.getIdentifier());
}
}, UserHandle.ALL);
}
@Override