Commit Graph

12692 Commits

Author SHA1 Message Date
Jason Monk
632def142d Switch SliceManager IContentProvider to ContentProviderClient
Also fix up some docs.

Test: cts + unit tests
Change-Id: I25ebbcb3fd2cef223a2cd43fba57c06a183e1d31
2018-02-02 10:33:23 -05:00
Jason Monk
b715b04763 Add backup/restore for slices access
Test: various "adb shell bmgr" commands to verify behavior
Change-Id: Ic4439e0e17516462acdb8d28fe49095209a2ed6f
Fixes: 68751119
2018-02-02 10:33:19 -05:00
Jeff Sharkey
044111b8b3 Merge "Move more folks to FileUtils.copy()." 2018-02-02 03:14:39 +00:00
TreeHugger Robot
0c8a7247c8 Merge "Switch order of onSaveInstanceState and onStop" 2018-02-01 23:26:21 +00:00
Jeff Sharkey
45c97df89d Move more folks to FileUtils.copy().
Also extend API to accept a "count" argument of exactly how many
bytes to copy, and return the actual number of copied bytes.

Improve docs.

Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978
Change-Id: I8d255e4f97462838c02a8ecb6d2d221188c4eff0
2018-02-01 16:01:55 -07:00
TreeHugger Robot
ab4332d616 Merge changes I855f5315,I9ac7e13e,I003837a9
* changes:
  WSA: More dead code.
  Restore pinned stack shadows.
  Nuke WSA#mClipRect/mHasClipRect
2018-02-01 04:03:36 +00:00
TreeHugger Robot
daaa009003 Merge changes I4a907600,If3205033
* changes:
  Marking used instant apps fields as System API
  Revert "Revert "Removes EphemrealResolverService and related""
2018-02-01 02:27:32 +00:00
TreeHugger Robot
3a2e3b03dc Merge "Revert "Revert "Adds generic intent Instant App resolution""" 2018-01-31 22:38:48 +00:00
Patrick Baumann
577d402d0d Revert "Revert "Adds generic intent Instant App resolution""
This reverts commit 860b8ba719.

The original change that was reverted contained a bug that allowed an
http view/browsable intent used to query for browsers to be considered
as a candidate for instant apps. This was resulting in an attempt to
bind to the instant app resolver while holding a lock on mPackages.

This change ensures that PMS doesn't bind while checking for the browser
status of a package in both the instant app filtering code and by adding
the FLAG_IGNORE_EPHEMERAL to the canonical browser intent.

Reason for revert: Applying fix

Change-Id: I4896b3a15416a11fdc3f6c191e552c4ce8963623
Fixes: 63117034
Fixes: 71916178
Test: Manual using test app at google_experimental/users/patb/InstantAppsInP
Test: atest android.appsecurity.cts.EphemeralTest passes after modification
2018-01-31 14:00:18 -08:00
Patrick Baumann
43c97a0e90 Revert "Revert "Removes EphemrealResolverService and related""
This reverts commit 1e0c91968e.

Reason for revert: Original issue fixed

Fixes: 38137176
Fixes: 38121489
Test: manual; builds and instant apps launch
Change-Id: If320503381b21580ac1b127c49f754b39ffcc93b
2018-01-31 14:00:18 -08:00
Robert Carr
32bcb10e33 Restore pinned stack shadows.
We use the approach of outsetting the stack bounds and then
insetting windows which don't have surfaceInsets by said outsets.

Test: Manual. go/wm-smoke
Bug: 72657549
Change-Id: I9ac7e13ec696f88f02794175d0d44ac870f91d33
2018-01-31 12:39:46 -08:00
David Brazdil
059054ff3f Merge "Show hidden API warning once per process" am: 880839d2d1 am: 169a159207
am: 5379c4fe3a

Change-Id: Iebf487a69de640fdcd181bc2bb8e8f8dbe826b8c
2018-01-31 19:53:52 +00:00
David Brazdil
5379c4fe3a Merge "Show hidden API warning once per process" am: 880839d2d1
am: 169a159207

Change-Id: I11b174f82b8a71884de6b384f9478d125ce45ab4
2018-01-31 19:45:39 +00:00
TreeHugger Robot
7f03076ba5 Merge "Add API to only map to slice uri and not bind" 2018-01-31 19:42:35 +00:00
David Brazdil
169a159207 Merge "Show hidden API warning once per process"
am: 880839d2d1

