Commit Graph

9767 Commits

Author SHA1 Message Date
Chris Craik
9180f64186 Merge "CriticalNative for RenderNode and DisplayListCanvas" 2016-12-15 21:48:17 +00:00
Victor Chang
ab10237900 Merge "Add EXTRA_PROVISIONING_DISCLAIMERS" 2016-12-15 20:34:31 +00:00
Chris Craik
fc29424a3c CriticalNative for RenderNode and DisplayListCanvas
Bug: 33460152
Test:  adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

- Also FastNative for setDisplayList, simplifying upcall into field setter.

- Also removes depth sweep parameter for ViewShowHideTests for now, they're not
providing much extra info.

Together with Outline/Path CL, about 25% faster visibility toggles

960MHz Bullhead Before (prior to Outline/Path CL):

$ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min
INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=743505
INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=332420
INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=354154
INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=1106095
INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1261290
INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=356153
INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=362149

After (this CL + Outline/Path CL):

$ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min
INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=636061
INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=267481
INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=289433
INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=976827
INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1207286
INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=286148
INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=292834

Change-Id: Iaddfa9550bdbab807c662595d005126d98cdc277
2016-12-15 11:30:08 -08:00
TreeHugger Robot
8732a47a9d Merge "Change notification shade ordering." 2016-12-15 16:06:00 +00:00
Nicolas Prévot
1548d5c43b Merge "Use affiliation ids when checking bind target users." 2016-12-15 14:31:39 +00:00
TreeHugger Robot
a9db0faecd Merge "Delay SharedPreferences.apply() by 50 ms" 2016-12-15 03:13:39 +00:00
Philip P. Moltmann
3349644872 Delay SharedPreferences.apply() by 50 ms
... so that multiple applies can be combined into a single write.

Do do this I replaces the executor in the QueuedWork by a more Android-y
handler.

Test: Ran shared preferences CTS tests. Looked at log and saw a lot of
      skipped writes
Bug: 33385963

Change-Id: I8f33df717be7091532930ccf6ca8c48940e4edd4
2016-12-14 15:48:39 -08:00
Kang Li
b431d715a3 Merge "Add Sharing Histories to UsageStatsManager." 2016-12-14 19:26:34 +00:00
Esteban Talavera
06fd71abdf Merge "Create DISALLOW_{ADD,REMOVE}_MANAGED_PROFILE user restrictions" 2016-12-14 19:16:26 +00:00
TreeHugger Robot
a97a01e5a2 Merge "Added supports-split-screen-multi-window command to am" 2016-12-14 18:43:28 +00:00
Julia Reynolds
4a02afbf04 Change notification shade ordering.
Certain ongoing and people centric notifications can now
(mostly) trump importance-based ordering.

Bug: 30374279
Test: runtest systemui-notification
Change-Id: Ieab6015174f9595c08057dc408233202035aae3e
2016-12-14 17:58:11 +00:00
Victor Chang
c10f6693fc Add EXTRA_PROVISIONING_DISCLAIMERS
- It's Bundle[]
- Each Bundle has EXTRA_PROVISIONING_DISCLAIMER_HEADER
and EXTRA_PROVISIONING_DISCLAIMER_CONTENT for header and content
- the disclaimer header is a localized String

Bug: 32760305
Test: built successfully
Change-Id: Ibc4ed25027f5949a0faa92ebf1f5ea1d518368eb
2016-12-14 16:41:21 +00:00
Nicolas Prevot
d5b036014d Use affiliation ids when checking bind target users.
BUG:32764274
Test: adb shell am instrument -e class
com.android.server.devicepolicy.DevicePolicyManagerTest -w
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ic79b58dcb583b1d9eb9e7af0d1501cf8cfd0ee86
2016-12-14 15:15:10 +00:00
Lenka Trochtova
3c9c96d8dc Merge "DevicePolicyManager: make 3 hidden provisioning methods system API." 2016-12-14 09:22:02 +00:00
Kang Li
53b4314ad9 Add Sharing Histories to UsageStatsManager.
This CL is for Android O Smart-Sharing (b/30982298). By this CL, sharing
counts are logged with UsageStatsManager.

