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

Commit fd461d23 authored by karthik bharadwaj's avatar karthik bharadwaj
Browse files

Send Microphone Disabled Setting Regardless Of Current State

Fix sending an update on a(n) (obsolete) boolean, and always send
it out.

Bug: 174691697
Test: Run PtsChreTestRunner#micDisableSettingsTest
Change-Id: Ied34dbb8c08cbfd9dc055b0048694188c1ebf452
parent 32906bfb
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -119,9 +119,6 @@ public class ContextHubService extends IContextHubService.Stub {
    // True if WiFi is available for the Context Hub
    private boolean mIsWifiAvailable = false;

    // True if audio is disabled for the ContextHub
    private boolean mIsAudioDisabled = false;

    // Lock object for sendWifiSettingUpdate()
    private final Object mSendWifiSettingUpdateLock = new Object();

@@ -1035,11 +1032,9 @@ public class ContextHubService extends IContextHubService.Stub {
        SensorPrivacyManager manager = SensorPrivacyManager.getInstance(mContext);
        boolean disabled = manager.isIndividualSensorPrivacyEnabled(
                SensorPrivacyManager.INDIVIDUAL_SENSOR_MICROPHONE);
        if (mIsAudioDisabled != disabled) {
            mIsAudioDisabled = disabled;
        Log.d(TAG, "Mic Disabled Setting: " + disabled);
        mContextHubWrapper.onMicrophoneDisableSettingChanged(disabled);
    }
    }


    private String getCallingPackageName() {