Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

settings: Switch from List preference to Animation Scale Preference #27

Draft
wants to merge 30 commits into
base: 14
Choose a base branch
from

Conversation

GuidixX
Copy link

@GuidixX GuidixX commented Jun 17, 2024

No description provided.

hyperb1iss and others added 3 commits June 17, 2024 16:23
@ frap129: Reworked for Pie, set default scale to 0.8f, and improved
the preference summaries so they match AOSP while keeping translations.

Change-Id: I29d89e532d07a325f6e568b21e4da4ce7e5761ac
Signed-off-by: Joe Maples <[email protected]>
Signed-off-by: saikiran2001 <[email protected]>
Signed-off-by: Joey Huab <[email protected]>
Change-Id: I3439bd3377bf7dac3f84094711810eff5e54ec75
Signed-off-by: mydongistiny <[email protected]>
Signed-off-by: Joey Huab <[email protected]>
Fix Settings FC when changing animation/duration scale, for reference:
https://developer.android.com/reference/androidx/preference/package-summary#interfaces

--------- beginning of crash
11-19 15:39:56.373 10693 10693 E AndroidRuntime: FATAL EXCEPTION: main
11-19 15:39:56.373 10693 10693 E AndroidRuntime: Process: com.android.settings, PID: 10693
11-19 15:39:56.373 10693 10693 E AndroidRuntime: java.lang.IllegalArgumentException: Cannot display dialog for an unknown Preference type: AnimationScalePreference. Make sure to implement onPreferenceDisplayDialog() to handle displaying a custom dialog for this Preference.
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at androidx.preference.PreferenceFragmentCompat.onDisplayPreferenceDialog(PreferenceFragmentCompat.java:629)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at com.android.settings.SettingsPreferenceFragment.onDisplayPreferenceDialog(SettingsPreferenceFragment.java:535)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at androidx.preference.PreferenceManager.showDialog(PreferenceManager.java:539)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at androidx.preference.DialogPreference.onClick(DialogPreference.java:257)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at com.android.settings.AnimationScalePreference.click(AnimationScalePreference.java:74)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at com.android.settings.development.AnimatorDurationScalePreferenceController.onPreferenceClick(AnimatorDurationScalePreferenceController.java:102)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at androidx.preference.Preference.performClick(Preference.java:1186)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at androidx.preference.Preference.performClick(Preference.java:1168)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at androidx.preference.Preference$1.onClick(Preference.java:181)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.view.View.performClick(View.java:7448)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.view.View.performClickInternal(View.java:7425)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.view.View.access$3600(View.java:810)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.view.View$PerformClick.run(View.java:28305)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7656)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
11-19 15:39:56.373 10693 10693 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Change-Id: I54ee312861e65d291987a60d64cc4fe1082d0102
@NurKeinNeid NurKeinNeid self-requested a review June 20, 2024 21:40
Copy link
Member

@NurKeinNeid NurKeinNeid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesnt compile:

packages/apps/Settings/src/com/android/settings/IntervalSeekBar.java:44: error: cannot find symbol
mDefault = seekBarType.getFloat(R.styleable.IntervalSeekBar_defaultValuePure, 1.0f);
^
symbol: variable IntervalSeekBar_defaultValuePure
location: class styleable

@GuidixX
Copy link
Author

GuidixX commented Jun 20, 2024

But how i compiled it?

@NurKeinNeid NurKeinNeid force-pushed the 14 branch 2 times, most recently from 101795f to 0ef210d Compare June 23, 2024 13:34
NurKeinNeid and others added 10 commits June 24, 2024 19:16
This reverts commit 3937577ef46b463b8790f7cfb447ddc248c09095.
This reverts commit 02ba348435c766bbd6fd77870c9ff4970819cca2.
This reverts commit 4fa623ae02a2df915f6262e6df3df566aa913efe.
This reverts commit 14829e1b167a36825fcb972ebff10e275e8e3479.
…atform/packages/apps/Settings into 14

Android 14.0.0 Release 50 (AP2A.240605.024)

Signed-off-by: NurKeinNeid <[email protected]>
[Updated to U by: ikeramat]
ikeramat: taken and adapted from: LineageOS/android_packages_apps_LineageParts@18f2dec