Change-Id: I2da706085d0ee0cb047b6b5c516c8a91487b77eb
2018-01-31 19:39:30 +00:00
TreeHugger Robot
397c38d017 Merge "Revert "Adds generic intent Instant App resolution"" 2018-01-31 09:57:26 +00:00
TreeHugger Robot
4b4539b6b0 Merge "Revert "Removes EphemrealResolverService and related"" 2018-01-31 09:57:17 +00:00
David Brazdil
d960cc4a51 Show hidden API warning once per process
In order to not spam users with warning toasts, add a boolean flag
that guards the displaying of a warning message about hidden API
usage and is set after the first time a message is shown.

Bug: 64382372
Test: manual
Change-Id: If7ea995ddf4727a15eccf55dad42ef7775b1fc91
2018-01-31 08:03:29 +00:00
Patrick Baumann
1e0c91968e Revert "Removes EphemrealResolverService and related"
This reverts commit 5564f880db.

Reason for revert: Resolve merge conflict for another revert (ag/3537193)
Bug: 72710855
Change-Id: Id7c3a3993a45c588ee4668d7486d67d764541b1e
2018-01-31 03:00:26 +00:00
TreeHugger Robot
3a247b19dd Merge "Removes EphemrealResolverService and related" 2018-01-31 02:05:32 +00:00
Patrick Baumann
860b8ba719 Revert "Adds generic intent Instant App resolution"
This reverts commit 3e8bd0f3b5.

Reason for revert: b/72710855

Change-Id: I1378ccb5c5c16256e472e1ff7c3ad2460e091300
Fixes: 72710855
2018-01-31 01:35:13 +00:00
Andrii Kulian
391161f110 Switch order of onSaveInstanceState and onStop
This CL switches order of onSaveInstanceState and onStop
callbacks for app that target P+. Now activity state will
be saved after onStop.

Bug: 68763258
Test: Manual
Change-Id: If0410cbfe7920bfff9e3b9fd8879646c5622cb33
2018-01-30 16:59:14 -08:00
Andrii Kulian
7db9d22139 Merge "Always execute onStop and onSaveInstanceState together" 2018-01-31 00:46:21 +00:00
Alex Chau
87ea3c3de3 Merge "API Review: Return status code for user management APIs" 2018-01-30 23:30:52 +00:00
Patrick Baumann
5564f880db Removes EphemrealResolverService and related
This change removes deprecated classes and constants that were not
renamed from ephemeral to instant prior to O. There were no
consumers of these APIs as correctly named alternatives existed and were
referenced in docs. No known consumers of these APIs exist on user
builds.

Fixes: 38137176
Fixes: 38121489
Test: manual; builds and instant apps launch
Change-Id: I982f8a6edc5668dd42cea65e52a1433ec8d6f8ef
2018-01-30 22:48:03 +00:00
TreeHugger Robot
d937d4b80c Merge "Update slice constants for range/input range." 2018-01-30 22:21:21 +00:00
Jason Monk
7b8fef2573 Add API to only map to slice uri and not bind
Test: cts
Bug: 68751119
Change-Id: Ideef3089f21f9dbffacf50a3e0ff139b214062ca
2018-01-30 16:23:07 -05:00
Tyler Gunn
83a6df5b07 Merge "Add handover permission, fill in some missing API gaps." am: 1dfa830bb0
am: ed4dd9fbc6

Change-Id: I2f04ac80df28e45d1bb9f8e55b45317752d61bd6
2018-01-30 19:43:52 +00:00
Tyler Gunn
ed4dd9fbc6 Merge "Add handover permission, fill in some missing API gaps."
am: 1dfa830bb0

Change-Id: Ie07c7031c1411b59bbcd250be9517eda51b58310
2018-01-30 19:32:32 +00:00
TreeHugger Robot
7f8fddc310 Merge "Fix slice listener permissions" 2018-01-30 19:19:27 +00:00
Treehugger Robot
1dfa830bb0 Merge "Add handover permission, fill in some missing API gaps." 2018-01-30 18:33:27 +00:00
Alex Chau
596c2880b3 API Review: Return status code for user management APIs
- Replaced boolean return value with error code

Bug: 71866621
Test: com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_StartInBackground
Test: com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_StartInBackground_MaxRunningUsers
Test: com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_CannotStopCurrentUser
Test: com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_StopUser
Test: com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser
Test: com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest#testCannotStartManagedProfileInBackground
Test: com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest#testCannotStopManagedProfile
Test: com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest#testCannotLogoutManagedProfile
Change-Id: Iddc3e33c91c3f9584d53e537dbab3f61b8772fb1
2018-01-30 17:34:07 +00:00
TreeHugger Robot
1b24054faf Merge "Fixed Activity.dump() to lazy load AutofillManager if needed." 2018-01-30 16:56:16 +00:00
Amin Shaikh
60593c2444 Update slice constants for range/input range.
Test: make
Bug: 68378584
Change-Id: Ie731edd779f60d0555ea3a573f465f4f3910a054
2018-01-30 10:55:56 -05:00
Jason Monk
3a1d2e9791 Fix slice listener permissions
When trying to listen to slices without permission before hand, it
would previously crash. Now it works properly with the grant dialog
and whatnot.

