Commit Graph

1453 Commits

Author SHA1 Message Date
TreeHugger Robot
1410b406d7 Merge "Allow WRITE_SECURE_SETTINGS for ANGLE to provide developer options." into rvc-dev 2020-03-27 17:16:35 +00:00
Geoff Lang
4b5a106542 Allow WRITE_SECURE_SETTINGS for ANGLE to provide developer options.
ANGLE is a system library which adds a developer option to control when
it is used as the default OpenGL ES driver.

Test: manual, ANGLE.apk's developer options work.
Bug: 142239747

This is a cherry-pick of https://android-review.googlesource.com/c/platform/frameworks/base/+/1222890

Change-Id: I3e616d6252d0daa0e32c942b05987d17e73a2709
2020-03-25 16:13:24 +00:00
Anton Hansson
7fe2d29f1b Merge "Remove the tethering hiddenapi whitelist entry" into rvc-dev 2020-03-25 12:42:23 +00:00
TreeHugger Robot
e0b1bfb87d Merge "Add tuner permissions to Shell" into rvc-dev 2020-03-24 06:26:00 +00:00
shubang
d7a3204c4e Add tuner permissions to Shell
So we can test system APIs in cts.

Bug: 150952758
Test: atest android.media.tv.tuner.cts.TunerTest
Change-Id: Ife5a5f712cdf3d3c2e5dd747fa1d3bc8c165b85b
2020-03-23 19:41:35 -07:00
markchien
1f47e1c22e Give tethering bluetooth privilege permission
Permisssion of PanService#setBluetoothTethering is change from
BLUETOOTH_ADMIN to BLUETOOTH_PRIVILEGED.
Tethering service need bluetooth privilege permission to enable
bluetooth tethering.

Bug: 146045934
Test: on/off bluetooth tethering
Merged-In: Ib87a5d5a5bb49390aa55e52713bb3539d4a52348
Change-Id: Ib87a5d5a5bb49390aa55e52713bb3539d4a52348
2020-03-23 11:42:39 -07:00
Anton Hansson
e11221c738 Remove the tethering hiddenapi whitelist entry
Dexes under /apex are automatically whitelisted.

Bug: 146757305
Test: presubmit
Change-Id: I97af6d911c7e9bafdaa2a97102b2131dea6c0896
2020-03-20 15:27:27 +00:00
TreeHugger Robot
48bd1c9ccf Merge "Shell: Allow usage of wifi usability score APIs" into rvc-dev 2020-03-19 22:33:43 +00:00
TreeHugger Robot
591bb7b1fe Merge "Enforce permission on native puller API" into rvc-dev 2020-03-19 21:12:52 +00:00
Roshan Pius
c551b3386a Shell: Allow usage of wifi usability score APIs
This permission is needed for wifi CTS tests.

Is the minimally scoped permission that needs to be added?
- Yes, this only allows the app to influnce wifi vs lte network
selection algorithm.

What options did you explore that did not need this permission?
- Without this permission, it would be impossible to test these API's:
WifiManager.setWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.clearWifiConnectedNetworkScorer()
WifiManager.addOnWifiUsabilityStatsListener()

Bug: 150236894
Test: Device boots up.
Change-Id: Ic173e44ab818cdfecebde80715ddaec347019db6
2020-03-19 13:14:50 -07:00
Tej Singh
10458eca11 Enforce permission on native puller API
Test: m
Test: no security exceptions on boot
Test: atest LibStatsPullTests
Bug: 148955001
Change-Id: I4b06bfc41be2925270eaddd717f1499d98739dae
2020-03-19 11:54:11 -07:00
Remi NGUYEN VAN
aa59d13672 Merge "Remove privapp grants for CaptivePortalLogin" into rvc-dev 2020-03-19 05:43:54 +00:00
Eric Laurent
e23ed86890 Add MODIFY_DEFAULT_AUDIO_EFFECTS permission to shell
Add MODIFY_DEFAULT_AUDIO_EFFECTS permission to shell which
is needed to run GTS tests on @systemApis for
audio effects control.