Bug: 30982298
Test: manual - shared images in Camera and texts in Chrome using a mobile device.

Change-Id: I0b4aa0506f99b3083d140a48f7b4bdd5b1c5afb6
2016-12-13 17:35:38 -08:00
Philip P. Moltmann
60b98d391f Merge "Do not write if apply() did not change the file." 2016-12-13 22:50:31 +00:00
Esteban Talavera
6c9116a643 Create DISALLOW_{ADD,REMOVE}_MANAGED_PROFILE user restrictions
Bug: 31952368

Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest    frameworks-services
Test: runtest -c com.android.server.pm.UserManagerTest frameworks-services
Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.UserRestrictionsTest

Change-Id: I240ab99c2409bbabffbc574bef202f2457026905
2016-12-13 18:14:19 +00:00
Lenka Trochtova
5291ee732d DevicePolicyManager: make 3 hidden provisioning methods system API.
In order to unbundle OobConfig app, make the following
methods @SystemAPI:
- DevicePolicyManager#isDeviceProvisioned
- DevicePolicyManager#setDeviceProvisioningConfigApplied
- DevicePolicyManager#isDeviceProvisioningConfigApplied

Test: gts-tradefed run gts -m GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DevicePolicyManagerTest

Bug: 32972931

Change-Id: Ic33b6c570222e4aa31cf7975a39de0d9e2614534
2016-12-13 15:34:44 +01:00
Julia Reynolds
52e64d0162 Give assistant ability to modify channels.
Test: cts on same topic
Change-Id: Ia0db73d4d81a89e0821ba6a06f12823605dbea73
2016-12-13 14:00:01 +00:00
TreeHugger Robot
d4f08a007d Merge "AutoFill Framework refactoring." 2016-12-13 04:05:51 +00:00
Felipe Leme
1ca634a544 AutoFill Framework refactoring.
The AutoFill Framework uses the same AssitStructure provided by the Assist API
and so far it was using the same methods as well, both internally and externally
(public API).

Sharing that internal code internally is fine, but the public APIs must distinguish between the 2 cases so they can fill the assist structures accordingly (although the initial implementation still shares the same logic).

This CL also splits the original 'auto-fill' request in 2 types of requests,
which are set by View flags:

- ASSIST_FLAG_SANITIZED_TEXT
- ASSIST_FLAG_NON_SANITIZED_TEXT

It also added new methods and callbacks to handle save requests.

Bug: 31001899
Test: manual verification

Change-Id:  I4eb09099dc19a43cb7e053e64d939aed3704b410
2016-12-12 18:22:45 -08:00
Philip P. Moltmann
46771b9096 Do not write if apply() did not change the file.
Bug: 33385963
Test: SharedPreferences CTS tests
Change-Id: I39955f8fbcdaa54faa539a3c503e12cb00808136
2016-12-12 16:42:39 -08:00
TreeHugger Robot
cf4d2ce358 Merge "Introduce TextClassificationManager." 2016-12-12 21:42:19 +00:00
Abodunrinwa Toki
8158af53e8 Introduce TextClassificationManager.
This handles smart selection and language detection features.
This CL only contains code to integrate the TextClassificationManager.
Implementation will be added in a follow up CL.

Test: Test will be added when TextClassificationManager is added.
Bug:32503402
Change-Id: I5f22150ff998156fbc91b51c733d93478efaa51f
2016-12-12 19:52:31 +00:00
Sudheer Shanka
6997bf20ee Merge "Add comment in IActivityManager.aidl." 2016-12-12 18:02:03 +00:00
TreeHugger Robot
d3e2ba3017 Merge "Fix blink of final position in activity transitions." 2016-12-12 16:41:43 +00:00
George Mount
f9c4b57b02 Fix blink of final position in activity transitions.
Bug 33059372

When implementing OneShotPreDrawListener, one of the onPreDraw()
calls was supposed to return false. This CL restores that behavior.

Test: manual against Play Movies app

