Commit Graph

5806 Commits

Author SHA1 Message Date
Bryce Lee
5b76ce1b2b Merge "Remove rotation and app bounds from Configuration diff." into oc-dr1-dev 2017-07-28 17:57:09 +00:00
Svetoslav Ganov
436b901dbb Report permission flags for all protections based on SDK
am: adb8c522a8

Change-Id: Ia30269ec2097d5978ae3e0b3930a38b3f4441ea4
2017-07-28 16:42:59 +00:00
Bryce Lee
0e4a6dfb3f Remove rotation and app bounds from Configuration diff.
The presence of these new flags leads to issues with application that
do not expect their presence. Since these flags can appear at
critical times, such as on orientation change, these issues are
brought to the surface often.

This CL remedies this problem by first removing the rotation
property. It is not used and the original issue of orientation and
Configuration alignment has been addressed. For app bounds, the CL
reverts the behavior back to identifying diffs as a screen size
change.

Fixes: 64004417
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Test: go/wm-smoke

Change-Id: I1fabb564dfb5c13d897336708523cf7cd5099fa0
2017-07-28 07:49:01 -07:00
Svetoslav Ganov
adb8c522a8 Report permission flags for all protections based on SDK
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.

Test: All permission tests pass
      Added a new test to ensure no protection flags reported
      for normal and dangerous permissions

Change-Id: I87b10a7695d8ecfa7156525d6f3d101fc0639513
bug:62755026
2017-07-28 05:46:53 +00:00
Bart Sears
076d6f7669 Revert "Report permission flags for all protections based on SDK"
am: 784b56e1e6

Change-Id: Ice7dde53c5613f48d013424a7e99203fd854e532
2017-07-28 05:17:52 +00:00
Bart Sears
784b56e1e6 Revert "Report permission flags for all protections based on SDK"
This reverts commit 852cf98cb8.

Change-Id: I62763bf85ec95a02a245c6b503aa34bb0e9d997a
2017-07-28 05:05:38 +00:00
Svetoslav Ganov
3cf283558a Report permission flags for all protections based on SDK
am: 852cf98cb8

Change-Id: I6e87c8f40fa466f2a50f41549be41ea4fb598824
2017-07-28 02:49:30 +00:00
Svetoslav Ganov
852cf98cb8 Report permission flags for all protections based on SDK
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.

Test: All permission tests pass
      Added a new test to ensure no protection flags reproted
      for normal and dangerous permissions

bug:62755026

Change-Id: I72547b0146e6b6919803e33ff64b7208c4a255ad
2017-07-28 01:46:04 +00:00
Bryce Lee
512e5d1b9b Merge "Do not report app bound differences as a Configuration change." into oc-dr1-dev 2017-07-26 14:20:31 +00:00
TreeHugger Robot
906d8f57bf Merge "Don't unbind from the sync adapter before cancelSync()." into oc-dr1-dev 2017-07-25 20:49:39 +00:00
Bryce Lee
600daddb67 Do not report app bound differences as a Configuration change.
App bounds are an internal Configuration field and should not
influence the diff that determines whether the Configuration has
changed. This changelist ensures this by introducing a new flag that
is identified server side and filtered before informing the client
that the configuration has changed.

Change-Id: Ibf1387f73eaa9b39e6213e1a1109c4cd57554e7c
Fixes: 63927944
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests#testAppBoundsConfigurationDiff
Test: go/wm-smoke
2017-07-25 18:20:29 +00:00
TreeHugger Robot
5bbf44e715 Merge "Persist/pacel # of periodic syncs properly." into oc-dr1-dev 2017-07-22 00:45:24 +00:00
David Friedman
f20c492190 Merge "Docs: Updates guidance about using permissions when accessing OBB expansion files, Bug: 34273998 Test: Ran "make" to verify error-free building." into oc-dev
am: e4d0557334

Change-Id: I931088e43f29707e1ab5d9764a06adbbe5af1d7e
2017-07-21 23:11:16 +00:00
David Friedman
e4d0557334 Merge "Docs: Updates guidance about using permissions when accessing OBB expansion files, Bug: 34273998 Test: Ran "make" to verify error-free building." into oc-dev 2017-07-21 23:01:56 +00:00
Makoto Onuki
fdc5723076 Persist/pacel # of periodic syncs properly.
(Note it shouldn't be persisting parceled data in the first place.  There's
already a bug filed for that.)

