Commit Graph

1076 Commits

Author SHA1 Message Date
Antoan Angelov
61c8bb74e6 Merge "Add START_ACTIVITIES_FROM_BACKGROUND to ManagedProvisioning." into qt-dev 2019-05-02 14:59:58 +00:00
Nicholas Sauer
a067a1ca9a Merge "privapp configs for car related apps." into qt-dev 2019-05-02 14:00:46 +00:00
Tyler Gunn
425dac52b0 Change command like set-default-dialer to be a test override.
RoleManager likes to terminate apps when roles are changed which does
not work in CTS tests.  We need to use a temp override in Telecom
for now.

Test: Run the CTS tests over, and over and over again.
Bug: 131065482
Change-Id: Id36942f2813abdfa0020ce4805c492a69bd07d0e
(cherry picked from commit 509ef150f2)
2019-04-30 20:26:47 +00:00
arangelov
72e8f8e46c Add START_ACTIVITIES_FROM_BACKGROUND to ManagedProvisioning.
Fixes: 131240642
Fixes: 130371743
Test: Manual
Change-Id: I72a4ab31bc662af4e3580a2c1d50f550e6314f74
2019-04-30 12:56:41 +01:00
Nicholas Sauer
4037c7ee73 privapp configs for car related apps.
bug: 126582117
Test: lunch gcar_emu_x86-userdebug && m && emulator
Change-Id: Id1527857f11a3627f3215afa141feb3a73ef6c53
2019-04-29 07:54:02 -07:00
Lorenzo Colitti
eb970d77ab Add privapp permissions to network modules.
When built as part of the system, the network stack and the
captive portal login app should have the BYPASS_PRIVATE_DNS
and CONNECTIVITY_USE_RESTRICTED_NETWORKS permissions.
These are necessary to validate restricted networks, bypass VPNs,
bypass private DNS for captive portal login, etc. Add these
permissions to privapp-permissions-platform.xml.

When installed as mainline modules that cannot use signature
permissions, the modules get this ability by virtue of having the
MAINLINE_NETWORK_STACK permissions.

Additionally, add the CONNECTIVITY_USE_RESTRICTED_NETWORKS
permission to the captive portal login app manifest, which did
not contain it.

Bug: 129789428
Test: builds, boots
Test: dumpsys package shows permissions
Change-Id: I632359f7eff09fed71167733ac75824a5aa57894
Merged-In: I632359f7eff09fed71167733ac75824a5aa57894
(cherry picked from commit 109dbf9c05)
2019-04-25 03:58:51 +00:00
Jack Yu
974607aac8 Fixed that emergency alert dialog not popped up
Fixed by granting START_ACTIVITIES_FROM_BACKGROUND
to the cell broadcast receiver.

Test: Manual
Bug: 130384940

Change-Id: Ie563a8f11ac991ab9568f65df6a4d14eebe47c5e
2019-04-21 17:21:43 -07:00
Philip P. Moltmann
3d6c31a320 Always request coarse location with fine location
If an app can access the fine location it can obviously also access the
coarse location. There is code inside checkPermission that encapsulates
the logic.

This code fixes two issues:
- checkPermission might return for the coarse location even though the
  permission is not even mentioned in PackageInfo.requestedPermissions.
  Now the coarse location is always added to requstedPermissions when
  the fine location is in the manifest even if the app does not have
  the coarse location in the manifest
- If the app requests the fine location only we might unintentionally
  kill the requesting app.
  1. App does not have any permissions granted
  2. App request FINE_LOCATION
  3. Permission controller reads (and caches) permission state: FINE=revoked,
     COARSE=revoked
  4. User grants FINE_LOCATION -> Perm controller updates internal
     state: FINE=revoked, COARSE=revoke
  5. Perm controller applies FINE_LOCATION state to the system
  6. Perm controller looks as COARSE and checks if it is granted.
     Because it is implied, it now shows up as granted. Hence perm
     controller will try to revoke it which kills the app
  The solution is that it will be impossible to only request
  FINE_LOCATION by itself. This change will automatically add requesting
  COARSE_LOCATION, whenever FINE_LOCATION is requested