Change-Id: I416da3bb3e84efb009f0efbacad71d0a2f66fe18
2016-12-09 16:51:35 -08:00
TreeHugger Robot
c09d69e8af Merge "Protect BackStackRecord from accessing null mHost." 2016-12-09 22:24:16 +00:00
Matthew Ng
626e0cc0aa Added supports-split-screen-multi-window command to am
The supports-split-screen-multi-window command allows the ability to
check if the device has split screen multiwindow support in shell. The
other changes allows the code to determine if the device has support for
it as well.

This will also help CTS tests to determine if the device has split
screen before trying to run the test.

Test: manual - adb shell am supports-split-screen-multi-window
Change-Id: I3da32b5b03712a8537104469d67100ec796de9e6
2016-12-09 12:05:59 -08:00
Philipp Weiß
9498f5a81b Merge "Add network logging icon to Quicksettings when enabled" 2016-12-09 16:31:41 +00:00
George Mount
d5f70891e1 Protect BackStackRecord from accessing null mHost.
Bug 33177567

The fragment manager is being accessed after it has been torn
down. This protects BackStackRecord from accessing the null
mHost in that case.

Test: cts-tradefed run singleCommand cts -d --skip-preconditions
--skip-connectivity-check -m CtsFragmentTestCases

Change-Id: Id927eb1bc78e3750b01f685523418bde5a9cf8a0
2016-12-08 15:04:58 -08:00
TreeHugger Robot
ac30b3bb5f Merge "Replace Toast-based cheat sheets with tooltips" 2016-12-08 19:25:53 +00:00
TreeHugger Robot
e3a3524dac Merge changes I6477b6d1,Ieb11345f
* changes:
  Adding ability for an app to request auto-enter picture-in-picture.
  Only allowed visible, non-stopped activities to enter PIP.
2016-12-08 18:37:45 +00:00
phweiss
a4e169ed68 Add network logging icon to Quicksettings when enabled
Add the network logging icon in Quick Settings' footer if
network logging is enabled, possible next to the VPN icon.
Quicksettings has to be able to tell that network logging
is enabled, so this CL changes DPM.isNetworkLoggingEnabled() to be
callable from the device owner or from any app with the MANAGE_USERS
permission.

The icon is only a placeholder until the official icon is finished.

CTS Verifier tests will be added when all Network logging UX changes are
done.

BUG: 33126618
BUG: 29748723
Test: runtest --path frameworks/base/packages/SystemUI/tests
Change-Id: Ib35d323605ab11f883a4b6199d1db79b9e53c49b
2016-12-08 16:34:25 +01:00
TreeHugger Robot
a62415dd1e Merge "Only persist last Shared Preferences state" 2016-12-08 02:23:37 +00:00
Winson Chung
b5c41b7868 Adding ability for an app to request auto-enter picture-in-picture.
- If an activity requests that it can auto-enter PIP, then we will trigger
  it to enter PIP when the task is effectively being occluded.  This does
  not affect the activity when the screen is locking, or if it starts new
  activities within its own task, or if it finishes itself, or if there is
  already a PIP activity.
- Changed setPictureInPictureAspectRatio to also specify the aspect ratio
  to use when auto-entering PIP.  If the activity is not PIP'ed and has
  not requested auto-enter, then the call continues to fail.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testAutoEnterPictureInPicture
Test: #testAutoEnterPictureInPictureLaunchActivity
Test: #testAutoEnterPictureInPictureFinish
Test: #testAutoEnterPictureInPictureAspectRatio
Test: #testAutoEnterPictureInPictureOverPip

Change-Id: I6477b6d1f160cf0219d935123bbb505f57ee7a56
2016-12-07 15:21:50 -08:00
TreeHugger Robot
e5e0a85ef3 Merge "Fix slow exit transition left exited views INVISIBLE." 2016-12-07 22:22:48 +00:00
Philip P. Moltmann
c543b56706 Only persist last Shared Preferences state
If multiple async shared preferences writes are queued, all but the
last one can be ignored as they will be overwritten by the last one
anyway.

For commit() we need to make sure that we have at least persisted the
state of the commit.

