mirror of
https://github.com/jrpie/Launcher.git
synced 2025-04-19 02:10:54 +02:00
add consent dialog for accessibility service
This commit is contained in:
parent
46aaa91fe9
commit
97d10d09b5
6 changed files with 98 additions and 8 deletions
5
app/src/main/res/color/text_color_toggle.xml
Normal file
5
app/src/main/res/color/text_color_toggle.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:alpha="0.2" android:color="?android:color" />
|
||||
<item android:color="?android:color" />
|
||||
</selector>
|
50
app/src/main/res/layout/dialog_consent_accessibility.xml
Normal file
50
app/src/main/res/layout/dialog_consent_accessibility.xml
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/AlertDialogDanger"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<de.jrpie.android.launcher.ui.util.HtmlTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_consent_accessibility_text" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/dialog_consent_accessibility_checkbox_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/dialog_consent_accessibility_privileges" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/dialog_consent_accessibility_checkbox_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/dialog_consent_accessibility_other_options" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/dialog_consent_accessibility_checkbox_3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/dialog_consent_accessibility_data_collection" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/dialog_consent_accessibility_checkbox_4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/dialog_consent_accessibility_consent" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -298,4 +298,12 @@
|
|||
<string name="dialog_select_color_cancel">Cancel</string>
|
||||
<string name="dialog_select_color_color_hex">Color</string>
|
||||
<string name="dialog_choose_color_title">Choose color</string>
|
||||
<string name="dialog_consent_accessibility_privileges">I am aware that this will grant far-reaching privileges to µLauncher.</string>
|
||||
<string name="dialog_consent_accessibility_other_options">I am aware that other options exist (using device administrator privileges or the power button).</string>
|
||||
<string name="dialog_consent_accessibility_consent">I consent to µLauncher using the accessibility service to provide functionality unrelated to accessibility.</string>
|
||||
<string name="dialog_consent_accessibility_data_collection">I consent to µLauncher not collecting any data.</string>
|
||||
<string name="dialog_consent_accessibility_text"><![CDATA[You are about to activate the accessibility service. This will grant <strong>far-reaching privileges</strong> to µLauncher.<br/>µLauncher will use these privileges <strong>only to lock the screen</strong>. µLauncher <strong>will never collect any data</strong>. In particular, µLauncher does not use the accessibility service to collect any data.]]></string>
|
||||
<string name="dialog_consent_accessibility_title">Activating the Accessibility Service</string>
|
||||
<string name="dialog_consent_accessibility_ok">Activate Accessibility Service</string>
|
||||
<string name="dialog_consent_accessibility_cancel">Cancel</string>
|
||||
</resources>
|
||||
|
|
|
@ -116,19 +116,18 @@
|
|||
<item name="android:textColor">#000</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style name="PopupMenuCustom" parent="@android:style/Widget.PopupMenu" tools:keep="@style/PopupMenuCustom">
|
||||
<item name="android:popupBackground">#252827</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="android:textColor">#000000</item>
|
||||
<item name="android:background">#ffffff</item>
|
||||
<item name="android:color">#000000</item>
|
||||
<item name="android:textColor">@color/text_color_toggle</item>
|
||||
<item name="android:background">#ffffff</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialogDanger" parent="AlertDialogCustom">
|
||||
<item name="buttonTint">#ff0000</item>
|
||||
</style>
|
||||
|
||||
<!-- Set the fade in animation on all activities by default -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue