Currently, when schedule sets to "Turns on at bedtime", the footer will
show a slid up animation when entering the page, this is because the
"Start time" & "End time" preferences are hidden in onResume().
This is because these 2 preferences always return AVAILABLE in
getAvailabilityStatus(), and manually update visibility in
refreshSummary(), which is called each time updateState() is called.
Usually the controller not set the visibility explicitly, but return
CONDITIONALLY_UNAVAILABLE in getAvailabilityStatus() when they want to
hide the preference.
Because getAvailabilityStatus() is called in onCreate(), by using this,
we can fix the flicker.
Fix: 234399017
Test: visual & robo test
Change-Id: I4cb7dd95d2985bd1ca4c8cb30aaebdc21a5415f8
The usage of this dialog is removed in
Change Ie2cf147de53385ae0c626c8472306f1b85317686
But this dialog is created (but not show) in DarkUIPreferenceController
each time dark mode toggle is turned on by user.
So clean this up.
Fix: 234419979
Test: make Settings
Change-Id: Icdc9d7a4fb77dc8b2a3f1a9d8e3f40fc0af4917d
Uri.toSafeString strips out paths and shouldn't be used
for situations other than logging.
Bug: 232694281
Test: PtsPowerTestCases
Change-Id: Iec835b738c3e928e922bd6a14573106f2ce4f526
When the page is entered from the AppInfoDashboardFragment, there is no
way to know whether the cycle data is available before finished the
async loading. If it's zero usage, the cycle spinner will be removed,
which cause a flicker.
Temporarily disable the preference list's animator before initial
page updates can solve this issue.
This also fix another flicker on this page when the background data is
off.
Fix: 233963355
Test: manual visual test
Change-Id: I795ed95e15bb3216fa17adfd4f57faf5fd92fa00
SeekBarPreference is set to unselectable in change
Ie5d819088dc3c435005ddd00e232b2f6992b234a
Update the test accordingly.
Bug: 230553896
Test: robotest
Change-Id: Ia024b81e3f8e3808b0bb1e48c41a84d0ececaa85
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
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
This reverts commit d9453bf8c6.
Reason for revert: This introduces a new flicker which doesn't seem good. Will have another solution once all things are ready.
Fixes: 232355879
Change-Id: I0bbc4561ce4fbef36d59de15ae98705a6d81574c
Add jank detection when click the following preferences,
- SwitchPreference
Single target, detect click in InstrumentedPreferenceFragment
- PrimarySwitchPreference
Two target, only detect click switch in switch's onClick()
- MainSwitchPreference
Single target, detect click in TogglePreferenceController
- SettingsMainSwitchPreference
Single target, detect click in its onSwitchChanged()
Bug: 230285829
Test: manual & robo tests
Change-Id: I97a13e05a601237b16cd2d903ba2fb6ec4a69a74
* Pop up dialog in 'Connected deivce' page and 'Accessibility -> Hearing
aids' page
Bug: 225117454
Bug: 226511985
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtils
Change-Id: I34a1e3ac680a7efe97dc501bfbe93f840ad16364
* changes:
Add 'Live Caption' preference for hearing aids device in Device details page
Update summary in Accessibility -> Hearing aids
Header for hearing aids now listed in one summary
Replace FooterPreference#SetLearnMoreContentDescription() with
FooterPreference#SetLearnMoreText().
This is a requirement: All links, controls, and buttons should
also have comprehensible text or tooltip text, so users can identify its
purpose, independent of context, such as when using the URL list from
TalkBack’s local context menu.
Bug: 215045903
Test: manual & robotest
Change-Id: Ib657ba336c5688c1434a58611dea3891001afe14
Goals: Call the function LayoutStyler#applyPartnerCustomizationLayoutPaddingStyle to dynamically adjust the padding of the view.
Bug: 231511522
Test: manual test
Change-Id: Idd4a00c004eca8ec9699edeabe85bbee4bd49af9
1. Replace InstrumentedDialogFragment by SettingsPreferenceFragment.
Enable the capability of shirnking the size of title.
2. Move switch bar into Preference.
Enlarge scrollable area within this UI page.
Bug: 224661026
Test: local
Change-Id: I6e0a491721e9f93858c389593b2bb891f6fa8f8d
- If Wi-Fi tethering is enabled or enabling, avoid to startTethering again.
- If Wi-Fi tethering is disabled or disabling, avoid to stopTethering again.
- Add more logs to know which module stopped Tethering.
Bug: 230457055
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSwitchBarControllerTest
Change-Id: I51d42ac0117d935ecaa9fa7312acc646b43d3593
Rather than recalculating it again. Also align logic on
listing and details pages.
Test: NotificationBackendTest, NotificationPreferenceControllerTest
Bug: 231662091
Fixes: 231815850
Change-Id: If9572766666620008afb839ecb0828ace8d6073d
- Activity#getCallingPackage will return null in some special cases, use the launched package instead.
Bug: 194709435
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiScanModeActivityTest
Change-Id: I4f22bab7592dedf75dd36daf5e18dbc934bc8655
When it's in a multi-window mode, force stopping an app will lead to an
activity recreate, and the dialog fragment will also be recreated.
That's why the dialog still shows after the button is clicked.
Hence, dismiss the dialog before stopping the app to fix it.
Fixes: 231529730
Test: robotest
Change-Id: I75d27624f0c60bb617e7d1a92ffe01d3c0fbf7be
Both "Mobile data usage" & "Non-carrier data usage".
By,
1. Use summary placeholder for usage amount to avoid shift
2. Before fix CycleListener's onItemSelected() is called multiple times,
cause the app list to flash, let DataUsageList to handle the dedup
logic to better handling.
3. Before fix if return from App Usage page, no loading view is
displayed (only first enter has it), move this to onResume() to fix.
4. Before fix the cycles passed to App Usage page is cached (even when
the cycles are changed), clear the cache when onResume() to fix.
5. Listener in SpinnerPreference could be null, add safety guard to it.
Fix: 187019210
Test: manual visual test
Change-Id: I95e544c46333496f4f30ed77dafa4779b4d66019
Hide the running time information for "Android System" entry, since this
entry will combine multiple system components together. It will provide
incorrect running time information. The getRealUid() method maps many
UIDs to Process.SYSTEM_UID(1000), which results in combining all of
those UIDs into one "Android System" entry. This is the expected behavior.
Bug: 220717612
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I9d44fe8490ad5c684419b8ebf8d7d5576a42788a
- Don't let device be discovered when the user launch "Connected Devices
settings" through SliceDeepLinkTrampoline.
Bug: 228450811
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify the device is not discoversable when open "Connected settings"
through test apk.
Change-Id: I5490b58675b1fd9fc36305766867f65caa6ccb6c