Generation counts are 64 bit, hence they never overflow.

Test: Produced a lot of SharedPreferences.Editor.apply and did not see
excessive writes anymore, ran SharedPreferences CTS tests
Bug: 33385963
Change-Id: I3968ed4b71befee6eeb90bea1666a0bb646544f6
2016-12-07 10:33:21 -08:00
TreeHugger Robot
9751197d30 Merge "Fix javadoc of EXTRA_PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION" 2016-12-07 14:29:28 +00:00
TreeHugger Robot
82ddb5e118 Merge "Fix two StrictMode stack collection bugs." 2016-12-07 08:21:42 +00:00
Jeff Sharkey
58f27b5033 Fix two StrictMode stack collection bugs.
When Binder calls are nested, we can quickly end up with a snowball
of stacktraces that can cause the original transaction to fail.  This
CL makes two specific changes to alleviate this pressure:

-- Consider a nested Binder call from PID A -> B -> C.  If both B and
C encounter dozens of StrictMode violations, then gatheredViolations
in B will end up with 10 ViolationInfo (5 from B and 5 from C).  This
problem only grows with each successive nested call.  To solve this,
always limit ourselves to only ever write out 3 ViolationInfo from
any given process.

-- CrashInfo already nicely truncates any large stack traces to 20kB,
but readAndHandleBinderCallViolations() blindly appends the entire
local trace, and never considers truncating again.  Similar to the
first problem above, nested calls can quickly cause the stackTrace
value to explode in size.  To solve this, we always re-truncate the
stackTrace value after appending our local stack.

Also fix some NPE bugs when missing crashInfo.

Test: builds, boots
Bug: 32575987
Change-Id: Ie8373ca277296f920f2b1c564d419c702a8ee0f2
2016-12-07 06:31:50 +00:00
Vladislav Kaznacheev
b265617b81 Replace Toast-based cheat sheets with tooltips
Currently ActionMenuItemView, MediaRouteButton and
ScrollingTabContainerView each have their own
implementation of a Toast-based long-press tooltips
(the last two apparently copy/pasted from the first).

Replacing those with the recently introduced tooltips
supported by the framework.

Bug: 31516506
Test: manual in ApiDemos
Change-Id: Ibcb8c5a43577a8b4d30f1a26e48ddcfde015d1dc
2016-12-06 11:41:58 -08:00
George Mount
5a2a948be7 Fix slow exit transition left exited views INVISIBLE.
Bug 33377297

When an exit transition was finished after the onStop was received,
the final visibilty ended up being INVISIBLE. To prevent this,
when views are being reset to the initial location, the transitions
are forced to end prior to changing the final values.

Test: I10517bb5f1477824f1e54109e7be766225591d24
Change-Id: I3837927bb41623a3a146fc3a42209c9a81c99a38
2016-12-06 09:31:06 -08:00
Michal Karpinski
803abe7378 Merge "Unhiding network logging API" 2016-12-06 09:54:14 +00:00
Mahaver Chopra
abf86385f8 Merge "Return error code from isProvisioningAllowed" 2016-12-06 09:45:05 +00:00
Ned Burns
df1710dc6e Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de am: f9566827f2
am: 768f62aac1

Change-Id: Ibe1a8b9a7cf71b715ae7d4e0157b5cdf1d52e81d
2016-12-06 02:48:01 +00:00
Ned Burns
768f62aac1 Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de
am: f9566827f2

Change-Id: I157e10afa6b8c0414c2af25d98bf5913928925f2
2016-12-06 02:38:47 +00:00
Ned Burns
7d6cb913de Modify SwipeDismissLayout to perform its own exit animation
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.

Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
2016-12-05 19:38:14 -05:00
TreeHugger Robot
9ce4714273 Merge "Fix monkey NPE" 2016-12-05 22:37:12 +00:00
Victor Chang
aa9cbc00e6 Fix javadoc of EXTRA_PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION
Bug: 32299699
Change-Id: I700d1b6b82a656d3a1385bf37d830ae717f25d5d
Test: built successfully
2016-12-05 20:50:57 +00:00