Commit Graph

10367 Commits

Author SHA1 Message Date
TreeHugger Robot
bd7ae7df28 Merge "Basic accessibility support for picture-in-picture" 2017-03-11 01:52:51 +00:00
Sudheer Shanka
c37cc60301 Merge "Update IUidObserver.onUidStateChanged to include procStateSeq." 2017-03-11 00:19:50 +00:00
Sudheer Shanka
8025580449 Update IUidObserver.onUidStateChanged to include procStateSeq.
This procStateSeq is associated with the process state change of
an uid and will help in identifying if network policy rules have been
updated for a process state change.

Bug: 27803922
Test: runtest -c com.android.server.am.ActivityManagerServiceTest
      frameworks-services
Change-Id: Iaab8d004f476b96f28d08c886c7b0a6b585b9fef
2017-03-10 16:04:41 -08:00
TreeHugger Robot
1d4578fed1 Merge "Reenable task snapshots without using RenderThread in SystemServer." 2017-03-10 23:54:50 +00:00
Phil Weaver
f00cd14f17 Basic accessibility support for picture-in-picture
Exposing actions from the PIP InputConsumer to accessibility,
stripping all actions from a covered PIP app, and adding the
InputConsumer's actions on the PIP app's root view.

We were also using an "undefined" accessibility ID to mean
three different things: a root view, a host view of a virtual
view hierarchy, and a truly undefined view. I've introduced
new values for cases where the id could be defined.

Also gathering all window IDs into one place to reduce the
chance of collisions.

Bug: 34773134
Test: In progress. Current cts passes.
Change-Id: I97269741a292cf406272bf02359c76c396f84640
2017-03-10 15:35:30 -08:00
Amith Yamasani
858f98d13e AssistStructure improvements
Added isOpaque() for Views
Added getAcquisitionStartTime(), ...EndTime()
Added isHomeActivity()

Bug: 30895450
Test: cts-tradefed run cts-dev -m CtsAssistTestCases -t
android.assist.cts.AssistStructureTest#testAssistStructure

Change-Id: I294a089aa3454ebfebf0442036d98ccb86cb2827
2017-03-10 09:40:32 -08:00
TreeHugger Robot
642028fccd Merge "Replaced auto-fill by autofill to keep it consistent with API style." 2017-03-10 07:05:41 +00:00
Robert Carr
a35e5de13c Reenable task snapshots without using RenderThread in SystemServer.
Instead just directly queue the buffer to the Surface.

Test: Make sure recents works.
Change-Id: I9488ae614f117f39f9471f3c368bf98152c4f107
2017-03-09 17:47:34 -08:00
TreeHugger Robot
af526ec9c3 Merge "Corrects the recents and home stacks position around docked state (1/2)" 2017-03-09 20:39:51 +00:00
Felipe Leme
640f30a776 Replaced auto-fill by autofill to keep it consistent with API style.
This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
2017-03-09 08:14:49 -08:00
Jeff Sharkey
e6306c485f Throw at getPackageSizeInfoAsUser() callers.
But only when targeting O; if they're old apps then log and pass
a soft failure message to their callback.

Test: builds, boots
Bug: 35749102
Change-Id: I6c6b5a37c23669e7b1ed3c30207bca610821eb1f
2017-03-08 15:25:38 -07:00
Jeff Sharkey
4f459b85d4 Merge "Revert "Throw at getPackageSizeInfoAsUser() callers."" 2017-03-08 21:19:42 +00:00
TreeHugger Robot
7e547fbe88 Merge "Replace AutoFillType by view constants." 2017-03-08 21:08:56 +00:00
Matthew Ng
330757dffa Corrects the recents and home stacks position around docked state (1/2)
Since splitting home stack into home and recents, some problems where
the home stack would appear above when home stack is not visible. This
would cause home stack to be below docked stack and think home is
visible when it is not. Then docking an app would minimize the docked
stack and go into a wierd state when recents is resumed/launched.

When docked stack is used, it will verify that recents is created and
avoids seeing home stack as visible when below docked stack with at
least 1 stack in between. Whenever an app is docked, this will make sure
home stack is below recents.

This will fix some parts of the cts tests that use
"adb shell am stack move-task <taskId> 3 true" and avoid glitches with
the docked stack.

The following scenarios were tested:
- Boot and dock and app without starting recents
- Dock after launching an app (when recents already created)
- Toggle dock with "adb shell am stack move-task <taskId> 3 true" and
undocking multiple times
- Dock with long press recents

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases
android.server.cts.ActivityManagerDockedStackTests
Bug: 35351074, 35145587
Change-Id: I6ac25c64f7d1050ea2260631ff4c052fcca3f185
2017-03-08 11:47:36 -08:00
Tony Mantler
dd3adc3398 Revert "Throw at getPackageSizeInfoAsUser() callers."
This reverts commit 597c934546.

