Wrap whole onTransact (#2740)

This commit is contained in:
Nullptr 2023-09-04 01:18:48 +08:00 committed by GitHub
parent 8d73414d2d
commit 134cd71fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 28 deletions

View File

@ -100,6 +100,7 @@ public class BridgeService {
public static boolean onTransact(@NonNull Parcel data, @Nullable Parcel reply, int flags) {
if (!ParcelUtils.safeEnforceInterface(data, DESCRIPTOR)) return false;
try {
ACTION action = ACTION.values()[data.readInt()];
Log.d(TAG, "onTransact: action=" + action + ", callingUid=" + Binder.getCallingUid() + ", callingPid=" + Binder.getCallingPid());
@ -134,6 +135,9 @@ public class BridgeService {
return false;
}
}
} catch (Throwable e) {
Log.e(TAG, "onTransact", e);
}
return false;
}