OSDN Git Service

Merge "[Companion] Fix notification access dialog being in new task" into oc-dev
authorEugene Susla <eugenesusla@google.com>
Tue, 20 Jun 2017 22:35:06 +0000 (22:35 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Tue, 20 Jun 2017 22:35:06 +0000 (22:35 +0000)
am: 2eacbac8c3

Change-Id: I75825ebddce328d3afa5c213194f84f24da041eb

core/java/android/companion/CompanionDeviceManager.java

index 4400ad3..86a30cf 100644 (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);
         }
     }