Commit Graph

55 Commits

Author SHA1 Message Date
Bonian Chen
0da056b2dd [Settings] Close reset network confirm dialog when SIM removed
When SIM removed, the network reset confirm UI no longer represents
the wordings which presented to the user.

Proceed on resetting will only reset APN on removed SIM and
lead to some side effect if user inserted a new SIM while
keeping displaying the confirmation dialog.

With this situation, close the confirmation dialog is current
decision in design. And the UI which prior to the confirm UI
also need to be updated to avoid from user accessing that
removed SIM.

Bug: 171070050
Test: manual
Change-Id: I338835ca98593f95d98bafa70f12b177c43bf91a
2020-12-16 02:35:26 +00:00
tom hsu
2fd7c9ffd1 [Settings] Refractor ApnSettings code to independent package folder.
Bug: 169750507
Test: make RunSettingsRoboTests
Change-Id: I8b2709ba8d16c625863d8a17abc3d0ab5d019bb8
2020-09-30 15:56:01 +00:00
Edgar Wang
21f8cb3a44 Refactor Reset options Settings
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: I94969f6903d047b9bc41b1e8c14096c92c460b38
2020-08-04 23:33:50 +08:00
tom hsu
a381196b8b Remove reference of Phoneconstants for SUBSCRIPTION_KEY
- use SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX instead of it

Test: make
Test: m RunSettingsRoboTests
Change-Id: Ic635b11c995077ebf1e143d9562b100d7730fe52
2020-01-14 15:31:02 +08:00
Betty Chang
b8104d5e70 Merge "[Mainline] To use @SystemApi to replace non-formal APIs for mainline" 2020-01-09 06:50:13 +00:00
Bonian Chen
45d9f23fee [Settings] Remove IMS factoryReset()
IMS factoryReset() has been done within
TelephonyManager.resetSettings().

Bug: 147342492
Test: manual
Change-Id: Id5c868726189397fc2a85717326e56e055b640af
2020-01-08 22:12:01 +08:00
changbetty
ebe36cf96c [Mainline] To use @SystemApi to replace non-formal APIs for mainline
- getResourcesForSubId(Context, int, boolean)
      - @SystemApi getResourcesForSubId(Context, int)
    - isUsableSubIdValue(int subId)
      - public isUsableSubscriptionId(int subId)

Bug: 147206736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ResetNetworkTest
      make RunSettingsRoboTests ROBOTEST_FILTER=ResetNetworkConfirmTest
      make RunSettingsRoboTests ROBOTEST_FILTER=CellularFallbackPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiCallingSettingsForSubTest

Change-Id: I1a67db80b114a438afda7d45af90e54af38703c3
2020-01-08 22:06:26 +08:00
zoey chen
353926a446 [Settings] Replace #getSubscriberId(I) with #getSubscriberId()
Bug: 146823314
Test: make
Change-Id: Idec4b7ed362a3be0693fa9670ecb2aba7c7fd1d1
2019-12-25 15:04:20 +08:00
zoey chen
8ea5428c07 [Setting] Use @SystemApi to replace the hidden api
Bug: 145785535
Test: make
Change-Id: I32554eec8e9f0477a7342a8137a32939b5393fad
2019-12-18 10:39:48 +08:00
Malcolm Chen
26e5dbdbfd Mainline: remove usage of hiddepn API SubscriptionManager#getPhoneId
Bug: 140908357
Test: build
Change-Id: Idaa206c7659717a269738c0121a31d957f7d90d0
2019-12-16 11:43:00 -08:00
Raff Tsai
a5b25dfb06 Misc change about ResetNetworkConfirm
- Modify reset network layout
- Merge changes from Qt-dev

Fixes:131127455
Test: manual
Change-Id: I6d63a821016588ea81a04ef792111c2b96dfe7fe
2019-05-07 09:31:15 +00:00
Raff Tsai
3aeb915355 ANR observed under settings when trying to reset network settings
- Move reset network settings code to async task.

Test: manual, Robolectric
Fixes: 130772994
Change-Id: I59345f48ed840ecfd64c29c2c20ab8caf2679f63
2019-04-25 02:55:25 +00:00
Andrew Sapperstein
88930e373e Update eSIM deletion strings.
Adds some conditional behavior for the confirmation screens.
When the erase eSIM option is visible and checked, shows alternate string.

Fixes: 126262481
Fixes: 118751918
Test: visual inspection & make -j RunSettingsRoboTests
Change-Id: I40f983b03ad470d785bf104e645dbc92e7897d2d
2019-03-22 13:03:25 -07:00
Amit Mahajan
defd0155a1 Merge "Move SMS raw db deletion to phone process." am: 479ec92c27 am: f784db5cae
am: 1285b12980

