Loading android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapEmailProvider.java +6 −6 Original line number Diff line number Diff line Loading @@ -326,7 +326,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { */ @Override public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.d(TAG, "openFile(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); Loading Loading @@ -419,7 +419,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { throw new IllegalArgumentException("Account ID missing in update values!"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { if (table.equals(BluetoothMapContract.TABLE_MESSAGE)) { return deleteMessage(accountId, messageId); Loading Loading @@ -463,7 +463,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { } String id; // the id of the entry inserted into the database long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); Log.d(TAG, "insert(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); try { Loading Loading @@ -517,7 +517,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { String accountId = null; switch (mMatcher.match(uri)) { Loading Loading @@ -606,7 +606,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { "selection shall not be used, ContentValues shall contain the data"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.w(TAG, "update(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); Loading Loading @@ -669,7 +669,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { @Override public Bundle call(String method, String arg, Bundle extras) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.d(TAG, "call(): method=" + method + " arg=" + arg + "ThreadId: " + Thread.currentThread().getId()); Loading android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapIMProvider.java +5 −5 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { throw new IllegalArgumentException("Account ID missing in update values!"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { if (table.equals(BluetoothMapContract.TABLE_MESSAGE)) { return deleteMessage(accountId, messageId); Loading Loading @@ -260,7 +260,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { // TODO: validate values? String id; // the id of the entry inserted into the database long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); Log.d(TAG, "insert(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); try { Loading Loading @@ -314,7 +314,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { String accountId = null; if (D) { Loading Loading @@ -503,7 +503,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { "selection shall not be used, ContentValues " + "shall contain the data"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.w(TAG, "update(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); Loading Loading @@ -614,7 +614,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { @Override public Bundle call(String method, String arg, Bundle extras) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.w(TAG, "call(): method=" + method + " arg=" + arg + "ThreadId: " + Thread.currentThread().getId()); Loading android/app/src/com/android/bluetooth/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ public final class Utils { int callingUid = Binder.getCallingUid(); // Use the Bluetooth process identity when making call to get parent user long ident = Binder.clearCallingIdentity(); final long ident = Binder.clearCallingIdentity(); try { UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE); UserInfo ui = um.getProfileParent(callingUser); Loading android/app/src/com/android/bluetooth/gatt/GattService.java +20 −17 Original line number Diff line number Diff line Loading @@ -2080,7 +2080,7 @@ public class GattService extends ProfileService { if (mCompanionManager == null) { return new ArrayList<String>(); } long identity = Binder.clearCallingIdentity(); final long identity = Binder.clearCallingIdentity(); try { return mCompanionManager.getAssociations( callingPackage, userHandle.getIdentifier()); Loading Loading @@ -3333,10 +3333,10 @@ public class GattService extends ProfileService { } // Need to clear identity to pass device config permission check long callerToken = Binder.clearCallingIdentity(); final long callerToken = Binder.clearCallingIdentity(); try { long floor = DeviceConfig.getLong(DeviceConfig.NAMESPACE_BLUETOOTH, "report_delay", DEFAULT_REPORT_DELAY_FLOOR); Binder.restoreCallingIdentity(callerToken); if (settings.getReportDelayMillis() > floor) { return settings; Loading @@ -3352,6 +3352,9 @@ public class GattService extends ProfileService { .setScanResultType(settings.getScanResultType()) .build(); } } finally { Binder.restoreCallingIdentity(callerToken); } } private void stopNextService(int serverIf, int status) throws RemoteException { Loading android/app/src/com/android/bluetooth/telephony/BluetoothInCallService.java +7 −3 Original line number Diff line number Diff line Loading @@ -438,9 +438,13 @@ public class BluetoothInCallService extends InCallService { public boolean processChld(int chld) { synchronized (LOCK) { enforceModifyPermission(); long token = Binder.clearCallingIdentity(); final long token = Binder.clearCallingIdentity(); try { Log.i(TAG, "processChld " + chld); return _processChld(chld); } finally { Binder.restoreCallingIdentity(token); } } } Loading Loading
android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapEmailProvider.java +6 −6 Original line number Diff line number Diff line Loading @@ -326,7 +326,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { */ @Override public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.d(TAG, "openFile(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); Loading Loading @@ -419,7 +419,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { throw new IllegalArgumentException("Account ID missing in update values!"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { if (table.equals(BluetoothMapContract.TABLE_MESSAGE)) { return deleteMessage(accountId, messageId); Loading Loading @@ -463,7 +463,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { } String id; // the id of the entry inserted into the database long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); Log.d(TAG, "insert(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); try { Loading Loading @@ -517,7 +517,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { String accountId = null; switch (mMatcher.match(uri)) { Loading Loading @@ -606,7 +606,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { "selection shall not be used, ContentValues shall contain the data"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.w(TAG, "update(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); Loading Loading @@ -669,7 +669,7 @@ public abstract class BluetoothMapEmailProvider extends ContentProvider { @Override public Bundle call(String method, String arg, Bundle extras) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.d(TAG, "call(): method=" + method + " arg=" + arg + "ThreadId: " + Thread.currentThread().getId()); Loading
android/app/lib/mapapi/com/android/bluetooth/mapapi/BluetoothMapIMProvider.java +5 −5 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { throw new IllegalArgumentException("Account ID missing in update values!"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { if (table.equals(BluetoothMapContract.TABLE_MESSAGE)) { return deleteMessage(accountId, messageId); Loading Loading @@ -260,7 +260,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { // TODO: validate values? String id; // the id of the entry inserted into the database long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); Log.d(TAG, "insert(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); try { Loading Loading @@ -314,7 +314,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); try { String accountId = null; if (D) { Loading Loading @@ -503,7 +503,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { "selection shall not be used, ContentValues " + "shall contain the data"); } long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.w(TAG, "update(): uri=" + uri.toString() + " - getLastPathSegment() = " + uri.getLastPathSegment()); Loading Loading @@ -614,7 +614,7 @@ public abstract class BluetoothMapIMProvider extends ContentProvider { @Override public Bundle call(String method, String arg, Bundle extras) { long callingId = Binder.clearCallingIdentity(); final long callingId = Binder.clearCallingIdentity(); if (D) { Log.w(TAG, "call(): method=" + method + " arg=" + arg + "ThreadId: " + Thread.currentThread().getId()); Loading
android/app/src/com/android/bluetooth/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ public final class Utils { int callingUid = Binder.getCallingUid(); // Use the Bluetooth process identity when making call to get parent user long ident = Binder.clearCallingIdentity(); final long ident = Binder.clearCallingIdentity(); try { UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE); UserInfo ui = um.getProfileParent(callingUser); Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +20 −17 Original line number Diff line number Diff line Loading @@ -2080,7 +2080,7 @@ public class GattService extends ProfileService { if (mCompanionManager == null) { return new ArrayList<String>(); } long identity = Binder.clearCallingIdentity(); final long identity = Binder.clearCallingIdentity(); try { return mCompanionManager.getAssociations( callingPackage, userHandle.getIdentifier()); Loading Loading @@ -3333,10 +3333,10 @@ public class GattService extends ProfileService { } // Need to clear identity to pass device config permission check long callerToken = Binder.clearCallingIdentity(); final long callerToken = Binder.clearCallingIdentity(); try { long floor = DeviceConfig.getLong(DeviceConfig.NAMESPACE_BLUETOOTH, "report_delay", DEFAULT_REPORT_DELAY_FLOOR); Binder.restoreCallingIdentity(callerToken); if (settings.getReportDelayMillis() > floor) { return settings; Loading @@ -3352,6 +3352,9 @@ public class GattService extends ProfileService { .setScanResultType(settings.getScanResultType()) .build(); } } finally { Binder.restoreCallingIdentity(callerToken); } } private void stopNextService(int serverIf, int status) throws RemoteException { Loading
android/app/src/com/android/bluetooth/telephony/BluetoothInCallService.java +7 −3 Original line number Diff line number Diff line Loading @@ -438,9 +438,13 @@ public class BluetoothInCallService extends InCallService { public boolean processChld(int chld) { synchronized (LOCK) { enforceModifyPermission(); long token = Binder.clearCallingIdentity(); final long token = Binder.clearCallingIdentity(); try { Log.i(TAG, "processChld " + chld); return _processChld(chld); } finally { Binder.restoreCallingIdentity(token); } } } Loading