Commit Graph

42578 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
Shen Lin
eb627be0b4 Mark DataUsageState as nullable to avoid potential NPE risk
mDataUsageState is nullable in UnrestrictedDataAccessPreference.java, so we'd better
add a annotation to getDataUsageState(), and add a null-check before calling it.

Bug: 246828843

Test: manual and Robotest.
Change-Id: If7fea53ec7efd004391a09becdba5709ae686f40
2022-09-15 14:23:38 +08:00
Treehugger Robot
8b0e08ecee Merge "Fix compile warnings due to non-varargs call of varargs method" 2022-09-14 04:16:30 +00:00
Treehugger Robot
8f793f5e4f Merge "Fix the IllegalArgumentException from RecyclerView" 2022-09-14 03:55:49 +00:00
Shen Lin
c463aee2b8 Fix the IllegalArgumentException from RecyclerView
Attempt to remove the animator as early as possible to avoid a RecyclerView crash.

Bug: 246411107
Related bug: 184214085

Test: manual.
Change-Id: I8fcb06836217f4de200a53bb88a1a0b5e42bbe21
2022-09-13 08:46:30 +00:00
Bill Yi
677cd61616 Merge "Merge TP1A.220905.004 to aosp-master - DO NOT MERGE" 2022-09-12 17:59:03 +00:00
Shen Lin
78fc8a21a4 Fix potential NPE crash in ConversationHeaderPreferenceController
mChannel is nullable and we have to do a null-check before calling its method.

Bug: 245506600

Test: manual and atest
Change-Id: Ib739f0f66f1a2aee1b2741263e7c206341782892
2022-09-09 10:16:29 +08:00
Bill Yi
042554a0e4 Merge TP1A.220905.004 to aosp-master - DO NOT MERGE
Merged-In: Id0c4e3c68ee40e5d0d57449b531228b31f2246ac
Merged-In: Ib71b6904b5c85b3d9f96563bd38bbf2d0305127d
Change-Id: I186ff56c007d17ad650b64facfbd4862cc06bf9a
2022-09-08 14:23:20 -07:00
Shen Lin
e960694a15 Fix compile warnings due to non-varargs call of varargs method
Bug: 245384099

Test: manual
Change-Id: Ie25c53b20cad318097ff17b7df0b4dd9ffeb4a32
Merged-In: Ib225d185b6f15463f4fae809e0cdaa25920d52af
2022-09-08 07:02:52 +00:00
Shen Lin
fa6a8e9767 Fix NPE crash in TextToSpeechSettings
Recyclerview's getItemAnimator() is nullable so we need a null check.

Bug: 245383855
Test: Manual

Change-Id: Iebad430e81a32b7fa8ebe0543abf3f122befb7e5
2022-09-07 10:26:39 +08:00
Treehugger Robot
b2a466d92f Merge "Fix NPE crash in UwbPreferenceController and optimize the lifecycle observer adding condition in page" 2022-09-06 23:54:40 +00:00
Shen Lin
0b9a6304aa Fix NPE crash in UwbPreferenceController and optimize the lifecycle observer adding condition in page
This patch contains two fixes:

- Make sure mUwbManager is non-null by calling isUwbSupportedOnDevice to avoid a NPE.
- Modify AdvancedConnectedDeviceDashboardFragment, add lifecycle observer only if device supports UWB.

Bug: 244871579

Test: manual test and Robotest.
Change-Id: I78f97794a66f3fb487f067c4570899e21c254acf
2022-09-06 14:55:08 +08:00
Pingzhi Wang
77ce80d6cb Crash in PreferredSimDialogFragment
NullPointerException when removing physical SIM card

Bug: 244622300
Test: Manual
Change-Id: Ie32c4d07e4c77a0460265a47501e332ae62e17e4
2022-09-05 11:29:42 +02:00
Treehugger Robot
36a80cd8e6 Merge "Add null check for mIntent in ZenRulePreference to avoid potential crash risk" 2022-09-02 03:36:40 +00:00
SongFerngWang
2d59130485 Add owner for job handover
Will CP it into AOSP later.

