Commit Graph

69 Commits

Author SHA1 Message Date
Bonian Chen
9d3bb818bf [Settings] Close UI when accessed from guest user
Avoid from guest user access.

Bug: 262242953
Test: local

Change-Id: Ib49693d083f42194575f958a1a238d6dfbba55d2
2023-02-10 17:51:00 +00:00
xinghailu
897fd74731 Cleanup some plurals in Settings
Change <one> to <1> in string res file, and update related java files.
Test: Update, existing test still pass.
bug: 199230342

Change-Id: Idd0ba3c6adc060da21574d98f8ed765fae00cef8
2022-12-22 16:05:13 +08:00
Bonian Chen
7c3f04aa11 [Settings] configuration for hidding SIM lock UI
Hide SIM lock UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I870c0b53112db56b7bc80bfd585f6f7b3cf82737
2022-10-21 10:59:11 +00:00
Thomas Nguyen
a2b0146d07 Provide useful hint when invalid SIM PIN is entered during changing SIM PIN
Bug: 241441049
Test: Manually tested with Pixel 6 Pro

Change-Id: Ie7239ad397dfeacd59f1483953392ee7935cfd07
2022-08-04 18:58:42 +00:00
Bonian Chen
48c945e9b5 [Settings] Expand the display area of PIN error message
PIN error message when user operating on PIN lock got long text string.
Which not fit into 2 lines of display area.

This is a change to expand the display area to max. capacity but remain
tightly wrap the text.

Bug: 211176734
Test: local
Change-Id: If175a53de4646d2479b15b10f6b59e4e0870d521
2021-12-21 14:08:58 +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
Sarah Chin
536cb60c65 Update ICC lock API methods
Test: atest TelephonyManagerTest
Bug: 171884262
Change-Id: Ia4ba222dfa7d7756a3675f75b3467d0265967516
2020-11-06 14:58:24 -08:00
Bonian Chen
fb4a0c25e0 [Settings] Avoid crash when switch SIM during PIN lock
PIN lock status are stored without subscription ID mapping on it.
Which makes SIM status change can't be processed correctly.

Through storing the subscription ID for PIN lock screen, dialog can be
reset when SIM status changed and crash can be avoided.

Bug: 155852345
Test: manual
Change-Id: Ic520bc34c5a460b4fcd199cd524b180d307e9ab4
2020-05-29 17:09:04 +08:00
Grace Jia
f203a66a74 Close and disable SIM lock dialogs when SIM removed from device.
Bug: 157102550
Test: Manually open the PIN toggle dialog and PIN edit dialog, then
remove SIM from DUT

Change-Id: Ied875909e9cbcb1cad1ae045578747a0a5810491
2020-05-21 13:47:09 -07:00
hoffc
d6c805f0bb Settings: Fix force close when destory sim lock fragment view
Sim lock fragment does not override its parent onCreateView method and diretly
return null, which results in NPE when destory after removing Sim card.

Override its parent onCreateView when no sim card inserted.

Bug: 154743278
Test: build pass
Change-Id: I0b10a07c1767cda74096dc44ef7ffa7839a9aae4
Merged-In: I0b10a07c1767cda74096dc44ef7ffa7839a9aae4
2020-04-29 16:34:21 +08:00
Tsung-Mao Fang
9c69ded434 The text on toast should be changed when remains 1 time for SIM lock input
This cl was cherry-picked from aosp/585306

The behavior of getQuantityString() is different according to language, it gets
both "other" and "one" string if English is system language. But it always gets
"other" string if non-English, then the "other" string of wrong_pin_code is
shown even if remains 1 time of SIM lock input.

In order to change the string in any language, we add new string for
remains 1 time.

Test: Rebuild rom
Fix: 71783850
Change-Id: If4b53bbbc6b51582bc0837abf4497d9a75ebbaad
2020-04-07 16:54:06 +08:00
Treehugger Robot
2b8bde162f Merge "Fixed NullPointerException" am: 5fb16be925 am: cbe5bbdcd5 am: 456b2bf87b am: b301288cd7 am: 036496e2d0
Bug: 150258187
Change-Id: I6b363bd609d580d547cb59851f5bfaba57ef7154
(cherry picked from commit 7c62cbd97e)
Merged-In: I6b363bd609d580d547cb59851f5bfaba57ef7154
2020-03-24 06:21:25 +00:00
SongFerngWang
3d54554521 Fix sim pin lock preference disappear in dual sim.
If one sim hide the preference and another one show the preference,
the preference always hide. The root cause is config value is wrong.
It should get config with subid.