Bug 63935632
Test: manaul test

Change-Id: I5385caa6cd0663c7e13db0256b2c1027abe6c3a1
2017-07-21 15:30:35 -07:00
Makoto Onuki
6a6ae04bd2 Don't unbind from the sync adapter before cancelSync().
- Also remove the unused method from ISyncAdapter.aidl

Bug: 63773598
Test: Manual test
Change-Id: Ifb2fc520759e83ad961032f9e217100e038e1a8c
2017-07-21 11:44:00 -07:00
Dave Friedman
cfe508824f Docs: Updates guidance about using permissions when accessing OBB
expansion files,
Bug: 34273998
Test: Ran "make" to verify error-free building.

Change-Id: Ic2022bd8bd78e2f6077d6ee6807fbbda7214737a
2017-07-19 10:08:49 -07:00
Rob Carr
cee8098178 Merge "Fix rotation animation selection." into oc-dr1-dev 2017-07-18 19:31:00 +00:00
Robert Carr
427ba4ff55 Fix rotation animation selection.
The default manifest value needs to be unspecified, not rotate,
as rotate overrides the LayoutParams specified value.

Bug: 63151981
Test: Manual from bug. go/wm-smoke.
Change-Id: I2ad6e3fdd06eeef0166bbe09d07b57cc45ed6e50
2017-07-17 18:37:06 -07:00
Benjamin Miller
8322920a7c Merge "Docs-change: clarification of LauncherApps.getApplicationInfo()" into oc-dev
am: d726ff988c

Change-Id: I42a62feffca60e8beb75e991ea0b6545a2813233
2017-07-17 22:37:35 +00:00
Benjamin Miller
7afa84c373 Docs-change: clarification of LauncherApps.getApplicationInfo()
Staged at: go/dac-stage/reference/android/content/pm/LauncherApps.html#getApplicationInfo(java.lang.String, int, android.os.UserHandle)

Test: make ds-docs and output staged
Bug: 38024981
Change-Id: I9f256d675433457b7c85fa111ed87d1147f1f2bc
2017-07-17 18:35:38 +00:00
Bryce Lee
fa62d79a02 Merge "Do not use rotation as indicator to relaunch from config change." into oc-dr1-dev 2017-07-13 18:28:09 +00:00
Bryce Lee
22571db5a6 Allow max aspect ratio to be specified by meta-data tag.
This changelist identifies aspect ratios set via meta-data tags on
the activity or application and applies them to the proper scope.
Values specified via styled attribute take precedence, and values
specified by the activity take priority over values in at the
application level.

Fixes: 63386222
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsAppTestCases android.app.cts.AspectRatioTests
Test: go/wm-smoke
Change-Id: I0d8d6b2778e7fc12bb9feb85c651e5ec22927f5f
2017-07-12 10:16:50 -07:00
Bryce Lee
248fbb180d Do not use rotation as indicator to relaunch from config change.
Rotation is a hidden member inside configuration that should not
influence configuration related logic. This CL ensures that we do
not consider changes to the rotation as grounds for relaunching an
activity.

Change-Id: I9e6d4a1a75fd3ee3beb63f307433e9c3fcfd6dd4
Fixes: 63533208
Test: go/wm-smoke
Test:cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerConfigChangeTests
2017-07-10 16:33:52 -07:00
Bryce Lee
649053810f Merge "Add app bounds to Configuration#compareTo." into oc-dr1-dev 2017-07-10 14:21:37 +00:00
Adam Lesinski
4eb4129c29 Fix Configuration#updateFrom() when assetsSeq doesn't change
Compare the value of assetsSeq when updating Configuration from
a delta.

Bug: 63352177
Test: manual
Change-Id: I9e1205cd64c4a1e0192b7049c82d36d53fb4af36
(cherry picked from commit 2123c415bf)
2017-07-06 21:56:46 +00:00
Bryce Lee
c5fe0eedb6 Add app bounds to Configuration#compareTo.
This CL takes app bounds into consideration when comparing two
Configurations with compareTo.