Fixes: 130358762
Test: Reproduced scenario in bug 130358762
Change-Id: I217c0b23063617f60b98c805af1d122a6ec0608e
2019-04-16 14:49:05 -07:00
Lucas Dupin
046282eabd Dark Theme QS tile
Creates Dark Theme tile and adds it to the default config,
under the fold.

Test: manually toggle tile
Fixes: 130253100
Change-Id: I2859d2eb20db1c6d9dd8e8e24979294316b905bb
2019-04-11 09:58:11 -07:00
Julia Reynolds
dc6adc6ca8 Adjust testapis/permissions for CTS tests
Test: cts
Bug: 127341023
Change-Id: Ice19dc337a06a3f20edca583ecbe5ef3148fd96d
2019-04-09 17:55:39 +00:00
TreeHugger Robot
1f616bc492 Merge "Move product only fonts out of AOSP." 2019-04-03 22:14:48 +00:00
Amin Shaikh
2b22df1e29 Move product only fonts out of AOSP.
Bug: 122975603
Test: make
Change-Id: Iee9cceebca1978631e22f9bd47032168de690c1a
2019-04-02 21:19:31 +00:00
Philip P. Moltmann
129a0b0c5e Remove dual storage permission model
- Also remove typed media permissions
- Leave typed media app-ops

Bug: 129716569
Test: Used apps, looked at permissions in the UI
Change-Id: If7714fb1a6955584157e1a60ab72b09e35287827
2019-04-01 16:30:11 -07:00
TreeHugger Robot
5595790416 Merge "Grant com.android.shell access to DynamicSystem" 2019-03-31 15:12:39 +00:00
Mark Chien
be40054bee Merge "[KA09] add keepalive offload permission to shell" 2019-03-29 04:20:39 +00:00
Hall Liu
d272ec184b Merge "Add shell permissions for CTS testing" 2019-03-29 00:04:54 +00:00
Hall Liu
9cf3e7ae68 Add shell permissions for CTS testing
Add NETWORK_SCAN to shell permissions to enable CTS testing of the
network scan changes

Bug: 126779616
Test: CTS
Change-Id: I1f75c9005620b3b0e06f066677cba6190f1d266c
2019-03-28 12:57:02 -07:00
Po-Chien Hsueh
e56f2f583d Grant com.android.shell access to DynamicSystem
Add permission INSTALL_DYNAMIC_SYSTEM to Shell's AndroidManifest.xml
and privapp-permissions-platform.xml.

Bug: 124637092
Test: adb shell am start-activity
Change-Id: Id7727a195f61c2fbffa0b2f52f3098784feeee52
2019-03-28 17:25:36 +08:00
Anton Hansson
aecff3d7c4 Merge "Move EmergencyInfo perm whitelist to /product" am: ae957afaa6 am: 300026a5e9
am: e6039fbffe

Change-Id: Id4df504d0c5a4622605b4803e8b3f2cb49003156
2019-03-26 06:22:22 -07:00
Anton Hansson
38cb100224 Move EmergencyInfo perm whitelist to /product
The app is moving to /product, to separate out its permission
grants to a separate file and move that file to /product as well.

Bug: 122353713
Test: boot aosp_arm64 emulator
Change-Id: Ic165aae180a002c3566e3c1b1495a1d50dfd0e4a
2019-03-25 20:13:54 +00:00
Anton Hansson
aaf15d2222 Grant PermissionController SUBSTITUTE_NOTIFICATION_APP_NAME
This app will pretend to be the Settings app when sending
location access notifications.

Bug: 128608303
Test: boot
Change-Id: I447510bbe323f3de40828a5cb4a37abe1c44c990
2019-03-25 16:13:26 +00:00
TreeHugger Robot
0369790fac Merge "Add Shell permission for CTS test." 2019-03-22 22:31:32 +00:00
TreeHugger Robot
c396d6738c Merge "API review followup: DynamicAndroidClient" 2019-03-22 17:21:39 +00:00
TreeHugger Robot
db053d1949 Merge "Revert "Checkbox for removing contributes files"" 2019-03-22 01:15:20 +00:00
wilsonshih
5db7b39dd8 Add Shell permission for CTS test.
Add Shell permission for new CTS tests to test the multi-display
functionality in WallpaperService/WallpaperManagerService.

