Commit e13738e
committed
fix(settings): prevent new-app default mode from resetting to Normal after restart
When native getNewAppProfileMode() returns 0 (which happens both when
the mode is actually Normal and when the kernel storage read fails),
loadNewAppProfileMode() was unconditionally treating native as
authoritative and overwriting SharedPreferences with 0. This caused the
Exclude/Root setting to be lost on app restart for many users.
Now the function only trusts native for non-zero values. If native
returns 0 but SharedPreferences has a saved preference, it restores
the native state from SharedPreferences instead.1 parent c83e9f3 commit e13738e
1 file changed
Lines changed: 17 additions & 5 deletions
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
808 | | - | |
| 808 | + | |
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
814 | | - | |
815 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
816 | 829 | | |
817 | | - | |
818 | 830 | | |
819 | 831 | | |
820 | 832 | | |
| |||
0 commit comments