Commit Graph

53 Commits

Author SHA1 Message Date
Bonian Chen
8d43fd9a35 [Settings] Change network reset into reset mobile network
Replace reset network into Reset mobile network settings

Bug: 260034791
Test: local and auto
Change-Id: I9547f266c1586073fd2b96f35cc9df8861b0a105
2022-12-15 15:44:08 +00:00
Bonian Chen
7d507964e6 Merge "[Settings] Enable ActivityResultLauncher for keyguard" am: d1e0b46a44 am: a0baef444d am: 5d2afa168a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2313406

Change-Id: Ib998f0407156c5f16aed4b0a977ec8f85e048560
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 15:46:37 +00:00
Bonian Chen
d1e0b46a44 Merge "[Settings] Enable ActivityResultLauncher for keyguard" 2022-11-24 14:25:17 +00:00
Bonian Chen
845426e9e5 Merge "[Settings] Code refactor" am: b60b759dac am: 61ed679576 am: e9e7cdf914
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2311309

Change-Id: I05dcb1af5e6d6e515ebaa81641df57883a88c36e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 05:16:23 +00:00
Bonian Chen
e76bcc5388 [Settings] Code refactor
Wrap reset options into an Object, for better supporting

Bug: 260034791
Test: auto testing
Change-Id: I98cc12440414077b600bba0b5598c887608419cc
2022-11-23 12:52:55 +00:00
Bonian Chen
b5921fade9 [Settings] Enable ActivityResultLauncher for keyguard
Enable the support of ActivityResultLauncher for keyguard.

Bug: 260034791
Test: local
Change-Id: I0643241d7b79ba0ac4cd2314a126f33eb6557cc0
2022-11-23 12:48:34 +00:00
Bonian Chen
3b7d0d2e17 Revert "[Settings] configuration for hidding SIM remove UI"
Revert submission 2299468-settings_without_siminfo

Reason for revert: Fix build breakage
Reverted Changes:
I3d6ecec14:[Settings] configuration for hidding SIM settings ...
I8f0c1d53c:[Settings] configuration for hidding SIM remove UI...
I1b88f0f70:[Settings] configuration for hidding SIM notificat...
Ibe22c3ba3:[Settings] configuration for hidding SIM provider ...
Id5ea14ca8:[Settings] configuration for hidding SIM related U...
I70be07dbc:[Settings] configuration for hidding SIM lock UI

Log of breakage:
https://android-build.googleplex.com/builds/submitted/9318826/full-eng/latest/view/logs/build_error.log

Bug: 260055628
Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
Change-Id: I5c52b841955f5be41ce861aca740147061fc7d3f
2022-11-22 11:59:15 +00:00
Bonian Chen
889c81f77a Merge "[Settings] configuration for hidding SIM remove UI" 2022-11-22 08:51:53 +00:00
Bonian Chen
eb6eb053e8 Merge "[Settings] Code Refactor" am: bafd49d604 am: c31caafb5a am: 81e86e8d5d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2308239

Change-Id: Ib0d6763f9994c3a8094472b5967ad304e11dcc66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 13:03:29 +00:00
Bonian Chen
81e86e8d5d Merge "[Settings] Code Refactor" am: bafd49d604 am: c31caafb5a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2308239

Change-Id: I8dbda9c6b40fb8207b81b30e89e464eea87a06bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 12:31:54 +00:00
Bonian Chen
e1f641a130 [Settings] Code Refactor
Adjust code structure for maintainance.

Bug: 259611847
Test: auto test
Change-Id: I6710aa814441c0858c712f416ffddde44081d4d1
2022-11-18 08:36:53 +00:00
Bonian Chen
e1a0637c3a [Settings] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
Change-Id: I8f0c1d53c4fe6e30280f2b7ae8f694cd27056e36
2022-11-14 10:19:27 +00:00
Bonian Chen
f6114d3f83 [Settings][Back port] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
Change-Id: I866b2dd566ffa9953f2a83aa3dcb32440390898a
2022-10-28 09:48:46 +00:00
Bonian Chen
69f6e76f2c [Settings] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
2022-10-20 09:59:01 +00:00
SongFerngWang
5a4df243f0 Fix the NullPointException
The subscriptionInfo.getCarrierName may be a null, so adding the null
checking.

Bug: 236064286
Test: build pass
Change-Id: I8f6f5ac725d6dd552ac2626725e44f52dcbf6c32
2022-06-16 10:46:07 +08:00
Jeremy Goldman
9d87cd9126 SubscriptionsPreferenceController shows the unique sim description.
Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionsPreferenceControllerTest
Change-Id: I041536fe0148087a068c6000383b382b0ff4e17c
2021-01-22 07:02:52 +00:00
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
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
Kevin Chyn
b13bc50542 1/n: Make ChooseLockSettingsHelper into a builder
The multitude of slightly different launchConfirmationActivity(*)
methods are a big unsustainable pyramid. It's too difficult to
read, too difficult to track which clients are interested in which
parameters, and too difficult to add new parameters, since we need to

1) Read through all of them and find one that's the closest
2) Try not to affect other callers, so potentially add yet another
3) Modify the internal paths, which all basically call each other
   until it reaches the biggest launchConfirmationActivity which
   has ALL of the parameters

This change should have no behavioral change.