Bug: 244524317
Test: NA
Change-Id: I9259596811cba08a21b78eebbe2f847e1aa6818c
2022-09-01 16:09:35 +08:00
Shen Lin
b25f123d9f Add null check for mIntent in ZenRulePreference to avoid potential crash risk
Bug: 244120502

Test: manual test, ZenRuleScheduleHelperTest for unit test.
Change-Id: Ib7338253783bb09b84b629f2dd891292d82f28b2
2022-08-29 19:19:59 +08:00
Treehugger Robot
d221269892 Merge "Fix always return first package for mock location app in developer options." 2022-08-23 13:15:51 +00:00
张倞诚
d8d0cb3532 Fix always return first package for mock location app in developer options.
The mock location app should be OP_MOCK_LOCATION allowed app, the packageOps.get(0).getPackageName()
is the first app that used the OP_MOCK_LOCATION in history, but maybe rejected.

Change-Id: I0158436dd7d2790f4e9640075bc9c8bd3422f467
2022-08-23 07:50:16 +00:00
Treehugger Robot
a93e78f781 Merge "Fix array-related errorprone warnings" 2022-08-17 18:37:46 +00:00
Cole Faust
a21ac03acb Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ida6513002f8fd845a385924be290b720f06c4748
2022-08-15 18:52:37 -07:00
Treehugger Robot
e194aa42eb Merge "Fix permissions for internal links." am: 24f45fbd63
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2182455

Change-Id: I633c22a73b0d160c0fbf662768a92e4f0dfac85c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 03:03:53 +00:00
Treehugger Robot
24f45fbd63 Merge "Fix permissions for internal links." 2022-08-12 02:44:31 +00:00
Bob Badour
11411e187b Fix permissions for internal links.
Test: m droid dist

Change-Id: If872d5e91a78d8f407e618a2c655c8cf4ac7d7fc
2022-08-10 14:21:47 -07:00
Treehugger Robot
4967e754eb Merge "Fix SIM name in Network Details to show the selected SIM." am: 3bd3f983bf
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2181975

Change-Id: Ie48078a7c33f40939b9d49140875ec7a02582ed3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 17:41:35 +00:00
Bruno Kremp
b204960ea4 Fix SIM name in Network Details to show the selected SIM.
When dual SIM cards with same Carrier Id inserted, authentication of
SIM base network is via default data SIM. However, SIM name shown in
Network Details is always the one inserted first.
Hence, make SIM name of default data SIM shown in Network Details
preferred to keep consistent with the one used for authentication.

Co-authored-by: Yibo Wang <yibo.x.wang@sony.com>

Test: manual test
Bug: 240732444
Change-Id: Ibd64189d6c25b5a64881a0ad9d40854df93481f4
2022-08-10 15:09:49 +02:00
Arc Wang
6945e70c02 Merge "Crash happens if back button is pressed during "Format as Portable"" am: 671fa153e8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147940

Change-Id: I70b0ae924d8a4410cc29e7f494e85a9b8a7d3abc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 03:26:39 +00:00
Arc Wang
671fa153e8 Merge "Crash happens if back button is pressed during "Format as Portable"" 2022-08-02 03:11:13 +00:00
SongFerngWang
34dac9cb73 [MEP] Hide the preferred SIM dialog when the user has replaced the SIM
Since there is the race condition and it causes UI hides the preferred
SIM dialog. Therefore, to hide the preferred SIM dialog under the
specific condition which the user has replaced the SIM during the
SIM switching.

Bug: 238061853
Test: Manually testing. Device has the psim+esim and the esim's mobile
data on. The tester disables the esim and then UI shows the preferred
SIM dialog.

