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
Goals:
1. Extends the api of apply partner's customization padding style in the Settings widget "SettingsMainSwitchPreference" to dynamically adjust the padding depending on the SetupWizard library.
2. Use the function to avoid the button being truncated.
Bug: 231512916
Test: manual test
Change-Id: I951776185eb1616136d9caf3a60f9daea4da191a
The source of this problem is that onBindViewHolder is called
after the user add the OnMainSwitchChangeListener. Then
preference gets a new MainSwitchBar in onBindViewHolder and
causes the listener to fail.
Bug: 223325900
Test: Manually test and observe the UI
Change-Id: I6e58c4cf035811bb8805e76bebb5fbb86c7a79da
- SettingsMainSwithBar will be recreated after the page is resumed.
We should keep the OnMainSwitchChangeListener for
SettingsMainSwitchPreference and re-register the listeners after
the page is resumed.
Fix: 228930107
Fix: 222384287
Test: Manually test and see the UI
Change-Id: I9b57053989e611288cf4814b2a0ecbf9e3c55145
there will be a blank area.
- Disable the visibility of preference when the the hide() method
is invoked.
Fix: 192332931
Test: robotest and see the UI
Change-Id: Iec5a06ca689843ebb692b1b7040f1d2be9f45bc2
appears twice when switch changed.
- Don't trigger the switch change event if the state of Switch and
SwitchSettingsMainSwitchPreference are the same.
Fix: 190767461
Test: robotest and operate the switch preference manually
Change-Id: I6ab4b7e5ca1455948ca9118bb4a674fdc4fdbd50
when the MobileNetwork page is slid to to top.
- Update the onBindViewHolder method of
SettingsMainSwitchPreference. The root cause is that the
onBindViewHolder method reset the visibility state of the
SwitchBar.
Fix: 190652161
Test: robotest and test MobileNetwork page manually.
Change-Id: If0a75579fd4bf0fe987ce5d11d2f11d10f4bc43c
- Check if the RestrictedPreferenceHelper is null to avoid NPE.
Fix: 190135868
Test: run robotest and manually test that page.
Change-Id: I746099260d8f53dc30513ccbb30aec5cbe3657e7
if it is restricted.
- Use the RestrictedPreferenceHelper to check the restricted state.
Fix: 179245126
Test: rebotest and see the UI
Change-Id: I3c0e3bd0f3596d6fa548b6f8f10e4d12e7e50c9a
Problem: The main switch won't be the ceiling preference. It has chance to show the divider if another preference won't disable the below divider.
Solution: Remove the above divider.
Bug: 186066199
Test: Test: Manual testing
Change-Id: I49893fa71b016f82dce9f402d47c86ec3df20a54
notification will pop up.
The root cause of the problem is that the switch preference and
switch bar status are not sync when using setCheckedInternal API.
Fix: 179498532
Test: Run robotest and see the ui
Change-Id: Ib51dc2ef27ce49b9c8ba69eb32757bf6b9945baf
- Update wi-fi calling switch.
- Update the switches in Accessibility
Fix: 178673860
Fix: 177968565
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Id10e6a110f418ea500a2eaf3c54752bef4f36507
Fix: 177967926
Fix: 177968295
Fix: 177967925
Fix: 177968078
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Ie854de96e5495fa564fb8a097ed4547bbd2b10c5
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.
Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70