Bug: 123707989
Test: atest WallpaperManagerMultiDisplayTests
Test: atest ActivityManagerMultiDisplayTests

Change-Id: Id97db050a0b9d1940c2dfaa793fbe526df578105
2019-03-22 09:13:10 +08:00
TreeHugger Robot
38076cdc88 Merge "Add system API for whether emergency assistance is enabled." 2019-03-21 23:03:33 +00:00
Zimuzo Ezeozue
91ea7af912 Merge "Add CONTROL_KEYGUARD_SECURE_NOTIFICATIONS to shell app" 2019-03-21 16:03:05 +00:00
markchien
5e430e5a39 [KA09] add keepalive offload permission to shell
This change adds PACKET_KEEPALIVE_OFFLOAD to shell, which allows
shell or code with shell permission identity to use privileged
tcp keepalive offload API.

Bug: 114151147
Test: -atest ConnectivityManagerTest#testCreateTcpKeepalive
      -build, flash, boot

Change-Id: Ib6660a5eaa72f83042596481452be4d415383f02
2019-03-21 19:56:42 +08:00
Po-Chien Hsueh
4e908c24ca API review followup: DynamicAndroidClient
Some API changes per API reivew:
- Move DynamicAndroidClient and ~Manager to android.os.image.
- Rename them to DynamicSystemClient and ~Manager.
- Rename permission MANAGE_DYNAMIC_ANDROID to MANAGE_DYNAMIC_SYSTEM
- Corresponding changes in the installation service.
- Corresponding changes in privapp-permissions-platform.xml.
- Add missing annotations.
- Change setOnStatusChangedListener's parameters order.
- Improve documentations.
- Re-generate api/system-current.txt.

Bug: 126613281
Test: adb shell am
Change-Id: Ia920e9ccf6de1dbbd38c52910cb72cb81b9b5b32
2019-03-21 17:25:59 +08:00
Evan Severson
95358d8b7b Revert "Checkbox for removing contributes files"
This reverts commit 38ea50c63e.

Revert and clean up merge conflicts. The checkbox which asks
to remove app data is still here

Fixes:112002130
Test: Build and check that the correct box is gone
      atest CtsPackageUninstallTestCases

Change-Id: I47d8632d2fca360c02151ad54a4b927a5c2801f1
2019-03-20 17:42:57 -07:00
Hai Zhang
953a8032a8 Add system API for whether emergency assistance is enabled.
This is needed in the emergency role.

Bug: 124452117
Test: build
Change-Id: I277ad208dfa07d42f3e2daee658d30ef831d4b9b
2019-03-20 14:38:13 -07:00
Zimuzo
901c70d18c Add CONTROL_KEYGUARD_SECURE_NOTIFICATIONS to shell app
Shell app needs the permission when we run KeyguardManager CTS for
allowing private notifications as a privileged app.

Bug: 127351183
Test: m -j
Change-Id: I199bac8c8fed9ff0fc63b8c62f8002a6b273b28f
2019-03-19 22:19:56 +00:00
Philip P. Moltmann
c94ba820fb Implement dual-permission model for storage.
- Pre-Q apps use the legacy READ/WRITE_EXTERNAL_STORAGE permissions
- Post-Q apps use the READ_MEDIA_* permissions
- Grandfathered Q apps have all storage permission granted fixed. In the
  UI they show only the legacy storage permissions
- The OP_LEGACY_STORAGE controls whether an app is grandfathered

Data providers should check both old and new permission model as
permissions that are not used are set as granted.

Test: atest CtsPermissionTestCases:android.permission.cts.DualStoragePermissionModelTest
Fixes: 126785920
Change-Id: I668530e62125d95f122a94ae39f17007391bcaa5
2019-03-15 16:48:18 -07:00
Julia Reynolds
d0ceefa989 API changes for NAS
- make NAS @SystemApi and guard with permission
- Add missing Nullable/NonNull annotations

Fixes: 126699678
Fixes: 127146476
Test: make, gts
Change-Id: Ie024983f7c440d5b4d3065af031b27958395f2f1
2019-03-06 09:40:36 -05:00
jackqdyulei
8c360174f5 Update MediaSessions to add some methods
Also move drawable to settingslib

