To avoid double registering, which prevent potential issues and could
improve latency.
Since DashboardFragment already supported register lifecycle
automatically for the controllers bound by XML which implements
androidx.lifecycle.Lifecycle, so doing a cleanup to prevent register
lifecycle event manually (doubling).
Bug: 149338098
Test: temporarily add logging to make sure the lifecycle method is
called and only called once
Change-Id: I4dbc36414991ef6b599be61aa77ff0dc8c52468c
The "Pause app activity if unused" SwitchPreference under App info page.
Currently, the preference controller updates the UI state in the
onOpChanged(), which is unnecessary and is called in another non-UI
thread.
Not updating state in onOpChanged() to fix.
Note: This controller implements the LifecycleObserver to handle
lifecycle related logic, but it's actually a no-op before change
If9e48e44267de8e89a5e8f45d256719130936320. So it used to work fine
without the OnOpChangedListener, we can remove it now.
Fix: 227762370
Test: manual
Change-Id: I33f1f55a706407d7b409c3544f9889c45855b34d
In this page, 3 conversation lists are implemented by the
ConversationListPreferenceController, these lists updates its contents
in updateState(), which is after the preference screen view created.
So when the first time this page is showed, animations of added contents
will be shown.
The improvement is when the first time, update the list in the
onCreate(), which is called before view creation, instead of the
updateState().
And also do the same thing for RecentConversationsPreferenceController.
Also, to reduce latency,
1. Because currently there are duplicated calls in
NoConversationsPreferenceController to check whether conversations are
exists or not, by removing the duplicated calls and reuse the result
from other controllers, the latency could be reduced.
2. Currently, there are seperated api calls, the
mBackend.getConversations(false) in AllConversationsPreferenceController
and the mBackend.getConversations(true) in
PriorityConversationsPreferenceController, use one
mBackend.getConversations(false) in ConversationListSettings to improve,
this does not change the behavior because the result is filtered in
matchesFilter() both before and after.
3. Currently, we sort conversations first then filter them, change to
filter first then sort to reduce latency.
Fix: 215073227
Test: visual check & robo tests
Change-Id: I028a7fabbbf64cf5627e6615372282a36eb784e5
setSummaryProvider() is used instead of setSummary() in
Ia24d88817c99db7ed3fc264dbc9c10e0a09d8a39, but there is still a place
using the setSummary(), mixing these two will lead to crash.
Change it to setSummaryProvider() to prevent crash.
Fix: 233295254
Fix: 233712251
Test: manual
Change-Id: I4627545711b848009c3bd7179f0368ff82e62697
Should set highlight Preference key after
isDuplicateClick to ensure clicked Preference
key & highlight Preference are different and
then isDuplicateClick returns a correct value.
Bug: 233553587
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.dashboard
manual
1. Click all left pane items and see if there is any launch problem.
2. Check if duplicate click check works.
Change-Id: Ic6394b96896fd3a0fb926707565f63beff74a27b
- SeekBarPreference should be unselectable
- remove unnecessary handling of Summary
- set currect Title color when preference is enabled and unselectable
Bug: 230553896
Test: robotest
Change-Id: Ie5d819088dc3c435005ddd00e232b2f6992b234a
- Sync the same design to query and set carrier Wi-Fi enabled status from MergedCarrierEntry
- Add more logs for issue tracking
Bug: 227236604
Test: manual test
atest -c CarrierWifiTogglePreferenceControllerTest \
WifiPickerTrackerHelperTest
Change-Id: I869fa97bd24ed31a3224b4a395ffc97a17aa1471
Currently, cannot use ListPreference.setSummary() when the summary
contains user generated string, because ListPreference.getSummary() is
using String.format() to format the summary when the summary is set by
ListPreference.setSummary().
Use preference.setSummaryProvider() instead, which is recommended for
ListPreference.
Fix: 233295254
Test: manual
Change-Id: Ia24d88817c99db7ed3fc264dbc9c10e0a09d8a39
The "phone calls" uses the Headset profile, not HFP profile. The ui
uses the wrong profile. It causes the "phone calls" is always enabled
when LE is enabled.
Bug: 231511825
Test: build pass
Change-Id: Ib507352107c0d825b8c7a9605713bc9083259fbd
Merged-In: Ib507352107c0d825b8c7a9605713bc9083259fbd