Commit Graph

862 Commits

Author SHA1 Message Date
Nate Myren
1a8d1110c0 Merge "Permission flag updates now notify listeners" 2019-07-10 16:03:07 +00:00
Bill Yi
abc48bceb2 Import translations. DO NOT MERGE
Change-Id: Ia76b70e9b62254d77734da1f3ecf400f0867fc46
Auto-generated-cl: translation import
2019-06-29 17:02:40 -07:00
Nate Myren
d3a6385686 Permission flag updates now notify listeners
Added a version of the onPermissionUpdated and
onInstallPermissionUpdated methods which will notify
OnPermissionChangedListeners, and added this to the
PermissionManagerService "updatePermissionFlags" and
"updatePermissionFlagsForAllApps" methods. Also adds
OnPermissionsChangedListener to @TestApi

Fixes: 135937566
Test: atest PermissionUpdateListenerTest
Change-Id: I906598c366234c3daaa202261678bca04837cb13
2019-06-28 16:56:26 +00:00
Abhijeet Kaur
0a295724f2 Merge "Add dark theme for Shell app." into qt-dev am: 190e99cf3a am: 1cceacc469
am: 2c90394b5d

Change-Id: I8c913dfa6823f9c9cfee1a68a3f61000e5594b57
2019-05-29 07:27:37 -07:00
Abhijeet Kaur
1cceacc469 Merge "Add dark theme for Shell app." into qt-dev
am: 190e99cf3a

Change-Id: I5e0d09befb3d1d45176a8826b4710f001e6fdce3
2019-05-29 07:17:36 -07:00
TreeHugger Robot
190e99cf3a Merge "Add dark theme for Shell app." into qt-dev 2019-05-29 14:03:55 +00:00
Nate Myren
1a4e0bc457 Merge "set RuntimePermissionPresentationInfo, getAppPermissions, and OnGetAppPermissions as Test Api, added Get Runtime Permissions to shell" into qt-dev am: 1ce9983162 am: 40bcb1d3cd
am: 364c09f390

Change-Id: I26127032cd6185632d33e779e33cb7976b9ee2c1
2019-05-28 09:59:45 -07:00
Abhijeet Kaur
2ae76e468b Merge "Migrate Shell app to use the new bugreport API." 2019-05-28 16:56:32 +00:00
Nate Myren
40bcb1d3cd Merge "set RuntimePermissionPresentationInfo, getAppPermissions, and OnGetAppPermissions as Test Api, added Get Runtime Permissions to shell" into qt-dev
am: 1ce9983162

Change-Id: I572a474338a50d5242d7a5fc89c10549764d42c6
2019-05-28 09:38:37 -07:00
TreeHugger Robot
1ce9983162 Merge "set RuntimePermissionPresentationInfo, getAppPermissions, and OnGetAppPermissions as Test Api, added Get Runtime Permissions to shell" into qt-dev 2019-05-28 16:33:05 +00:00
Nate Myren
17f2159181 set RuntimePermissionPresentationInfo, getAppPermissions, and OnGetAppPermissions as Test Api, added Get Runtime Permissions to shell
Test: Run PermissionControllerTest
Fixes: 129200595

Change-Id: I44cf152e52895d9344b39b978b85ac263a5cb37c
2019-05-28 16:15:16 +00:00
Abhijeet Kaur
767c8bb96a Migrate Shell app to use the new bugreport API.
Add new calls to bugreport API, all the while keeping the previous code
and logic untouched.

Added feature flag in Settings which if untouched, runs the old dumpstate workflow
by default. To test the new workflow turn on the feature flag from UI or
`adb shell setprop settings_call_bugreport_api true`.

Add permission TRIGGER_SHELL_BUGREPORT so that not all can send
broadcasts to trigger bugreports.

Create new receiver BugreportRequestedReceiver for the new broadcast intent that the shell app will
use.

Whitelist Shell app to use the bugreport API.

Bug: 123617758

Test: manually built and flash to device. Turn on the feature flag, generate bugreports and check
the onProgress and onFinish notifications.
Test: Turn off the feature flag test old workflow.