Bug: 149800931
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SimLockPreferenceControllerTest
Change-Id: I91b551bc363b8ecb0a4b6b40e9de79c74ccd76fd
2020-03-17 14:35:31 +08:00
zoey chen
cf33e51a55 Fix Card 2's pin shows ON when only turn on card 1's pin
Bug: 150258187
Test: manual
Change-Id: Ifc54090da6737d31a2eb71eeabe6846592ff32fc
Merged-In: Ifc54090da6737d31a2eb71eeabe6846592ff32fc
2020-03-12 03:56:46 +00:00
Heemin Seog
56e62ec30a Replace TYPE_STATUS_BAR_PANEL with the SUB_PANEL
TYPE_STATUS_BAR_PANEL is deprecated and the replacement is in a
different Z layer. SUB_PANEL ensures that the view appears in the same
place as before.

Bug: 10414819
Test: existing robo tests
Change-Id: I16113e5140e753e87e55467230b5b6fbf21deffd
2020-02-26 14:17:11 -08:00
Daniel Bright
721467c679 Repoint ACTION_SECRET_CODE + ACTION_SIM_STATE_CHANGED
Bug: 148160428
Test: make, flash
Change-Id: I9404e2c3c816311c7ef3875622fe5cd5a315ec58
2020-02-10 12:59:26 -08:00
Jorim Jaggi
fd802bca2d Update name of used API
Test: Builds
Change-Id: I470d98b0fff94128ff03322d138930b3bb19342e
Exempt-From-Owner-Approval: Trivial rename
2020-01-22 23:44:34 +00:00
Tiger Huang
df93c77dc4 Window Manager Flag Migration (7/n)
Let the client control the window layout about avoiding insets.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
            ViewRootImplTest DisplayPolicyLayoutTests
            DisplayPolicyInsetsTests DisplayPolicyTests

Change-Id: I63c778b35347ac104c7ec335bc6dc82c2c55018d
2020-01-21 22:05:26 +08:00
zoey chen
698e2ed95e [Settings] To avoid use APIs in IccCard directly, calling APIs through TelephonyManager
Bug: 146983487
Test: manual
Change-Id: I4bf1341f972639829cd9fc64370018127460a65f
2020-01-14 16:02:04 +08:00
Bonian Chen
31367d7a72 [Settings] Replace getSimCount() API
Change design of monitor change in Settings.Global.MOBILE_DATA and
Settings.Global.DATA_ROAMING in order to avoid from accessing
getSimCount().

Bug: 144251589
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=RoamingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Change-Id: I965a0c07c7c9ef5897b33809bae6a7921977db18
2019-11-11 15:27:30 +08:00
Yanting Yang
118e7aee28 Turn off debug logging flags
Fixes: 130558346
Test: visual
Change-Id: Ie82bfe503f789435a3474697391fdfdeb94864ee
2019-04-17 19:55:54 +08: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
Fan Zhang
dcfeea3e7b Merge "Fix toast is covered by PIN code screen after wrong pin" am: d5abc0eb44 am: c150f5eb29
am: 4c95f60b9e

Change-Id: I651be252786c84156be901ef30f7cab37c1d4fdb
2018-10-23 19:36:50 -07:00
Fan Zhang
d5abc0eb44 Merge "Fix toast is covered by PIN code screen after wrong pin" 2018-10-24 02:16:57 +00:00
Hao Zhao
754930bc50 Fix toast is covered by PIN code screen after wrong pin
The error toast is displayed when user input wrong PIN
code three times, but at that moment the SIM PUK code input
page in SystemUI pop up and covers the toast, so the user
can't seen the error message.

Adjust the toast window layer, let the the toast pop up
over the SIM pin code input page.

Bug: 74056527
Change-Id: I569a2fc2adac15c4713b4c95e9720335bd4df88a
2018-10-24 06:39:45 +09:00
Youming Ye
792e6afc84 Merge "Fix error message shown when SIM PIN enable/disable fails" am: f29392303a am: 8bac59265e
am: 6293483fce

Change-Id: I5b533e911f1185bb9fe1847701e333093b49926e
2018-10-15 11:41:46 -07:00
Youming Ye
8bac59265e Merge "Fix error message shown when SIM PIN enable/disable fails"
am: f29392303a

Change-Id: I060d7e0e02b56d9fea5260ba1f2cf8a1ea746414
2018-10-15 10:42:52 -07:00
Youming Ye
f29392303a Merge "Fix error message shown when SIM PIN enable/disable fails" 2018-10-15 17:08:22 +00:00
Sandeep Gutta
fe6ddaec99 Fix error message shown when SIM PIN enable/disable fails
Current code fails to pass the 3GPP spec test case 27.14.3
'Disabling the PIN'.