Change-Id: I7d966ef973050ef791403062774fd7f576a65388
2017-03-08 19:04:22 +00:00
Philip P. Moltmann
ed8b4c7a09 Merge "Issue a warning if SharedPreferences are corrupted" 2017-03-08 17:23:17 +00:00
Philip P. Moltmann
ef98cead57 Merge "Log histogram of fsync times of sharedPreferences" 2017-03-08 17:13:28 +00:00
TreeHugger Robot
4ad75b0541 Merge "Throw at getPackageSizeInfoAsUser() callers." 2017-03-08 05:30:49 +00:00
Jeff Sharkey
597c934546 Throw at getPackageSizeInfoAsUser() callers.
But only when targeting O; if they're old apps then log and pass
a soft failure message to their callback.

Test: builds, boots
Bug: 35749102
Change-Id: Ifecf7108397444e88763f404a4b5f3fdc48443bb
2017-03-07 21:03:21 -07:00
TreeHugger Robot
9d64b054d2 Merge "AOD: Invert color spans for ambient display view" 2017-03-08 02:49:12 +00:00
Adrian Roos
0bc3f6aae2 AOD: Invert color spans for ambient display view
Fixes a bug where notifications with color spans would not show
the text properly because we inverted the background. Now we invert
the color spans the app put on the text for the ambient view.

Fixes: 35705172
Bug: 30876804
Test: receive gmail notification, observe that subject is visible on ambient display
Change-Id: I602335562346759d62d2a69a55f3ac9d1be735a9
2017-03-08 00:57:22 +00:00
Dianne Hackborn
3744d8ba14 Merge "Fix issue #35813125: API Review: android.os > Bundle" 2017-03-07 23:30:33 +00:00
TreeHugger Robot
22b3c1b185 Merge "Allow disk writes on main thread in SharedPrefs" 2017-03-07 23:02:25 +00:00
Julia Reynolds
3d91f1109b Allow channels to be renamed.
Because string resource ids aren't stable.

Test: runtest systemui-notification
Change-Id: Iaaa07b8c8cc1c8c321c7fedbfe1e252b4c1153dd
2017-03-07 21:23:12 +00:00
TreeHugger Robot
9165948219 Merge "Retry SECURITY_LOGS_AVAILABLE if DO doesn't request the logs" 2017-03-07 20:21:29 +00:00
Calin Juravle
9108ae1a16 Merge "PackageManager: Clean up code related to foreign dex use" 2017-03-07 18:48:17 +00:00
Pavel Grafov
9cdba2722f Retry SECURITY_LOGS_AVAILABLE if DO doesn't request the logs
Test: manually, with TestDPC.
Bug: 34186771
Change-Id: I99ec406b05f7b072c2c729f6336d1a5cf0f7c3d4
2017-03-07 18:43:36 +00:00
Felipe Leme
8931e30370 Replace AutoFillType by view constants.
Now that AutoFillType does have any logic (since the "subType" logic was moved
to AutoFillHint), it makes more sense to get rid of the type and use constants
directly.

This change creates the contants and "pseudo-deprecate" the old stuff: it's
still available because some clients are using it, but it will be removed once
they migrate.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass

Change-Id: I0efe7f0cc101c86164a18c85903bb871e1f13ba2
2017-03-07 10:43:17 -08:00
Calin Juravle
74f0a3450c PackageManager: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170
Change-Id: I3660e2f3913a73904181449c2d910af0a0477950
2017-03-06 17:59:12 -08:00
Philip P. Moltmann
ccc5fc0e31 Allow disk writes on main thread in SharedPrefs
waitToFinish is called when the main thread enters the stopped state. At
this time we need to make sure to flush all shared preferences to the disk.

Usually this is not problem as they were asyncronously persisted. In
rare circumstances it can happen that the shared preferences are not
flushed yet.

Disk writes on main thread are quicker then waiting for the background
thread to do the write for this thread. Hence it is ok to write on the
main thread here.

Test: android.content.cts.SharedPreferencesTest
Change-Id: Ice8c0425a60005d1e4b150fa74e55e753dead6b8
2017-03-06 16:24:30 -08:00
TreeHugger Robot
ca006f9d3d Merge "Rename DPM.isDefaultInputMethodSetByOwner()" 2017-03-06 23:41:44 +00:00
Philip P. Moltmann
e64a521084 Log histogram of fsync times of sharedPreferences
Example log:

Time required to fsync
/data/user/0/com.google.android.gms/shared_prefs/gms_sync_prefs_sync:ContactMetadata.xml:
[<1: 0, <2: 0, <4: 0, <8: 0, <16: 0, <32: 0, <64: 0, <128: 0, <256: 0,
<512: 0, <1024: 1, <2048: 0, <4096: 0, <8192: 0, <16384: 0, >=16384: 0]

