- When satellite mode is switched on Wifi, and APM entry shall show the warning dialog and avoid user uses these functions.
Bug: 337154438
Test: Manual test.
Test: atest pass
Change-Id: I45cd92a8688e7a619613361ea4a8d58a0984d99f
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.
Using TwoStatePreference in Java will helps migration in the future.
Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
This instance is only initialized if isAvailable() returns true in the
first place, so we should check for it everytime we try to access it, or
else we will result in a NPE.
Bug: 271223463
Test: atest AirplaneModePreferenceControllerTest
Change-Id: I43d35b91c86517201c8ec4f458f8c0328a9fb768
There're 2 missing parts in previous code refactor:
1. The API change for exiting ECM mode dialog
2. The support of onActivityResult() for PreferenceController
Bug: 226494641
Test: local
Change-Id: I0c2c313a53fbc1b7435f295f190b70653e2f6758
The AirplaneModeEnabler is a ContentObserver, and it must be closed when
the object containing it is deleted. Otherwise, it will continue to
exist and cause a memory leak.
Test: atest -c SettingsUnitTest
Bug: 177265744
Change-Id: Idd48b601be1133ee02010e23d8dcb394d1e29bd3
There were several errors in indexing mobile related sliceable
controllers, which led them not able to display on Panel and as inline
controls in search result.
It's because indexing mechanism is running in a worker thread and trying
to construct each controller instance, but the failed controllers'
constructors need to initilize something in the main thread.
- Give the main looper to the classes which only can be initialized in
the main thread to fix the indexing.
- Guard null pointer exception in SlicesIndexer after fixing the
indexing.
- Use onStart/onStop in AirplaneModePreferenceController to start/stop
listener.
Fixes: 149720345
Test: robotest
Change-Id: Ibe5a8d6cc713eeddf26eceaabc05e6d1faa45507
This CL uses TelephonyManager instead of TelephonyIntent for
ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS
Bug: 146240041
Change-Id: I45bf3295badb49a571ab13fea2c6218768533835
Only PreferenceControllers with isPublicSlice() set to true are exposed
to other apps. Others will be Settings only.
Bug: 141088937
Test: robotests
Change-Id: I5934e89bc1b268fdd44acd630621fa46987728ff
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.
Bug: 117924132
Bug: 141246285
Test: lunch blueline-userdebug; m checkbuild
Change-Id: Ic4f16a4475eb2870dcaeec41b38de90a0f6473bb
Establish the Activity which hosts Settings panels through the
PanelFragment. The Activity's purpose is to validate the intent
data coming in, including:
- Called with startActivityForResult (so we can log who is calling)
- Intent has the proper intent extra to link to a Panel
The fragment takes the Panelable data and builds a Settings Panel.
Each panel will have:
- Title
- List of Slices
- Link to underlying content
The Panelable interface is created to provide all of those datums, and
the new FetureProvider provides the Panelables by linking them with
keys. The keys will eventually become public APIs with CTS tests.For
now, we store them locally.
I included an exmaple panel, the InternetConnectivityPanel which
currently shows Wifi and Airplane mode.
Screenshot: https://screenshot.googleplex.com/c6sv7ZzQ5OJ
Bug: 117804089
Test: make -j40 RunSettingsRobotest
Test: Manual app
Change-Id: I1932f7179cc32088acd6413a736901ddf9651892
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Change pref key for airplane mode to "airplane_mode" to match the
constant declared in SettingsSlicesContract.
Bug: 80106671
Test: robotests
Change-Id: I898befffbdafc3004fc127414edd04f60ff2554e
Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.
Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.
Test: robotests
Bug: 79779103
Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.
The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.
Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.
Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
- Convert inheritance from AbstractPreferenceController to
TogglePreferenceController.
- Register AirplaneModePreferenceController in XML.
- Decouple AirplaneModeEnabler with preference, leave the UI be
controled by PreferenceController.
- Add RoboTests test cases for AirplaneModePreferenceController.
Fixes: 67997339
Test: RunSettingsRoboTests
Change-Id: I7398943ed51345e014ee7aa774bfae1ca28632f1
This introduces a new boolean flag:
config_show_toggle_airplane
Which when set to false, will hide the airplane mode toggle in network &
internet.
Bug: 69813881
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=AirplaneModePreferenceControllerTest
Change-Id: I2cf682bf78231040eba5573fbcb55a65be2a13df
Allows calling without instantiating the pref controller.
Also some minor cleanup of MobileNetworkPrefController.
Bug: 62022517
Test: robotests
Change-Id: I34ff5d3729d06158bff3cc125de4c114bf4861d5
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.
Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
&& make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
- Add a ProgressiveDisclosureMixin that contains all logic for collapse
preference list when it's too long
- Refactored PreferenceController's updateState to take a preference
instead of PreferenceScreen, because with progressive disclosure the
preference can either be in screen or the mixin. DashboardFragment is
responsible finding the preference before passing it to controller.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I6713abd61c954ce12732902e5b3ca4d4c0b1563e
- Also made tiles refresh more efficient: when category changes, only
refresh dynamic tiles. Static tiles from xml will not change due to
category change.
Bug: 31799836
Test: RunSettingsRoboTests
Change-Id: I1e4c85f2c122c65ec99729e43a66c80acdd863c8