When using EXTRA_USER_HANDLE, check for INTERACT_ACROSS_USERS_FULL permission on calling package.
Bug: 259385017
Test:
1. Build a test app that creates and starts an intent to NOTIFICATION_LISTENER_DETAIL_SETTINGS while setting the intent extra "android.intent.extra.user_handle" to UserHandle(secondaryUserId).
2. Create and switch to a secondary user
Settings > System > Multiple users > Allow multiple users > Add user > Switch to New user
3. Open Settings > Notifications > Device & app notifications and choose an app from the list (uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE). Enable Device & app notifications for selected app and disable all attributed permissions.
4. Switch back to the Owner user.
5. Get the userId of the secondary user: adb shell pm list users.
6. Open the test app and enter the userId for the secondary user and the component name that uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE.
8. In the settings window that open, enable all 4 sub-options.
9. Switch to the secondary user and note that the all sub-options for the app are disabled.
Change-Id: I875b9f2fc32c252acdcf8374a14067836e0f1ac6
(cherry picked from commit 99b8b4cd60)
When using EXTRA_USER_HANDLE, check for INTERACT_ACROSS_USERS_FULL permission on calling package.
Bug: 259385017
Test: 1. Build a test app that creates and starts an intent to NOTIFICATION_LISTENER_DETAIL_SETTINGS while setting the intent extra android.intent.extra.user_handle to UserHandle(secondaryUserId).
2. Create and switch to a secondary user
Settings > System > Multiple users > Allow multiple users > Add user > Switch to New user
3. Open Settings > Notifications > Device & app notifications and choose an app from the list (uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE). Enable Device & app notifications for selected app and disable all attributed permissions.
4. Switch back to the Owner user.
5. Get the userId of the secondary user: adb shell pm list users.
6. Open the test app and enter the userId for the secondary user and the component name that uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE.
8. In the settings window that open, enable all 4 sub-options.
9. Switch to the secondary user and note that the all sub-options for the app are disabled.
Change-Id: I875b9f2fc32c252acdcf8374a14067836e0f1ac6
Due to the special width/ height of the device, we have to modify the
available condition otherwise the resolution option cannot be shown on Settings.
Bug: 258346214
Test: Lunch Settings and check the Display page
atest SettingsUnitTests:ScreenResolutionControllerTest
atest SettingsUnitTests:ScreenResolutionFragmentTest
Change-Id: Ie22df7dff6e31a7697c128eabe69dfe4bba29746
This CL adds support for UVC GadgetFunction. UVC can be enabled/disabled
by setting the `ro.usb.uvc.enabled` property, and this CL makes sure
that the Settings app honors the property when showing USB functions to
the user.
Bug: 242344221
Test: Manually tested that the 'USB Webcam' option is present when the
property is set, and removed when property is unset.
Change-Id: I5d1ff0a43d3c0c722bc9e03132a581da5c61bd76
Connected wifi entry is represented by either
mConnectedWifiEntryPreferenceCategory or
mFirstWifiEntryPreferenceCategory, but we only clear
mConnectedWifiEntryPreferenceCategory when Wifi is disabled. Make sure
to also clear mFirstWifiEntryPreferenceCategory.
Bug: 267815756
Test: manually verify connected wifi is hidden when wifi is disabled
Change-Id: I4c30a658200f1ab90af5ce41a6531f5784a8de5d
Test: Manual - navigate to the activity mentioned in the bug and observe
the background
Bug: 264993674
Change-Id: I21c8143099e4c76ed5744cff12f31f578320a871
This will let users know which screensaver they are customizing.
Fixes: 267582102
Test: flashed device and enabled talkback, opened screensaver settings,
and verified talkback correctly says the name of the screensaver
Change-Id: I9d0d9422f06b7a78efca0e6953b73fe612f79e2a
Collasping the tool bar when search menu item is invoked.
Bug: 266383101
Test: visual test, open the page and the large empty space will be
collapsed when searching language list.
Change-Id: I6548d3d572082a66778cb27d9333dff760619dab
Ethernet is enabled when either FEATURE_ETHERNET *or* FEATURE_USB_HOST
is present. See ConnectivityService#deviceSupportsEthernet.
ConnectivityService#deviceSupportsEthernet should really be moved to
some commonly accessible location.
Test: TH
Change-Id: I497d99169248db7e5948b3a19134ab42e66d5b9b