Change-Id: I349002ff9a72b08056a8af47361de4914afb2b3d
2019-03-14 18:55:13 -07:00
Amit Mahajan
d0ff80dc79 Move SMS raw db deletion to phone process.
Test: manual
Bug: 127929687
Change-Id: Ib23efc647fbd4b3007197932b9493393dc5b4d5b
2019-03-13 17:36:16 -07: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
Jimmy Chen
d62453d3de p2p: do P2P factory reset for Network Reset
Bug: 109866998
Test: * manual trigger network reset in below conditions:
        * trigger network reset with P2P on
        * trigger network reset with WiFi on, P2P off
        * trigger network reset with WiFi off
        * trigger network reset with WiFi off then do reboot
      * check groups shown in WiFi Direct page
      * use wpa_cli -i p2p0 list_network
Test: RobotTest - make ROBOTEST_FILTER=ResetNetworkConfirmTest

Change-Id: If5292e34cb9702d4319a4c9bbd867e0e5ed716a2
2018-11-09 18:41:36 +08:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Aurimas Liutikas
b1af85d155 Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
2018-08-28 11:48:56 -07:00
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
Brad Ebinger
c30af9b8d1 Merge "IMS: Use the slot based ImsManager factory reset API." am: 9e4ff6fca6 am: 15ca33865c
am: aca1e304bd

Change-Id: I0b3b6198e895caf4c33354ffb2fc20b599540387
2018-07-16 14:21:57 -07:00
Brad Ebinger
15ca33865c Merge "IMS: Use the slot based ImsManager factory reset API."
am: 9e4ff6fca6

Change-Id: I42b0a06ed5707475d105646233ac49958de29d75
2018-07-16 13:32:55 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Malcolm Chen
0508cb5c46 Clean Sms raw table when resetting network.
There has been issues when Sms raw table somehow stores orphan
fragments. They lead to garbled message when new fragments come
in and combied with those stale ones. While we work on proper
fixes, one of the options we offer to the user if it happens again,
is to reset all network settings which will clean up this table.

Bug: 77910620
Test: manual test
Change-Id: Ib80c395fb9a1501f35716fdca43df3e5c87893c7
2018-04-17 15:57:18 -07:00
Pengquan Meng
7a1c93dcf3 Move apn settings to network
This is a clean up CL, move the apn settings related class from settings'
root to network's directory.

Bug: 77339683
Test: make ROBOTEST_FILTER=ApnEditorTest -j40 RunSettingsRoboTests
Change-Id: I751a6c2a27c9a1e08d7308407d75ccb355f295aa
2018-04-02 17:27:56 -07:00
Fan Zhang
c0c3eaa66c Remove more wrappers
Bug: 76167422
Test: make RunSettingsRoboTests -j40
Change-Id: I0dc42c483ae92d508dec94e42573b55ced0e4bb0
2018-03-30 14:29:50 -07:00
Suresh Koleti
981f940ee9 IMS: Use the slot based ImsManager factory reset API.
Use the slot based factory reset API of ImsManager
to reset the IMS settings values for appropriate sub.

Test: Manual
Bug: 74412226
Change-Id: Iceabb225764ac01f0172142ef95e874ca93c061d
2018-03-09 13:12:09 +05:30
arangelov
e35badd9d5 Make "Action not allowed" dialog compliant with Material Spec and replace full screen activities with the dialog.
Bug: 64893948
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogTest -j40 RunSettingsRoboTests
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest -j40 RunSettingsRoboTests
Change-Id: I9308d8d86a3789b8f2c92b9f4f20cf00cce71d14
2018-03-05 20:27:51 +00:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
Antony Sargent
1a0d4428ba Call super.onDestroy in ResetNetworkConfirm fragment
Test: monkey tests
Change-Id: I0ca8d0296db20a48e318391ef111cada8109e13b
Fixes: 72999943
2018-02-06 15:49:12 -08:00
Doris Ling
72489725c6 Change superclass to InstrumentedFragment.
- for fragments that do not implement the preference screen, change them
to inherit from InstrumentedFragment instead.

Change-Id: I791c2634024bd2c248efea955be5c680180d735c
Fixes: 68277111
Test: make RunSettingsRoboTests
2018-02-02 13:41:16 -08:00
Qingxi Li
c8a2b040a1 Add checkbox to let user wipe eSIM data together with FDR
This CL add a check box for eSIM enabled devices to reset eSIM data
during factory reset of the phone.