Bug: 148703417
Test: run gts -m GtsAudioTestCases -t com.google.android.audio.gts.DeviceEffectTest#testCreateDeviceEffect
Change-Id: Iba579001aeffd85743850727135a6f536579ea17
2020-03-18 12:07:57 -07:00
Winson Chung
185d0b08b7 Add launcher3 specific permission to the whitelist
Bug: 151611270
Test: Manual
Change-Id: Id039cdc7966c34c57bca331e762ae385cf0a9e44
2020-03-17 22:10:13 +00:00
Winson Chung
bdf1684824 Adding launcher permission to base whitelist
- This is a *temporary* permission that we are using to set the system
  rotation setting via the launcher settings.  The framework uses the
  same setting for forced-rotation, but this currently only is scoped to
  launcher so it makes more sense as a launcher setting than as a
  developer option (and we plan on removing it shortly).  We are working
  with jjaggi@ and caen@ to coordinate the fw and launcher settings.

Bug: 151611270
Test: Manual
Change-Id: If371cac4d580785ed1714c82a67b995a40ecf9a6
2020-03-16 16:28:22 +00:00
Automerger Merge Worker
366c9406fd Remove privapp grants for CaptivePortalLogin
CaptivePortalLogin is not a privileged app, so it cannot get these
permissions anyway.

Test: CaptivePortalLogin working without the permissions
Bug: 151214275
Change-Id: I283b8068b9eada28d92c9d550473106a1b680a27
Merged-In: I283b8068b9eada28d92c9d550473106a1b680a27
(cherry picked from commit 53839762d4)
2020-03-16 10:14:01 +00:00
Keun-young Park
60a4479b55 Merge "Add MONITOR_INPUT for kitchensink test app" into rvc-dev 2020-03-12 22:57:11 +00:00
Chi Zhang
bb9ed92165 Telephony statsd atoms.
Test: build
Bug: 146066107
Bug: 141631489
Bug: 122371089
Bug: 149880090
Bug: 127666858

Change-Id: I124cf2da59ed4c5e92406081aac0df0f347ace74
2020-03-11 15:10:36 -07:00
TreeHugger Robot
abb2d5847d Merge "Camera: Add new hidden API for camera open/close callback" into rvc-dev 2020-03-10 23:27:46 +00:00
Heemin Seog
764220e47e Add priv-app permission
Necessary for Hawk to boot

Bug: 151155652
Test: boot hawk
Change-Id: Idd456a01cdb40a6ab1175b16440b96d5778b4cda
2020-03-10 10:41:18 -07:00
Shuzhen Wang
6d76d3b1f6 Camera: Add new hidden API for camera open/close callback
The hidden API is used by SystemUI process to adjust the system UI based
on when a certain camera is opened or closed.

Test: Manually observe callbacks in SystemUI when running camera CTS
Bug: 150540299
Change-Id: I04cae782d96f0e32be8ef588dcd328f84b32887a
2020-03-10 09:35:50 -07:00
TreeHugger Robot
a01570b72f Merge "Whitelist READ_PRIVILEGED_PHONE_STATE for the contacts provider" into rvc-dev 2020-03-07 00:58:35 +00:00
Keun young Park
1f57921b1d Add MONITOR_INPUT for kitchensink test app
Bug: 146062605
Test: bootup
Change-Id: Ic5139d587ec9ada26107fa38823a79a63a3d75f6
2020-03-06 11:58:24 -08:00
Fabian Kozynski
04e7bdef04 Add dialog for recommended controls
The dialog can only be requested if the package of the controls provider is
currently in the foreground.

This is accomplished by querying Activity Manager about the
UidImportance of that package. Added
android.permission.PACKAGE_USAGE_STATS to SystemUI for this.

Test: atest
Test: manual
Fixes: 149410221