Change-Id: I44457aa51377bc70a1fdb11dfa089a17732dfd85
Signed-off-by: Mohammad Hasan Keramat J <[email protected]>
This messes with dialog lifecycle, move to onResume/onPause instead,
which also gets automatically called on preferences

Change-Id: I3bb0a25e275822bdc481ff659fc9c7f39541473c
@NurKeinNeid NurKeinNeid marked this pull request as draft June 24, 2024 17:59
@NurKeinNeid NurKeinNeid marked this pull request as draft June 24, 2024 17:59
ianchb and others added 9 commits June 29, 2024 20:19
QKIvan: adapt to our source

All credits to LineageOS and related authors on:

https://github.com/LineageOS/android_packages_apps_LineageParts

Squashed commits:

commit f4795d67d018d99b1cf724360bee278d66bbebeb
Author: Paul Keith <[email protected]>
Date:   Tue Jan 14 02:39:24 2020 +0000

    Settings: Allow removing livedisplay pref screen with config_enableLiveDisplay

    Change-Id: I17103ad116d1d26855fb47fdee1fa6cdc914e053

commit 98638aef74e0a6c1dab2a45a4582eb8daef0b2e9
Author: Han Wang <[email protected]>
Date:   Fri May 1 15:41:46 2020 +0200

    Settings: Remove obselete PreferenceCategory for LiveDisplay

     * This avoids showing empty 'title' which looks ugly.

    Change-Id: I34c655c94a26fc5907620fc9b82b84852fe741be

commit 36d8f89c63a38f182d69160264121c458a768b10
Author: Bruno Martins <[email protected]>
Date:   Sat Apr 11 14:34:40 2020 +0100

    LiveDisplaySettings: Hide Reading Mode if wellbeing app is enabled

    Google's wellbeing app provides Wind Down feature along with
    a grayscale option. Remove our preference to avoid having
    duplicate features.

    Change-Id: Ib20a0544a778ace385cb45ab2518a44420fb9bf6

commit 6750d003c074d46df1200b29ba674e5748b29ee7
Author: dianlujitao <[email protected]>
Date:   Wed Aug 7 00:20:42 2019 +0800

    LiveDisplaySettings: Hide automatic outdoor mode preference on HWC2

     * Unconditionally enabled on HWC2.

    Change-Id: Iebc39ba7d9be2ad83425b70fdc0542b8e4be6104

commit fb79eac7755c11f7b42ce6c432b505b2f4071869
Author: dianlujitao <[email protected]>
Date:   Tue Aug 6 23:33:11 2019 +0800

    LiveDisplaySettings: Reenable display mode preference for outdoor mode

    This reverts commit 7998c557e7f6a8749052f5bd7d7251dbc21d10ce.

    Change-Id: Iebcc6bcb8d29e8b61218a93d1856dd710e263f47

commit 4491cdf82a0fafe1c0558d35044de8fd58ebd43f
Author: Henrique Silva <[email protected]>
Date:   Sun Jun 2 18:32:11 2019 -0300

    Settings: Don't index display mode and color temperature on HWC2

    Change-Id: Iec23d14c6a7256432abc9a9bc313c303b88178c5

commit e9511a67d15e02a2e47d5f4bd71529e12251dcca
Author: jhenrique09 <[email protected]>
Date:   Fri Jul 5 20:27:23 2019 -0300

    LiveDisplaySettings: Fix outdoor mode preference on hwc2

    Change-Id: I7ecbc68cb7bc2eb70544f8f5bc3e3d9d2943e4d7

commit 10e1b8b237261033282e9e4ee02b9048fce03c53
Author: Rashed Abdel-Tawab <[email protected]>
Date:   Sat Jun 1 19:21:50 2019 +0530

    livedisplay: Don't show display mode and color tempertature on HWC2

    Change-Id: Ib60e11bdb79a233c961d00c0968922264c042011

commit 3ac1021fb707c5bee611529ed90184cae6513e9d
Author: Henrique Silva <[email protected]>
Date:   Mon May 6 10:53:01 2019 -0300

    LiveDisplay: Add illustration into picture and color adjustment

    Change-Id: I923ae55f2b4022bfba4292a6825ee75309e50239

