Commit Graph

25 Commits

Author SHA1 Message Date
althafvly
ed95f35423 Settings: Protect sensitive data on the about phone
- Hide some personal info like phone number and IMEI.
- IMEI shows on a tap, so why not.
- Avoid showing this in screenshot/screenrecord

Co-authored-by: El Dainosor <eldainosor@gmail.com>
Change-Id: I45b7898da440c36045aec64a0a86fb804116cd9d
2022-09-17 13:48:02 +00:00
Chaohui Wang
6c9da58f4b Clean up unused Sliceable.copy()
Sliceable.isCopyableSlice() is not set to true for any controller, so this function is not used.

Usage is removed in Change: I81474aed994678c42d73cc59e169573880de1378

Bug: 227722942
Test: robotest & manual
Change-Id: I86e23aa8ad43f60b5017ff0a278e20e3f727706c
2022-04-02 19:16:22 +08:00
Bonian Chen
d051e65d3c [Settings] Support phone number talkback
Support phone number talkback in about phone UI pages.

Bug: 182923869
Test: local, junit
Change-Id: I159827070a954dee13230ff7cf6de81dbbaa7545
2021-12-07 10:22:24 +00:00
Stanley Wang
9c63c415ea Fix the problem that the SIM status and IMEI after the "Build number".
- Adding the SIM status and IMEI items of SIM2 to the PreferenceScreen
  can not put these items in the correct categories. We have to put
  these items directly into the correct categories.

Bug: 193384705
Test: robotest and see the UI
Change-Id: I2de7ee72fc1315eeef01288b386f8756ca366e33
2021-07-16 19:44:25 +08:00
Jeremy Goldman
804b9a4d46 PhoneNumberPreferenceControllerTest converted to JUnit
Actual preferenceScreen used rather than mock, since it is a final class
ArgumentCaptor used to get clip data text.

Test: atest -c PhoneNumberPreferenceControllerTest
Change-Id: Ib33be3bc7d9b506523be408a44f31417f0faa4c1
2021-02-24 13:21:39 +08:00
Yanting Yang
b6c30a2c31 Do not generate copyable slices for Settings Search
Copyable slices is to provide user a quickly sub-text copying way on
Settings Search. Since we plan to remove all sub-text from Settings
Search, the copying feature is no longer available.

Therefore, we don't need to generate copyable slices in Settings
anymore.

Impact search result:
Build number, Phone number, Hardware version, Serial number and IMEI

Bug: 143118037
Test: visual and robotests
Change-Id: I81474aed994678c42d73cc59e169573880de1378
2020-04-17 13:25:22 +08:00
Automerger Merge Worker
107cd136a3 Merge "[Settings] Adopting public API" am: 8ddd0da0a1 am: 40d2a2dd8d am: 11fa77b023
Change-Id: I87282b78a9db6eb3611591f0c4702447b8470db4
2019-12-16 08:31:03 +00: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
Yi-Ling Chuang
2516848b30 Make some device info related slices public.
Only PreferenceControllers with isPublicSlice() set to true are exposed
to other apps. Others will be Settings only.

Bug: 141088937
Test: robotests
Change-Id: Id38fd0203a4efc812e30990491786b4d8aff8902
2019-11-28 14:38:30 +08:00
Sunny Shao
f3865e9264 Synced the code from master branch
Fixes: 144364245
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.deviceinfo.PhoneNumberPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.deviceinfo.simstatus.SimStatusDialogControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.telephony.RenameMobileNetworkDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.homepage.contextualcards.deviceinfo.DeviceInfoSliceTest
Change-Id: Ibb26f5a63a969b28915a226a0197bc4033c91346
Merged-In: I5dfb71ceb87a8f658ef7fbceacf460ef8d35593a
2019-11-14 21:57:12 +08:00
Sunny Shao
0f844d168b Use the getBidiFormattedPhoneNumber to replace getFormattedPhoneNumber
Fixes: 123698996
Test: make RunSettingsGoogleRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.PhoneNumberPreferenceControllerTest
Test: make RunSettingsGoogleRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.simstatus.SimStatusDialogControllerTest
Test: make RunSettingsGoogleRoboTests -j ROBOTEST_FILTER=com.android.settings.network.telephony.RenameMobileNetworkDialogFragmentTest
Test: make RunSettingsGoogleRoboTests -j ROBOTEST_FILTER=com.android.settings.homepage.contextualcards.deviceinfo.DeviceInfoSliceTest
Change-Id: I5dfb71ceb87a8f658ef7fbceacf460ef8d35593a
2019-11-08 16:36:33 +08:00
Yanting Yang
afe788ca19 Set phone number preference unselectable
For multiple sim case, there are two or more phone number preferences in
About page. They should be grayed out because they don't have actions.

