Commit Graph

193 Commits

Author SHA1 Message Date
Roshan Pius
3ebfceafa6 settings(nfc): Remove reference to APM setting in NFC page
APM mode no longer affects NFC stack as of Android Q.

Bug: 275381319
Test: atest NfcEnablerTest NfcPreferenceControllerTest
Test: Manual settings page verification
Change-Id: I974a424332eb85e27d51816507183e1ca0def42c
2023-03-29 12:57:32 -07:00
Lifu Tang
caa1b51ef2 Revert "Remove duplicate strings."
Revert submission 19748582-settings_yesno

Reason for revert: Common strings in English could be translated into different strings in other languages.

Reverted changes: /q/submissionid:19748582-settings_yesno

Bug: 272603842
Test: build and open Settings app
Test: atest SettingsRoboTests
Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
2023-03-15 22:39:24 +00:00
George
2c5d1f8d29 Adding Nfc Tag App Preference setting to special_access settings
In the settings app, allow users to change the preference of the Nfc Tag apps.

Bug: 244272155
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NfcTagAppsPreferenceControllerTest
Change-Id: I28903fae8935613a0e8618da21ca44e98b8801d5
2023-02-01 14:10:04 +08:00
Jack Yu
50f657e1d5 Update page id enum for NFC default payment selection page
Bug: 260060603
Test: build pass
Change-Id: I6f3da2223a455f8dfe6b8c5be13af37f933202b8
2022-11-28 02:57:09 +00:00
Kweku Adams
5949fccc7a Remove duplicate strings.
"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.

Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
2022-08-26 00:07:08 +00:00
Jack Yu
f8b664e31f Only primary user is allowed to control secure nfc
Bug: 238298970
Test: manual
Change-Id: I945490ef1e62af479a732c9a260ed94bdd8bc313
2022-08-16 02:59:18 +00:00
TreeHugger Robot
1ef5a1c86a Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev am: 2f184b0ff4 am: e3bbadb7df am: 6fd7cf1993 am: 165c11c0da am: 2e68c87afc am: b2a6f3b640 am: e6ee0ba1ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18158869

Change-Id: Idd1b1e42bacbb74d950d9aa9a367b0f3a9fe176c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 11:18:16 +00:00
TreeHugger Robot
e6ee0ba1ca Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev am: 2f184b0ff4 am: e3bbadb7df am: 6fd7cf1993 am: 165c11c0da am: 2e68c87afc am: b2a6f3b640
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18158869

Change-Id: I38e251a90df0d85b02e4a90e60434374caebb43b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 10:56:20 +00:00
TreeHugger Robot
2e68c87afc Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev am: 2f184b0ff4 am: e3bbadb7df am: 6fd7cf1993 am: 165c11c0da
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18158869

Change-Id: I8d59841265494fc6b1e1b280c6c275c4103959be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 08:13:52 +00:00
TreeHugger Robot
6fd7cf1993 Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev am: 2f184b0ff4 am: e3bbadb7df
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18158869

Change-Id: I6c7835e9885cf02ba167a8f4ac1c564bad511e6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 07:34:09 +00:00
Jack Yu
2290b0af8c Do not let guest user disable secuer nfc via SettingsSlice
Do not let guest user switch the secure nfc preferernce setting.

Bug: 228314987
Test: manual
Change-Id: I60a832e32d83bb57d968af2f8b92d94e2ac7c6a2
2022-05-04 18:06:04 +08:00
Jack Yu
bf3a207fb5 Change the alignment of the foreground preferernce controller
Set left align to the nfc foreground preference controller.

Bug: 223073535
Test: manual
Change-Id: I0d4ffcedb2646b9d3fd7f4d56adb0d000cfd5987
2022-04-25 15:27:05 +08:00
Jack Yu
d01497a5de Fix "learn more" link is not clickable
Use function setLearnMoreAction instead of ClickableSpan in
NFC FooterPreference.

Bug: 226299551
Test: maunal test
Change-Id: I69c494b3e6fc92940d498d8be0c9ef5041b1bb3b
2022-03-28 22:42:45 +08:00
TreeHugger Robot
da591a4f76 Merge "Make NFC Setting summary text translatable" into tm-dev 2022-03-15 14:47:16 +00:00
Jack Yu
323606ee25 Correct null UserHandle handling for ACTION_CHANGE_DEFAULT
When there is no userhandle passed via Intent.EXTRA_USER,
use UserHandle.myUserId() instead.

