@@ -697,7 +697,8 @@ public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
697697 IApplicationThread app = ApplicationThreadNative .asInterface (b );
698698 Intent service = Intent .CREATOR .createFromParcel (data );
699699 String resolvedType = data .readString ();
700- ComponentName cn = startService (app , service , resolvedType );
700+ int userId = data .readInt ();
701+ ComponentName cn = startService (app , service , resolvedType , userId );
701702 reply .writeNoException ();
702703 ComponentName .writeToParcel (cn , reply );
703704 return true ;
@@ -709,7 +710,8 @@ public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
709710 IApplicationThread app = ApplicationThreadNative .asInterface (b );
710711 Intent service = Intent .CREATOR .createFromParcel (data );
711712 String resolvedType = data .readString ();
712- int res = stopService (app , service , resolvedType );
713+ int userId = data .readInt ();
714+ int res = stopService (app , service , resolvedType , userId );
713715 reply .writeNoException ();
714716 reply .writeInt (res );
715717 return true ;
@@ -2523,14 +2525,15 @@ public PendingIntent getRunningServiceControlPanel(ComponentName service)
25232525 }
25242526
25252527 public ComponentName startService (IApplicationThread caller , Intent service ,
2526- String resolvedType ) throws RemoteException
2528+ String resolvedType , int userId ) throws RemoteException
25272529 {
25282530 Parcel data = Parcel .obtain ();
25292531 Parcel reply = Parcel .obtain ();
25302532 data .writeInterfaceToken (IActivityManager .descriptor );
25312533 data .writeStrongBinder (caller != null ? caller .asBinder () : null );
25322534 service .writeToParcel (data , 0 );
25332535 data .writeString (resolvedType );
2536+ data .writeInt (userId );
25342537 mRemote .transact (START_SERVICE_TRANSACTION , data , reply , 0 );
25352538 reply .readException ();
25362539 ComponentName res = ComponentName .readFromParcel (reply );
@@ -2539,14 +2542,15 @@ public ComponentName startService(IApplicationThread caller, Intent service,
25392542 return res ;
25402543 }
25412544 public int stopService (IApplicationThread caller , Intent service ,
2542- String resolvedType ) throws RemoteException
2545+ String resolvedType , int userId ) throws RemoteException
25432546 {
25442547 Parcel data = Parcel .obtain ();
25452548 Parcel reply = Parcel .obtain ();
25462549 data .writeInterfaceToken (IActivityManager .descriptor );
25472550 data .writeStrongBinder (caller != null ? caller .asBinder () : null );
25482551 service .writeToParcel (data , 0 );
25492552 data .writeString (resolvedType );
2553+ data .writeInt (userId );
25502554 mRemote .transact (STOP_SERVICE_TRANSACTION , data , reply , 0 );
25512555 reply .readException ();
25522556 int res = reply .readInt ();
0 commit comments