Commit Graph

37 Commits

Author SHA1 Message Date
Weng Su
efbe144a9a [Catalyst] Migrate Airplane Mode preference
NO_IFTTT=Catalyst only

Bug: 375925972
Flag: com.android.settings.flags.catalyst_network_provider_and_internet_screen
Test: Manual testing
atest -c AirplaneModePreferenceTest \
         NetworkDashboardFragmentTest
atest -c NetworkDashboardScreenTest

Change-Id: Ie63f2208a64cadf5faaa274fd4e069d839da850e
2024-12-05 09:10:54 +00:00
joonhunshin
37d4fb736e Data only device(without FEATURE_TELEPHON_CALLING) : Add try/catch to handle UnsupportedOperationException
If the device does not have Telephony feature calling, the some of interfaces in TelephonyManager throw UnsupportedOperationException.

Bug: 297989574
Test: oriole with ATT SIM, boot completed
      APM/data/wifi on/off, browse setting menu
Change-Id: Ifa9092cd8d9a00039e9d93d5fd9fc4dabed633c8
2024-01-05 03:04:14 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Zoey Chen
927a1cac10 [Settings] Revert the test for using mPhoneStateListener since the Robolectric test is broken
Bug: 183066948
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AirplaneModeEnablerTest
Change-Id: Ic5c67a9a2996f40fcb07d0840f5c677494e1dc0a
2021-03-19 17:00:00 +08:00
Zoey Chen
b8a639f8fd [Settings] Use TelephonyManasger.registerTelephonyCallback instead of TelephonyManager.listen
Bug: 175270951
Test: make and atest
Change-Id: I15e1a199e6a34914db97055bfea9392c5bbdc9c6
2021-03-12 19:27:05 +08:00
Jason Chiu
1766b3c01d Fix indexing error of mobile related controllers
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
2020-04-10 10:56:31 +00:00
Bonian Chen
717e0765a5 [Settings] Refactor AirplaneModeEnabler with test
Support auto testing

Bug: 147029746
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AirplaneModeEnablerTest
Change-Id: Ib39ab1881484f65bc5a3834b2828c6ba98198cca
2020-01-02 12:06:00 +08:00
Bonian Chen
a72a038bb6 [Settings] Refactor AirplaneModeEnabler
1. Multiple instance of PhoneStateListener is not required.
2. It will be better to monitor radio power state changed instead of service state.

Bug: 147029746
Test: Manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AirplaneModePreferenceControllerTest
Change-Id: I51465904ce2409b6c07c3ba80ea362d208989fbd
2019-12-31 17:02:35 +08:00
Bonian Chen
f980a2985a [Settings] Code refactor
Code refactor.

Bug: 146985715
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AirplaneModePreferenceControllerTest
Change-Id: I3ecc85f0f4ae1a0164a88bf811fe4c865d517d03
2019-12-30 11:24:58 +08:00
Bonian Chen
8a512ca7b4 [Settings] Fix crash when no SIM
Airplane mode enabler exception under the condition of
no active subscription. This is due to incorrect null pointer
checking within source code.

Bug: 145830780
Test: manual
Change-Id: I47cb4d82b7b99b4c34270023cd58f479347477da
2019-12-09 13:39:27 +08:00
Bonian Chen
5980b80adc [Settings] Remove PhoneStateIntentReceiver
1. Replace PhoneStateIntentReceiver by adopting PhoneStateListener
2. Replace TelephonyProperties.in_ecm_mode() by
TelephonyManager.getEmergencyCallbackMode()

Bug: 144331663
Test: Manual
make RunSettingsRoboTests -j ROBOTEST_FILTER=AirplaneModePreferenceControllerTest

Change-Id: I95c80d9857c9ca44deede7105e1c200d729fefd3
2019-11-14 04:37:12 +00:00
Inseob Kim
4db955ad57 Schematize Telephony System Properties
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
2019-11-01 13:10:51 +09:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Jason Monk
fcd5f0f1aa Push full slice index to device index
Test: make RunSettingsRoboTests
Bug: 74555610
Change-Id: I3f0aa1218e1d7e736dc918d83e76423fa81ac6ab
2018-04-26 11:16:04 -04:00
CY Cheng
fee4807dc0 Refactor airplane mode preference controller.
- 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
2018-04-12 14:10:35 +08:00
Leif Hendrik Wilden
28dee1f086 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: I70a6e76cc8440547746ecc008c32bd06a7de8161
2018-01-24 12:30:39 -08:00
Leif Wilden
cab0ee611d Revert "Migrate to use instrumentation classes from settingslib."
This reverts commit 1546cca529.