Fixes: 138263122
Test: Visual
Change-Id: I86ec37d049983c23b8990dda0e12bfadebf70d1e
2019-09-05 22:22:10 +08:00
Stanley Wang
ae78184c5f Fix Settings crashing while displaying phone number slice.
Check if the SubscriptionInfo list is empty to avoid the IndexOutOfBoundsException.

Fixes: 133258244
Test: maunal & robotest

Change-Id: I837f6761ba2b53823f0126f734f65875a30e34dd
2019-05-22 16:50:52 +08:00
Fan Zhang
b1b07e2030 Convert xml based API allowDynamicSummaryInSlice to java
- Add boolean useDynamicSliceSummary() in Sliceable interface. This is
  the switch equivalent to android:allowDynamicSummaryInSlice in xml. It
  moves the setter closer to regular Sliceable APIs, thus less easily to
  miss.
- Coverted all android:allowDynamicSummaryInSlice to use the java API.
  - Except 2 prefs in my_device_info. They incorrectly set this to true
  previously (controller is not sliceable, no point setting
  dynamicSliceSummary to true. They just won't do anything)

Fixes: 128446156
Test: robolectric
Change-Id: Ic57acd590dec3e87dcf4592df137321d14b854d9
2019-04-01 12:39:30 -07:00
Fan Zhang
e0a722e130 Merge Copyable into Sliceable.
It's only a slice concept. Regular preference copyability is handled in
xml.

Bug: 112427717
Test: rebuild
Change-Id: Iaba7077c320cd03a5963797916a60e0dc80fdbbe
2019-02-25 16:36:04 -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
Stanley Wang
3f80d1b64b Implement the Copyable interface to PhoneNumberPreferenceController
Change-Id: I70085cffe13047ac808d1bf08a467f693b1d8737
Fixes: 118398321
Test: manual and robotests
2018-12-14 15:09:34 +08:00
tmfang
e402cb2744 Support phone number in Settings slices
- Let controller of phoner number extends BasePreferenceController,
so it can be supported showing slice view by SettingsSliceProvider.

Test: make RunSettingsRoboTests
Bug: 74900516
Change-Id: Id98e6aac981025159a0530c6e0709ba0f2ebcd15
2018-10-01 11:15:02 +08: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
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
Ben Lin
9703a9757a Hide "Phone number" from About page if not call enabled.
Bug: None
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.deviceinfo
Change-Id: Ib056bae12d23fe68e71fe78c92741b8dc7887de0
2018-01-30 16:04:11 -08:00
Wu Qiang
4d8f51531f Fix plus position in about phone
Settings has phone number in about phone, "+"
is shown with incorrect position in Bidi layout.
Then it needs to use BidiFormatter

Fixes: 70700094
Test: manual
Change-Id: I1d63f773926136c38ce1ac811869476dc6a89eac
2018-01-16 09:58:36 -08:00
jeffreyhuang
4e087a3b0d Add search to phone number preference
- implement preference controller mixin

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I907420e49c710427c4cd3ad6fccb2f58f99164ea
2017-11-15 15:35:53 -08:00
jeffreyhuang
ba76fbeb3b Phone number in about phone v2
- Introduce preference controller to manage phone number
 - Add new strings for multi sim devices

Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: Ibf5dc65ba67969b6eeb095b8d202ef8a5faf16ca
2017-11-10 15:40:22 -08:00