Change-Id: Ifdf479d8dbc70502da95d362e3bfd60ad3c561fb
2020-03-06 12:55:35 -05:00
Tej Singh
0e4f868bb2 Merge "Make pull atom permission accessible to shell" into rvc-dev 2020-03-04 21:58:36 +00:00
Philip P. Moltmann
a3040ca8df Merge "Nicer share target for default print service" into rvc-dev 2020-03-04 17:52:35 +00:00
Philip P. Moltmann
26e1d17778 Nicer share target for default print service
This was suggested by the share sheet team and I checked that this
permission only narrowly adds the ability to present a nicer share
target.

The default print service cannot be renamed "print" as the name of the
app shows up on other print UI.

Bug: 150646365
Test: Checked permission after boot
Change-Id: I3aa5900605bda90ce0cb58a09fe08128bf4c9531
2020-03-03 16:02:32 -08:00
Tej Singh
924910db90 Make pull atom permission accessible to shell
Make REGISTER_STATS_PULL_ATOM permission available to Shell to allow
testing it in gts.

Is the minimally scoped permission that needs to be added?
Yes, it is the only permission to register pulled atoms.

What options did you explore that did not need this permission?
I explored expanding the permission to be development in addition to
privileged, and giving the permission to gmscore. However, this solution
was recommended to me by the GTS team. If there are better ways to enable
testing the API in GTS, I am open to feedback.

Test: atest GtsStatsdHostTestCases
Bug: 150329323
Change-Id: I103d937842beaa2d918181b1a952d27179411dcc
2020-03-03 23:36:08 +00:00
Hall Liu
81866d4149 Merge "Add PlatformCompat permissions to TelephonyProvider" into rvc-dev 2020-03-03 23:29:19 +00:00
Roshan Pius
75dbcfff98 Shell: Allow retrieval of wifi network credentials
This permission is needed for some wifi CTS tests.

Is the minimally scoped permission that needs to be added?
- Yes, this only allows the retireval of the saved wifi network
credentials on the device.

What options did you explore that did not need this permission?
- Possibly creating a UI to ask for manual entry of network credentials.
But, that would not let us do automated CTS tests (will need to become
CTS verifier tests then).

Bug: 150236894
Test: atest android.net.wifi.cts.WifiNetworkSpecifierTest
Change-Id: I6881003510191f667950be1ab27a5399fe3914b4
2020-03-03 09:26:27 -08:00
TreeHugger Robot
c0cc6a532a Merge "New priority scripts + critical updates to fonts." into rvc-dev 2020-03-03 05:07:59 +00:00
TreeHugger Robot
cada936a36 Merge "Update nintendo joystick layout" into rvc-dev 2020-03-03 02:30:54 +00:00
Hall Liu
106c0defca Add PlatformCompat permissions to TelephonyProvider
Add the required permissions for querying PlatformCompat to the
whitelist for TelephonyProvider.

This is the minimum scoped permission -- PlatformCompat only defines two
permissions for access (read and write) and we need both.

The alternative for using these permissions is to not call
PlatformCompat and enforce the new behavior on all apps. This was deemed
unacceptable by the app compat team because it was breaking some popular
apps.

Bug: 144631034
Test: atest TelephonyProviderHostTest

Change-Id: I43a0a66ae381caf8d9e21d0f14d471b20a4e44af
2020-03-02 13:04:01 -08:00
Paul Murphy
5dbabb62a6 Merge "Add COMPANION_APPROVE_WIFI_CONNECTIONS to shell permissions" into rvc-dev 2020-02-29 23:42:23 +00:00
Paul Murphy
1460b76a02 Add COMPANION_APPROVE_WIFI_CONNECTIONS to shell permissions
1. This is a minimally scoped permission (which allows the new WiFi API's
to silently connect to a wifi network).
2. I explored writing a GTS test instead of a CTS test, with the idea being that it would run inside the Android Auto user. Unfortunately the API under test requires two permissions, MANAGE_COMPANION_DEVICES and COMPANION_APPROVE_WIFI_CONNECTIONS. Android Auto will only have COMPANION_APPROVE_WIFI_CONNECTIONS, and if I elevate to Shell privileges the test will have MANAGE_COMPANION_DEVICES, but not COMPANION_APPROVE_WIFI_CONNECTIONS. Beyond this, I've been told that it's better for us to test this API in CTS than what it is under GTS.

