Bug 422473 - Light/dark theme option doesn't persist across force quits
Summary: Light/dark theme option doesn't persist across force quits
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (other bugs)
Version First Reported In: unspecified
Platform: Android Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-05 05:18 UTC by Daniel Tang
Modified: 2020-07-16 06:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tang 2020-06-05 05:18:54 UTC
SUMMARY

The new light/dark theme option doesn't get applied on process startup.

This was first reported by Philip C-C on Telegram.

STEPS TO REPRODUCE
1. Make sure the Android system theme is set to light
2. Set the theme to dark inside the KDE Connect app global settings
3. Force quit KDE Connect (or restart Android)
4. Open KDE Connect
5. Look at the theme color
6. Repeat steps 1-5 with the opposite combination

OBSERVED RESULT

When launching the app after it died, the theme matches the system theme instead. The "Choose theme" setting has no effect until it is changed again.

EXPECTED RESULT

The theme always matches the one set in "Choose theme".

SOFTWARE/OS VERSIONS

KDE Connect: c318d609 (first bad commit), d5946faf (latest commit)
Last good commit is e315cbd9

Device: Android Studio
Skin: Pixel XL
Image: Android 10.0 (Q) Google APIs Intel x86 Atom System Image, API 29, Revision 10

This also affects real physical devices.
Comment 1 Philip C 2020-07-16 06:28:37 UTC
Git commit 8e099366924266feaaadb4b501afd540e01c31ec by Philip Cohn-Cort, on behalf of Anjani Kumar.
Committed on 16/07/2020 at 06:28.
Pushed by philipc into branch 'master'.

Set user preferred theme when activities are created

M  +1    -0    src/org/kde/kdeconnect/Plugins/BigscreenPlugin/BigscreenActivity.java
M  +1    -0    src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhoneActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationFilterActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/PresenterPlugin/PresenterActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/RunCommandPlugin/RunCommandActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/RunCommandPlugin/RunCommandUrlActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/RunCommandPlugin/RunCommandWidgetDeviceSelector.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/SharePlugin/SendFileActivity.java
M  +2    -0    src/org/kde/kdeconnect/Plugins/SharePlugin/ShareActivity.java
M  +1    -0    src/org/kde/kdeconnect/UserInterface/AppCompatPreferenceActivity.java
M  +1    -0    src/org/kde/kdeconnect/UserInterface/CustomDevicesActivity.java
M  +1    -0    src/org/kde/kdeconnect/UserInterface/MainActivity.java
M  +1    -0    src/org/kde/kdeconnect/UserInterface/PluginSettingsActivity.java
M  +12   -0    src/org/kde/kdeconnect/UserInterface/ThemeUtil.java
M  +1    -0    src/org/kde/kdeconnect/UserInterface/TrustedNetworksActivity.java

https://invent.kde.org/network/kdeconnect-android/commit/8e099366924266feaaadb4b501afd540e01c31ec