diff options
author | Etienne Ruffieux <eruffieux@google.com> | 2022-04-15 14:35:52 +0000 |
---|---|---|
committer | Etienne Ruffieux <eruffieux@google.com> | 2022-04-19 12:20:25 +0000 |
commit | 7d6e2d190c1b0ceb685d2d175ca25149d553903c (patch) | |
tree | 52d50e2dafc33dbbe7c334e6d2d53d277ac91c3b /service/java/com/android/server/bluetooth/BluetoothManagerService.java | |
parent | 99dc2fa04da6254cd9dc8d948e8bf0023622d451 (diff) |
Fix updateOppLauncherComponentState package name
updateOppLauncherComponentState was using the old Bluetooth
package name, now we call PackageManager to get it
at runtime.
Bug: 227078439
Test: atest testOppDisabledWhenRestrictionSet
Tag: #stability
Ignore-AOSP-First: rename in internal only
Change-Id: I79c100673e98d4eb64652881428435f0ac6ba501
Diffstat (limited to 'service/java/com/android/server/bluetooth/BluetoothManagerService.java')
-rw-r--r-- | service/java/com/android/server/bluetooth/BluetoothManagerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothManagerService.java b/service/java/com/android/server/bluetooth/BluetoothManagerService.java index b9af522955..0d415cae45 100644 --- a/service/java/com/android/server/bluetooth/BluetoothManagerService.java +++ b/service/java/com/android/server/bluetooth/BluetoothManagerService.java @@ -2882,7 +2882,8 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { */ private void updateOppLauncherComponentState(UserHandle userHandle, boolean bluetoothSharingDisallowed) { - final ComponentName oppLauncherComponent = new ComponentName("com.android.bluetooth.services", + final ComponentName oppLauncherComponent = new ComponentName( + mContext.getPackageManager().getPackagesForUid(Process.BLUETOOTH_UID)[0], "com.android.bluetooth.opp.BluetoothOppLauncherActivity"); final int newState = bluetoothSharingDisallowed ? PackageManager.COMPONENT_ENABLED_STATE_DISABLED |