Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java +2 −23 Original line number Diff line number Diff line Loading @@ -37,8 +37,6 @@ import com.android.settingslib.Utils; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; Loading Loading @@ -287,16 +285,7 @@ public class HearingAidProfile implements LocalBluetoothProfile { return defaultValue; } try { Method method = mService.getClass().getDeclaredMethod("getDeviceSideInternal", BluetoothDevice.class); method.setAccessible(true); return (int) method.invoke(mService, device); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { Log.e(TAG, "fail to get getDeviceSideInternal\n" + e.toString() + "\n" + Log.getStackTraceString(new Throwable())); return defaultValue; } return mService.getDeviceSide(device); } /** Loading @@ -313,17 +302,7 @@ public class HearingAidProfile implements LocalBluetoothProfile { return defaultValue; } try { Method method = mService.getClass().getDeclaredMethod("getDeviceModeInternal", BluetoothDevice.class); method.setAccessible(true); return (int) method.invoke(mService, device); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { Log.e(TAG, "fail to get getDeviceModeInternal\n" + e.toString() + "\n" + Log.getStackTraceString(new Throwable())); return defaultValue; } return mService.getDeviceMode(device); } public String toString() { Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidProfile.java +2 −23 Original line number Diff line number Diff line Loading @@ -37,8 +37,6 @@ import com.android.settingslib.Utils; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; Loading Loading @@ -287,16 +285,7 @@ public class HearingAidProfile implements LocalBluetoothProfile { return defaultValue; } try { Method method = mService.getClass().getDeclaredMethod("getDeviceSideInternal", BluetoothDevice.class); method.setAccessible(true); return (int) method.invoke(mService, device); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { Log.e(TAG, "fail to get getDeviceSideInternal\n" + e.toString() + "\n" + Log.getStackTraceString(new Throwable())); return defaultValue; } return mService.getDeviceSide(device); } /** Loading @@ -313,17 +302,7 @@ public class HearingAidProfile implements LocalBluetoothProfile { return defaultValue; } try { Method method = mService.getClass().getDeclaredMethod("getDeviceModeInternal", BluetoothDevice.class); method.setAccessible(true); return (int) method.invoke(mService, device); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { Log.e(TAG, "fail to get getDeviceModeInternal\n" + e.toString() + "\n" + Log.getStackTraceString(new Throwable())); return defaultValue; } return mService.getDeviceMode(device); } public String toString() { Loading