Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d6e2d19 authored by Etienne Ruffieux's avatar Etienne Ruffieux
Browse files

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
parent 99dc2fa0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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