Change-Id: I9894f312429626975a2651b837cae8d80548c271
Fixes: 63160229
Test: go/wm-smoke
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests#testConfigurationCompareTo
2017-07-06 08:03:28 -07:00
Bryce Lee
c1f2f2a9d3 Add rotation to configuration.
Certain activities are dependent on the rotation of the device to
determine layout. In these cases, orientation does not provide enough
details.

This CL adds the field (hidden) to the configuration.

Change-Id: Idb3ba10cb4de8838737c25e92264e6cee224e264
Fixes: 32839232
Test: go/wm-smoke
2017-06-29 17:40:23 -07:00
Lei Yu
a023184bbc Merge "Add API to RuntimePermissionPresenter" into oc-dr1-dev 2017-06-28 17:55:04 +00:00
TreeHugger Robot
c4ccefc7fd Merge "Whitelist ACTION_QUICK_CONTACT from StrictMode.onFileUriExposed" into oc-dr1-dev 2017-06-26 23:49:07 +00:00
Makoto Onuki
eb63919bc4 Merge "Fix activity icon badging for non-bitmap icons" into oc-dev
am: 9f607f4c0b

Change-Id: Ie8b426c14fa30b7c2f5eadc5818e1dfd16f8c0a5
2017-06-26 23:31:59 +00:00
jackqdyulei
a90bfb5f80 Add API to RuntimePermissionPresenter
Add API to reovke runtime permission in RuntimePermissionPresenter

Bug: 36921532
Test: runtest -x LocationCheckActionTest(in settings)
Change-Id: I51d43d6372fffcd260d7053cb89f2a00d3b07468
2017-06-26 13:44:10 -07:00
Makoto Onuki
8f2a478d9d Fix activity icon badging for non-bitmap icons
Bug 62930145
Test: Manual test with development/samples/ShortcutDemo/launcher/

Change-Id: I8d0eed2e1f93a3b04a6a078c25cefbfc47c528a4
2017-06-23 13:10:41 -07:00
Makoto Onuki
fb2d50e891 Whitelist ACTION_QUICK_CONTACT from StrictMode.onFileUriExposed
Bug 38428650
Test: Manual test on an eng build + logcat + contacts app

Change-Id: I1b6c99b8f42443511baddd8574955a17342b2ac9
(cherry picked from commit 7d1911f264)
2017-06-23 17:52:10 +00:00
Seigo Nonaka
b7773ce875 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
(cherry picked from commit 6d6cd68660)
2017-06-23 10:02:59 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
Svetoslav Ganov
40610e3a14 Support native shared libs
resolve merge conflict for ac9b6706b

Add the shared libs that are APKs to the native library
path when creating application class loaders. Also don't
allow shared libraries hosting native libs to request
extraction of the native libs out of the APK. Lastly,
shared libraries hosting native libs must be declared
as multi-architecture.

Test: CTS tests in this topic

bug:62720360

Change-Id: Ie3f203db12a3f3826e114c219a8341d9acab604f
2017-06-21 15:21:22 +00:00
Svetoslav Ganov
324c41ba89 Merge "[DO NOT MERGE] Support native shared libs" into oc-dev 2017-06-21 01:06:22 +00:00
TreeHugger Robot
8d4ff1b34f Merge "Only enable wide color gamut support on capable devices" into oc-dr1-dev 2017-06-20 23:41:39 +00:00
Romain Guy
e89d0bba66 Only enable wide color gamut support on capable devices
Bug: 62827458
Test: CtsColorModeTests, more tests going in MR1
Change-Id: Idca2804b04ae6bdcbec6bcda6fd74dc6ada89c31
2017-06-20 14:23:28 -07:00
Svet Ganov
f8579581c1 [DO NOT MERGE] Support native shared libs
Add the shared libs that are APKs to the native library
path when creating application class loaders. Also don't
allow shared libraries hosting native libs to request
extraction of the native libs out of the APK. Lastly,
shared libraries hosting native libs must be declared
as multi-architecture.

Test: CTS tests in this topic

bug:62720360