The addition of the permission to androis.os.shell could theoretically allow it to connect to a WiFi network using the new WiFi APIs without the user being prompted. Android R will still allow the legacy WiFi API's which also allow wifi connections without users being prompted without this permission. Android Auto requires the new API's as they better handle cases of connecting to WiFi networks with no internet access. The old API's will not always result in fallback to LTE, whereas the new ones do that.

Test: Unit test in separate change.
Change-Id: Ifd8ae6b7e53307ea8973406fdefa468dfa679bda
Bug: b/147748710
2020-02-28 21:58:08 +00:00
Marek Z Jeziorek
0806acaf0c New priority scripts + critical updates to fonts.
Author: Marek Z. Jeziorek <marekj@google.com>

BUGANIZER BUGS Addressed
========================
BUG: 149257053

CHANGES
=======
Remove font files no longer required
 deleted:    other/NotoSansAdlam-Regular.ttf
 deleted:    other/NotoSansGeorgian-Bold.otf
 deleted:    other/NotoSansGeorgian-Medium.otf
 deleted:    other/NotoSansGeorgian-Regular.otf
 deleted:    other/NotoSansJavanese-Regular.ttf
 deleted:    other/NotoSansTifinagh-Regular.ttf
 deleted:    other/NotoSerifGeorgian-Bold.otf
 deleted:    other/NotoSerifGeorgian-Regular.otf

 modified:   fonts.mk
 modified:   other/Android.bp

Replacements for the above deleted files:
 new file:   other/NotoSansAdlam-VF.ttf
 new file:   other/NotoSansGeorgian-VF.ttf
 new file:   other/NotoSansJavanese-Regular.otf
 new file:   other/NotoSansTifinagh-Regular.otf
 new file:   other/NotoSerifGeorgian-VF.ttf

New additions to Android fonts (living/revival languages):
 new file:   other/NotoSansGunjalaGondi-Regular.otf
 new file:   other/NotoSansHanifiRohingya-Regular.otf
 new file:   other/NotoSansKhojki-Regular.otf
 new file:   other/NotoSansMasaramGondi-Regular.otf
 new file:   other/NotoSansWancho-Regular.otf
 new file:   other/NotoSansWarangCiti-Regular.otf

