diff options
| -rw-r--r-- | core/java/android/companion/CompanionDeviceManager.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java index a08d659ab4aa..e812d81c0053 100644 --- a/core/java/android/companion/CompanionDeviceManager.java +++ b/core/java/android/companion/CompanionDeviceManager.java @@ -1884,7 +1884,7 @@ public final class CompanionDeviceManager { mLocalOut = new ParcelFileDescriptor.AutoCloseOutputStream(localFd); try { - mService.attachSystemDataTransport(mContext.getPackageName(), + mService.attachSystemDataTransport(mContext.getOpPackageName(), mContext.getUserId(), mAssociationId, remoteFd); } catch (RemoteException e) { throw new IOException("Failed to configure transport", e); @@ -1921,9 +1921,9 @@ public final class CompanionDeviceManager { mStopped = true; try { - mService.detachSystemDataTransport(mContext.getPackageName(), + mService.detachSystemDataTransport(mContext.getOpPackageName(), mContext.getUserId(), mAssociationId); - } catch (RemoteException e) { + } catch (RemoteException | IllegalArgumentException e) { Log.w(TAG, "Failed to detach transport", e); } |