Add getSystemService(Class<T>) to align the capability with framework
part.
Bug: 179640862
Test: local
Change-Id: I278951c2402aa8551cee37923f45626ab1830dd3
Since the Andorid S, we introduce the CollapsingToolbarLayout
, the highlighted funcation might break for unkown reason.
I observed that broken cases with overlapping issue on tool bar.
The possible root cause is the interation bwtween
CoordinatorLayout v.s CollapsingToolbarLayout v.s Recycler
view.
This cl is definetly a workaround to prevent this issue.
I try to collapse the tool bar with an animation before
we start to scroll the list. This makes the overall transition smooth
but always collapse the tool bar.
Fix: 177968297
Test: Click a lot of search results, and screen should highlight
settings correctly.
Change-Id: Id9c32b642433dcc39c179a2cc83a06e77cc47888
This reverts commit 99eb12048c.
Reason for revert: Revert this workaround since the real solution has been submitted and released. More information please see b/177766209.
Change-Id: I566194ff71bb9e912407d6d4b3798adc6be71779
Settings app is planning to make toolbar collapsible for next
Android release. This CL is to add a new layout for
CollapsingToolbarLayout in the Settings app and to update the theme
correspondly. This feature will be controlled by feature flag, which
makes Settings app compacitible with the existing layout.
Bug: 174451673
Test: manul test and visual verification
1) Enable the feature and open Settings app
2) Navigate to each sub page and check if toolbar is collapsible
Change-Id: Ibef524bbaa7ae3f0a43db7e40e599f42e009437f
When WifiTracker2 callbacks to Wi-Fi Settings, should check if the
activity is finishing at first.
Bug: 151677440
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiSettings2Test
Change-Id: I95737eae3f67e6471c75ba845b57af2d721d5d37
Under dashboards with expand button, preferences are renderred even
not been expanded.
Avoid from rendering un-expanded preference can improve the performance
of dashboard display.
Bug: 141833767
Test: manual
Change-Id: I00c6f827a0b7b7cec6a6fd8c809b94ca1dce88bb
- Remove buttonBar because it is only used in PublicVolumeSettings
- Add tabLayout in preference_list_fragment.xml
Bug: 141601408
Test: manual
Change-Id: Ieb84ccf2e685a03abec7b07cb8f9f4b64ee475e0
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId
Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
Fixes: 124129485
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.core
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.SettingsPreferenceFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Change-Id: I920d0de403b9c7109de0e2e53be7ed99bc8e7390
- The second divider is shown after we set a background to the pinned
header.
- Fix it by simply hiding the pinned header instead of its inner views.
Fixes: 133231218
Test: robotest, visual
Change-Id: I53add6f01930299425ce96d23350f9f066e85145
Header preference was just a static preference and used LayoutPreference
to show customized layout. But Preference default enabled the selectable
attribute, then caused the a11y service to speak out "Double-tap to
activate". Override the selectable attribute to fix it.
Fixes: 132856214
Test: robotests, visual
Change-Id: Ibc577de347edb66ab9de53f6177ca068a19ffa74
- instead of removing it from the preference screen, set its visibility
to false, so that if it becomes available later, it will still be found
on the screen.
Bug: 119838520
Test: make RunSettingsRoboTests
Change-Id: Idc7079bb5846aef247dd87c0b0dba2546f2d8f8f
- Remove LayoutPreference in Settings source code.
- Remove unused style, layout
- Replace old imports to com.android.settingslib.widget.LayoutPreference
- Replace old XML tag to com.android.settingslib.widget.LayoutPreference
Test: robotest, manual test
Bug: 120005054
Change-Id: I9ae1ae14a16f443e11ac5d75b6038c7c5e253844
Since we overrided the empty constructor,
it can't find a empty constructor when
Fragment tries to instantiate a fragment
in framework.
So, we can't override this constructor,
and then just use newInstance() to initialize
and setup a new Fragment.
Test: robotest
Change-Id: Ifcd1c1771bc69d947caeee5c5bc055c4f94365c2
Fixes: 115676209
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
This patch focused on fixing compile errors and some runtime errors.
Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
- Make SettingsPreferenceFragment implement Indexable directly
- Add existing fragments that are SettingsPrefFragment but not Indexable
to grandfather list.
- Fix "font size" fragment so it shows up in search properly.
- Remove duplicates for "lock screen display", "Screen saver".
Bug: 70720645
Test: robotests
Change-Id: I44ce0cac0fdf5e882b315861bb4bebc45dbe01e6
- Fragments should not have advanced button when coming from search.
Change-Id: I10a192216b7ff702e73b791acbcc1eb1d71cb407
Fixes: 73348428
Test: robotests
- Moved HighlightableAdapter to its own class
- Replaced ripple with blue background
- Bluebackground only stays for 5 seconds. After that it's replaced by
?attr/selectableBackground
Misc fixes.
- Fix NPE in UserSettings
- Update char limit on a new string
Change-Id: I4687e54e71fd7b9243f520b7630563df58be23d4
Fixes: 71715698
Fixes: 72761974
Test: robotests
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.
Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
- when the fragment is created, checks the argument to see if the extra
fragment arg key is set. If so, do not hide the preferences in the
preference screen inside the advanced button.
Change-Id: I80fa20672024fe702ed2ddab448232bdc92ce05f
Fixes: 68988454
Test: make RunSettingsRoboTests
- when the fragment is created, checks the argument to see if the extra
fragment arg key is set. If so, do not hide the preferences in the
advanced button.
Change-Id: Id662ae1cec77edad7fcd5d6daa71929a8cb1402c
Fixes: 68988454
Test: make RunSettingsRoboTests
In fragments where preferences were being injected after
the super#onResume, the incorrect preference was
being highlighted as the selected result.
This is because the index of the preference is calculated
in SettingsPreferenceFragment#onResume, but the index is
not checked again before the item is highlighted.
Instead, we calculate index right before we highlight.
Change-Id: Idaa655f682a1a6186c1996fb51d352589bbeda0f
Fixes: 62179739
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/SettingsPreferenceFragmentTest.java
Also consider the visiblity of list container, when list container
is invisible, we should show the empty view.
Bug: 62062415
Test: RunSettingsRoboTests
Change-Id: I065e70386242c425ef3cbfb2b703a5433dbe40c1
The preference framework does not remove pref recursively. So when a
preference is nested in preference hierarchy, it's not safe to simply
call screen.removePreference(). We need to first find its parent and
remove pref from its parent.
Change-Id: Ic7fefa498ed71a8877d862845ddcc2d6d6034a55
Fix: 38507066
Test: make RunSettingsRoboTests