Note: CredentialStorage doesn't need returnCredentials anymore as of
      ag/6073449

Test: make -j56 RunSettingsRoboTests
Test: Manually traced code paths for each invocation. A few hidden
      dependencies (such as explicitly setting challenge=0 with
      hasChallenge=true) were found. Left them the way they were in
      case they were intended
Test: Enroll face, fingerprint
Test: Enable developer options
Test: Change to PIN, Pattern, Password, then back to PIN (so each
      type requests confirmation)
Test: adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL,
      authenticate
Test: adb shell am start -a android.app.action.CONFIRM_FRP_CREDENTIAL
      (shows confirm credential screen)
Fixes: 138453993

Change-Id: Ic82ef3c3ac2e14d624281921f2d816bcdacbd82b
2020-07-24 11:13:13 -07: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
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
Bonian Chen
1247771b88 [Settings] Adopting public API
Replace SubscriptionManager#getActiveSubscriptionInfoList(true) by
SubscriptionManager#getActiveSubscriptionInfoList() since they're
equivalent.

Bug: 146312766
Test: build pass
Change-Id: Iab8a141277e0199f75a3419527e15d63669224fc
2019-12-16 06:35:43 +00:00
Taesu Lee
39e4fbb746 Fix to show eUICC preference in eng build
DEVELOPMENT_SETTINGS_ENABLED is not set before entering Developer
options in settings app even if it is in eng build. To show eUICC
preference in eng build, uses isDevelopmentSettingsEnabled() instead.

Test: Manual and make RunSettingsRoboTests

Change-Id: Ia1f46fad94bc62ca48dcfef7cd5d6188766aa380
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-09-06 16:11:39 +09: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
Hunter Knepshield
e8e86e631a [Strings + layout] Minor changes for eSIM erase.
1. String changes (uniform on both screens now)
2. Minor non-functional layout changes (margin is uniform now)

Reset everything: https://screenshot.googleplex.com/OZsvOt36CZf
Reset networks: https://screenshot.googleplex.com/in0vdOAeF7u

Change-Id: I92d068c3731f6915c8d393d94ac8c25a3c8ed773
Fix: 119120504
Test: on device
2019-03-14 15:14:35 -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
Malcolm Chen
14dde50c3a Don't show hidden Cellular subscription in Settings.
Replace getActiveSubscriptionInfoList() with
getActiveSubscriptionInfoList(true) so that settings will not show
hidden subscriptions to the user in various pages.

Bug: 121396526
Test: manual
Change-Id: I717999fed7d3a5a037914239694bef52df7c6207
2019-01-16 00:21:30 -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
hjchangliao
e86eec0c07 Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.

Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
2018-05-09 10:00:05 +08:00
arangelov
9308154090 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 17:35:48 +00:00
Fan Zhang
7cf99f5f12 Migrate more settings to use SubSettingsLauncher
Bug: 73250851
Test: robotests
Change-Id: I08f6f380489646231d6d8ceb1488e2efb036bf69
2018-02-18 21:10:03 -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
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
4a01283309 Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.

Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
2017-11-13 17:58:13 -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
Doris Ling
03a3b518de Update preference screen title.
- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
2017-10-25 11:02:07 -07:00
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00
Fan Zhang
c6ca314c0b Log source with visibility change
- Add a method in VisibilityLoggerMixin to log visible event using
  LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
  to next page.
- In next page's onResume(), extract the previous page's metricsCategory
  and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters

Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
2017-02-15 17:17:19 -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
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
Meng Wang
dfba923468 Hide sim card selection UI when only one sim presents
Bug: 30319100
Change-Id: I9bb8409475d9431463516117b54d34cbdfb317b9
2016-08-01 10:19:15 -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
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
Shishir Agrawal
d2b0fc066c Unhiding MSIM APIs.
1. Unhide MSIM APIs in TelephonyManager that already have non-MSIM equivalent
   APIs public.
2. Make MSIM API naming consistent (overloaded, no suffix).
3. Unhide APIs in SubscriptionManager that are necessary for MSIM.

Bug: 26772894
Change-Id: I69471769ece56dd2d505f087d2ed3b585eb4b2d0
2016-01-26 13:48:21 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Xiaohui Chen
44879a387a sys user split: first pass updating Settings
Update various places in Settings to use "admin" ueser flag
instead of checking user id "0".  This should be no-op in
single user mode since the only admin user would be user 0.
In split system user mode, this will correctly ACL admin
user instead of non-interactive system user.

Bug: 19913735
Change-Id: Ida4d59c5f689ea0dc34b3b3ff0822b087fa0afd6
2015-07-27 15:39:28 -07:00
Stuart Scott
176f512c5a Network Reset should have a lockdown like Factory Reset.
bug:20332322
Change-Id: I645ad0d226869042c11225630e4de5968ebb7a0d
2015-05-22 10:19:53 -07:00
Jorim Jaggi
8a09b619ae Update confirm device credentials to spec, add fingerprint
- New strings in the screen.
- New layout/style.
- Clean up internal API's around it.
- Add fingerprint support if launched from externally
- Separate theme if launched from externally
- If launched from above Keyguard, use SHOW_WHEN_LOCKED flag

Change-Id: Icdf9bf9e0506841f24e8aab5f0f1d1f4b688951f
2015-04-13 14:59:26 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00