Change-Id: I0a398593ebe41b2976cb706ca8a388005f5aec83
2017-06-20 12:12:34 -07:00
Makoto Onuki
15e7a256e1 Enhance recent sync log in dumpsys content
- Add "Per Adapter History" section that has recent activities per adapter. Example:
  mxxxx@gmail.com/com.google u0 [com.android.calendar]
    2017-06-19 14:19:07 success Source=LOCAL Elapsed=0s Reason=10014 Extras=[upload=true ]
    2017-06-19 14:19:06 success Source=SERVER Elapsed=16s Reason=10014 Extras=[feed=#contacts@group.v.calendar.google.com ]
  mxxxx@gmail.com/com.google u0 [com.android.chrome]
    2017-06-19 13:26:25 canceled Source=POLL Elapsed=0s Reason=AccountsUpdated Extras=[initialize=true ]
  mxxxx@gmail.com/com.google u0 [com.android.contacts]

- Improve pending/periodic syncs with better formatting, and sort them in a sane order.

Bug: 38498544
Bug: 62391411
Test: manual test with "dumpsys content"
Change-Id: I947a9255230f27a7f438d648da324787fdf16f55
2017-06-20 17:14:06 +00:00
Phil Weaver
0da21f56e4 Merge "Separate a11y and autofill view ids" into oc-dev
am: c91290a6e9

Change-Id: Iec71a9ae34f963ef1f0ce7f6bd09b5af5bbba6e6
2017-06-17 00:59:04 +00:00
Phil Weaver
846cda9397 Separate a11y and autofill view ids
Autofill seems to need IDs to be preserved across things
like configuration changes, while accessibility will not
function without views with unique ids. Separating out the
two types of IDs. We can re-combine them once it's clear
that both demands can be satisfied.

Bug: 62301218
Test: Run a11y and autofill CTS, and verify that the play
store app functions with TalkBack after a screen rotation.

Change-Id: I17a99de2874768fc0ade3aa354130dd1f6b4cd7e
2017-06-16 14:36:36 -07:00
Todd Kennedy
b692f4a095 Merge "Save overlay paths as user state" into oc-dev
am: 508a5bade6

Change-Id: If46b58323883dcdeef72f0a394f79becca134c23
2017-06-13 22:39:40 +00:00
Todd Kennedy
b274947dfb Save overlay paths as user state
Instead of maintaining a separate structure just for overlay
paths, store them as user state in the package setting. Also
centralize updating the overlay paths to avoid issues with
inconsistent updates.

Fixes: 36561125
Test: Manual
Change-Id: Iac1c987e8650074dbc564e332d5da1950fad6ac5
2017-06-13 12:05:44 -07:00
Jeff Sharkey
0ba24ed694 Merge "Improve developer docs for storage APIs." into oc-dev
am: 05b52d8ba5

Change-Id: I282786d353e3dc406c7123daa00d3e7fe43de7bc
2017-06-13 00:36:09 +00:00
Jeff Sharkey
b31afd2273 Improve developer docs for storage APIs.
No code changes; only docs.

Test: builds
Bug: 38508833, 37987197, 37978296
Change-Id: Idfeb680480b2f818d18f787cbf20ceab896763a2
2017-06-12 20:19:53 +00:00
Jeff Sharkey
0c28d43fe1 Hide APIs not intended to ship in DR.
This CL will be reverted once it merges into the next release branch
to re-introduce the proposed APIs.

This CL also makes the following code changes to preserve API
compatibility:

-- It keeps the recently added RemoteViews.clone() synchronized logic
intact, but moves it inside the method to avoid changing the API
signature.

-- It reverts the RttCall.read() behavior to the oc-dev logic, since
we can't throw IOException until we get an API level bump.  (The
original logic returned null instead of throwing.)

Test: builds, boots
Bug: 62427252, 62431886, 62427329
Bug: 62468911, 62431162, 62428935, 62429096
Bug: 37290820, 37359238, 36886243
Bug: 30143923, 35761231, 62192626, 29829689
Change-Id: I83d723f598cb0ee1fe198e65debd86ef7fd0420c
2017-06-12 10:26:01 -06:00
Jeff Sharkey
c017d299ce Merge "Omit icons from bulk SessionInfo calls." into oc-dr1-dev 2017-06-09 20:23:23 +00:00