Change-Id: I1c7c258a48815a0386d7d4771301cd76f9cae3d0
2019-05-28 14:31:57 +01:00
Bill Yi
143fd9556a Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Ia1f336348c266cd252479b58fe06cc4a51100cda
2019-05-24 23:00:13 -07:00
Abhijeet Kaur
8549ccf69b Add dark theme for Shell app.
Bugreport info dialog is used in the BugreportProgressService; services
are not themeable from the manifest file. Added themed context wrapper
in the service file.

Text view underlines are no longer black, and are white in color.

Bug: 128364209
Test: build and flash to device, manually verified the color of the dialog
Change-Id: Ia42c1c7c2b6f2e30d91a5522f1d6b3507b032cdb
2019-05-24 14:28:56 +00:00
Varun Shah
2f9ec7aacf Merge "Merge "Add INTERACT_ACROSS_PROFILES permission to shell for CTS test." into qt-dev am: b92f0771dc am: 5e18bffeb3" into qt-r1-dev-plus-aosp
am: 8cc03f58e0

Change-Id: Ifb8cdd290bfe8b7a7ef5ed3a5eb90db79d98e9fa
2019-05-22 06:08:40 -07:00
Varun Shah
5e18bffeb3 Merge "Add INTERACT_ACROSS_PROFILES permission to shell for CTS test." into qt-dev
am: b92f0771dc

Change-Id: Iedf4a341c219b963a83df85bc6a4dcd9d450f1d2
2019-05-21 21:56:12 -07:00
Zimuzo Ezeozue
5f499f54e9 Merge "Add ExplicitHealthCheckServiceImplTest" into qt-dev am: ab9c69fda4 am: 6986220caa
am: e03326cc70

Change-Id: Ibe20de711dca5afc2068a9ac68572bc6e107db5f
2019-05-20 22:32:17 -07:00
Varun Shah
a248265d93 Add INTERACT_ACROSS_PROFILES permission to shell for CTS test.
Bug: 127804311
Test: atest CrossProfileAppsHostSideTest#testStartActivity
Change-Id: I1deb66409fae1ec654555adb8d4a61d670689d2a
2019-05-20 20:56:59 -07:00
Zimuzo Ezeozue
e03326cc70 Merge "Add ExplicitHealthCheckServiceImplTest" into qt-dev am: ab9c69fda4
am: 6986220caa

Change-Id: I6a98815f3bcebb0a7986cfed8e9520d8ed17cd20
2019-05-20 17:17:58 -07:00
Zimuzo Ezeozue
b1b7422068 Merge "Add ExplicitHealthCheckServiceImplTest" into qt-dev
am: ab9c69fda4

Change-Id: Ibecb66d0d1f707d98ae117dd3baad278a0163d0b
2019-05-20 15:27:01 -07:00
Zimuzo Ezeozue
ab9c69fda4 Merge "Add ExplicitHealthCheckServiceImplTest" into qt-dev 2019-05-20 20:16:22 +00:00
Zimuzo
0d70a6ac49 Add ExplicitHealthCheckServiceImplTest
Test: atest
android.ext.services.watchdog.ExplicitHealthCheckServiceImplTest
Bug: 132640467

Change-Id: I2d1820a38adce238a157e925512898c184dadec0
2019-05-19 19:39:29 +01:00
Jeff Sharkey
5f939fc96c Merge "Aggresive performance optimizations." into qt-dev am: 433b7fc88b am: dda03c678d
am: eaa0626d20

Change-Id: I414a81701aaea44c4faf5cef89015bba9f08a32b
2019-05-18 03:40:36 -07:00
Jeff Sharkey
eaa0626d20 Merge "Aggresive performance optimizations." into qt-dev am: 433b7fc88b
am: dda03c678d

Change-Id: Ibce662c5c2e543476e518c4633af158db4913873
2019-05-17 23:27:48 -07:00
Jeff Sharkey
b270eabe36 Merge "Aggresive performance optimizations." into qt-dev
am: 433b7fc88b

Change-Id: Iae7e2135360590f7246aea640fadd95ff0cad4c4
2019-05-17 23:12:40 -07:00
Jeff Sharkey
b66f4f4bad Aggresive performance optimizations.
Now that we have LocalCallingIdentity, we can start caching it in
very narrow cases.  We must be careful to not cache too long, since
any changes to granted permissions for the UID mean we need to
re-evaluate any cached answers.