Bug: 67500470
Test: make RunSettingsRoboTests
Change-Id: I5a81d43f23ae55f8549a5b807fdf41f36c9d3acd
2018-01-22 16:08:23 -08:00
Qingxi Li
0caad2f3ba Add checkbox for erase esim under network reset screen
This CL add a checkbox letting user decide when they reset the network
configurations under System > Reset options > Reset Wi-Fi, mobile &
Bluetooth, whether they want to reset eSIM together or not. If the user
choose to reset eSIM togather, EuiccManager#eraseSubscriptions will be
called and all the eSIM profiles will be removed.

Bug: 62961867
Test: E2E & make RunSettingsRoboTests
Change-Id: I533756b12c0474e8e58cc6fe60a38c119365cee2
2018-01-19 14:26:50 -08:00
Doris Ling
ed4685fafb Update activity titles for fragments without preference screen.
1. Move getPreferenceScreenResId() from individual subclass to
InstrumentedPreferenceFragment.

2. Removed InstrumentedPreferenceFragment.getTitle() and let the
preference fragments that do not have preference screen set the activity
title directly instead.

3. Removed OptionsMenuFragment as all it does is call
setHasOptionMenu().
- changed subclasses of OptionsMenuFragment to extend from
InstrumentedPreferenceFragment directly.
- none of the exisitng subclasses actually implements the option menu
related methods to provide any option menu. So, the setHasOptionMenu()
call is not added to the subclasses.

4. Update Languages preference title.
- launch the fragment from the preference controller instead of from the
default handling, as we need the title res id at launch time to get it
work properly when retrieving the title from back stack.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Ibecdcab32cbaed8bf604ec5ebe0a926b4e489a7d
2017-10-26 12:01:06 -07:00
Malcolm Chen
e9d96b7bc1 Reset APN when doing network reset.
Bug: 35956245
Test: Manual test

Change-Id: Iadb00c55d41a51204be1678bb77c2367e1bcb775
2017-04-20 10:58:32 -07: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
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Udam Saini
0708d9e119 Fixes back button on action bar on some fragments.
SettingsPreferenceFragment has this already set so that the drawer
layout will work when the menu doesn't exist. However, some fragments
are not preference fragments, and we need to set setHasOptionsMenu
manually.

bug:27879503
Change-Id: I6faadeb56dab00af611ac413109800822038c66d
2016-03-29 10:29:14 -07:00
Prathmesh Prabhu
8d763c0302 settings: Fix more NPEs when bluetooth is missing.
Fix a couple NPEs in the settings app when device doesn't support
bluetooth.

BUG:27600761
Change-Id: I356f5e7f321e8230f85ec74da9e405449431846b
2016-03-11 21:35:58 +00:00
Sudheer Shanka
7dbbe13168 Add disabled by policy empty views to more screens.
Bug: 27214401
Change-Id: I6cd4292a63610671070bf2134105e9e348c3ab32
2016-02-19 20:18:43 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Hyejin Kim
5518adbe1a Add IMS settings to Network setting reset am: 623852f6c7 am: c46bbd6373
am: 00bc7567b8

* commit '00bc7567b81b05f55d3388817dabfdd1d7b83776':
  Add IMS settings to Network setting reset
2015-12-07 23:48:09 +00:00
Hyejin Kim
623852f6c7 Add IMS settings to Network setting reset
Add the factory reset function to be used to reset IMS settings

BUG=25300757
Change-Id: I78d2e919418b7a0b42f56af3442d7d98afe40d77
2015-12-01 10:59:25 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Ajay Panicker
568d9336ba Implement Bluetooth settings factory reset (5/5)
Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default

Bug: 16161518
Change-Id: Ie5404a4547fcf747a0bb51d515e0c97628416f4b
2015-08-04 15:28:16 -07:00
Stuart Scott
47ed6ca004 Network Reset should have a lockdown like Factory Reset.
bug:20332322
Change-Id: I645ad0d226869042c11225630e4de5968ebb7a0d
(cherry picked from commit 176f512c5a)
2015-06-01 16:30:48 +00:00
Stuart Scott
83dbf09fb0 Avoid mulitple calls to getActivity.
Change-Id: I789069d86e268aee5f5a1f961de3d703cd7940a7
2015-04-08 16:40:16 -07:00
Stuart Scott
73281fbcfe Move reset network settings into framework.
bug: 16161518
Change-Id: I7d62201758e97bf08117183429a7acfa13b74994
2015-03-30 18:00:41 -07:00