Bug: 221561126
Test: set default payment in GPay app
Change-Id: I272aa6674b7a18523fe02fadeb4a502a67303ee7
2022-03-15 02:47:25 +00:00
Jack Yu
47bdc61116 Make NFC Setting summary text translatable
Add a string in resource xml for the work app summary text in the
default payment selection list.

Bug: 202369556
Test: manual test
Change-Id: Iec3f4bd47c641f3226506a5c49f1601cb24f613a
2022-03-14 11:45:19 +08:00
TreeHugger Robot
382cebc187 Merge "Refine NFC settings UX" 2022-02-15 14:45:04 +00:00
Treehugger Robot
11ac8ac28a Merge "Use Intent.EXTRA_USER for ACTION_CHANGE_DEFAULT" am: 57238d653c am: 1a16975a36 am: b7077ab55f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1977698

Change-Id: Icc629addf9f47a48a0da14d105d737a7e9e1348c
2022-02-14 12:05:25 +00:00
Treehugger Robot
b7077ab55f Merge "Use Intent.EXTRA_USER for ACTION_CHANGE_DEFAULT" am: 57238d653c am: 1a16975a36
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1977698

Change-Id: I0196d39d1e8d619a54931492fc89f15b8b5dfc99
2022-02-14 11:49:04 +00:00
Jack Yu
1e9a9cdec4 Refine NFC settings UX
Adjust notification string when selecting a work app.
Use NFC banner instead of app icon.

Bug: 202367033
Test: manual
Change-Id: I4f1094b8d48bb60716a2bf648dff593186d707aa
2022-02-09 21:52:18 +08:00
Jack Yu
c7b568751e Use Intent.EXTRA_USER for ACTION_CHANGE_DEFAULT
Use Intent.EXTRA_USER to pass the UserHandle as the extra field of
ACTION_CHANGE_DEFAULT.

Bug: 215300017
Test: manual
Change-Id: I8862ae509638c7c264f49c4bc5753a65e8fdcfbc
2022-02-09 21:34:59 +08:00
Jack Yu
4e543a38f6 Do not let guest user disable secure nfc
Bug: 209446496
Test: manual
Merged-In: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
Change-Id: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
(cherry picked from commit d9e3e6e4b1)
2022-02-02 17:44:55 +00:00
Jack Yu
29e46bd01e Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124 am: b85416796d am: 05dfb08c80 am: 147f4bc01d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: Ibb578e5efdfffa772c785cb482de853a19faf0b7
2022-01-28 23:29:42 +00:00
Jack Yu
147f4bc01d Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124 am: b85416796d am: 05dfb08c80
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: Ib69851dd1d88fcba84af0cf940b6f949aab15355
2022-01-28 23:14:00 +00:00
Jack Yu
35b818e4f8 Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124 am: b85416796d am: 05dfb08c80
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: I552305e84fd81e640b5dc3245826925b0318410d
2022-01-28 23:13:59 +00:00
Jack Yu
b85416796d Do not let guest user disable secure nfc am: a579ca7554 am: 1009054124
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16691815

Change-Id: I9879ba034ae2b8d7a964a4d6c9d700bad55b636e
2022-01-28 22:31:38 +00:00
Jack Yu
a579ca7554 Do not let guest user disable secure nfc
Bug: 209446496
Test: manual
Merged-In: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
Change-Id: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
(cherry picked from commit d9e3e6e4b1)
2022-01-22 07:56:25 +00:00
TreeHugger Robot
8a0d26dca7 Merge "Do not let guest user disable secure nfc" 2022-01-22 07:41:57 +00:00
Jack Yu
9de30f08e6 New UX for the NFC default payment settings
Re-design the UX.

Bug: 202367033
Test: maunal
      make RunSettingsRoboTests ROBOTEST_FILTER=NfcForegroundPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=PaymentSettingsTest
Change-Id: I4c05ac4a1974645c76a37900d64aa8e1a491bca1
2022-01-21 10:25:09 +00:00
Jack Yu
d9e3e6e4b1 Do not let guest user disable secure nfc
Bug: 209446496
Test: manual
Change-Id: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
2022-01-19 10:43:10 +00:00
Michael Groover
911f7e7aa9 Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting T or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the T release.

Bug: 161145287
Test: Build
Change-Id: Ie97372efebd8258d9a4c503771d55109a85e6ae9
2021-12-09 20:34:02 -08:00
Jack Yu
9a0ab00ac4 Merge "NFC support in work profile" am: c2647199ce am: 79675e89f2 am: 3ccf7e29f8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1856215

Change-Id: Ib97dd1b197a362258552a45d7d9b40565da96cb5
2021-11-22 11:23:29 +00:00
Jack Yu
79675e89f2 Merge "NFC support in work profile" am: c2647199ce
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1856215