The best middle-ground for this in the Q release is to use an active
camera session as a proxy for when we should create a cache object
and then later invalidate it.  (It's very unlikely that a user
changes permissions while actively using the camera, and this is
a strong signal that the caller is sensitive to performance.)

Many other sprinkled optimizations to avoid extra binder calls into
the OS, such as aggressively caching VolumeInfo related details.

Track IDs that are owned by each LocalCallingIdentity, to speed up
all future security checks.

Dispatch all change notifications asynchronously, and delay them by
several seconds while the camera is being actively used, to give
more important foreground work a fighting chance.  Invalidate
thumbnails asynchronously.

Optimizations to ModernMediaScanner where it's safe to skip the
"reconcile" and "clean" steps when we're focused on a single file
that we successfully scanned.

Local tests show this CL improves performance of a test app that
takes 100 rapid shots by 45%.  (All the collective optimizations
done so far this week add up to a 70% improvement.)

Bug: 130758409
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial manifest change
Change-Id: I38cc826af47d41219ef44eae6fbd293caa0c01d5
2019-05-18 05:48:21 +00:00
Bill Yi
775c515798 Merge "Import translations. DO NOT MERGE" 2019-05-12 23:12:08 +00:00
Bill Yi
ae7813e091 Import translations. DO NOT MERGE
Change-Id: Ifb20685493044135d5a8697c7830eb51733b07c4
Auto-generated-cl: translation import
2019-05-11 14:06:24 -07:00
Evan Laird
84714827b7 Merge "Grant STATUS_BAR permission to com.android.shell" into qt-dev am: 36e3f91918
am: 79e5e41853

Change-Id: I9102b190086081dc1951a39c4fb36e8198de4ee2
2019-05-11 01:26:49 -07:00
Evan Laird
79e5e41853 Merge "Grant STATUS_BAR permission to com.android.shell" into qt-dev
am: 36e3f91918

Change-Id: I48c58cb96499b3dbf9ea2811184b9b1ce2d12555
2019-05-10 18:58:43 -07:00
TreeHugger Robot
36e3f91918 Merge "Grant STATUS_BAR permission to com.android.shell" into qt-dev 2019-05-11 00:46:36 +00:00
Bill Yi
60ab87f395 Import translations. DO NOT MERGE
Change-Id: I4a2105e7fd1b8754ea3284d373ad78498bc82bd6
Auto-generated-cl: translation import
2019-05-09 05:25:26 -07:00
Bill Yi
a6865863b2 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I3b830d4343ec1aa35e4b5174ad3b0f1e81261f8c
2019-05-04 08:39:32 -07:00
Sasha Smundak
a63c2dbc7c Merge "Convert packages/Shell/**/Android.mk file to Android.bp" am: 355f9f77a9 am: 3d94f0ea5b
am: 7d539ad6f3

Change-Id: I653adf6eb05842fc1484d5af3afb7b6076ef09ea
2019-05-03 12:54:58 -07:00
Sasha Smundak
7d539ad6f3 Merge "Convert packages/Shell/**/Android.mk file to Android.bp" am: 355f9f77a9
am: 3d94f0ea5b

Change-Id: Iae73f1affbb285c1a2f978340a2a17ba17607265
2019-05-03 09:31:09 -07:00
Sasha Smundak
3d94f0ea5b Merge "Convert packages/Shell/**/Android.mk file to Android.bp"
am: 355f9f77a9

Change-Id: I7c869c798b4836485daee9113b83100fc36ee862
2019-05-03 09:20:52 -07:00
Sasha Smundak
995887eafb Convert packages/Shell/**/Android.mk file to Android.bp
See build/soong/README.md for more information.

Bug: 122332340
Test: atest ShellTests
(same errors as baseline)
Change-Id: I63b777342359e0b42ccd554b7d056c7431178380
2019-05-02 21:35:45 -07:00
Bill Yi
0862e69651 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I4a4bfa1d6db234699c00ce167efa16ab297da941
2019-04-25 09:49:28 -07:00
Bill Yi
044c92ac81 Import translations. DO NOT MERGE
Change-Id: I739f6260be0757490212c9a605545d763eb60a44
Auto-generated-cl: translation import
2019-04-20 02:11:09 -07:00
Evan Laird
deb46f3c36 Grant STATUS_BAR permission to com.android.shell
Allows for testing APIs protected by this permission from CTS tests