Bug: 126199571
Test: Build
Change-Id: I20d06c179b7cd67ef97cde1d04e26a120ffdd4ae
2019-02-27 13:24:37 -08:00
Remi NGUYEN VAN
2e35424ad2 Merge "Rename NetworkStack package" am: e4a40c77e1 am: 69728afbc7
am: 8f46e05096

Change-Id: I9d5b907c3bcd9b15899307927b8518a9f60eceba
2019-02-17 17:34:12 -08:00
Remi NGUYEN VAN
e4a40c77e1 Merge "Rename NetworkStack package" 2019-02-18 01:07:51 +00:00
TreeHugger Robot
2a10cb0c3e Merge "Add DynamicAndroidInstallationService" 2019-02-13 16:44:55 +00:00
Remi NGUYEN VAN
2134893486 Merge "Remove INTERACT_ACROSS_USERS_FULL for NetworkStack" am: 749dfc3083 am: 082034a6dd
am: 67e46255ea

Change-Id: I57248b9294e239d031dcf36cf75e94bf58919701
2019-02-11 21:20:07 -08:00
Remi NGUYEN VAN
749dfc3083 Merge "Remove INTERACT_ACROSS_USERS_FULL for NetworkStack" 2019-02-12 04:47:43 +00:00
Sergii Piatakov
b7c41e9afd Merge "Grant Shell ability to clear instant app" am: f5a0e41e18 am: 7282c21b57
am: 57ee0ed8d2

Change-Id: I8a6d3b87d3bf0711fcd70f9965164b46a789b9fb
2019-02-11 20:35:33 -08:00
Treehugger Robot
f5a0e41e18 Merge "Grant Shell ability to clear instant app" 2019-02-12 03:42:40 +00:00
Remi NGUYEN VAN
8c0d94608c Rename NetworkStack package
Set the new name to com.android.networkstack. Also rename the stub APK
to com.android.networkstack.permissionstub.

Also add shared UID to the NetworkStackPermissionStub to enforce
signature restrictions on the UID.

Test: booted, WiFi working
Bug: 124033493
Change-Id: Id8967db08b7faaa659b20f86f1013493eb0e188f
2019-02-08 15:32:21 +09:00
Malcolm Chen
b8f1b10871 Adding READ_PRECISE_CALL_STATE permission in phone app.
This is needed if internal component wants to listen to
precise call state change.

Bug: 117980553
Test: unittest
Change-Id: Id5a60519cbf1d724f939fc10b1f03cccfe5c1b5c
Merged-In: Id5a60519cbf1d724f939fc10b1f03cccfe5c1b5c
2019-02-07 17:37:36 -08:00
Anton Hansson
b71394a63d Merge "Remove privapp permission grant for dmservice" 2019-02-07 08:07:28 +00:00
Remi NGUYEN VAN
f871bfb8c7 Remove INTERACT_ACROSS_USERS_FULL for NetworkStack
Replace with INTERACT_ACROSS_USERS, which is needed to send the
ACTION_NETWORK_CONDITIONS_MEASURED broadcast.

Also cleanup some non-privileged permissions that were added to the
priv-app file.

Test: built, booted, broadcast and captive portal login work
Bug: 123846255
Change-Id: I3c97c166e80c19bf57fa047709c8b91fca75d635
2019-02-07 02:39:57 +00:00
Anton Hansson
6db0deae3f Remove privapp permission grant for dmservice
Not part of the platform.

Test: boot blueline
Change-Id: I7778d32d6f07aa4e8bddd20e1ea4f35b1f0a8ef3
2019-02-05 16:27:39 +00:00
Varun Shah
913a014f5f Merge "Add OBSERVE_APP_USAGE permission to shell for CTS test." 2019-02-05 15:21:25 +00:00
Anton Hansson
8c31ae712e Merge "Separate privapp grant for dialer" am: 5d7fc9568e am: ce448e631b
am: a0a2d9a09a

Change-Id: I84a41eeb16cab36cec91d7d6a53695fcadc984ee
2019-02-04 21:52:05 -08:00
Nadia Benbernou
af41d5f7bd Merge "Make sure notifications from the default sms app do not get filtered to the non-interruptive section." 2019-02-04 17:25:31 +00:00