Test: ===================================================
Test: on Android (click on a link within a browser):
Test: Adlam https://en.wikipedia.org/wiki/Adlam_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_Extended
Test: Gunjala Gondi https://en.wikipedia.org/wiki/Gunjala_Gondi_(Unicode_block)
Test: Hanifi Rohingya https://en.wikipedia.org/wiki/Hanifi_Rohingya_(Unicode_block)
Test: Javanese https://en.wikipedia.org/wiki/Javanese_(Unicode_block)
Test: Khojki https://en.wikipedia.org/wiki/Khojki_(Unicode_block)
Test: Masaram Gondi https://en.wikipedia.org/wiki/Masaram_Gondi_(Unicode_block)
Test: Tifinagh https://en.wikipedia.org/wiki/Tifinagh_(Unicode_block)
Test: Wancho https://en.wikipedia.org/wiki/Wancho_(Unicode_block)
Test: Warang Citi https://en.wikipedia.org/wiki/Warang_Citi_(Unicode_block)
Test: ===================================================
Test: on Android (click on a link within a browser):
Test: udhr Adlam https://unicode.org/udhr/d/udhr_fuf_adlm.html
Test: udhr Georgian https://unicode.org/udhr/d/udhr_kat.html
Test: udhr Gunjala Gondi NA (Not Available)
Test: udhr Hanifi Rohingya NA (Not Available)
Test: udhr Javanese https://unicode.org/udhr/d/udhr_jav_java.html
Test: udhr Khojki NA (Not Available)
Test: udhr Masaram Gondi NA (Not Available)
Test: udhr Tifinagh https://unicode.org/udhr/d/udhr_tzm_tfng.html
Test: udhr Wancho NA (Not Available)
Test: udhr Warang Citi NA (Not Available)
Test: ===================================
Test: on Android (comparing two systems - before/after)
Test: Georgian: Systems settings menus compared side by side
Test: ===================================
Test: on Mac (comparing the existing Android fonts with the new font
Test: using diffenator - https://github.com/googlefonts/fontdiffenator)
Test: ===================================
Test: SansAdlam-VF: VALIDATED
Test: SansGeorgian-VF: VALIDATED
Test: SansGunjalaGondi: NEW (No Applicable)
Test: SansHanifiRohingya: NEW (No Applicable)
Test: SansJavanese: VALIDATED
Test: SansKhojki: NEW (No Applicable)
Test: SansMasaramGondi: NEW (No Applicable)
Test: SansTifinagh: VALIDATED
Test: SansWancho: NEW (No Applicable)
Test: SansWarangCiti: NEW (No Applicable)
Test: SerifGeorgian-VF: VALIDATED

Change-Id: I86d46f4b6404509a2e7792473a321f5538b9eb19
Signed-off-by: Marek Z Jeziorek <marekj@google.com>
(cherry picked from commit a28399dbaf)
2020-02-28 14:34:56 +00:00
Siarhei Vishniakou
76baf21e11 Update nintendo joystick layout
Now that we will have the correct hid-nintendo driver in the kernel, we
need to update the joystick layout to ensure correct operation.

This change requires the hid-nintendo patch from:
https://android-review.googlesource.com/c/kernel/common/+/1246269/

Test: verified via bluetooth and usb using controllerTester app
Test: atest NintendoSwitchProTest

Bug: 135136477
Change-Id: I8d5c660864a46e8fcd6967c7fffd42460f86e36f
2020-02-27 11:30:54 -08:00
Ivan Chiang
3cb1cbdcfd Add PlatformCompat feature for DocumentUI
- Whitelist PlatformCompat permissions for DocumentsUI
- Add documents-ui-compat-config into Android.bp

Bug: 141600225
Test: build and boot to home
Test: tools/tradefederation/core/tests/run_tradefed_tests.sh \
      --class com.google.android.asit.DeviceBootTestTest
Change-Id: Iedf73faf497a4ea055b33f68dc0b7097f306791d
2020-02-27 06:57:43 +00:00
Kelvin Kwan
f73b84160e Merge "Add MODIFY_QUIET_MODE for DocsUI" into rvc-dev 2020-02-26 20:30:53 +00:00
Michael Groover
58f20c408f Whitelist READ_PRIVILEGED_PHONE_STATE for the contacts provider
In Android 10 access to device identifiers was moved from a runtime
permission to the privileged READ_PRIVILEGED_PHONE_STATE permission.
One of the non-resettable identifiers missed was SubscriptionInfo#
getIccId. The contacts provider currently uses this ID to upgrade
to version 1003 of the database; to ensure there are no issues with
this upgrade this permission is being whitelisted for the contacts
provider.

Bug: 131909991
Test: atest ContactsProviderTests
Change-Id: I7574f787a7e55aa0337237b9fe916ee143a2f697
Merged-In: I7574f787a7e55aa0337237b9fe916ee143a2f697
(cherry picked from commit 7b484438ec)
2020-02-26 18:43:50 +00:00
TreeHugger Robot
6f01c62d29 Merge "Add key layouts for Xbox clones" into rvc-dev 2020-02-26 15:02:38 +00:00
Kelvin Kwan
2fc5d72f40 Add MODIFY_QUIET_MODE for DocsUI
Bug: 149642046
Test: manual
Change-Id: Ie65b4b86fad557f27e241ea848793ee52473e6df
2020-02-26 14:16:29 +00:00
Evan Rosky
55bddd83ea Generalize change transition into WindowContainer
Created a SurfaceFreezer class which lives in WindowContainer
and manages/will-manage per-container freezing (snapshots).
This replaces the one-off change transition code.

Change Transitions used to create its own temporary leash
on initialization and that leash would be replaced/cleaned-up
as soon as the animation leash was created.

Now, the SurfaceFreezer creates the animation leash immediately
and SurfaceAnimator can take a SurfaceFreezer instance when it
starts an animation. At this point it will take the leash that
was already created by the freezer and use that. This removes
the messy reparenting/cleanup.

To deal with this, though, leash callbacks into Animatable
needed an extra stage: onLeashAnimationStarting. This is called
when SurfaceAnimatior is actually starting to animate the leash.

Next, DC.mChangingApps was converted to list of WindowContainers
rather than ActivityRecords. Some of the existing change code was
cleaned up (ie. there was some visibility stuff that doesn't make
sense because changing apps are visible->visible) and some of the
Activity-specific functions were generalized. For now, there are
a couple things that use the top-activity for changing Tasks.

The result of this means that windowing-mode change transition can
now fully live at the Task level. This also should allow freezing
at any hierarchy level which enables app-freezes that don't freeze
the whole screen and potentially mixed seamless/snapshot-based
rotations.

Bug: 149490428
Test: existing tests pass. Manually open app in freeform and
      maximize/restore it.
Change-Id: Ib32524ebbbb084a98442d3d035897306a11ee6c2
(cherry picked from commit e55b9e0f9d)
2020-02-25 11:51:36 -08:00
Siarhei Vishniakou
09bd9d12b3 Add key layouts for Xbox clones
There are a lot of controllers that are essentially 'clones' of the xbox
controllers. They follow the same key layouts.

To support these clones, we add these layouts as a copy of the xbox
layout. They were generated using a small python script.

The layouts will be manually verified for now, on a select subset of
these controllers.

Test: these will be selectively verified manually
Test: we will add CTS for some of these in the future

Bug: 144469012
Bug: 136263708
Change-Id: Id453f103824a1ba2bf03a9309378dafde418e594
2020-02-25 10:54:28 -08:00
Andrii Kulian
02c0e4d2ac Handle config/display changes for WindowContext
Introduce IWindowToken to report config/display changes from
server side. When config change callback is received,
it will update the resources associated with the window token.

Test: WindowContextTests
Bug: 128338354
Bug: 146820733

Change-Id: I871bd78a21dbde1286786e65c340b6259b873660
2020-02-21 16:07:32 +08:00
Automerger Merge Worker
7e66d1c563 Merge "Merge "Key revocation check is permissive when device is unlocked" am: a9384cdc9b am: 3f638d9a3f" into qt-qpr1-dev-plus-aosp am: 5882228ab8
Change-Id: I39879ca88d139e51e71f2fa7050ff2ee5a67b96b
2020-02-19 23:13:15 +00:00
Yo Chiang
be20495f0b Key revocation check is permissive when device is unlocked
imageValidationThrowOrWarning() logs the error as a warning if device
bootloader is unlocked, else re-throw the error.
Device lock state is queried via PersistentDataBlockManager service.

Bug: 128892201
Test: adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
    -a android.os.image.action.START_INSTALL \
    --el KEY_USERDATA_SIZE 8192 \
    -d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip \
    --es ${IMAGE_KEY}
Test: Observe the logcat
Change-Id: I895e70d90624afda2bf7cd3b34ea8d21a1702163
2020-02-19 11:11:29 +00:00
Linus Tufvesson
ab72687615 Merge "Block TYPE_PRESENTATION windows on default display" 2020-02-17 17:03:26 +00:00
Abhijeet Kaur
0a04f04ea0 Merge "Whitelist PlatformCompat permissions for MediaProvider" 2020-02-17 14:18:48 +00:00
Linus Tufvesson
b386456680 Block TYPE_PRESENTATION windows on default display
... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

Bug: 141745510
Test: atest CtsWindowManagerDeviceTestCases:PresentationTest
Change-Id: I2aaab1903dee54190338f7b6e49888aa51437108
2020-02-17 13:37:25 +00:00