Commit Graph

9746 Commits

Author SHA1 Message Date
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
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
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
Michael Kwan
319cfe16f1 Disable swipe-to-dismiss for not cancelable dialogs. am: f7964be938 am: 85ba660b16
am: 1805ba1d76

Change-Id: I23863328b64f95915a7ecb7ceb35448bc10bdfbe
2016-12-05 18:21:14 +00:00
Michael Kwan
85ba660b16 Disable swipe-to-dismiss for not cancelable dialogs.
am: f7964be938

Change-Id: I6d71bb4c6acdc9d994766eebd7a6320356aa3a23
2016-12-05 18:09:10 +00:00
TreeHugger Robot
014505babe Merge "Add EXTRA_PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION" 2016-12-05 17:53:10 +00:00
Mahaver Chopra
849fd6f58e Return error code from isProvisioningAllowed
Added hidden pre condition codes for PO and DO provsioning.
Added hidden api checkProvisioningPreCondition, which returns codes
instead of boolean. Managed provisioning can use this to show
useful debug information and user facing error dialogs.

Test: All DevicePolicyManagerTest pass

Bug: 27467633
Change-Id: I7d2a79921bc3ac2e12d506629a35563fc7ff62bf
2016-12-05 17:48:42 +00:00
Michal Karpinski
ea98e43600 Merge "Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent" 2016-12-05 16:56:12 +00:00
Michal Karpinski
d55b731452 Unhiding network logging API
Unhiding network logging feature API on master in order to add CTS
tests and the like. Feature will still be CPd to MR2 as hidden.

Bug: 29748723
Change-Id: Iae3957d8e678c82b67654cd9f442436ba44ae728
2016-12-05 13:56:38 +00:00
Michal Karpinski
da9d3ad3ac Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent
Test: the APIs will be tested by CTS when unhidden
Bug: 29748723
Change-Id: I3a029afee57b79e3ffd9ef574969ec31156b1293
2016-12-05 13:32:01 +00:00
Michael Kwan
f7964be938 Disable swipe-to-dismiss for not cancelable dialogs.
Bug: 33249829
Change-Id: Ib3d2c9982ece22d1b080b821eaf306f6b686d099
2016-12-02 17:33:56 -08:00
George Mount
3005e17b03 Fix monkey NPE
Bug 33177567

Monkey was causing a commit() while the activity was shutting down.
This protects from an NPE in this unlikely situation.

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

Change-Id: I832cfa8fb187c61b4d2f5a8a4d0f508d7a435171
2016-12-02 12:45:39 -08:00
TreeHugger Robot
04a7a5370c Merge "Split home stack into home and recents stack" 2016-12-02 19:12:23 +00:00
Jeff Sharkey
37d3eecbac DO NOT MERGE: Check provider access for content changes. am: c813f5dae2
am: 2b7584f5b1

Change-Id: I1a74f306a4d9858a4e9726cd53ab544d28542522
2016-12-02 18:36:36 +00:00
Jeff Sharkey
2b7584f5b1 DO NOT MERGE: Check provider access for content changes.
am: c813f5dae2

Change-Id: I939bca8887198e2578916356d49b0f2f0a2bf3d2
2016-12-02 18:19:46 +00:00
Jean-Michel Trivi
d29d66c787 Merge "Stream types are for volume control" 2016-12-02 17:33:54 +00:00
Matthew Ng
ae1ff4f85f Split home stack into home and recents stack
Refactored functionality of home stack (HOME_STACK_ID) in the code
base to home stack and recents stack (RECENTS_STACK_ID). Also changed
function and variable names from homeStack to homeOrRecentsStack.

Differentiating home and recents stack will allow readablilty and
managing logic between home and recents stacks. For example, for
multi-window minimized dock state, the home and recents stacks can
be set to different rects where the home stack needs to be a fixed
large size while the recents stack is hidden and the dock stack is
animating to be minimized.

Fixes: 32839371
Test: ./run-test android.server.cts and manually tested split and
rotation
Change-Id: I7603359c2dc20e35924664178634eb761e0367a6
2016-12-01 14:20:56 -08:00
Geoffrey Pitsch
aac3cba531 Merge "Listener in createNotificationChannel" 2016-12-01 19:46:09 +00:00
TreeHugger Robot
7075269195 Merge "Add READ_PHONE_NUMBER permission" 2016-12-01 18:27:07 +00:00
Geoffrey Pitsch
e75a66e87a Listener in createNotificationChannel
Necessary for when this will eventually trigger an Activity.
New unit test file for NotificationServiceManager.

Test: runtest systemui-notification (cts tests in separate CL)
Change-Id: I8f3e8e34ddcebb1acb9ddd84bffc68affb4b6e89
2016-12-01 10:59:47 -05:00
Victor Chang
89ee279d05 Add EXTRA_PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION
Test: built successfully
Bug: 32299699
Change-Id: I22a470786c31e4acc010ac2efbc32eb5e47b8b1d
2016-12-01 15:47:30 +00:00
Jeff Sharkey
42bb160818 Merge "Grant MMS Uri permissions as the calling UID." 2016-11-30 23:04:17 +00:00
Jeff Sharkey
7ff418d9a9 Grant MMS Uri permissions as the calling UID.
A recent security fix prevents the system UID from handing out Uri
permission grants directly from itself.  Instead, services need to
issue grants as the original calling UID to ensure that the caller
actually has access to the Uris.

Test: builds, boots, send/recv MMS works in primary/secondary users
Bug: 33231106
Change-Id: Ia9fe19843b52977c8a94ee5349b907beda1882fc
2016-11-30 14:30:02 -07:00
Chad Brubaker
73ec8f963d Add READ_PHONE_NUMBER permission
READ_PHONE_NUMBER allows only access to the phone number and not all the
other things that READ_PHONE_STATE allows access to. READ_PHONE_NUMBER
will be accessible to ephemeral apps while READ_PHONE_STATE will no
longer be.

Test: Verified that getLine1Number works with READ_PHONE_NUMBER from an
epemheral app
Test: cts-tradefed run cts -m CtsPermission2TestCases
Change-Id: I599c19227f886adbe8efe346a78d51e88ab46379
2016-11-30 10:34:15 -08:00