Change-Id: I01e7d60170c5053730fd3113abd914fb5c0d11c9
(cherry picked from commit 286dce6b6e)
Merged-In: I01e7d60170c5053730fd3113abd914fb5c0d11c9
2022-07-29 22:35:50 +00:00
Jason Chiu
8cef068117 Make bluetooth not discoverable via large screen deep link flow
Deep links on large screen devices starts a homepage activity on the
left pane, and then starts the target activity on the right pane. This
flow overrides the calling package, and the target activity can't know
who initially calls it.

Thus, we store the initial calling package in the intent, so the
Connected devices page is able to make bluetooth not discoverable when
it's called from unintended apps on large screen devices.

Bug: 234440688
Test: robotest, manual
Change-Id: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
Merged-In: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
(cherry picked from commit 5df14831b8)
Merged-In: I4ddcd4e083c002ece9d10aabdb4af4a41de55ce7
2022-07-29 22:35:44 +00:00
Bonian Chen
4ec8323bad resolve merge conflicts of 81d1cd0871 to stage-aosp-master
Test: Build pass this conflict resolution.
Bug: None
Change-Id: Iaacaeaa579025deee52b29b4b1245fc7c0fa0346
2022-07-29 07:34:35 +00:00
Treehugger Robot
81d1cd0871 Merge "Settings: Make NetworkScanHelper max search time customizable" 2022-07-29 05:37:46 +00:00
Himanshu Rawat
7c6a004452 Merge "Don't cancel passkey entry pairing autonomously" am: 059ab284e7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2159779

Change-Id: I7680942ca7ac5da3799b10306b1a3849800a1f4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 02:17:18 +00:00
LuK1337
988a76f5bb Settings: Make NetworkScanHelper max search time customizable
Default max search time (300) fails on some devices.

Test: Network scan works on OnePlus 9 after overlaying
      max network scan search time to 254.
Change-Id: Ia0038fac6d2000748e0aa08fd6a53f11876728d7
2022-07-25 17:44:40 -07:00
Himanshu Rawat
aa1950fd80 Don't cancel passkey entry pairing autonomously
Bluetooth pairing is cancelled if the pairing popup is closed without
explicitly accepting the pairing. However there is no way to
explicitly accept the pairing when the local device displays for the
passkey entry or pin key entry pairing method.
As a result all passkey entry and pin key entry pairings, where the
local device is displaying the value, are cancelled after the pairing
is successful. If the BT stack has not completed the SDP search when
the pairing is cancelled after successful pairing, it may result in
removal of the bond information.

Bug: 237757124
Test: Pair with BT HID keyboard; adb logcat | grep "BTPairingController:
Pairing dialog canceled"

Change-Id: Ifdb98c16084dd811eed68469e7df5d1913c6ace8
2022-07-20 03:33:55 +00:00
Treehugger Robot
2a0a88af4d Merge "Fix incorrect storage calculation when SD card is inserted" am: e705fcd7c3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147780

Change-Id: I6ba5b7c40e87df6c231e0c774913b1320c9c3996
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-16 02:51:11 +00:00
Treehugger Robot
e705fcd7c3 Merge "Fix incorrect storage calculation when SD card is inserted" 2022-07-16 02:35:19 +00:00
ot_hemant.yadav
9a72877c7c Crash happens if back button is pressed during "Format as Portable"
SD card format as internal, during migrate process press back key or  During "Format as Portable", 
press back key crash happened.

Fix:
Hide the bottom navigation from that particular activity so that user can not accidentally 
press back key.
/packages/apps/Settings/src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java
/packages/apps/Settings/src/com/android/settings/deviceinfo/StorageWizardMigrateProgress.java

Bug: 238596768
Test:
1. Insert sdcard or generate virtual disk using command : adb shell "sm set-virtual-disk true"
2. Go to Settings -> Storage -> SD Card -> Format as Internal -> move later
3. After step 1, back to storage
4. Again enter in Storage -> SD Card -> to do migrate data
5. during migrate process press back key
6. Storage -> SD Card -> Format as Portable
7. During "Format as Portable", press back key