Change-Id: Iac30f77fd5d732bb3b50fc531600fed02d477919
2021-11-22 11:00:16 +00:00
Jack Yu
2a2e0275cc NFC support in work profile
Configure NFC payment settings based on userId.

Bug: 202367033
Test: mauanl tests
Change-Id: I97e275f374d34618b64188d5de185ec6c527e0fd
2021-11-15 19:03:34 +08:00
Jason Chiu
026b1b5df6 Merge changes from topic "slice-highlight" into sc-v2-dev am: 6821b6be32
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16151654

Change-Id: Ib03d41631d8bf961fa3ff3957eb5452411da7792
2021-11-02 02:28:16 +00:00
Jason Chiu
2989c50a23 Add highlight menu keys for all toggle pref controllers and custom slices
Bug: 204695404
Test: manual, robotest build pass, unit
Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2021-11-01 15:00:18 +08:00
TreeHugger Robot
9a573b1942 Merge "PaymentDefaultDialog Could be Overlaid" into sc-dev am: a2e975064e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15821792

Change-Id: Id94319ec70f89a5f153d4e7f6db9ed2cba036997
2021-09-30 19:05:51 +00:00
Alisher Alikhodjaev
b2c03474c4 PaymentDefaultDialog Could be Overlaid
Settings#PaymentDefaultDialog Could be Overlaid to Trick User into
Updating Default Payment App

Bug: 180104327
Test: build ok
Change-Id: Ia7786d05aae8e38a11bd73d02200640cb614e88a
2021-09-13 17:00:30 -07:00
Treehugger Robot
6eb3f3bf90 Merge "Support multi-users for NFC payments" am: 6eb702ed63
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1778405

Change-Id: I1f20e829bf513d8166458e1749bcc8c9fade07b2
2021-09-02 09:17:20 +00:00
Jack Yu
d2ca4038ce Support multi-users for NFC payments
Configure nfc payment settings based on different users.

Bug: 191851086
Bug: 191845397
Bug: 192994529
Test: nfc payment with 2nd user
      make RunSettingsRoboTests
      ROBOTEST_FILTER=DefaultPaymentSettingsPreferenceControllerTest
Change-Id: I52440e77b6b5837b978b381e1c1694d2b29f048e
2021-08-23 16:18:08 +00:00
Stanley Wang
10b7a7d483 Use MainSwitchPreference to replace the button style switches.
Fix: 177967926
Fix: 177968295
Fix: 177967925
Fix: 177968078

Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Ie854de96e5495fa564fb8a097ed4547bbd2b10c5
2021-02-02 08:39:37 +00:00
Stanley Wang
b87ddba6cd Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings.
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.

Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui

Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
2021-01-14 22:48:31 +08:00
Toby Chuang
36b00c5e4f Merge "[NFC] Add a picture under NFC settings to show NFC detection point." into rvc-dev 2020-04-06 07:28:00 +00:00
Toby Chuang
204fa8a420 [NFC] Add a picture under NFC settings to show NFC detection point.
Each smartphone has a different NFC antenna detection point,
users would confuse where the NFC antenna is and how to place the
smartphone close to the card reader/equipment.

Starting from Android R device, we move NFC antenna position from
top area to middle center of the phone.

From the OEMs perspective, they could implement their own picture
to indicate the best NFC detection point.Hence, we propose to
show NFC antenna position under NFC setting.

Bug: 142230563
Test: build pass
Change-Id: Ib3cd7fc3ea299be1667aba0aeebaa148fb49015f
2020-04-06 13:37:31 +08:00
Robert Luo
2f4ebf9475 Refine NFC payment wording for "Set default" and "Update" scenarios.
Fixes: 149270345
Test: manual and check if new string is applied
Change-Id: I4d7591882489d3892020f8fa2f963f7c90ec79e4
2020-03-30 13:25:39 +08:00
George Chang
5920f62784 Update OWNERS file
Test: None
Change-Id: Ifa7045000ce578a611bb065cd821a87a54edd49c
2020-02-18 17:32:09 +08:00
Yi-Ling Chuang
430c16c012 Make some existing 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: I5934e89bc1b268fdd44acd630621fa46987728ff
2019-11-28 14:32:15 +08:00
Sunny Shao
3526f666a8 Fix the display abnormal of Tap & pay screen in landscape mode
- Add a new layout for the landscape mode.
- Update the logic to show image when has no any visible preference.

Bug: 141559275
Test: manual view
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.nfc
Change-Id: Ib59ad3347e0635c07d61d557d75f8feaf78ff23c
2019-10-03 18:56:36 +08:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00