Cherish: Recognizing fingerprint animation [2/2]

Change-Id: I1b11c4b6e6a6dd49d206e01d9f425b307df1a047
Signed-off-by: Ayan Mukherjee <mukherjeeayan725@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
00day0
2021-02-23 08:47:28 +00:00
committed by Hưng Phan
parent fcd07ad550
commit f75ac920ca
4 changed files with 100 additions and 2 deletions

View File

@@ -1189,4 +1189,59 @@
<item>7</item>
<item>8</item>
</string-array>
<!-- FOD Recognizing fingerprint animations -->
<string-array name="fod_recog_animation_entries" translatable="false">
<item>@string/fod_recog_animation_miui_normal</item>
<item>@string/fod_recog_animation_miui_aod</item>
<item>@string/fod_recog_animation_miui_aurora</item>
<item>@string/fod_recog_animation_miui_aurora_cas</item>
<item>@string/fod_recog_animation_miui_light</item>
<item>@string/fod_recog_animation_miui_pop</item>
<item>@string/fod_recog_animation_miui_pulse</item>
<item>@string/fod_recog_animation_miui_pulse_white</item>
<item>@string/fod_recog_animation_miui_rhythm</item>
<item>@string/fod_recog_animation_miui_star_cas</item>
<item>@string/fod_recog_animation_op_cosmos</item>
<item>@string/fod_recog_animation_op_energy</item>
<item>@string/fod_recog_animation_op_mclaren</item>
<item>@string/fod_recog_animation_op_ripple</item>
<item>@string/fod_recog_animation_op_scanning</item>
<item>@string/fod_recog_animation_op_stripe</item>
<item>@string/fod_recog_animation_op_wave</item>
<item>@string/fod_recog_animation_pureview_dna</item>
<item>@string/fod_recog_animation_pureview_future</item>
<item>@string/fod_recog_animation_pureview_halo_ring</item>
<item>@string/fod_recog_animation_pureview_molecular</item>
<item>@string/fod_recog_animation_rog_fusion</item>
<item>@string/fod_recog_animation_rog_pulsar</item>
<item>@string/fod_recog_animation_rog_supernova</item>
</string-array>
<string-array name="fod_recog_animation_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
<item>17</item>
<item>18</item>
<item>19</item>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
</string-array>
</resources>

View File

@@ -1137,4 +1137,33 @@
<string name="lockscreen_fod_category">Fingerprint On Display</string>
<string name="fod_gesture_title">Screen off FOD</string>
<string name="fod_gesture_summary">Allows unlocking the device without having to wake up the screen first</string>
<!-- FOD animations -->
<string name="fod_recog_animation">Fingerprint animation</string>
<string name="fod_recog_animation_summary">Shows an animation while reading your finger</string>
<string name="fod_recog_animation_effect_title">Select fingerprint animation effect</string>
<string name="fod_recog_animation_miui_normal">MIUI default</string>
<string name="fod_recog_animation_miui_aod">MIUI AOD</string>
<string name="fod_recog_animation_miui_aurora">Aurora (K30 Pro)</string>
<string name="fod_recog_animation_miui_aurora_cas">Aurora (Mi 10 Ultra)</string>
<string name="fod_recog_animation_miui_light">Light</string>
<string name="fod_recog_animation_miui_pop">Pop</string>
<string name="fod_recog_animation_miui_pulse">Pulse</string>
<string name="fod_recog_animation_miui_pulse_white">Pulse (White)</string>
<string name="fod_recog_animation_miui_rhythm">Rhythm</string>
<string name="fod_recog_animation_miui_star_cas">Starlight</string>
<string name="fod_recog_animation_op_cosmos">Cosmos</string>
<string name="fod_recog_animation_op_energy">Energy</string>
<string name="fod_recog_animation_op_mclaren">McLaren</string>
<string name="fod_recog_animation_op_ripple">Ripple</string>
<string name="fod_recog_animation_op_scanning">Scanning (Cyberpunk 2077)</string>
<string name="fod_recog_animation_op_stripe">Stripe</string>
<string name="fod_recog_animation_op_wave">Wave</string>
<string name="fod_recog_animation_pureview_dna">DNA</string>
<string name="fod_recog_animation_pureview_future">Future</string>
<string name="fod_recog_animation_pureview_halo_ring">Halo ring</string>
<string name="fod_recog_animation_pureview_molecular">Molecular</string>
<string name="fod_recog_animation_rog_fusion">Fusion</string>
<string name="fod_recog_animation_rog_pulsar">Pulsar</string>
<string name="fod_recog_animation_rog_supernova">Supernova</string>
</resources>

View File

@@ -273,6 +273,21 @@
<PreferenceCategory
android:key="fod_category"
android:title="@string/lockscreen_fod_category">
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="fod_recognizing_animation"
android:title="@string/fod_recog_animation"
android:summary="@string/fod_recog_animation_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="fod_anim"
android:title="@string/fod_recog_animation_effect_title"
android:summary="%s"
android:entries="@array/fod_recog_animation_entries"
android:entryValues="@array/fod_recog_animation_values"
android:defaultValue="0"
android:dependency="fod_recognizing_animation" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="fod_gesture"

View File

@@ -54,7 +54,6 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
private static final String DATE_FONT_SIZE = "lockdate_font_size";
private static final String LOCKOWNER_FONT_SIZE = "lockowner_font_size";
private static final String AOD_SCHEDULE_KEY = "always_on_display_schedule";
private static final String LOCKSCREEN_CATEGORY = "lockscreen_category";
private ContentResolver mResolver;
static final int MODE_DISABLED = 0;
@@ -82,7 +81,7 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
mResolver = getActivity().getContentResolver();
boolean enableScreenOffFOD = getContext().getResources().
getBoolean(com.android.internal.R.bool.config_supportScreenOffFod);
getBoolean(com.android.internal.R.bool.config_supportsInDisplayFingerprint);
Preference ScreenOffFODPref = (Preference) findPreference("fod_gesture");
if (!enableScreenOffFOD){