Change-Id: I1f393ffb872bb90d7dfeb4e1c86648b3413645a1
2022-07-11 17:21:04 +00:00
Bill Yi
c73b07dc76 Merge SQ3A.220705.003 to aosp-master - DO NOT MERGE
Merged-In: I5ea05490d13515baaeda9ea7b6c153c8c2d0a54e
Merged-In: I7a2a0e8da3ae59219e9984e8437ce0b1e007bce2
Change-Id: I677947b60b051c89293ca58359cb56b8cbc63ec8
2022-07-07 15:33:30 -07:00
Xingbin Feng
3cbff800a3 Fix incorrect storage calculation when SD card is inserted
The displayed internal storage is incorrect when an SD card
is inserted into the device.

Bug: 209962845
Test: Insert an SD card with some content. The System
storage calculation should remain unchanged.

Change-Id: I0a338bc306c0ade68747356714cd291e209a5069
2022-07-07 14:42:57 +02:00
Xin Li
b8d6e73355 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: Ifcb9d4c564839199d998bd503f390f021c6bf3ad
Change-Id: I9d69bcbc6916176beece2616f152ebd3d74fc0f8
2022-06-28 21:23:28 +00:00
SongFerngWang
7f6fcce1d5 The UI only shows the active LE device
At the media device, it only shows the active LE device which is
connected.

Bug: 232892046
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=ConnectedBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=SavedBluetoothDeviceUpdaterTest

Change-Id: Iac661206def4d43bc40ab9bb1938f084926899c2
Merged-In: Iac661206def4d43bc40ab9bb1938f084926899c2
2022-06-28 15:03:07 +08:00
Bonian Chen
b88828b155 Merge "[Settings] Avoid from close dialog when touch outside." into tm-dev am: c5fc5db0e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18869528

Change-Id: I5bd96bac8e7313ec76a461a0d4e453da90ba9072
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 04:25:38 +00:00
Bonian Chen
c5fc5db0e7 Merge "[Settings] Avoid from close dialog when touch outside." into tm-dev 2022-06-23 04:08:21 +00:00
Salud Lemus
071719856d Merge "Fix title used for financed device info in Settings" into tm-dev am: bb149294dd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18934542

Change-Id: I48ec660d0ac6aecd3a28368a3b2035dbfb6fe297
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 22:47:52 +00:00
Salud Lemus
bb149294dd Merge "Fix title used for financed device info in Settings" into tm-dev 2022-06-22 22:33:18 +00:00
Bonian Chen
e9cdc176a6 Merge "[Settings] Adjusted the API of Settings app" into tm-dev am: 29a00dbc31
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18660040

Change-Id: I8391c6e89654e3595a496de6da4485f27834bfda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 19:24:20 +00:00
Bonian Chen
29a00dbc31 Merge "[Settings] Adjusted the API of Settings app" into tm-dev 2022-06-22 18:59:54 +00:00
Oriol Prieto Gascó
10e5657a39 Merge "Use com.android.bluetooth as the BT stack APK" into tm-dev am: d6166e42a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18981799

Change-Id: I7fcfd55573d121122867893a5624c297a1f18653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 17:43:23 +00:00
Bonian Chen
d10618d489 [Settings] Adjusted the API of Settings app
The API of Settings app get changed in order to support large screen.
This is a fix to adopt the change related to this work.

A short brief:
1. Accept ACTION_MAIN for launching MobileNetworkActivity.
2. Support deep-link intent while MobileNetworkActivity in foreground.
3. Avoid from binding MobileNetworkActivity as a single instance.

Bug: 230047450
Bug: 234406562
Bug: 229371407
Test: local & unittest
Change-Id: Ifcb9d4c564839199d998bd503f390f021c6bf3ad
2022-06-22 07:51:47 +08:00
SongFerngWang
fd583a0459 Fix the NullPointException am: 5a4df243f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18921546

Change-Id: Icb8aae31d833d27bb64040af296f096471838785
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 07:27:56 +00:00