Test:  adb shell dumpsys package com.android.shell | grep "\bSTATUS_BAR:
granted=true" # should find the permission
Bug: 130178313

Change-Id: Ida0950664b98217d9c0801c0f19436c754ee6744
2019-04-19 16:23:40 +00:00
Bill Yi
2524f8f796 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I88f2588ab4330239de3174b349f9b08f97b3cfce
2019-04-17 14:02:09 -07:00
Bill Yi
16adee0dec Import translations. DO NOT MERGE
Change-Id: I219d0c8ab1cf805a0f32e64b53dee3a94abfa68a
Auto-generated-cl: translation import
2019-04-12 21:17:01 -07:00
Narayan Kamath
55a06bb5d1 Merge "Shell: Grant CACHE_CONTENT to Shell"
am: dd2e005d2f

Change-Id: I5a409357fa9a4acd2cc7cbdf707b7388557e8643
2019-04-10 01:20:37 -07:00
Julia Reynolds
11166399b8 Merge "Adjust testapis/permissions for CTS tests" into qt-dev am: a2c50b1da8
am: a36ab826fb

Change-Id: I93495e9871675d0f2eb8f432c5041a68ca20d20f
2019-04-09 23:30:04 -07:00
Narayan Kamath
f207dc666f Shell: Grant CACHE_CONTENT to Shell
Required to test ContentResover#[get|put]Cache

Bug: 127711435
Test: atest CtsContentTestCases

(cherry picked from commit a31ed1bbdd)

Merged-In: I5eb72772a0a35897611dd6db95c68a2d2e971e9a
Change-Id: I91a91a2969db175d88e9f41938869bc751f7b108
2019-04-09 18:58:02 +01: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
Narayan Kamath
fae14dd3cd Merge "Shell: Grant CACHE_CONTENT to Shell" into qt-dev am: 94feed6c55
am: b697fb32a3

Change-Id: I392673af2b2884b06515eaf3fa6e219183bff418
2019-04-09 08:50:25 -07:00
Narayan Kamath
a31ed1bbdd Shell: Grant CACHE_CONTENT to Shell
Required to test ContentResover#[get|put]Cache

Bug: 127711435
Test: atest CtsContentTestCases
Change-Id: I5eb72772a0a35897611dd6db95c68a2d2e971e9a
2019-04-09 09:50:53 +01:00
Svetoslav Ganov
58819a079a Merge "Restricted permission mechanism - framework" into qt-dev am: 9dfc48d06e
am: 3d47c34546

Change-Id: I6dfcef6fa71e8d7dd0b2710bd565ddde3e601753
2019-04-08 08:34:57 -07:00
Svet Ganov
d8eb8b2690 Restricted permission mechanism - framework
This change adds a mechanism for restricting permissions (only runtime
for now), so that an app cannot hold the permission if it is not white
listed. The whitelisting can happen at install or at any later point.

There are three whitelists: system: OS managed with default grants
and role holders being on it; upgrade: only OS puts on this list
apps when upgrading from a pre to post restriction permission database
version and OS and installer on record can remove; installer: only
the installer on record can add and remove (and the system of course).

Added a permission policy service that sits on top of permissions
and app ops and is responsible to sync between permissions and app
ops when there is an interdependecy in any direction.

Added versioning to the runtime permissions database to allow operations
that need to be done once on upgrade such as adding all permissions held
by apps pre upgrade to the upgrade whitelist if the new permisison version
inctroduces a new restricted permission. The upgrade logic is in the
permission controller and we will eventually put the default grants there.

NOTE: This change is reacting to a VP feedback for how we would handle
SMS/CallLog restriction as we pivoted from role based approach to roles
for things the user would understand plus whitelist for everything else.
This would also help us roll out softly the storage permisison as there
is too much churm coming from developer feedback.

Exempt-From-Owner-Approval: trivial change due to APi adjustment

Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Test: atest CtsPermissionTestCases
Test: atest CtsPermission2TestCases
Test: atest RoleManagerTestCases

bug:124769181

Change-Id: Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd
2019-04-07 22:39:54 -07:00