Signed-off-by: jhenrique09 <[email protected]>

commit cae1a2b742d1d2cc1c596dff0ba979e8e675e6fa
Author: Bruno Martins <[email protected]>
Date:   Fri May 14 22:54:09 2021 +0100

    LiveDisplaySettings: Unlock Reading Mode whenever is possible

    Don't hide it anymore if Digital Wellbeing is present as this package
    no longer provides the same functionality as before. It has a greyscale
    option, but only when bedtime mode is enabled. User might want to enable
    Reading Mode independently, so make it available.

    This partially reverts commit 1b1932c05f85b5285784ca7080f4a17525a21226.

    Change-Id: Icacd81362d3cf83ced67ff07aed41ffb44af35ec

commit aedb2f0f979fdf5339931cbb058344567dcc21ae
Author: LuK1337 <[email protected]>
Date:   Tue Apr 27 11:39:23 2021 +0200

    LiveDisplay: Add color mode preview from AOSP Settings

    Change-Id: Ie69134a7148053e93e3aba528eefd858ae660ccd

commit bed6a42a67c61e061414ff6e070b0ec026af7fa7
Author: Arian <[email protected]>
Date:   Wed Jul 29 16:05:53 2020 +0200

    Settings: Add a toggle for anti flicker mode in LiveDisplay settings

    Change-Id: I4a80af3888c578652bf5e264a62e333cc2162305

Change-Id: Iccb5fe6dcb5672af2875886cfb2c98fe878247fe

Co-authored-by: Paul Keith <[email protected]>
Co-authored-by: Han Wang <[email protected]>
Co-authored-by: Bruno Martins <[email protected]>
Co-authored-by: dianlujitao <[email protected]>
Co-authored-by: Henrique Silva <[email protected]>
Co-authored-by: Rashed Abdel-Tawab <[email protected]>
Co-authored-by: LuK1337 <[email protected]>
Co-authored-by: Arian <[email protected]>
* Resolved IllegalArgumentException when opening the notification light color settings dialog.

Crash log before fix:
java.lang.IllegalArgumentException: Cannot display dialog for an unknown Preference type: ApplicationLightPreference. Make sure to implement onPreferenceDisplayDialog() to handle displaying a custom dialog for this Preference.
    at androidx.preference.PreferenceFragmentCompat.onDisplayPreferenceDialog(PreferenceFragmentCompat.java:674)
    at com.android.settings.SettingsPreferenceFragment.onDisplayPreferenceDialog(SettingsPreferenceFragment.java:566)
    at androidx.preference.PreferenceManager.showDialog(PreferenceManager.java:542)
    at androidx.preference.DialogPreference.onClick(DialogPreference.java:264)
    at androidx.preference.Preference.performClick(Preference.java:1197)
    at androidx.preference.Preference.performClick(Preference.java:1182)
    at androidx.preference.Preference$1.onClick(Preference.java:183)
    at android.view.View.performClick(View.java:7931)
    at android.view.View.performClickInternal(View.java:7908)
    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
    at android.view.View$PerformClick.run(View.java:30989)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8590)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
This reverts commit c6eba74.

Change-Id: Ib8403ca842a4655d1526b27f1965feeee336c687
…lightBrightness

Ref: DerpFest-AOSP/packages_apps_Settings@b19d623

Change-Id: I68535f00ee494df948b98904096220138041396d
Signed-off-by: NurKeinNeid <[email protected]>
lineageos-gerrit and others added 8 commits July 20, 2024 04:27
Change-Id: I477312f5aead1e00d906467d5dfa9bf08ce526bc
Change-Id: I2bb84ece20f57bbbcb9b1d23ca06e0ccd715f1c2
Matches header start padding with other SuW activities.

Change-Id: If8eff0a75161da21e8a7dd876d864323a0d00784
Change-Id: I8dd9b1e5ffca893cd51a344462a763edbf940b4d
Change-Id: I1926a8917ac04d37d24b7c12e0036c3f55a5ced4
…atform/packages/apps/Settings into 14

Android 14.0.0 Release 56 (AP2A.240805.005.A1)

Signed-off-by: NurKeinNeid <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.