Test: uiservicestests
Bug: 68751119
Change-Id: I3aedab9c75ac8486026723dea5c93ee950995295
2018-01-30 10:13:11 -05:00
TreeHugger Robot
5e25d9aaa2 Merge "Revert "Minor LoadedApk refactoring."" 2018-01-30 14:43:28 +00:00
Todd Kennedy
233a0b14ca Revert "Minor LoadedApk refactoring."
This reverts commit 7541ca4d1a.

Change-Id: I2a6aa5038870c32c4145436f0463092c9b82dd23
Bug: 71501570
Test: manual
2018-01-30 05:53:38 -05:00
Felipe Leme
9d16dff058 Fixed Activity.dump() to lazy load AutofillManager if needed.
Bug: N/A
Test: manual verification

Change-Id: I2ab74caab460e41ed6c08882af3d504d3322a577
2018-01-29 18:13:16 -08:00
Alison Cichowlas
087fc33b05 Merge "Revert "Security model for moving sharesheet to systemui"" 2018-01-30 00:00:10 +00:00
Alison Cichowlas
76f0ccb5f1 Revert "Security model for moving sharesheet to systemui"
This reverts commit 88f3d4dbe1.

Bug: 72554856
Test: repro instructions in bug
2018-01-29 16:34:33 -05:00
Sudheer Shanka
5be44ff31c Add a DPM api to check if a pkg is restricted to use metered data.
We need this so that Settings can check if an app is
restricted by admin from using metered data.

Bug: 63700027
Test: manual
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I9a2ea9c458b0f10a3c3c6edcbe82da9eccaa51c3
2018-01-29 11:24:46 -08:00
Andrii Kulian
8ae7957390 Always execute onStop and onSaveInstanceState together
Because onStop is guaranteed to be called when activity goes away
and onSaveInstanceState is always called before onStop (starting
with Honeycomb), we can execute these two callbacks together.

This CL consolidates all call points to stop the activity and
moves them to callActivityOnStop, which will also take care of
saving instance state.

Bug: 68325009
Bug: 68763258
Test: Manual
Change-Id: I1062c6be28581a7de7961babd55664640aaae359
2018-01-29 10:51:48 -08:00
TreeHugger Robot
84783905c0 Merge "Adds generic intent Instant App resolution" 2018-01-29 18:43:46 +00:00
Pavel Grafov
a77e198ea8 Merge "Log additional events in security log." 2018-01-29 18:41:41 +00:00
TreeHugger Robot
bd2f2e991f Merge "Add slice subtype constants for sliders/progress." 2018-01-29 18:31:57 +00:00
Ricardo Loo Foronda
8a9ca8e911 Docs: Removed rogue "(TODO)" note in FLAG_SHOW_LIGHTS member am: f8f6d0a8ec
am: 753f325909

Change-Id: Ib6fb6b03669f789a9b0c9dc789cfb371ce1350c4
2018-01-29 17:20:29 +00:00
Ricardo Loo Foronda
753f325909 Docs: Removed rogue "(TODO)" note in FLAG_SHOW_LIGHTS member
am: f8f6d0a8ec

Change-Id: I8aabec3ac04c0a732efe705919f53a3cadd8c63a
2018-01-29 17:12:00 +00:00
Pavel Grafov
ce72ef0f57 Log additional events in security log.
These events are required for US NIAP MDFPP v3.1 compliance.

Bug: 70886042
Test: manual
Change-Id: I1752469cf4c7ff499eb4356fa1c94f3146d4c9b8
2018-01-29 16:32:49 +00:00
Patrick Baumann
3e8bd0f3b5 Adds generic intent Instant App resolution
Bug: 63117034
Change-Id: Ie3818e913e8e1077f60434a626bc606c0b5015ab
Test: Manual using test app at google_experimental/users/patb/InstantAppsInP
Test: atest android.appsecurity.cts.EphemeralTest passes after modification
2018-01-29 16:19:42 +00:00
David Brazdil
eeed184127 Merge "Control hidden API toast with a system property" am: 13020490be am: a9b3f91828
am: 1e1c4fc802

Change-Id: I0b2d898dbdac8ed6ac8995bab521b62adb5d0f2e
2018-01-29 16:07:23 +00:00