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

Commit eee0a549 authored by William Escande's avatar William Escande
Browse files

Remove hearing aid featureUtilFlag

Hearing aid has moved to a platform system properties and is enabled by
default except on automotive / tv and watch

Bug: 262605980
Test: atest ServiceBluetoothTests
Change-Id: Ibf1b9eb75f53acdd451b92f064a459697d385018
parent e52c5b4e
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -69,13 +69,11 @@ import android.os.Process;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.sysprop.BluetoothProperties;
import android.text.TextUtils;
import android.util.Log;
import android.util.proto.ProtoOutputStream;

@@ -277,7 +275,7 @@ class BluetoothManagerService {
    private final BluetoothHandler mHandler;
    private int mErrorRecoveryRetryCounter;

    private boolean mIsHearingAidProfileSupported;
    private final boolean mIsHearingAidProfileSupported;

    // Save a ProfileServiceConnections object for each of the bound
    // bluetooth profile services
@@ -661,18 +659,6 @@ class BluetoothManagerService {
                            .orElse(isAshaEnabledByDefault);
        }

        String value = SystemProperties.get(
                "persist.sys.fflag.override.settings_bluetooth_hearing_aid");

        if (!TextUtils.isEmpty(value)) {
            boolean isHearingAidEnabled = Boolean.parseBoolean(value);
            Log.v(TAG, "set feature flag HEARING_AID_SETTINGS to " + isHearingAidEnabled);
            if (isHearingAidEnabled && !mIsHearingAidProfileSupported) {
                // Overwrite to enable support by FeatureFlag
                mIsHearingAidProfileSupported = true;
            }
        }

        IntentFilter filter = new IntentFilter();
        filter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED);
        filter.addAction(BluetoothAdapter.ACTION_BLUETOOTH_ADDRESS_CHANGED);