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

Commit 02814a06 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Emergency button should depend on FEATURE_TELEPHONY_CALLING" into main

parents 6480ad21 f6e11ce8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ class EmergencyButtonControllerTest : SysuiTestCase() {
    fun testUpdateEmergencyButton() {
        Mockito.`when`(telecomManager.isInCall).thenReturn(true)
        Mockito.`when`(lockPatternUtils.isSecure(anyInt())).thenReturn(true)
        Mockito.`when`(packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY))
        Mockito.`when`(packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CALLING))
            .thenReturn(true)
        underTest.updateEmergencyCallButton()
        backgroundExecutor.runAllReady()
@@ -112,7 +112,7 @@ class EmergencyButtonControllerTest : SysuiTestCase() {
                /* isInCall= */ any(),
                /* hasTelephonyRadio= */ any(),
                /* simLocked= */ any(),
                /* isSecure= */ any()
                /* isSecure= */ any(),
            )
        mainExecutor.runAllReady()
        verify(emergencyButton)
@@ -120,7 +120,7 @@ class EmergencyButtonControllerTest : SysuiTestCase() {
                /* isInCall= */ eq(true),
                /* hasTelephonyRadio= */ eq(true),
                /* simLocked= */ any(),
                /* isSecure= */ eq(true)
                /* isSecure= */ eq(true),
            )
    }

+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ public class EmergencyButtonController extends ViewController<EmergencyButton> {
                mMainExecutor.execute(() -> mView.updateEmergencyCallButton(
                        /* isInCall= */ isInCall,
                        /* hasTelephonyRadio= */ getContext().getPackageManager()
                                .hasSystemFeature(PackageManager.FEATURE_TELEPHONY),
                                .hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CALLING),
                        /* simLocked= */ mKeyguardUpdateMonitor.isSimPinVoiceSecure(),
                        /* isSecure= */ isSecure));
            });