Merge "[Companion] Fix notification access dialog being in new task" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-06-20 22:22:54 +00:00
committed by Android (Google) Code Review

View File

@@ -214,10 +214,12 @@ public final class CompanionDeviceManager {
return;
}
try {
mService.requestNotificationAccess(component).send();
IntentSender intentSender = mService.requestNotificationAccess(component)
.getIntentSender();
mContext.startIntentSender(intentSender, null, 0, 0, 0);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} catch (PendingIntent.CanceledException e) {
} catch (IntentSender.SendIntentException e) {
throw new RuntimeException(e);
}
}