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

Commit 79865c82 authored by Jay Thomas Sullivan's avatar Jay Thomas Sullivan Committed by Jay Sullivan
Browse files

Fix SensorUseDialog UI issues

The SensorUseDialog (displayed when the camera or microphone is
accessed while the global camera/microphone toggle is disabled)
currently has a few issues:

1. Upon opening the dialog, a rounded rectangle with the text
   "System UI" momentarily flashes on the screen. This is
   undesirable/unexpected.
2. When the user rotates the device, the dialog exits. This is
   unexpected: the dialog should remain open while the device is
   rotated.

This change fixes both issues.

Fix: 294748342
Test: atest CameraMicIndicatorsPermissionTest
Change-Id: I212ba868e8b0221113b0a6ed13aa81466555708e
parent 60e830f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -562,7 +562,7 @@
                  android:exported="true"
                  android:exported="true"
                  android:launchMode="singleTop"
                  android:launchMode="singleTop"
                  android:permission="android.permission.MANAGE_SENSOR_PRIVACY"
                  android:permission="android.permission.MANAGE_SENSOR_PRIVACY"
                  android:theme="@style/Theme.SystemUI.Dialog.Alert"
                  android:theme="@style/Theme.SystemUI.Dialog.Alert.SensorPrivacy"
                  android:finishOnCloseSystemDialogs="true"
                  android:finishOnCloseSystemDialogs="true"
                  android:showForAllUsers="true">
                  android:showForAllUsers="true">
        </activity>
        </activity>
+5 −0
Original line number Original line Diff line number Diff line
@@ -451,6 +451,11 @@


    <style name="Theme.SystemUI.Dialog.Alert" parent="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert" />
    <style name="Theme.SystemUI.Dialog.Alert" parent="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert" />


    <style name="Theme.SystemUI.Dialog.Alert.SensorPrivacy" parent="Theme.SystemUI.Dialog.Alert">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowContentOverlay">@null</item>
    </style>

    <style name="Theme.SystemUI.Dialog.GlobalActions" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen">
    <style name="Theme.SystemUI.Dialog.GlobalActions" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen">
        <item name="android:colorError">@*android:color/error_color_material_dark</item>
        <item name="android:colorError">@*android:color/error_color_material_dark</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:windowIsFloating">true</item>
+3 −1
Original line number Original line Diff line number Diff line
@@ -228,6 +228,8 @@ open class SensorUseStartedActivity @Inject constructor(
    }
    }


    override fun onDismiss(dialog: DialogInterface?) {
    override fun onDismiss(dialog: DialogInterface?) {
        if (!isChangingConfigurations) {
            finish()
            finish()
        }
        }
    }
    }
}