Fix IActivityManager.bindService for Android 14 (#2700)
This commit is contained in:
parent
0229e294d0
commit
32e0daf1b4
|
|
@ -143,6 +143,9 @@ public class ActivityManagerService {
|
|||
|
||||
IActivityManager am = getActivityManager();
|
||||
if (am == null || appThread == null) return -1;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||
return am.bindService(appThread, token, service, resolvedType, connection, (long) flags, callingPackage, userId);
|
||||
else
|
||||
return am.bindService(appThread, token, service, resolvedType, connection, flags, callingPackage, userId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,11 @@ public interface IActivityManager extends IInterface {
|
|||
String resolvedType, IServiceConnection connection, int flags,
|
||||
String callingPackage, int userId) throws RemoteException;
|
||||
|
||||
@RequiresApi(34)
|
||||
int bindService(IApplicationThread caller, IBinder token, Intent service,
|
||||
String resolvedType, IServiceConnection connection, long flags,
|
||||
String callingPackage, int userId) throws RemoteException;
|
||||
|
||||
boolean unbindService(IServiceConnection connection) throws RemoteException;
|
||||
|
||||
boolean switchUser(int userid) throws RemoteException;
|
||||
|
|
|
|||
Loading…
Reference in New Issue