Fix broadcastIntentWithFeature on Android S with newer patch (#2111)
This commit is contained in:
parent
4ffcb36a95
commit
8f8eb73a69
|
|
@ -79,15 +79,13 @@ public class ActivityManagerService {
|
|||
int appOp, Bundle options, boolean serialized, boolean sticky, int userId) throws RemoteException {
|
||||
IActivityManager am = getActivityManager();
|
||||
if (am == null || thread == null) return -1;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S_V2) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
try {
|
||||
return am.broadcastIntentWithFeature(thread, callingFeatureId, intent, resolvedType, resultTo,
|
||||
resultCode, resultData, null, requiredPermissions, null, null, appOp, null,
|
||||
serialized, sticky, userId);
|
||||
} catch (NoSuchMethodError ignored) {
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
return am.broadcastIntentWithFeature(thread, callingFeatureId, intent, resolvedType, resultTo,
|
||||
resultCode, resultData, null, requiredPermissions, null, appOp, null,
|
||||
serialized, sticky, userId);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import android.os.RemoteException;
|
|||
import androidx.annotation.RequiresApi;
|
||||
|
||||
public interface IActivityManager extends IInterface {
|
||||
@RequiresApi(32)
|
||||
@RequiresApi(31)
|
||||
int broadcastIntentWithFeature(IApplicationThread caller, String callingFeatureId,
|
||||
Intent intent, String resolvedType, IIntentReceiver resultTo,
|
||||
int resultCode, String resultData, Bundle resultExtras,
|
||||
|
|
|
|||
Loading…
Reference in New Issue