An Incorrect toast error message is displayed, when enable/disable
SIM PIN operation fails without checking the error code.

Fix: Display appropriate toast error message based on the SIM PIN
enable/disable error code.

Bug: 73080305
Change-Id: I4219c68c7ebcf450a2f779b2d1f1ce881440753b
2018-09-18 12:21:51 +05:30
Fan Zhang
de117046ad DO NOT MERGE Import clean up.
Reordered all imports according to Android codestyle.

Test: rebuild
Change-Id: I750f01f70f2114d51838bf652833aebdc4065c98
2018-09-04 13:54:46 -07:00
Aurimas Liutikas
03fcde338b Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
(cherry picked from commit b1af85d155)
2018-08-28 16:35:52 -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
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
Fan Zhang
e0b0e9f902 Refactor help menu stuff into a controller
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
2017-11-29 15:51:04 -08:00
Qi Ding
4ca4bd31c3 Fix current tab is changed when rotating device
Even if SIM slot 2 is selected in SIM card lock settings,
the current tab is changed to SIM slot 1 when rotating the device.
To fix this issue, the current tab should be restored
after rotating the device.

Fixes: 63690125
Test: manual - go to Settings > Security > SIM card lock
               and rotate device

Change-Id: I874d4d06019e21dd7b65951a3aefb75ff5ea298b
2017-10-26 14:39:03 +09:00
tiansiming
92e77cbd43 Merge "Fix wrong position of cursor in IccLockSettings"
am: 3a3044eeef

Change-Id: I26f1c35505538768a7816f038c44437fe9a08f67
2017-10-19 19:20:09 +00:00
tiansiming
64f48b5ce6 Fix wrong position of cursor in IccLockSettings
Position of cursor goes to the front when submit
an error pin.

Bug:https://issuetracker.google.com/issues/67839176
Test:
1) Insert a sim card
2) Go to Settings -> Security -> Set up SIM card lock
3) press Lock SIM card checkbox
4) enter 123 and press OK button

Change-Id: I90655f3fa4cb3e4bda251cd0fc62e66300a4b66f
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
2017-10-20 01:26:40 +08:00
Fan Zhang
b91a26b356 Add help url placeholder for SimLock settings
Bug: 38412798
Test: manual
Change-Id: I77a8fa89c2b16da9269b40c5efcb6d0f868d5b76
2017-06-19 21:11:48 +00:00
xudiwen
ecfbe17684 Merge "NullPointerException when running monkey test in IccLockSettings" am: 2c8d826b01 am: 957c4d7720
am: 0ff0487b51

Change-Id: I22cd436533a745a415a49122fe2469ef9a96cdc9
2017-06-01 19:09:25 +00:00
xudiwen
18615600ae NullPointerException when running monkey test in IccLockSettings
In Android N, finish() in onCreate() cannot avoid onViewCreated() lifecycle
in Fragment, so a crash occurs in com.android.settings.IccLockSettings
because of insecure call in updatePreference().
It's a tiny bug only appears when running monkey test.

Test: run monkey test with page IccLockSettings.

This bug was reported to Google Issue Tracker.
Link: https://issuetracker.google.com/issues/38152568

Change-Id: I143b046fd7ac5ffba55e51254c7dd068274d342e
Signed-off-by: xudiwen <xudiwen@xiaomi.com>
2017-05-10 09:40:41 +08:00
Tamas Berghammer
5a638a6ad1 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler"
This reverts commit fbd5f5fdce.

Change-Id: I769f7a0f509996ccc39fd1c628cad7e5ec1202bf
2017-01-18 19:28:11 +00:00
Tamas Berghammer
fbd5f5fdce Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
(cherry picked from commit 265d3c2a0c)
2017-01-11 11:28:10 +00: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
Jason Monk
b7e4380cd2 Remove PreferenceActivity
Its broken and isn't worth maintaining, instead port the few things
using it over to SettingsPreferenceActivity with wrapping blank
Activities like the rest of Settings.

Change-Id: Ic82f0dcb63ed9b4078f7da6a79c0c52f0130e8d1
Fixes: 28779941
2016-06-08 09:48:58 -04:00
Jason Monk
5b39710e6d Fix sim pin settings
Change-Id: I8fba2a367958da5831efd04f599ba7a363d11a1f
Fixes: 27419276
Fixes: 27529989
2016-03-30 11:41:45 -04: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