Reason for revert: Broke fingerprint setup flow. b/72267201

Change-Id: I8321265ae64732c526325882ddea51080decddf5
2018-01-22 20:57:36 +00:00
Leif Hendrik Wilden
1546cca529 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: Ie5515bb0fe3e621fc7723a9b04ba23e4bfa9c401
2018-01-18 11:13:24 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
aa71afe597 Use MetricsFeatureProvider for logging in Settings.
Bug: 31664539
Test: make RunSettingsRoboTests for regression
Test: adb logcat -b events | egrep "(sysui_|notification_)" for
      verifying log

Change-Id: Id944be7c4ff9911aebee481c2df485542f1318f0
2016-09-23 08:37:37 -07:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Chris Wren
1b6ffba9e6 log more settings actions
airplane mode
  bluetooth
  cell data
  do not disturb

Bug: 20264417
Change-Id: I726033a126fba9f9dffc916806d636feea04033b
2015-05-08 18:48:24 -04:00
Jason Monk
fc1b00cfe4 Move some wifi tracking code to SettingsLib
Move tracking of which networks are available/saved and their state
over to SettingsLib to share it with Quick Settings.

Bug: 19180466
Change-Id: Iaeef06b26da8cb38e1ba09a7d105d04d499dc181
2015-02-04 20:40:32 +00:00
Fabrice Di Meglio
daef2e2b06 Fix bug #15730311 Checkboxes on R side should update to Quantum/Material on/off switch
Per UX request, convert more CheckBoxes to Switches

Change-Id: I04712bce4c0a54516d9ecedbb554f403fd6dd9e7
2014-10-15 19:00:35 -07:00
Fabrice Di Meglio
e3bced2cda Update Airplane mode to use a SwitchPreference
- do the switch

See bug: #15730311 Checkboxes on R side should update to Quantum/Material on/off switch

Change-Id: I7addc48a90d74c105b2f0275ae80874b9324f589
2014-08-15 20:36:29 +00:00
Christopher Tate
6a5929b086 Update Settings app to use new namespace for airplane-mode settings
Bug 7132230

Change-Id: I0253637e6d464afc229cf11ffe69852bf44fe261
2012-09-10 15:46:17 -07:00
Gilles Debunne
dfc2637eba Removed summary text and categories in Wireless settings
Bug 5002377 and 5002476.

Change-Id: Ia35dd9701f59a18a812b5079396835cc19e6d901
2011-07-08 10:05:14 -07:00
Amith Yamasani
b98c00e710 Update airplane mode checkbox when toggled from system bar.
Bug: 3148095

Also fix an NPE crash I saw when exiting Settings immediately after toggling
the airplane mode.

Change-Id: I83eb2d90e203fd56b09269cf9fa8f74a4354834f
2011-01-26 09:56:44 -08:00
Irfan Sheriff
ecea11f3e9 Keep airplane mode UI & system settings in sync
If mobile radio bring up/down fails, airplane mode UI & system settings
go out of sync and this prevents wifi from being brought up on every
reboot.

Bug: 2887841
Change-Id: Id0f1299e6b4e2c28b72c8fb8d853dad3fcaceaa7
2010-08-02 19:14:17 -07:00
Chouting Zhang
71cc49e480 Airplane Mode in Emergency Callback Mode (ECM)
When user tries to change Airplane Mode between ON & OFF
in ECM mode, a notice should be shown to indicate it's in ECM mode,
and ask if user wants to exit ECM, if yes, then the Airplane Mode
is changed after ECM mode exit. If not, Airplane Mode should not be
changed.
2009-08-31 09:45:21 -07:00
Mike Lockwood
83bcc98af1 Allow enabling Wifi when in airplane mode.
If the new system settings value for AIRPLANE_MODE_TOGGLEABLE_RADIOS
contains RADIO_WIFI, then the user will be allowed to enable Wifi
while in airplane mode.
Turning on airplane mode will still disable Wifi, but the user will
be free to reenable it in the Settings app.

We also allow access to the VPN settings under the same circumstances.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-29 23:53:44 -07:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
5962e18d0e auto import from //branches/cupcake/...@125939 2009-01-09 17:51:25 -08:00
The Android Open Source Project
abc48f80d8 Code drop from //branches/cupcake/...@124589 2008-12-17 18:06:01 -08:00
The Android Open Source Project
de2d9f5f10 Initial Contribution 2008-10-21 07:00:00 -07:00