Fixes: 30662828
Test: Looked at log
Change-Id: I6d585b107ae14e05ff1c77b0a0017de684226cba
2017-03-06 15:00:39 -08:00
TreeHugger Robot
a485f71fd7 Merge "Refactor EphemeralResolverService" 2017-03-06 21:39:17 +00:00
TreeHugger Robot
3a47175778 Merge "Fix Loader bugs" 2017-03-06 19:31:30 +00:00
TreeHugger Robot
d4bd7f1ee6 Merge "Removing check for launched-from package to expand PiP." 2017-03-06 18:46:07 +00:00
Philip P. Moltmann
78278d4f8a Issue a warning if SharedPreferences are corrupted
We already only issue a warning if the xml cannot be parsed. So if the
xml could be parsed by the result could not be cast to a map, we should
also only issue a warning.

Also log the corrupted file as this is called on an async thread and it
is not clear what file is affected.

Bug: 29006064
Test: Just logging changes.
Change-Id: I503fd4ee9b905f72668136b4d98c819cd7f9021b
2017-03-06 10:09:34 -08:00
Bartosz Fabianowski
172f7801c7 Rename DPM.isDefaultInputMethodSetByOwner()
Settings.Secure.DEFAULT_INPUT_METHOD is a misnomer. It does not really
record a permanent default of any sort - it just indicates the currently
chosen IME. Thus, isDefaultInputMethodSetByOwner() should more
appropriately be called isCurrentInputMethodSetByOwner().

Furthermore, it turns out that setting a different IME for a user and
the user's work profile is unsupported. Thus, it is sufficient for the
intended use case to just retrieve the calling user's default IME.
There is no need for a |user| parameter.

Bug: 32692748
Test: unit tests (see DevicePolicyManagerTest.java for invocation)
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases

Change-Id: Ia0846d38a1361042429dae7430a8b055575ef2e0
2017-03-06 14:24:12 +01:00
George Mount
e6f7daeb46 Fix Loader bugs
Bug 32758881
Bug 34264461

When destroying the LoaderManager, the host was not being cleared.
The host was being leaked and this leaked the Activity.

When a LoaderManager is reused, for example with an orientation
change, the host was updated, but it wasn't started. This
adds a test for that case to ensure that when a reused
LoaderManager is loaded that it is properly started.

Test: Ib90f14e16083916a21a25ce87a4dd29ab9a33878
Change-Id: Id4c8afab5db0a78bbff376d597be294a6e3dbcba
2017-03-03 17:27:56 -08:00
Dianne Hackborn
2510b37518 Fix issue #35813125: API Review: android.os > Bundle
- Renamed deepcopy to deepCopy.
- Clarified docs about when a shallow vs. deep copy happens.

Test: booted and ran

Change-Id: I2b4400770d781ff51423cd1c860454742e1d3c9c
2017-03-03 17:02:29 -08:00
TreeHugger Robot
a515299d29 Merge "Add forAutoFill suffix on ViewStructure methods that add children." 2017-03-04 00:37:14 +00:00
Todd Kennedy
1fb3404b2b Refactor EphemeralResolverService
* Change name to InstantAppResolverService
* Left old service in place to handle existing client
  [to be removed prior to O launch]
* When resolving phase II, return a list instead of a single item

Bug: 34763730
Test: Build and verify resolution occurs w/ legacy & new resolver service
Change-Id: Ieccaf91538bd91c04f4be4e35d8264619d7cd6d7
2017-03-03 15:45:20 -08:00
Felipe Leme
dbe07a587c Add forAutoFill suffix on ViewStructure methods that add children.
Change-Id: I36f7bd26b7d45fd809d7398cc86de3d2671f2b28
Fixes: 35764877
Test: m update-api
2017-03-03 14:33:07 -08:00
Felipe Leme
235770d4ee Minor documentation fixes.
Test: m update-api
Bug: 33550221

Change-Id: I757f161eb78a5c0c662743f35a372c91130c5b34
2017-03-03 13:58:36 -08:00
TreeHugger Robot
638903002e Merge "OMS: Introduce default overlays" 2017-03-03 21:36:11 +00:00
Winson Chung
d95687c3ef Removing check for launched-from package to expand PiP.
Bug: 35946309
Bug: 35927986
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: I71ed03dc664a080e93427c6e18a4c1e7ff99d726
2017-03-03 20:59:01 +00:00
Philip P. Moltmann
8f40508d81 Merge "Add autoFillHint property to view" 2017-03-03 20:53:43 +00:00
TreeHugger Robot
8b5ca97a6c Merge "Add API for checking which CA certs were installed by the DO/PO" 2017-03-03 20:28:37 +00:00
TreeHugger Robot
e8f090d7c8 Merge "Allow resid notification channel group labels." 2017-03-03 19:45:45 +00:00
Daniel Nishi
b52ba99d00 Merge "Save/load calculated cache quotas to a file." 2017-03-03 19:35:26 +00:00
Bartosz Fabianowski
05dc9f764c Add API for checking which CA certs were installed by the DO/PO
With this API, the system can determine whether a CA cert was
installed by the user or the user's DO/PO.

Bug: 32692748
Test: unit tests (see DevicePolicyManagerTest.java for invocation)
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases

Change-Id: I3bcae5ac18ec2b110154184fc515df804fd73da6
2017-03-03 19:42:51 +01:00