• Home
  • History
  • Annotate
  • only in /frameworks/base/core/java/android/
History log of /frameworks/base/core/java/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0f6254b0ebb7a6502b8f51c12cc89f36f3fb148d 14-Jun-2018 Philip P. Moltmann <moltmann@google.com> Abbreviate permission labels less aggressively

We switched the package installer app to always abbreviate all labels
loaded from foreign packages. This is done so that a foreign app cannot
crorrupt the UI via super-long strings.

The default abbreviation is very aggressive and abbreviates to ~5 cm.

When an app with a targetSDK <= M gets installed, all permissions will
get auto-granted. Hence when a user side-loads such an app, we show the
permissions during install so that the user is aware of this.

Unfortunately most permission labels and restrictions do not fit into a
single line.

This change allows much longer strings for permissions names and
descriptions. It still abbreviates eventually and handles permission
descriptions with weird characters (such as back-space) correctly.

Fixes: 110209410
Test: Side-loaded old app and verified that permission labels and
descriptions are not abbreviated.

Change-Id: Ie1db240883c9f5cb9c1b74ca7bdcb80625e3f7f2
(cherry picked from commit 004e489a251d6adf94922368e98a730185642123)
c5b828df68460fac58964222d0c4b805e63e4081 08-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed typo on TextValueSanitizer sample." into pi-dev
551328eaaa90e770076079a80f8c4e4565787493 08-Jun-2018 Chris Forbes <chrisforbes@google.com> Merge "pm: Exposing Vulkan 1.1 does not guarantee AHB extension support" into pi-dev
eaf3590edabc82318319e9aa082139358d519cbb 08-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Let sendShowMessage called from hide to show"" into pi-dev
98f34402cc75e132b9bad153b757e72992967e4b 08-Jun-2018 Chris Forbes <chrisforbes@google.com> pm: Exposing Vulkan 1.1 does not guarantee AHB extension support

Bug: b/109875843
Change-Id: Ib53fb1a4f7a5a6c055b575b4d8775f8bd62db7a8
e4e9ee79518ba2b795cd46fb5b9ed42ed91f9a0c 08-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move nulling of nextFrameCallback" into pi-dev
d97f38f69c97731ad15298bbd5c34421666ef082 07-Jun-2018 Benjamin Miller <benjaminmiller@google.com> Merge "docs: Backup requestRestore() doesn't kill app during restore." into pi-dev
c6e4acc222ca99af82e3910d164cdf3f5636559b 07-Jun-2018 Winson Chung <winsonc@google.com> Merge "Consider window background opacity when determining snapshot translucency" into pi-dev
b6e3e618509992bb5f7a519f20f5130eb33a80ef 07-Jun-2018 Laura Davis <laurabd@google.com> Merge "docs: Changed language to be gender-neutral." into pi-dev
bae9b1a71cb271166bf28c52dbd6a2092401f5bc 07-Jun-2018 Andrew Sapperstein <asapperstein@google.com> Merge "Revert "Hide system apps until installed (1/2)"" into pi-dev
e6a026bdfed45b4085410d1ecd042b1214cedb0a 06-Jun-2018 Jorim Jaggi <jjaggi@google.com> Move nulling of nextFrameCallback

If draw() invokes postDraw that sets the next callback, the
callback will never be invoked.

Test: Long-swipe-up from navigation bar
Change-Id: If2e4dfff8a845b73fa77426305d5ece1921857e5
Fixes: 109701914
02378b430717d55bb3115e366ce6a5a9359c0d07 05-Jun-2018 Winson Chung <winsonc@google.com> Consider window background opacity when determining snapshot translucency

Bug: 80536978
Test: Open WhatsApp conversation with IME open, hit home, go to Overview
Change-Id: I14cb15a15c2dc43229c927eda4bad3d61e568622
39f04a7da4a3b7925827685f1c03dfa0e41ffcd4 07-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Document -n option on intent specification." into pi-dev
afef5daaf969546aecd8d8e7de96ee4d9064240d 06-Jun-2018 Sanry Huang <sanryhuang@google.com> Revert "Hide system apps until installed (1/2)"

This reverts commit 40ede29ed6467d4d85a482e6008b92aa02d50267.

Bug: 74068582
Bug: 80444486
Bug: 80316870
Bug: 109803325
Bug: 109642189
Bug: 109660260
Bug: 109649585
Bug: 109647120
Bug: 109648512
Bug: 109648513
Bug: 109647122
Change-Id: I0e50ceebeaecae89f461f541450e24d9c148527d
a2537b7269179c37a6c068dfb71efd63fdbd06fb 06-Jun-2018 Selim Cinek <cinek@google.com> Merge "Fix exception from DateTimeView unregisters receiver again" into pi-dev
bcbdeb29c96b836101b4adccb0bc66e6450e6705 06-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix repeated calls into reportExtractedText" into pi-dev
fe1d9dc1af7b067ae939253c17681cd709bbff12 06-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Further interruptiveness changes" into pi-dev
9c593f27ad5e5fdf22efac28edfc3a447acd8a89 28-May-2018 Benjamin Miller <benjaminmiller@google.com> docs: Backup requestRestore() doesn't kill app during restore.

Doc-only change to note that requestRestore() doesn't behave as expected
and kill the app as part of the restore operation.
Fixed formatting of first paragraph running into deprecation notice.
Also removed dupe versioning info from deprecation notice--see staged version.
Staged at:

Bug: 29255593
Test: make ds-docs and staged output. Visual inspection and manual link test.
Change-Id: I8baae2216f23bd63510f8b445fcdd8090354b0df
051b63d4b368973641ab0012a62fa160c5e93736 06-Jun-2018 Martijn Coenen <maco@google.com> Merge "Serialize calls into BinderProxy." into pi-dev
e8f0fe3140c30f7752b70ad4ee126615e923dbdf 05-Jun-2018 Riddle Hsu <riddlehsu@google.com> Fix exception from DateTimeView unregisters receiver again

Although parent view may invoke onDetachedFromWindow incorrectly,
itself should guarantee to unregister receiver only when removing
the last attached view.

Change-Id: I4b701c223c6aa354896a4067f77aad9c98d88dfd
Fixes: 78506836
Test: atest FrameworksCoreTests:DateTimeViewTest
890662c3c4100ec0510226d6feb7142ac27cd82c 06-Jun-2018 Laura Davis <@google.com> docs: Changed language to be gender-neutral.

Test: make ds-docs

Bug: 75324366
Change-Id: Ia2dbcbe4bec303791cbbb004bab6a0b585c5dfb6
ba4e877905cca9656d9f13030625717619bc163c 01-Jun-2018 Akinobu Nakashima <akinobu.x.nakashima@sonymobile.com> Suppress AID log on adb logcat

When NFC event transaction intent is sent,
the device shows AID information on logcat.
But such information should not be shown for security reasons.

Test: Send NFC EventTransaction and check logcat
Bug: 80551185
Change-Id: I8d1f9c1946bb1514e3a6bfa70fff03be4525d6b5
(cherry picked from commit 37e702861579fddfd275143c2421ca53f27cb41c)
c4b6bd34e1c7cff4ba5cb40a22710ac8ec782292 05-Jun-2018 Jiyong Park <jiyong@google.com> Merge "Fix: vendor public libraries are accessible via System.loadLibrary" into pi-dev
a4fb9da87950bd60d725c9a8777fd4accd723fd2 04-Jun-2018 Julia Reynolds <juliacr@google.com> Further interruptiveness changes

- Compare strings instead of CharSequences in actions
- Ignore changes to remote input choices
- Ignore updates to summaries

Test: runtest systemui-notification
Change-Id: I33a29ee85d93658b2c7217a4ef3b300c9bd2850c
Fixes: 78643290
038f7a8b09db95a375a9eab49fa89ab8b2e40b81 04-Jun-2018 Clara Bayarri <clarabayarri@google.com> Fix repeated calls into reportExtractedText

As part of adding the hint text feature in
I357dd5c74b61d149cf8612d1f52c7118ec70c696 I refactored
the code inside reportExtractedText to avoid nesting but lost one
of the condition checks in the process. Since onDraw calls into
this method on each frame, the missing check was causing calls to be
made into the IME even when no content or selection changes have

Test: CtsWidgetTestCases:.TextViewTest
Bug: 73613936
Change-Id: If56e3f1d45e64dccd052e4cff4d742f0cbecc07c
44121059dce0713c4dd82fbd3c04ab9051eb0cdc 05-Jun-2018 Jorim Jaggi <jjaggi@google.com> Merge "Crashing can not override Keyguard transit" into pi-dev
0192e9a213f901bd94f92700a09039419ff8bd3a 05-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Optimise the hit test algorithm" into pi-dev
dfa390e0802bbbdd00d7911f893cc94ec57bf159 05-Jun-2018 Martijn Coenen <maco@google.com> Serialize calls into BinderProxy.

The BinderProxy class is not thread-safe, hence all calls into it
must be serialized. This was achieved by holding the gProxyLock in
JNI code. However, a recent change added calls into BinderProxy
from ActivityManagerService without holding that lock, causing

Instead of dumping debug info from AMS, make the call directly
from JNI, so we can make sure gProxyLock is held correctly.

Also, only dump on debug builds.

Bug: 71353150
Bug: 109701487
Test: sailfish builds, boots, info gets dumped with lowered limits.
Change-Id: I446a71ce4115b9936a01a170401ef98ba3818c0b
205a5581ae0a3a5cf70ce8fe8bc752de5e58f696 05-Jun-2018 Makoto Onuki <omakoto@google.com> Merge "Allow except-idle whitelisted apps to start BG services in EBS" into pi-dev
0c6929ec046119c3b360dcf2e66c64306ea1c61b 05-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS"" into pi-dev
af8ff4f2afdfa1acfc7acf73f934434cac97b7a3 04-Jun-2018 Makoto Onuki <omakoto@google.com> Allow except-idle whitelisted apps to start BG services in EBS

Change-Id: I8dd42f48cf13c97b4e428afbf29838f442d8731b
Fixes: 80420676
Test: dumpsys activity processes| grep mDeviceIdle
mDeviceIdleWhitelist=[1000, 1001, 2000, 10028, 10035, 10036, 10042, 10053, 10137, 10138, 10139, 10142]
mDeviceIdleExceptIdleWhitelist=[1000, 1001, 2000, 10006, 10008, 10014, 10016, 10028, 10035, 10036, 10042, 10047, 10053, 10058, 10060, 10070, 10111, 10137, 10138, 10139, 10142]
Test: Manual test with "DEBUG_BACKGROUND_CHECK = true" and
am startservice 'com.android.vending/com.google.android.finsky.hygiene.DailyHygiene\$DailyHygieneService'
then check the whitelist log.
492457e94e32599ff61e89846f3bf45917890848 04-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "New behavior of setSynchronousMode" into pi-dev
fdaf523f04605a59a0855229827ccad98319880a 04-Jun-2018 Adam Powell <adamp@google.com> Revert "Let sendShowMessage called from hide to show"

This reverts commit 690b36903ce89e692ca73ff75621ad15077fabbb.

Original patch created an inconsistency in show/dismiss
dialog callbacks.

Bug: 80268176
64896541d4a440a843a87c5c510a9feed536315e 04-Jun-2018 Hongming Jin <hongmingjin@google.com> Merge "Add shell command handler for account manager to allow enabling service binding for instant app. Test: cts-tradefed run cts -m CtsAccountManagerTestCases cts-instant-tradefed run cts-instant -m CtsAccountManagerTestCases Bug: 79367659" into pi-dev
4da326c0d6e9ab78ceca654e13bcbc05bc671c09 04-Jun-2018 Andrew Sapperstein <asapperstein@google.com> Revert "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS"

This reverts commit 44c4ca41d83d73d7c1d0e217a80a46a449e8c475.

Reason for revert: Wanted to go with a different option and this was mistakenly Dr. No'ed.

Bug: 80444486
Test: clean revert
Change-Id: I7fdd13a5bc0f4d9fabf91f3e5497c4065008b531
15ebbeb9fdbf91efcdf0b85c5e7a2c1f449803ea 04-Jun-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS" into pi-dev
8e2bfc11ce480aaa4791c42bdf1df7111c32db4a 30-May-2018 Hongming Jin <hongmingjin@google.com> Add shell command handler for account manager to allow enabling service
binding for instant app.
Test: cts-tradefed run cts -m CtsAccountManagerTestCases
cts-instant-tradefed run cts-instant -m CtsAccountManagerTestCases
Bug: 79367659

Change-Id: I3ac968ebc20be68da08293d9b685a01920f11b76
cfe38cdb1cc45c8b7dcbe4f39329551f6602b9ce 04-Jun-2018 Jiyong Park <jiyong@google.com> Fix: vendor public libraries are accessible via System.loadLibrary

This CL fixes the problem that vendor public libraries (libs that are
listed in /vendor/etc/public.libraries.txt) are not loadable via
System.loadLibrary(). (Note that the libs were accessible via dlopen()

The problem was happening because when System.loadLibary() is called,
the classloader first checks whether the lib is found and accessible in
its own native lib search paths. The native lib search paths basically
come from the java.library.path property, which in turn is from
namespace.default.search.path in /system/etc/ld.config.txt. When VNDK is
enforced starting from P, namespace.default.search.path does not have
paths other than /system/lib because otherwise system process can have
unlimited access to libs in vendor partition. The linker namespace is
dynamically configured by the libnativeloader so that only the public
vendor libs are accessible. However, as a side effect of removing
/vendor/lib from namespace.default.search.path, the classloader always
fails to find any lib under /vendor/lib even if the lib is a public one.

In order to solve the problem, while keeping rest of the non-public
vendor libs from apps, /vendor/lib (and /odm/lib and /product/lib as
well) is added to the classloader AFTER native loader is created for the

Bug: 93333337
Test: m -j
Test: System.loadLibrary("adsprpc") is successful in Pixel (because
libadsprpc.so is in Pixel's vendor public lib list)
Test: atest cts/tests/tests/jni
Change-Id: Iac12384548cbdd51234568082d02eeba466c160c
8ba2089165b39dcf595444cc535fb57627fd8944 01-Jun-2018 Fyodor Kupolov <fkupolov@google.com> New behavior of setSynchronousMode

setSynchronousMode is now applicable to any journal mode.
This can be useful for apps that want to use stricter durability
settings for their database.

Test: android.database.sqlite.cts.SQLiteDatabaseTest
Bug: 86953240
Change-Id: I7dbaa6d0bc0975da8067e87b402f63f51b4add10
dbc6052022661b8f9a6340575267b0ea635dc062 01-Jun-2018 Hongming Jin <hongmingjin@google.com> Merge "Enforce permission check before returning application info Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest Bug: 77821568" into pi-dev
9c52ebbf96ba04e07bde962c93f203e81621599b 01-Jun-2018 Jorim Jaggi <jjaggi@google.com> Crashing can not override Keyguard transit

If an app crashes during Keyguard transition, make sure to keep
Keyguard transition

Test: AppTransitionTests
Test: go/wm-smoke
Change-Id: I80b80952f93d2b5611754f05a3dc333905cd1c86
Fixes: 80132133
079f6d7fa68e5640081bfb21fe8e05fa93307447 01-Jun-2018 Makoto Onuki <omakoto@google.com> Merge "Serialize AM.getContentProvider() calls in client side" into pi-dev
44c4ca41d83d73d7c1d0e217a80a46a449e8c475 31-May-2018 Jackal Guo <jackalguo@google.com> Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS

Update the logic in PackageParser to avoid unistalled system app
can't be found.

Test: follow steps on b/80444486 and can add account normally
Test: PackageManagerTest
Bug: 80444486
Change-Id: Ifafac34111d883e51563018be793655c25d09fba
b559512508a44b49adee1066939244ee9f076587 01-Jun-2018 John Reck <jreck@google.com> Merge "Attempting to fix the black flicker" into pi-dev
83e162615f022f897d451db914becd6825a69b88 18-May-2018 Hongming Jin <hongmingjin@google.com> Enforce permission check before returning application info
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
Bug: 77821568

Change-Id: I7554805c36c0c2552163dad7b07cfc5f552b624e
b6c79ea065fc1adf383beabfacb401ff8b6466a8 31-May-2018 Makoto Onuki <omakoto@google.com> Serialize AM.getContentProvider() calls in client side

Th wait() call in AMS.getContentProviderImpl() can cause a deadlock when it
starts a new process for a target provider and all system server binder threads
are reaching out to the same provider at the same time, because AMS won't be
able to receive a callback from the provider process.

Let's serialize access to AM.getContentProvider() to avoid this scenario.

Longer team, we should stop waiting in the system server and instead do so in
the client side.

Bug: 74523247
Test: Boot, add a google account, and let syncs run and finish.
Test: Watch free video on Coursera

Change-Id: If5be2dc4b6f22f72d1bb3aa1b5b4d49f20c8d94d
d4c5d1e44847fd3712068ac0d0144839f84b4479 31-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: add new detailed error callback" into pi-dev
fe8c263011f0adeaa771a90f65ba34859294e675 31-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Document getNumberOfCameras behavior for logical camera" into pi-dev
2f898c4df5b666bf88f749b60fcc1882286c3f08 31-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ensure permission held for MATCH_KNOWN_PACKAGES" into pi-dev
5b02c629bd8da951331e5e464fe78e03b3393a72 17-May-2018 John Reck <jreck@google.com> Attempting to fix the black flicker

Bug: 79231206
Test: Repro steps from bug

Merged-In: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
a07cd3268486746d61f8028c4388d750c77c227a 31-May-2018 Yin-Chia Yeh <yinchiayeh@google.com> Camera: add new detailed error callback

For the legacy shim layer to tell the difference between evction
and disable error.

Test: CTS CameraEvictionTest + IdleUidTest
Bug: 77486868
Change-Id: I5b68f55460287634903c9b8b42188d9dec8744d5
e7d3cd0a761c8a742858d8213d75b3313b21d054 31-May-2018 Shuzhen Wang <shuzhenwang@google.com> Camera: Document getNumberOfCameras behavior for logical camera

For camera1 API, framework only exposes one camera id for every
logical/physical camera id group. Document this behavior accordingly.

Test: Build
Bug: 80075565
Change-Id: I32c2de84d27a603d485014255bf1fad5031aa08e
138b106402d86653eaf296a02708737a6e360b58 09-May-2018 Mihai Popa <popam@google.com> Optimise the hit test algorithm

Layout#getOffsetForHorizontal was running in O(n^2) time, where n is the
length of the current line. The method is used when a touch event
happens on a text line, to compute the cursor offset (and the character)
where it happened. Although this is not an issue in common usecases,
where the number of characters on a line is relatively small, this can
be very inefficient as a consequence of Unicode containing 0-width
(invisible) characters. Specifically, there are characters defining the
text direction (LTR or RTL), which cause our algorithm to touch the
worst case quadratic runtime. For example, a person is able to send a
message containing a few visible characters, and also a lot of these
direction changing invisible ones. When the receiver touches the message
(causing the Layout#getOffsetForHorizontal method to be called), the
receiver's application would become not responsive.

This CL optimizes the method to run in O(n) worst case. This is achieved
by computing the measurements of all line prefixes at first, which can
be done in a single pass. Then, all the prefix measurement queries will
be answered in O(1), rather than O(n) as it was happening before.

Bug: 79215201
Test: manual testing
Change-Id: Ib66ef392c19c937718e7101f6d48fac3abe51ad0
Merged-In: Ib66ef392c19c937718e7101f6d48fac3abe51ad0
ce1beadc09f4052f632ef0c65aa862797bcb9150 31-May-2018 Jason Monk <jmonk@google.com> Don't use stable providers for slices

Because they aren't what we want.

Test: manual + existing tests
Bug: 80532760
Change-Id: Ib69799a2ef9440d0d67cea02e6b3c61844535755
7ba4c2b254f87f66714266a0c06f687f470f2037 30-May-2018 Evan Rosky <erosky@google.com> Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev
ef9acb6ed97ececa4c8554adb693ec948a963db1 30-May-2018 Todd Kennedy <toddke@google.com> Ensure permission held for MATCH_KNOWN_PACKAGES

There's an escape clause that passes the cross user permissions
if the caller UID is identical to the target user ID [eg. we're not
operating across users]. However, the method getInstalledPackagesList()
uses android.permission.INTERACT_ACROSS_USERS to filter the results and
a calling UID check is not sufficient. Ensuure the permission is
actually held, regardless of the calling UID or target user.

Change-Id: Iebf88668766d387a15246d6eea6420610665105a
Fixes: 80435086
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
0dbb516a4383f022420d57b7af1865eb37cb3021 25-May-2018 Michael Wright <michaelwr@google.com> Allow for any default vibration intensity level.

Because we can't always create the range of effects we'd like, we may
need different default intensity levels for different devices. This
works fine for prebaked effects, but for application defined amplitudes
we need to provide a scaling function. In addition, this scaling
function should leave amplitude values untouched in the default state so
that application developers produce the effects they expect.

Bug: 80275800
Test: manual
Merged-In: Ibb552ddfa60891853ebcb1a5567ed6745bb5defe
Change-Id: Ibb552ddfa60891853ebcb1a5567ed6745bb5defe
8c4c359b25912fa3670d51c66e4394f85bf30462 29-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix for missing location icon" into pi-dev
a5d8c3718d23cbe316cb10106bce95c44bb57489 29-May-2018 Glenn Kasten <gkasten@google.com> Merge "Resolve conflict between javadoc and CDD re: audio output" into pi-dev
14e605d7e91bf186e8be4a9f1d9bd73be9ed6d37 29-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Enable systemui_theme feature flag" into pi-dev
a1ce9637435f28b1de2b9e8e8a2175b53cc9e0f2 29-May-2018 Amith Yamasani <yamasani@google.com> Fix for missing location icon

OpEntry.duration was being used to indicate that the
operation was still running if -1 is returned. A recent
change caused a regression.

Adding a new mRunning field in OpEntry to explicitly
hold the running state, even when partial duration is

Change-Id: Ib29f4c903f990aaa202e84f964959aedfc24abdb
Fixes: 80242152
Test: atest FrameworksServicesTests:AppOpsActiveWatcherTest
Test: Launch maps and verify the location icon is visible
in the status bar
8997b7e4c9eef423f73b7c61e926a66648473c24 28-May-2018 Adrian Roos <roosa@google.com> Merge "WindowInsets: Never dispatch negative insets" into pi-dev
879d09f94607e2f8776bc91a918bef6c7cab3bb3 26-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dump proxy debug info when exceeding proxy limit." into pi-dev
9d19487b1c144316dfa208ea61fb733e3946af5a 26-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev
cd80e611cab3cc09366af23f2ef0b0f8e5146c86 18-May-2018 Evan Rosky <erosky@google.com> Fixed a bug where sometimes unhandled handler would consume all keys

In a situation where a focused view consumed only the UP of a key
and the unhandled key manager would focus a listener, it wouldn't
drop focus unless the original key was pressed/released again.

This updates the record of captured keys before it can be consumed
in the view hierarchy.

Bug: 79993136
Test: Added a test for this to cts ViewTest#testUnhandledKeys
Change-Id: I5dfdcf16c5c41e9ad51cb62b385580c5493e8520
64a33d695dfe333cc6ae1acf41724f820e759030 26-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Final cleanups to permission slices" into pi-dev
c4e19963f42f21ac2f18a062caac8846e0b82110 25-May-2018 Selim Cinek <cinek@google.com> Merge "Fixed the behavior of group conversations when targeting P" into pi-dev
b14dde0793e6639c74adea33f72cf38a0fad70fb 25-May-2018 Jason Monk <jmonk@google.com> Final cleanups to permission slices

- Add icons to the right and shortcut modes
- Add color
- Make sure dialogs are secure

Test: manual
Bug: 79960669
Change-Id: I6d251b0ea5bd3c1b3eed32b184e4aae22c52ffb5
eebac6d6b562d5b94d5d53a1c33a59dd2da46811 25-May-2018 Martijn Coenen <maco@google.com> Dump proxy debug info when exceeding proxy limit.

If a process gets killed because it sends too many proxies,
dump proxy debug info so we can see what types of interfaces
it sends.

Bug: 71353150
Test: builds, output generated
Change-Id: I3a7787cb3fa73b0b4ad223b18cd79f44e22b9ef5
30eab1f43074590fb08dd48de0bf786561622eff 25-May-2018 Wale Ogunwale <ogunwale@google.com> Added TestApi to ActivityInfo.isTranslucentOrFloating

This would be use to determine the right activity state during CTS
test for products that have windowSwipeToDismiss set.

Also, dump ActivityRecord.fullscreen to proto for the same reason.

Bug: 76207986
Bug: 79167358
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerAssistantStackTests
Change-Id: Iadc088e9129be088b8a083ebbafd8d20fe26b673
ce8794fbbc49baf2777eb9d078890cbf28c890d5 24-May-2018 Selim Cinek <cinek@google.com> Fixed the behavior of group conversations when targeting P

Fixes an issue where the group conversation heuristic was still
applied even when the app is targeting P. We're now following
the isGroupConversation completely and only do the migration
for apps targeting < P.

Change-Id: I471d58e8a8f5e6270f0dcce8691d08a2bdd1c582
Fixes: 78450835
Test: add messaging notification, observe correct display
1ffdec20b498284190a606d799ab6e77958fdd04 25-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix monkey crash in smart selection animation" into pi-dev
568ccfe0b6ba1a4926157651076adbc459054cc2 25-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Clarify multi-camera id selection logic" into pi-dev
6e8e27bf9ad118038282f29abc75b89e8f37bb86 25-May-2018 Mihai Popa <popam@google.com> Fix monkey crash in smart selection animation

In Id65443e93d277c106ea955c867d39e94192cc55d we fixed a monkey crash
happening when the smart selected text had changed while the smart
selection animation was running. However, the change introduced a new
crash, happening when the smart selection result was null. This CL fixes
it, and lets startSelectionActionMode run even when the result is null,
as there seems to be some logic there which should happen in this case.

Bug: 80244201
Test: none
Change-Id: I7f0304446dec85578bdcd5011d2e9ea2737d3c36
(cherry picked from commit a9d27ea8692dbf6c6def6bd21754af0ad67d1675)
Merged-in: I7f0304446dec85578bdcd5011d2e9ea2737d3c36
7419a17d9243ddb0629af24d0308797154e44925 24-May-2018 Adrian Roos <roosa@google.com> WindowInsets: Never dispatch negative insets

Bug: 80204753
Test: atest ViewRootImplTest
Change-Id: Idace95ae57c6a3a1667b95ce8c3ac7d2bfe06f94
ce3ae87da943eee81483fab8a786633b358179b4 24-May-2018 Felipe Leme <felipeal@google.com> New Autofill field: FIELD_AUTOFILL_SESSION_ID

This field contains the autofill session id (Thank You, Captain Obvious!), which
is useful to correlate autofill metrics that are not logged on

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
'adb shell logcat -b events | grep sysui'. Example:

Fixes: 80093094

Merged-In: If4b1c9ab616b2ba580745096894997eb7edb3e34
Change-Id: If4b1c9ab616b2ba580745096894997eb7edb3e34
94eca2cbd4f274a85b1080918bf40220cf1160a9 25-May-2018 Lucas Dupin <dupin@google.com> Enable systemui_theme feature flag

Turning flag on even though translations are not ready in order to
expose feature and make sure it was properly tested before release

Change-Id: I10f515b1bdcae45d1ed6d6d293afe1853f44dc02
Bug: 63903361
Fixes: 75498812
Test: manual
41a60f40338851616d149fdb43813ea6b1377ff1 25-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added the class name of activity being autofilled on (most) autofill metrics." into pi-dev
94594d1290a15ff56770301debfce2097fa5996c 25-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Merged many autofill session metrics into AUTOFILL_REQUEST:" into pi-dev
621fd20f5591a3d5846e7bbdb8d5624e2b8b8dab 25-May-2018 Makoto Onuki <omakoto@google.com> Merge "Tweak exemption for sync requests made by FG apps" into pi-dev
212b1614f4328a66c58a27899fe75583c753ef35 22-May-2018 Felipe Leme <felipeal@google.com> Added the class name of activity being autofilled on (most) autofill metrics.

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
'adb shell logcat -b events | grep sysui'

Fixes: 80151641

Change-Id: I5b83e6ceb549a641d10c39bbfd4f24d0a43d1a23
14c61286c42eeadc9dd3bc033dca985ffa91e19d 24-May-2018 Michael Wachenschwanz <mwachens@google.com> Merge "Revert "Revert "Write UsageEvents Parcel data as a Blob""" into pi-dev
cf2c35dca6e20ffc87b4980b3b5d576a080db80a 24-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "WallpaperColors hint computation"" into pi-dev
56cc567dfd5688c8311b6b82402706a0c68c5b78 24-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hide system apps until installed (1/2)" into pi-dev
76d03fcd7e7f70287a49107e3f9b6420b99c6865 24-May-2018 Michael Wachenschwanz <mwachens@google.com> Revert "Revert "Write UsageEvents Parcel data as a Blob""

This reverts commit 8520e569980c8b2bbca0872c906d057165121012.

Reason for revert: Bug Fixed

Change-Id: Ibaabe3c6bab72f417b24121a91ec5f953ad18ff7
f61ba5cabf031181154d82c46715ef4fad2d3557 21-May-2018 Felipe Leme <felipeal@google.com> Merged many autofill session metrics into AUTOFILL_REQUEST:


At least one AUTOFILL_REQUEST is created on each session; additional ones are
created for each additional request made to the service (which is tracked by

- Added TYPE_CLOSE to indicate a timeout waiting for the service response.
- Added FIELD_AUTOFILL_REQUEST_ORDINAL to indicate the order of the request in
the session.
- Created an AUTOFILL_FIELD_FLAGS to avoid conflict with FIELD_FLAGS.

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched the result of
'adb shell logcat -b events | grep sysui', as described below.

1) LoginActivityTest#testAutoFillNoDatasets:


758:10 = TYPE_SUCCESS, 909 = FIELD_AUTOFILL_NUM_DATASETS (-1 == null response)

2) LoginActivityTest#testAutoFillTwoDatasetsSameNumberOfFields:


Where 1145=FIELD_AUTOFILL_DURATION (60ms UI latency)

3) LoginActivityTest#testCancellationSignalCalledAfterTimeout:


Where 758:2 = TYPE_CLOSE (timeout)

4) LoginActivityTest#testAutofillManuallyOneDataset:



5) FillEventHistoryTest#testNoEvents_whenServiceReturnsFailure:


Where 758:11 = TYPE_FAILURE

6) AuthenticationTest#testFillResponseAuthJustOneField



7) AuthenticationTest#testDatasetAuthTwoDatasets



8) AuthenticationTest#testFillResponseAuthServiceHasNoData


9) VirtualContainerActivityCompatModeTest#testAutofillSync



10) FieldsClassificationTest#testHit_manyUserData_manyDetectableFields




Bug: 80093094
Fixes: 80095814

Merged-In: I87424834fc925a3bcba410eec5aa32fcd6253367
Change-Id: I87424834fc925a3bcba410eec5aa32fcd6253367
b5e5053ebc442ced1ad702f551919bc533bee164 24-May-2018 Lucas Dupin <dupin@google.com> Revert "WallpaperColors hint computation"

This reverts commit c50f47d970b474371938f33e46b13ae2dd040df0.

Fixes: 79465234
Reason for revert: Google still does it using private APIs and apps were relying on this behavior, not good for the ecosystem.

Change-Id: I62e2b4cd1e6e562fcdd89c97e599bcdade83381a
87631c2d29d8f5eaa83c769a7eaa9cb82e85eb9b 24-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use TCM context if application context is unavailble." into pi-dev
d55c618340992aa22c4c11a19f2b93a9b83f71b7 24-May-2018 Michael Wachenschwanz <mwachens@google.com> Merge "Revert "Write UsageEvents Parcel data as a Blob"" into pi-dev
8520e569980c8b2bbca0872c906d057165121012 24-May-2018 Michael Wachenschwanz <mwachens@google.com> Revert "Write UsageEvents Parcel data as a Blob"

This reverts commit f5bae21c5efcd51c0b3fb29942c02c00b896fccf.

Reason for revert:
Bug: 79860717
Fixes: 80215357

Change-Id: I0768e5ce0a95afe7ff091c0035335437bb33c46c
b112f26ccef2ddcca67f14fd53b9ad297e452a4a 24-May-2018 Michael Wright <michaelwr@google.com> Use TCM context if application context is unavailble.

In TextClassificationManager, we use the application context to reduce
the likelihood of leaking the underlying Activity. Unfortunately, some
places (e.g. auto, system_server) don't actually provide us an
application context, so we need to fall back to whatever context was
passed in to TCM in the first place.

Bug: 80188317
Test: none
Change-Id: Ib4b2e6ed543d3ed56cefd8f56717855158cdc0fe
062c050d01972035b1d758a9649714ac879dea8d 24-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Use fallback key if the requested key returns null" into pi-dev
40ede29ed6467d4d85a482e6008b92aa02d50267 19-Mar-2018 sanryhuang <sanryhuang@google.com> Hide system apps until installed (1/2)

Applying this mechanism for system carrier apps to make visibility
reasonable from the user's perspective. In other words, before
hidden system apps have been installed, they wouldn't be listed
via APIs in PackageManager which are used at all apps list and
search in Settings and so on.

Test: manual
Test: atest CarrierAppUtilsTest
Test: atest PackageManagerTest
Bug: 74068582
Change-Id: Id3ff138ad529b909d9bbf6719af3a553b909ccbb
3884e936c90bb3713e2bafd4c46291f38134ce77 24-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SystemUI theme feature flag" into pi-dev
d5f25d2cd882c89965b6538082556d9469f72288 23-May-2018 Makoto Onuki <omakoto@google.com> Tweak exemption for sync requests made by FG apps

Exemption given to a sync request made by a foreground app (including
At the schedule time, we promote the sync adapter app for a higher bucket:
- If the device is not dozing (so the sync will start right away)
promote to ACTIVE for 1 hour.
- If the device is dozing (so the sync *won't* start right away),
promote to WORKING_SET for 4 hours, so it'll get a higher chance to be started once the
device comes out of doze.
- When the sync actually starts, we promote the sync adapter app to ACTIVE for 10 minutes,
so it can schedule and start more syncs without getting throttled, even when the first
operation was canceled and now we're retrying.

Test: atest cts/tests/tests/syncmanager/
Test: Manual test with "requestsync -f" and "am set-standby-bucket", while checking
"dumpsys usagestats"
Test: settings put global app_idle_constants \
and check "dumpsys usagestats" and make sure the constants are properly updated.
Fixes: 72443754

Change-Id: I233d8e4be85769150830bac798abc04810f4cc7b
452936192fa1a249fda1ea8a9e757c4edc9d2bac 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE Allow cross user usage event queries" into pi-dev
615f8039af17a20ae1b05fa28cf84d21e7d5090b 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Write UsageEvents Parcel data as a Blob" into pi-dev
06daff0660a036c5af32d1dde08aadc9fd48bf6f 23-May-2018 Lucas Dupin <dupin@google.com> SystemUI theme feature flag

Hide SystemUI theme under feature flag, this way we can enable it when
we're sure that all new strings were localized and the feature is ready
for prime time.

Bug: 63903361
Test: manual
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SystemUiThemePreferenceControllerTest
Change-Id: I1093d414d951b71cab7cff10187c63bdd80eeee2
a57c274fc489eed8da13d154740b1eeadf175fc0 23-May-2018 Shuzhen Wang <shuzhenwang@google.com> Camera: Clarify multi-camera id selection logic

Test: Compile
Bug: 80075565
Change-Id: I12d95b7b0248ab8c3e8fb9e42cac3ed6475e499b
ccf93b279212e10a14dc2ff5e3c35826d73739c4 23-May-2018 Chalard Jean <jchalard@google.com> Merge "Fix: ConnectivityManager is initialized with a wrong context" into pi-dev
44eae19b24473d1b1bf8bfcac1d965078cb55768 23-May-2018 Jeff Sharkey <jsharkey@google.com> Merge "Last-ditch clamping of negative NetworkStats." into pi-dev
1f8f21af607b6a8449a509d8482f92a194fc1c99 23-May-2018 Remi NGUYEN VAN <reminv@google.com> Merge "Add configurable captive portal probes" into pi-dev
20e682910de540ddfcb7d566eb4856d263e9817e 21-May-2018 Julia Reynolds <juliacr@google.com> DO NOT MERGE Allow cross user usage event queries

For multipackage requests, caller must be system uid or hold
interact_across_users if not requesting fate for the same user.

For single package requests, caller must be system uid or the
same package and hold interact_across_users if not requesting data
for the current user.

In both cases the caller must have the usagestats permission.

Test: couldn't find automated tests for this file; manual
Bug: 79142791
Change-Id: I8d650f8e875e0e4578cb48c9ba42e821342852a0
467a831aa6e1759fd5816846d6edefd21537da93 23-May-2018 Michael Wright <michaelwr@google.com> Merge "Uncanonicalize URIs before comparing them." into pi-dev
8255c2d6c27363daa8bd92f7fcb3302682b9950a 22-May-2018 Remi NGUYEN VAN <reminv@google.com> Add configurable captive portal probes

The probes allow testing for a configurable status code and location
header (regexes). They are disabled by default, so this CL is a
no-op unless the probe configurations are pushed.

Bug: b/79499239
Test: tests in CL pass, manual: captive portal login works
Change-Id: I785723aaed06054b9aa8ebff77803f23d7836db9
18474fcfafd4416b6c924cf0c1b0cffc563c7486 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixup SntpClient to bypass Private DNS" into pi-dev
7eccfeb9ca60aa6e09afbdf3a4435cb2f0d12987 22-May-2018 Erik Kline <ek@google.com> Fixup SntpClient to bypass Private DNS

NTP may be necessary in order to validate Private DNS certificates,
so it should be allowed to bypass Private DNS.

Test: as follows
- built, flashed, booted
- tcpdump for port 53; adb shell am restart
queries for the NTP hostname appear in the clear
- runtest frameworks-net passes
Bug: 64133961
Bug: 80118648
Change-Id: Id9ceb3fcaaffb48cbbd4cd381d48cae991572c9e
d018bc4346a3c1706db18894f789f6130faec09e 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hiding the icon of notifications that were replied to" into pi-dev
9e3d7d63780fdb7a5c491e1b38626807f23af690 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allowing the notification to be a bit bigger for the remote input history" into pi-dev
b662f94c3740b7a3a4ceae8fc953185345cbb519 23-May-2018 Jovana Knezevic <jovanak@google.com> Merge "Adding hidden APIs for assigning Admin flag to users." into pi-dev
b0dc61b503a1d86ae61bdd4a209b476a4cf535a3 23-May-2018 Selim Cinek <cinek@google.com> Hiding the icon of notifications that were replied to

Because those notifications now stay around but the user
has already seen them, were hiding the icon instead.

Change-Id: I6b8590e31295ed79218698b1ac54df33b273d38c
Fixes: 78486801
Test: add notification, reply, observe icon gone
0355dd64369ca77662acfe33a267998f67b616e4 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Stop using unsupported Canvas operations in IME" into pi-dev
42b29eb46289b7c525e93888b968323996699b02 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Bumping BatteryStats report version." into pi-dev
4611a2e1bc1ced572aaf1c326c083ea805b12027 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update security-related WebView documentation." into pi-dev
bee4e074bbb791f7696233ce43bcf28a75dd1d99 22-May-2018 Selim Cinek <cinek@google.com> Allowing the notification to be a bit bigger for the remote input history

This also fixed the squishing when heads-upped by only allowing
one remote input text to be visible when heads upped.

Change-Id: I0c77931233b452420dee4dcf4772092d96d214c9
Fixes: 78877946
Test: add inbox style with 6 entries, reply a few times, observe no squishing
f24ad4993cf02d94f2f732e0db62e7103942f798 18-May-2018 jovanak <jovanak@google.com> Adding hidden APIs for assigning Admin flag to users.

Also fixing method for requiring both MANAGE_USERS

Fixes: 80001332
Bug: 25935510
Test: unit test
Change-Id: If10166b4379ddc6a5f004eab77fa1f93abf6ac2a
1561bb41bdd2b5d333c14dedbe52168f3bf51a02 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add Settings Slice Whitelist key" into pi-dev
640821bbc82549cc4f67397564397fdfbf6bcc46 21-May-2018 Matthew Fritze <mfritze@google.com> Add Settings Slice Whitelist key

Bug: 79779103
Test: None - only a flag.
Change-Id: I764f2fddf05bf2b9df4e633c7f6c6c7e781c1149
Merged-In: I794159db4ff8aba7b6dcd91e13a984db40da47e7
6fe1a5a3341473935ecefae7f626077769005ee2 23-May-2018 Kweku Adams <kwekua@google.com> Bumping BatteryStats report version.

Bug: 80147518
Test: Android builds
Change-Id: I663557cdf54dff3184681cf8584b22ad9b9939fe
f0800fa3bd6d5279df3a183cc35ca5489112d73e 02-May-2018 Tony Huang <tonyychuang@google.com> Add theme mode design let user can choose theme self

Add a ContentObserver on WallpaperManagerService to
listen THEME_MODE value change. When changed, call
notifyWallpaperColorsChanged and set WallpaperColors
color hint by the current mode.

Bug: 63903361
Test: manual
Change-Id: I4f7aa7b184565b1bb23c7f4f1f07fc310dac7546
c49d44c3ef18f74e67fd28978b391117ee0894cc 22-May-2018 Jeff Sharkey <jsharkey@google.com> Merge "Build browse intents based on target user." into pi-dev
97bf0beaf33666dd6d24546d3af52a16eee491c4 16-May-2018 Torne (Richard Coles) <torne@google.com> Update security-related WebView documentation.

Add a number of notes for application developers related to using the
WebView securely.

Change-Id: I7dba78d35bc36dd719ed0629224fe3a1d197f52c
Bug: 80095507, 79169416, 79169397, 79170052, 79170398
Fixes: 78941917
Test: m offline-sdk-docs
d59c695a7875b22a9ac374dff10c62e91e534d81 18-May-2018 Tarandeep Singh <tarandeep@google.com> Stop using unsupported Canvas operations in IME

KeyboardView relies on deprecated Canvas#clipRect(Rect, Op.REPLACE).
This method is now unsupported and throws runtime exception.
Operations other than Difference and Intersect are unsupported.
This method call can be replaced by saving initial Canvas and calling
intersect operation of Canvas#clipRect(Rect).
Saving initial state can be achieved using Canvas.save() and

Fixes: 79777033
Test: Manually verified with SoftKeyboard (which uses KeyboardView)
1. m SoftKeyboard
2. Set current keyboard to SoftKeyboard
3. SoftKeyboard runs fine
Test: Tested Canvas.getClipBounds() is consistent across save() &
.restore() operations

Change-Id: Id34c289f152b2ec06f37fffa9f940a909153447c
f38efd123a3b8ce7ddf85ca22d2195dba02f61c6 19-May-2018 Michael Wright <michaelwr@google.com> Uncanonicalize URIs before comparing them.

In order to ensure we maintain compatibility, we now configure the
canonical URIs instead of the raw URIs. Correspondingly, we need to
uncanonicalize before comparing them.

Note that we uncanonicalize the configured URI, rather than
canonicalizing the one given to us. This is because the canonicalization
format might change (e.g. add extra parameters) at which point they'll
no longer by equal, but should always uncanonicalize to the same value.

Bug: 75947705
Test: manual
Merged-In: If3b02dfef480245210fd2c585c7c727de77a4a73
Change-Id: I53dece42424a6629e0fb406845f57ebbb06dffcb
2d6dbbac04a3f47cbdce91476337a8c7d7c0d0eb 22-May-2018 Annie Meng <anniemeng@google.com> Merge "Allow restore of settings with nullable components" into pi-dev
b4ee5d7b42918e9ad2bf23ecf4bb6c2200f24ae3 22-May-2018 Jeff Sharkey <jsharkey@android.com> Build browse intents based on target user.

SystemUI runs under a single user (user 0), and needs to build
browse intents for secondary users. To accommodate this, the safety
check recently added to buildBrowseIntent() needs to be relaxed
when building for a non-current user.

Bug: 79733193
Test: builds, boots
Change-Id: Icce014bf824d0a0ee15e3d84c34f1c2b73d213c1
b5a97e6f63bfe8b828224f606f8cb8585d9f28ec 22-May-2018 Jeff Sharkey <jsharkey@android.com> Last-ditch clamping of negative NetworkStats.

We've seen reports of negative values flowing through to attempt
being recorded, which will outright crash. This change does one
last-ditch check to see if we're about to work with negative values,
reporting any trouble and clamping them to zero so we don't crash.

This gives us the data we need to continue investigating without
triggering runtime restarts in the field.

Bug: 80057433
Test: atest android.net.NetworkStatsTest
Change-Id: I8174391c6cf5dadc2c2c10a8d841ee07e1f7d934
4245b12ef957bfa884f21325cd2d84aaa211e5ca 22-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Marks deprecated StatsManager APIs." into pi-dev
1a3158691808c428de5949414d8ae41f8bf2a3b9 22-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not throw IllegalArgumentException in slice manager." into pi-dev
d0a4dddb9b6ebc2af09e22a5013c857fa18a1334 22-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "End the TC session on terminal selection event actions" into pi-dev
a14c6b9cada2aeb52d40674541a7f8bb970720bc 22-May-2018 Steven Wu <stwu@google.com> Do not throw IllegalArgumentException in slice manager.

Test: manual
Bug: 80087497
Change-Id: Ic05c812f41d0153c8745b08718513d4e095ab27b
6df95fa08778b0639b75182d9dc16764d125408f 22-May-2018 Mihai Popa <popam@google.com> Merge "Fix crash after smart selection animation" into pi-dev
f299fc03973503b81ca1cb99695d0066c3c6605a 17-May-2018 Abodunrinwa Toki <toki@google.com> End the TC session on terminal selection event actions

This regressed when introducing TC sessions in
When the user triggers a terminal selection event such as "Copy",
we should immediately end the session instead of waiting for the
"Abandon" event (i.e. selection dismissed) to be included in the
logs. Terminal selection events implicitly dismiss a selection and
we'd rather distiguish between an actual "selection dismiss" from
one that happened because of a "terminal" selection event.

This cl also removes the "*" marker used to distinguish the new
logging from the old ones. The code for the old logging has already
been deleted so no more need for a marker.

Bug: 78541105
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Iac7d45dbc63e7076683742bd045766a1d927cfc9
31ec39297cd11f293551d2e83ebf54c74cbf7aba 22-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reduce LoadedApkAssets LRU cache size." into pi-dev
4451179411f4a84d2b64c5306371b186e510ad3c 17-May-2018 Annie Meng <anniemeng@google.com> Allow restore of settings with nullable components

Creates a new settings validator that allows for null components, which
have semantic meaning for certain settings (in this case, that no
service is selected).

Bug: 79925290
Test: 1) atest SettingsValidatorsTest
2) Manual:
- In Settings UI, select "None" for autofill service and accessibility
shortcut target
- "adb backup -keyvalue -f nullsettings.ab com.android.providers.settings"
- "adb restore nullsettings.ab"
- Verify no crashes and that autofill service and accessibility shortcut
target both have "None" in Settings UI

Change-Id: I159b3f4706c6b981a30437c31724b106eb4e3f2a
3a95d0bb94b72fd5884de486f3c602ee2d646cc5 22-May-2018 Annie Meng <anniemeng@google.com> Merge "Check settings validators for NPE" into pi-dev
7bd7a369e4e483170fa118d17df9b36ff5ecac5f 21-May-2018 Richard Uhler <ruhler@google.com> Reduce LoadedApkAssets LRU cache size.

The cached apk assets can take up multiple megabytes of .apk mmap and
native memory for associated data structures. Reduce the cache size
for potential multi-megabyte memory savings with hopefully no
noticeable performance impacts.

In particular, rough estimates of the memory and performance impacts
of this change were evaluated by starting the launcher app,
sampling system server PSS with dumpsys meminfo and cache stats using
dumpsys activity for a few different cache sizes:

LRU Size 1: cached apks: total= 1 created=0 evicted=33 hit= 0 miss=34 max=1 TOTAL PSS=187542
LRU Size 3: cached apks: total= 3 created=0 evicted=12 hit=19 miss=15 max=3 TOTAL PSS=190606
LRU Size 15: cached apks: total=15 created=0 evicted= 0 hit=19 miss=15 max=15 TOTAL PSS=199350
LRU Size 100: cached apks: total=15 created=0 evicted= 0 hit=19 miss=15 max=100 TOTAL PSS=201416

Comparing cache stats after launching the settings app:

LRU Size 3: cached apks: total=3 created=0 evicted=5 hit=14 miss=8 max=3
LRU Size 15: cached apks: total=6 created=0 evicted=0 hit=18 miss=6 max=15

Running performance tests locally to ensure no clear regression in app

LRU 15 3 3
activityStart: 40.47 38.53 39.27
bindApplication: 24.40 24.53 24.93
draw: 4.27 4.33 4.07
layout: 0.73 1.07 0.73
onCreate: 9.40 9.00 8.53
totalLaunchTime: 183.13 183.27 187.07


LRU 15 15 3 3
Calculator_avg: 333.9 333.1 343.3 334.6
Calculator_max: 345.0 360.0 370.0 363.0
Calculator_median: 333.5 331.5 343.5 333.5
Calculator_min: 320.0 317.0 320.0 311.0
Calculator_std_dev: 6.62 13.26 18.22 16.51
Clock_avg: 510.0 511.2 509.2 512.6
Clock_max: 529.0 528.0 530.0 529.0
Clock_median: 510.5 509.0 503.5 512.0
Clock_min: 498.0 495.0 487.0 492.0
Clock_std_dev: 7.70 11.71 15.25 11.07
Contacts_avg: 457.7 527.3 507.3 543.9
Contacts_max: 602.0 622.0 591.0 588.0
Contacts_median: 410.5 568.5 568.0 580.0
Contacts_min: 390.0 374.0 366.0 394.0
Contacts_std_dev: 85.64 96.80 88.80 72.97
Phone_avg: 6073.1 6109.7 6110.8 6115.8
Phone_max: 6196.0 6208.0 6180.0 6222.0
Phone_median: 6070.0 6117.5 6100.0 6133.5
Phone_min: 5982.0 5990.0 6061.0 5994.0
Phone_std_dev: 61.49 67.35 34.55 60.17
Settings_avg: 457.9 446.6 451.6 428.7
Settings_max: 487.0 468.0 494.0 449.0
Settings_median: 460.0 450.0 444.5 424.0
Settings_min: 423.0 421.0 431.0 420.0
Settings_std_dev: 21.21 12.02 20.46 9.71

Bug: 79115008
Test: Device boots.
Test: dumpsys activity all shows ResourcesManager max cache size of 3.

Change-Id: I7225b6978fac6197c27bec23d2b477fb1f5aee43
6748ff37db680fbe832a977377540e9a03a0d4c7 08-May-2018 Mihai Popa <popam@google.com> Fix crash after smart selection animation

At the end of the smart selection animation, we run a callback that sets
the selection on the TextView (subsequently starting the action mode
toolbar and showing the handles). However, when the text changes before
the animation finishes, the selection might not be valid, and might get
out of the text bounds, which was producing a crash. This was observed
in a monkey crash. This CL fixes this bug by refusing to set the
selection when it goes outside the text bounds, corresponding to the
case when text has changed between the time the animation has started
and the time it ended.

Bug: 69919777
Test: manual testing before and after the fix
Change-Id: Iea043f320004d45ad16dd7e9e5b47e5256e6d9fa
(cherry picked from commit cce6e82d35b5a6c8eb29e76fbae53eae8b70e99a)
Merged-in: Iea043f320004d45ad16dd7e9e5b47e5256e6d9fa
fd12af848a65bee56cb763ee1ab59c88c1fda471 22-May-2018 Remi NGUYEN VAN <reminv@google.com> Merge "Move CaptivePortalProbeResult to its own file" into pi-dev
d1d4cc94ba7f4f1b83aded29e7634cb6b88b011b 22-May-2018 Chalard Jean <jchalard@google.com> Merge "Fix setCapabilities." into pi-dev
f5bae21c5efcd51c0b3fb29942c02c00b896fccf 22-May-2018 Michael Wachenschwanz <mwachens@google.com> Write UsageEvents Parcel data as a Blob

If too many events are queried from UsageStats, the Parcel will be too
big for a transaction. If the data is written as a Blob, the Parcel will
store too large data in ashmem.

Test: atest android.app.usage.cts.UsageStatsTest
Test: manual (create 1MB in UsageEvents and queryEvents)
Bug: 79860717
Change-Id: Ieb4bd486c83a9cc11fdff55e8fa457a9bdca7395
d63c119101d20ff364dab3ead021e7c5a9149350 22-May-2018 Remi NGUYEN VAN <reminv@google.com> Move CaptivePortalProbeResult to its own file

This is necessary to resolve visibility issues for the next change.

Bug: b/79499239
Test: runtest frameworks-net
Change-Id: I50bc96afe6ae88c8f58a693f0a4e821f1f9b3299
f94b4936b40dab2b56cf97185b1257e0abb3d5fd 22-May-2018 David Chen <dwchen@google.com> Marks deprecated StatsManager APIs.

Marking some API's as deprecated, so users avoid getting confused.

Test: Test that build works.
Bug: 80099023
Change-Id: I4b3d4e4fa1ee3d706e49b8180aa4d0ad0e7d6eeb
c81ed627ab9aa88b114aaf99cdac8f9a1122ef11 21-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow UiAutomation being used off the main thread" into pi-dev
d0897f2b6529d54879d811c5dca2cc96f1b11342 21-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove MANAGE_USERS from setPackagesSuspended" into pi-dev
452dbebd0effb34520456e9d06f52d9d2dc4ff1b 20-May-2018 Svet Ganov <svetoslavganov@google.com> Allow UiAutomation being used off the main thread

Test: cts-tradefed run cts -m CtsUiAutomationTestCases
cts-tradefed run cts -m CtsAccessibilityServiceTestCases
cts-tradefed run cts-instant -m CtsAccessibilityServiceTestCases


Change-Id: I72c565d28f4cbcf6775535fb846b268b785a6b34
6b03aa76e9b9ced678a499df1ca0c8316aeb5e59 16-May-2018 Svet Ganov <svetoslavganov@google.com> Make RemoteCallback test API

Test: manual


Change-Id: I61343573428333c0d4a9ee2523c444753280186c
eed1b812a4ad38c6815f3066e41a95d7f5358838 21-May-2018 Annie Meng <anniemeng@google.com> Check settings validators for NPE

From b/79910479, we need to have better checks on settings validators.

Catch NPE for various settings validators and add a @Nullable annotation
to try to prevent NPEs in new validators.

Bug: 80067772
Test: atest SettingsValidatorsTest
Change-Id: I9a5058e1bae1ba0dea084c0589aa3e4ef3a51836
4c4bc93b5eb1d830a9be22658baea5628f8aa477 18-May-2018 Chalard Jean <jchalard@google.com> Fix setCapabilities.

P introduced setSSID, UIDs and unwanted capabilities.
None of these exhibit commutative behavior through combineCapabilities
because their semantics don't allow it. Therefore
NetworkRequest.setCapabilities() is badly broken around any of
these. Look at the comments in the new tests to realize the
extent of the damage.

Bug: 79748782
Test: new tests written, old tests pass
Change-Id: Ie46581bdaf9ecc2f14aab44788bbdb27a3fec8c1
45a250a2be6deceeebb74d25c98d984b173b4db4 19-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Id4feeefa,Ie0a501b8 into pi-dev

* changes:
Add counter for predictive info for hush gesture
Update DND strings
177ee3d7a128fe0ea997efad9fb2e537c04890d9 19-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout" into pi-dev
38fcfd050010aad8a98f63694194eb3df053d41e 18-May-2018 Beverly <beverlyt@google.com> Add counter for predictive info for hush gesture

Test: adb shell settings get secure hush_gesture_used
Test: adb shell settings get secure manual_ringer_toggle_count
Change-Id: Id4feeefa03a5951c03b09ab466a6c399d8aadd0e
Fixes: 79537757
f7b7426d81c5365473d00362cf158aa5ae35cee3 22-Nov-2017 Adrian Roos <roosa@google.com> Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout

ActionBarOverlayLayout used to drop WindowInsets, extract the content insets
as a rect, and then dispatch a modified rect to the content view; this because
there was no way to retarget the WindowInsets to the content view, and the
WindowInsets were not truly immutable. That means however, that other kinds of
insets than the content insets do not get dispatched, such as the display cutout.

To fix this, we add APIs to inset WindowInsets, make them immutable. Note that
a similar change is needed for the support lib.

Bug: 79733300
Test: atest ActionBarOverlayLayoutTest
Change-Id: I6a69d8462163ca5e66fdb53f83def6bc4063f8aa
fedf04f3dfc1195d98bb928d30b47ac07b7f3a29 18-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "(Behind flag) Wireless charging vibration feedback" into pi-dev
6b8014f5c850fa5a8dca3423e47110bc8ed5dbfe 18-May-2018 Jorim Jaggi <jjaggi@google.com> Merge "Schedule trimMemory after drawing the frame" into pi-dev
b29e318e0337213d4e031dc5d339f9903cef78a9 30-Apr-2018 Jorim Jaggi <jjaggi@google.com> Schedule trimMemory after drawing the frame

Fixes jank issues where trimMemory gets scheduled during an
animation. trimMemory likely hits code that is not in the
page cache anymore, leading to high execution time because of page
misses. Scheduling it after the next frame has been drawn
minimizes the risk that this page miss actually causes jank.

Test: Boot, switch between a couple of apps.
Bug: 78611607
Change-Id: Ia1fc411fbe6ca07861183ae484124406681118e5
f75019b810db6fef11c13546e0215bc034e7de19 18-May-2018 Selim Cinek <cinek@google.com> Merge "Keep notification when sending smart reply." into pi-dev
f01e40c5e1a2dc708809d130652e33d8336026cf 18-May-2018 Justin Yun <justinyun@google.com> Camera: Use fallback key if the requested key returns null

If the key returns null, try with the fallback key to get the values.
This is to support old key names for old camera hals.

Bug: 79183654
Test: Launch GCA in P and P+OMR1 walleye devices.

Change-Id: I1d55cc53b159401d4cd47da9a02f174cb6cb9e5e
e4a8d4c7e94ac72cf7978306160994015b99227c 18-May-2018 Jorim Jaggi <jjaggi@google.com> Merge changes I608d4b61,Ia7900e75 into pi-dev

* changes:
Follow up to Ia7900e753b29187a7a7b81f393666687e8b8e04b
Apply surface parameters in sync with RenderThread
2b3c858296d34741e32c03b144b14f9532b19bb2 18-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add explicit override for default Private DNS mode" into pi-dev
c4da4d494b51854a3c22dbeda67ade6726ef2e15 18-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "add javadoc for carrier ifd install API" into pi-dev
3083d0b0c7e82bb11e5abb33abd88f44ec600996 17-May-2018 fionaxu <fionaxu@google.com> add javadoc for carrier ifd install API

Bug: 79426800
Change-Id: Iaf5af11220c85dc63164cee31414dce8e4d02037
8cc15d2ebf3cb2e5caaefb984e547b4b3c1249d0 09-May-2018 Kenny Guy <kennyguy@google.com> Keep notification when sending smart reply.

If an app cancels a notification while we are
sending a smart reply then don't dismiss the

Bug: 79120026
Test: atest NotificationEntryManagerTest
Test: atest SmartReplyControllerTest
Test: atest statusbar.NotificationListenerTest
Test: atest NotificationRemoteInputManagerTest

Change-Id: Ibbc0014ae0aeb12b58be13c041d720903251490f
b1059130980a8244ec091749babf006b4a5bcce6 17-May-2018 Annie Meng <anniemeng@google.com> Merge "Fix NPE in ComponentNameValidator" into pi-dev
5d26b8c03a1e11076e41699fd54259ef5ff4a1e0 17-May-2018 Annie Meng <anniemeng@google.com> Fix NPE in ComponentNameValidator

In general, we should consider null component names as invalid settings,
meaning that we don't restore.

b/79925290 to allow restoring null component names for specific
settings where null has semantic meaning.

Bug: 79910479
Test: 1) atest SettingsValidatorsTest
2) Manual:
- In Settings UI, select "None" for autofill service and accessibility
shortcut target
- "adb backup -keyvalue -f nullsettings.ab com.android.providers.settings"
- "adb restore nullsettings.ab" and verify no crashes
Change-Id: Iffecbe7d26a93a816e7be42f564ba471f9681876
3fa564030f3a5fb109f7f83c95e19ae88fb9fdf5 17-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refresh TCM settings when they change" into pi-dev
0a111ad6d08db275aa1d7d2079ab017eeb05578b 16-May-2018 Glenn Kasten <gkasten@google.com> Resolve conflict between javadoc and CDD re: audio output

As CDD text is likely to change in this area, rather than attempt to
keep them in sync we'll just defer to CDD for the official definition.

Test: N/A
Bug: 79440478
Change-Id: Ibd352af626f192eac9a4dfa2fafe675a3955270e
c2449b8361d8ab382e69244399352948125c9dc8 01-May-2018 Abodunrinwa Toki <toki@google.com> Refresh TCM settings when they change

Approach here is to register a content observer that invalidates the
TC settings whenever updates to the settings happen.

This CL also ensures that the TC is invalidated when a settings
update happens. This is because the settings may change what
TC the system returns.

TextView's SelectionActionModeHelper has been updated to not cache
the settings and get them directly from TCM (which caches the settings).

NOTE that we expect TC settings to rarely change.

Bug: 77539576
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: manual - Made changes to TC settings and observed logs / app behaviour

Change-Id: I88bbb6f951708b17323fac1a72385fe808d270a5
2085646c7d66087c39ef885bf74ac0395a3fd99c 17-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use FLAG_UPDATE_CURRENT for TC PendingIntents." into pi-dev
19841794096e7c9f7112ba25af9bfda04403f791 16-May-2018 Erik Kline <ek@google.com> Add explicit override for default Private DNS mode

Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
Bug: 79719289
Change-Id: I943c5476666e47d04690626e2133f501cb875b46
7f91c59b3ea96916b1f69fa64f30856231ca4c39 17-May-2018 Dieter Hsu <dieterhsu@google.com> Merge "Trigger action for app ops icon for keyboard navigation" into pi-dev
3a9b5a98dc3c4873baa9debe40f8eb6041a44686 15-May-2018 Dieter Hsu <dieterhsu@google.com> Trigger action for app ops icon for keyboard navigation

Bug: 79671932
Test: manually check talkback, switch access and kb navigation
Change-Id: I8a2ed0fc8e6b565e923954fa87e61a20c83438c0
5f8e42f7f0767837f2e91ee48d97ccc8dbc626f2 17-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adde back check to make sure Activity.recreate() is called on main thread." into pi-dev
14405c9ac323e09281950e7fad9c8b10515f8e0b 17-May-2018 Suprabh Shukla <suprabh@google.com> Remove MANAGE_USERS from setPackagesSuspended

MANAGE_USERS is a widely used permission and setPackagesSuspended is a
dangerous API. Also having a lot of apps which can use the api can lead
to complications like them suspending each other.

Test: Existing tests with SUSPEND_APPS pass:
atest com.android.server.pm.SuspendPackagesTest

Existing permission tests without SUSPEND_APPS pass:
atest GtsSuspendAppsPermissionTestCases

Bug: 79773970
Change-Id: I49d81c0254c6ba528c50ece960a0db277c0afd7f
318abc932467485e191578a923baba2ed40834f0 04-May-2018 lpeter <@google.com> [IdleController] Support dock scenario on idle or active judgement

In the current design, IdleController of Job service considers devices as ‘idle’ after 71 minutes of screen off. But under docking use scenario, devices screen might remain on for a very long time and it’s not necessary implying the device being interactive with users.
So create a mechanism for device to enter the ‘idle’ state that JobScheduler can kick off idle tasks.

Bug: 79183658
Test: atest DeviceStatesTest
Change-Id: I5b307ca51e28ffca63f79a9c43984c3b76e51629
64be98d5d27a2a2b786e28ae7afbff5ac987f163 26-Apr-2018 Jorim Jaggi <jjaggi@google.com> Apply surface parameters in sync with RenderThread

Otherwise it could lead to parameters applied in the wrong frame,
leading to jank.

Test: Open notification
Bug: 78611607
Change-Id: Ia7900e753b29187a7a7b81f393666687e8b8e04b
Merged-In: Ia7900e753b29187a7a7b81f393666687e8b8e04b
0527d9129d889a1947ab6a18ad6c5b9d5adce2da 17-May-2018 Wale Ogunwale <ogunwale@google.com> Adde back check to make sure Activity.recreate() is called on main thread.

Change-Id: Id8fa7e1c17ee3d42a19c82dc8cc1fec2de1757d1
Fixes: 79703568
Test: Existing test pass.
10f8ed0cf88da4fbb561e7d8eaea38a1c9978a5d 17-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "TextSelection.Builder.setId should take null as well" into pi-dev
cd835ba41851a17fe9141b3901e0534600f72373 16-May-2018 Dianne Hackborn <hackbod@google.com> Merge "More app ops fg/bg tuning" into pi-dev
0689312acbcc81be4280b6cde0e4dc4a444d7a54 16-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add some null checks to slices" into pi-dev
4da6e1f3b015f5d9c397b74f836fe851ef849bf2 16-May-2018 Daniel Sandler <dsandler@android.com> Merge "Improved notification interruptiveness calculation." into pi-dev
df9f36da19ab42bb1c44dc61a8300aecea0a840d 09-May-2018 Beverly <beverlyt@google.com> (Behind flag) Wireless charging vibration feedback

- to turn vibration feedback on wireless charging:
adb shell settings put global charging_vibration_enabled 1

Test: manual
Bug: 74505795
Change-Id: I177bc05e75bb9e66a88b45432eee778ab619e28f
7d67bd4fd7fb6810edebd1c61a96530077c74eda 15-May-2018 Dan Sandler <dsandler@android.com> Improved notification interruptiveness calculation.

Apparently comparing Spannables is dangerous because
the various Span classes do not implement .equals() in any
meaningful way, so all CharSequences must be converted to
flat Strings before being compared.

Lots of additional debug code remains, for the next time we
don't understand why an innocuous notification update
appears to be interruptive.

Test: atest com.android.server.notification.NotificationManagerServiceTest
atest com.android.server.notification.NotificationTest
Bug: 78643290
Change-Id: I1c282238687f28b5b197e28a4b878dc697049f4d
8938932a0af1e3a51864cb54c8b67a9424f55bcf 16-May-2018 Jason Monk <jmonk@google.com> Add some null checks to slices

It'll make developer debugging experience sooo much nicer.

Test: manual
Bug: 79773776
Change-Id: Ie0a826c5572752e2bb50db7669374a1698333770
84368781ecb93f6de5f1f3eb019b2c5a27bf8c92 15-May-2018 Tony Mak <tonymak@google.com> TextSelection.Builder.setId should take null as well

TextSelection#Id is nullable, so the builder should take null as well.

Bug: 79779551
Test: Build
Change-Id: Iacabcab2befcbd4cb1c8674c253fe9a26cb877bf
33da7043af58f8fe55b7b560a44e4c7deaa171b7 16-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add shell command to get slice permissions" into pi-dev
7830cd820bb1c5710818806e0d51165e86763d43 16-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add SCREEN_BRIGHTNESS_FOR_VR to set of public settings." into pi-dev
7f01f3b6198465c70e81c5edcc1be2fa8199efd8 15-May-2018 Jason Monk <jmonk@google.com> Add shell command to get slice permissions

Lets shell/root get a list of pkgs that have access to any slices
within an authority.

Test: manual
Bug: 78136892
Change-Id: Id33fd458ed5ad73b30f69b3a464676428344e446
aec5981b88b7b223363561e0ceee0be2750a0458 16-May-2018 Abodunrinwa Toki <toki@google.com> Use FLAG_UPDATE_CURRENT for TC PendingIntents.

This way the newest PendingIntent will override any matching ones.

Bug: 78286917
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Change-Id: Ib130fa5979c3dab628e7be668331cb94d23e0829
1e62b676d92c23475c812023ad2be0ac2bf9250f 15-May-2018 Jerry Zhang <zhangjerry@google.com> Merge "Access removable volumes through /mnt/media_rw" into pi-dev
bef37f23d63f4dd24e3fc56fa978e0e9b440ba95 15-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update RemoteInput#setChoices documentation" into pi-dev
76fd7d57760502090b2a9fd28ed92232be30cdca 15-May-2018 Damien Bargiacchi <drb@google.com> Merge "Switch the setting for Off Body Radios Off to User Absent Radios Off" into pi-dev
eddc0d712c06648bd3b330af92ea32c8192851e3 15-May-2018 Jiabin Huang <jiabin@google.com> Merge "Add support for manually set surround formats." into pi-dev
b504a2f65b70b9baa319cd97693c9c94a602890c 15-May-2018 Phil Weaver <pweaver@google.com> Merge "Update a11y when alpha changes" into pi-dev
4b3a54710792d24233b77bcd6cca120b9ffe0b32 10-May-2018 Kodlee Yin <kodlee@google.com> Update RemoteInput#setChoices documentation

The behavior that #setChoices didn't render on mobile devices from apps
that target SDK < P went undocumented. Because this is changing in P and
above, this documentation needs to point out this behavior.

Also updated formatting and style of docs to improve interop with

Test: none
Bug: 79244189
Change-Id: Iabfe3b2ddcc369e5ec15f9773481468cbc48dabb
c1eddaed6e472f80c7083013ea2ab533821c4b26 15-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Rethrow SecurityExceptions in UsageStatsManager" into pi-dev
e93ab41d2a98f154f5e2a58c10da93226921c462 15-May-2018 Dianne Hackborn <hackbod@google.com> More app ops fg/bg tuning

- Only report that something has changed when a uid changes between
the restricted and unrestricted states. (Adds new constant that
defines this important division point.)

- Have different settle times for different key transitions: (a)
out of the top state, (b) out of any other unrestricted state,
(c) down to a lower background state.

- But, don't apply any settle time when transitioning from top to
another unrestricted state... there is no need to.

Bug: 78480444
Test: manual
Change-Id: Ife772858009a6da5c286e285a4059aea3ad3f6c7
3994075a5b638ecffce5b8782521fce7631e7169 03-Apr-2018 jiabin <jiabin@google.com> Add support for manually set surround formats.

To make surround sound setting more clear to users, we are changing
surround setting from ALWAYS to MANUAL. With MANUAL, users could enable
surround formats according to their need.

Bug: 67479735
Test: Try creating AudioTrack with enable/disable surround formats.
Change-Id: I79e610f6c43d7003daf13da3bee4e03ba9b6ea87
c46279aa98f6fa36d43c05b599c9da45f3ebacd2 15-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix crash when loading resources without code" into pi-dev
2544c6917aa747352112b49429ba4d77f36f05cf 15-May-2018 Jason Monk <jmonk@google.com> Fix crash when loading resources without code

Should use default appComponentFactory, not the actual one from the
app because we have no code.

Test: manual
Change-Id: I982967543c4cf5c28b19b36b6d183a30052bf602
Fixes: 78883500
8e6445a1a5e693b8778ba3366b10edad10404002 15-May-2018 Jeff Sharkey <jsharkey@google.com> Merge "Let tests enumerate all transports/capabilities." into pi-dev
100df0a66c28bfae8f4e3c2dd6c4c7b21294456d 15-May-2018 Chalard Jean <jchalard@google.com> Fix: ConnectivityManager is initialized with a wrong context

ActivityThread#setHttpProxy uses a system context to get
a ConnectivityManager instance. If it's not already cached, the
system service registry will cache this instance initialized
with the system context, and subsequent calls to get this service
will return the bad instance.
This patch uses the application context instead, unless it's
not available for some unlikely reason.

A possible symptom of this issue is to have Bluetooth tethering
failing with a security exception, because it's requested by
the "android" package without system uid.

Bug: 73572062
Test: manual
Change-Id: I745707e4ffe564f6d201ec259fa6b5ee32fbeda6
6d0842154bb063632f937ef360557af281b6c2cb 15-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't call setAutofillClient() on base Context if it's null." into pi-dev
cc64fb9c8f441d18f611643d8dc212b8dfe0c081 15-May-2018 Philip P. Moltmann <moltmann@google.com> Merge "Allow Print subsystem to work with services provided by instant app" into pi-dev
d247de85bb7d36ff5d3d232d6d4d2d3d1eeedec2 15-May-2018 Felipe Leme <felipeal@google.com> Don't call setAutofillClient() on base Context if it's null.

Test: atest CtsAutoFillServiceTestCases
Test: changed activity on autofill sample to override attachBaseContext() by
calling super.attachBaseContext(null) - the activity still crashes, but
not on attachBaseContext().

Fixes: 79707861

Change-Id: Idfaa9c596cc338ab815441138ce06ba64cd3b4d2
7b6ecb76689fe57496510f22edd46d78d5aa5c0a 15-May-2018 Dake Gu <dake@google.com> Merge "Autofill: allow switch IME when autofill is showing" into pi-dev
3789bbc476763c6bb6e1f85c6aa00101c888ece6 15-May-2018 Phil Weaver <pweaver@google.com> Merge "Improve a11y ordering" into pi-dev
a5ee62f356780bb94e3e78e5c45b3a7aedd922b0 14-May-2018 Jeff Sharkey <jsharkey@android.com> Let tests enumerate all transports/capabilities.

This gives them a way to collect all included values without
resorting to manual probing of each newly added value.

Bug: 16207332
Test: atest com.android.cts.net.HostsideVpnTests
Change-Id: I35ca412512dc8515b44d5518e1ca4caa5bdc678f
841de8fb314c4d75402909fbd3353bdf2a769c94 15-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Mitigating cache corruption in ArrayMap" into pi-dev
1938e34e42969053f1b553779fa21257a28d708d 14-May-2018 Suprabh Shukla <suprabh@google.com> Mitigating cache corruption in ArrayMap

Before calling freeArrays, storing the array reference into a temporary
pointer so that the main pointer doesn't end up corrupting the static
pool of arrays on concurrent access. An earlier change missed a rare
case when removeAt was called for the last element in the map.

Test: atest android.util.ArrayMapTest
atest android.util.cts.ArrayMapTest

Bug: 78898947
Change-Id: I454c5b1600eb0a6c690e746df10f6a0ebcd8aa1d
fd44f27b5145c2e3d56e84bba7bfe332f9882f04 14-May-2018 Amith Yamasani <yamasani@google.com> Rethrow SecurityExceptions in UsageStatsManager

Some of the newer methods were not rethrowing the system server
exceptions. When not returning a default value, rethrow the
RemoteException from the system server.

Bug: 79692228
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Change-Id: I7b2ae735fc97f3e1903903ed5c98ce914aeaa84a
adaca2146dff3f4a5fb543451d81bb1be899195d 14-May-2018 Dianne Hackborn <hackbod@google.com> Merge "Allow device/profile owners to change app ops modes." into pi-dev
86b326012813f09d8f1de7d6d26c986a909de894 11-May-2018 Phil Weaver <pweaver@google.com> Improve a11y ordering

We use ids to break ties when sorting views just to
guarantee that we won't break sorting. But we don't
want to have our swipe order determined by arbitrary

Before resorting to such a crude tie-breaker, look at
a view's children to try to break a tie using their
bounds. That sort is more based on what's on the
screen, and will also produce the same result from
the same ui.

Bug: 78348191
Test: Switch access order is much more sensible on
Recents. Also ran a11y cts.

Change-Id: I918eae3b0d27e889a53d05a6ebe925e38ce5d7b4
71938e18ca4ad77519da70565710ef37e79443f8 11-May-2018 Jerry Zhang <zhangjerry@google.com> Access removable volumes through /mnt/media_rw

Due to permissions changes, we now need to access
the underlying filesystem of removable devices in
order to get write access.

Add internalPath to StorageVolume, and have VolumeInfo
set the field on creation.

Bug: 77849654
Test: Can write to emulated sdcard through MTP
Change-Id: I63302ecf2dd2600a1c9f3f6ab106c3695654cbaa
d52544183e2532f22cee33df582bc7bece400837 12-May-2018 Dianne Hackborn <hackbod@google.com> Allow device/profile owners to change app ops modes.

This allows them to continue to have this capability the
same as before we locked down access to it.

Bug: 78480444
Test: manual
Change-Id: If2b0722945235eb67676ace3f54efaa71a64bcde
e3125c7e89284914d8402a527e73c888e35360c5 14-May-2018 Jan Althaus <jalt@google.com> Merge "Remove custom schema parsing in favor of Uri" into pi-dev
6db14d01c23810a2a98a1d249b9d98480f89a073 13-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not parcel legacy TextClassification fields" into pi-dev
53ae6a82cd5c6e1ff31707d9e9a811fb4810865a 12-May-2018 Winson Chung <winsonc@google.com> Merge changes from topic "sysui_flags_drop" into pi-dev

* changes:
Clean up Recents animation api
Expose the system ui visibility flags and translucent state with snapshot
1b69d7b40661640bbcbe9b456de8b8c21aefee37 11-May-2018 Beverly Tai <beverlyt@google.com> Merge "Show settings suggestion" into pi-dev
98fd4fa0f40a5e06641d0f7b73d2102766f7319e 11-May-2018 Amith Yamasani <yamasani@google.com> Merge "Add limits to App Usage Observer Api" into pi-dev
1c60953f9da5714b3ebabf0b6546e8fbf06b1597 11-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix TextClassifier logging." into pi-dev
92b64bb1bbabcc2908fe510e71b4a60426ca3cb0 11-May-2018 Todd Kennedy <toddke@google.com> Merge changes from topic "b_78809704" into pi-dev

* changes:
OMS: teach the OMS about static RROs
OMS: rebase settings when overlays update
02b9592ff1b039cbbc5f592cd1a7c9896a685216 11-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow onGetSliceDescendants to be slow" into pi-dev
90dbb0ed72a9432cd4d853156d8566550c6599c5 11-May-2018 Bo Zhu <bozhu@google.com> Merge "Revert "Revert "Change the root of trust for CryptAuth Vault Service""" into pi-dev
a66dfee8d0946b301dda9853e1782b7fef7600ff 11-May-2018 Jason Monk <jmonk@google.com> Allow onGetSliceDescendants to be slow

Because sometimes it needs to be

Test: existing tests
Bug: 79132845
Bug: 77873463
Change-Id: I93aa8553c48c856bf96c347a229be6e770751708
301e92a4dd71e6581935a8ccc53cb0b6b842c58b 27-Apr-2018 Beverly <beverlyt@google.com> Show settings suggestion

Bug: 78445134
Test: Settings tests
Change-Id: Ib66ebb3af3328ac1ffa9949282afaf800e1f1019
bd7879ce3ec8a729b2addb9fddca05eebec6d672 11-May-2018 Bo Zhu <bozhu@google.com> Revert "Revert "Change the root of trust for CryptAuth Vault Service""

This reverts commit be4f735cb199d184431d718b245ac51c4e7a70bf.

Reason for revert: Resubmit the CL http://ag/3983388 that was reverted. The server side change has been deployed now.

Bug: 78920513
Change-Id: If676799176ecf90fd51a97027a9ff83bec5d4bed
47a8ecce90716d534781e2e39e0a44c03cc422e0 11-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a path to allow detection of task changes to the top of the ActivityView" into pi-dev
72da1e6f788ad2ca27518b630fa7d251c31d9a8b 10-May-2018 Christopher Tate <ctate@google.com> Document system activity intents that may not be implemented

All of these activity-start intents might be unimplemented on some
Android products. Document this to make sure that developers are
aware of the need to safeguard against this.

Bug: 68300743
Bug: 62201251
Bug: 69587018
Fixes: 77282739
Test: atest CtsContentTestCases:.AvailableIntentsTest
Change-Id: Ia2346d03ccb7f2bdad2b84ba9efff72413fdc3c2
ddf6c1e22c6c3e126c36fb2f667f3df617e8fc51 10-May-2018 Dake Gu <dake@google.com> Autofill: allow switch IME when autofill is showing

IME used to allow startInput() *only* when window has focus.
This is no longer the case after we made changes to allow autofill
window to get window focus to receive physical keyevents.

The fix changed precondition of when InputMethodManager can startInput:
(hasWindowFocus() || isAutofillUIShowing()).

Test: manual test:
- install two IMEs
- install autofill sample service and autofill sample service
- launch the Autofill sample app, click on edittext, both
IME and autofill window are showing.
- type "username", autofill datasets are being filtered.
- click "globe" button in IME window to switch IME.
- continue typing "username2" using new IME and autofill window
continues to filtering.
- also try the "IME switch" button in bottom bar to switch IME.
Bug: 79494235

Change-Id: I0d222b5fc13ad46834aa861647d8f2e1649093ec
b3baaab4af7e1ed8dfc5da1c976cc34d135fb82b 11-May-2018 Philip P. Moltmann <moltmann@google.com> Allow Print subsystem to work with services provided by instant app

Most functionality works, but the PrintActivity cannot directly interact
with the instant service.

As instant services should only appear in tests this functionality needs
to be enabled via shell commands.

Fixes: 79484768
Test: cts-tradefed run commandAndExit cts-instant-dev -m CtsPrintTestCases
cts-tradefed run commandAndExit cts-dev -m CtsPrintTestCases

Change-Id: Ie4663c72b8c0f959b5d172ef28875479d120e386
ba196c5a3d8a8f04ffb22fd29435e545ee435fa0 20-Apr-2018 Abodunrinwa Toki <toki@google.com> Do not parcel legacy TextClassification fields

If we depend on legacyIntent, then TextClassifierService implementations
will have to always popuplate a deprecated field.
To avoid breaking legacy clients, the returned legacyOnClickListener should
represent the first pendingIntent (i.e. primary action) that was parcelled.

Bug: 78340399
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: manual check with a TCS that only sets non-deprecated fields vs a
legacy TC client
Change-Id: I41d27a65f1ede6369dd2a66d92b2210edb0d11e2
a1e56fb23bc60f5f37b3a36be5b699a0ea90348e 10-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expands javadocs for Intent.FLAG_ACTIVITY_MATCH_EXTERNAL" into pi-dev
92ae2c6665d5b2a32a29981812c79bc6089f41bb 10-May-2018 Patrick Baumann <patb@google.com> Expands javadocs for Intent.FLAG_ACTIVITY_MATCH_EXTERNAL

This change adds much needed detail to the new MATCH_EXTERNAL flag,
explaining some of the behavior changes that come with using it.

Test: none
Bug: 63117034
Bug: 79325769
Change-Id: Iab320d2171ffe8d8012a2928656ea61d5e0f0862
3b0f0117097bade987e0ab0df02f1f571bbf79e4 10-May-2018 Bo Zhu <bozhu@google.com> Merge "Revert "Change the root of trust for CryptAuth Vault Service"" into pi-dev
be4f735cb199d184431d718b245ac51c4e7a70bf 10-May-2018 Bo Zhu <bozhu@google.com> Revert "Change the root of trust for CryptAuth Vault Service"

This reverts commit 1f4097860987a7e8337f7ffb101488512698e69c.

Reason for revert: Will resubmit once the server side change is ready

Bug: 79513473
Bug: 78920513
Change-Id: I4c94d307a9181390a59cdc1602cc9d04c1661ad0
14d035c969c59907763c56c6ab69ac3b3268f808 02-May-2018 Kenny Guy <kennyguy@google.com> Fix colorized messaging layout and smart replies.

Modify messaging style and smart replies view to
cope with colorized backgrounds.

Bug: 78928664
Bug: 77927019
Test: atest SystemUITests (with patch from ag/3992401)
Test: visual - see bug for screenshots

Change-Id: Iee66931574fb48d0340986bf520532f798ef59fc
68bbaade77b3b8f0bcc308e385307f897c6e27e8 10-May-2018 Damien Bargiacchi <drb@google.com> Switch the setting for Off Body Radios Off to User Absent Radios Off

Bug: 79491395
Change-Id: I82f8742398da503bdddc420399de444e3314998e
65a4f251c7e14307f46911e376db49c8c7a1a8bb 09-May-2018 Dianne Hackborn <hackbod@google.com> Further flesh out app ops foreground state.

Fix some bugs, add the ability to monitor state changes, improve
dumpsys output to help debugging, add a new check API that allows
the caller to get the real state.

Bug: 78480444
Test: atest FrameworksServicesTests:AppOpsServiceTest
Test: atest CtsPermissionTestCases:AppOpsTest
Change-Id: I3d41be9968c1d95a1456f4052da958ea64aa068d
689866352b2e36fb10128244c19a671b4bc1fdc5 10-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "add install action for carrier id to system API" into pi-dev
147ef6b1a418c9687af37de48de2e4907430ec9a 09-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allows disk reads when adding native paths to classloader" into pi-dev
c8b3e0b6178ef312b86614ebc916bd95636d606e 09-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE: Allow to control behavior of loadSafeLabel" into pi-dev
065df1d75b8a57c6880dc85571e60e87922075fc 09-May-2018 Jiabin Huang <jiabin@google.com> Merge "Fix shutter sound cannot enable." into pi-dev
56c1b4f7047da711d53f6299692d127fc03c1a2d 09-May-2018 Philip P. Moltmann <moltmann@google.com> DO NOT MERGE: Allow to control behavior of loadSafeLabel

(Minimal change for P, full change already in master)

Test: looked at package installer UI and saw that labels are not
truncated anymore.
Bug: 77964730

Change-Id: Ia181288a90501f4f563d24dacd6edb0c81406b82
792d36c17036e80a587ba910f362e1b4f0b5ea9c 09-May-2018 Victor Hsieh <victorhsieh@google.com> Merge "Allow only selected priv apps to run OOB" into pi-dev
dcb8ec66c51d0320c89e6657494ff429a55cbd7c 09-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Update the Open Mobile API version" into pi-dev
5c5daa4c3f9e0f4b1bb930e27c964c7ae8e059ff 09-May-2018 Patrick Baumann <patb@google.com> Allows disk reads when adding native paths to classloader

In the cases that the classloader is being updated on the main thread,
temporarily allows disk reads so that native paths can be checked for
directory vs. APK.

Change-Id: I89cab9c7fcb71b8eff8891db974285844affe220
Fixes: 79425683
Test: atest WebViewHostSideStartupTest
738b0a8b42e6659997d544ce24fb9df326d78e7f 09-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Change the root of trust for CryptAuth Vault Service" into pi-dev
643d9256d91115c3762b6f4e74b1f426d3bc2a92 09-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Fix a typo in the API doc of TextView#setKeyListener()" into pi-dev
8d6571aeede9fa0fe17ff72d4105afc8320fd9f1 09-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge changes I5851dd16,Id196307f into pi-dev

* changes:
OMS: harden permission checks
Add missing fields to OverlayInfo.hashCode
a525e2239a95c79d62e27b18fc5e4f13789ab352 10-Apr-2018 Mårten Kongstad <marten.kongstad@sony.com> OMS: teach the OMS about static RROs

Teach the OMS about static RROs (those with <overlay isStatic="true">)
and add a new OVERLAY_ENABLED_STATIC state to OverlayInfo. This makes
isStatic less of an edge case and something that can be reasoned about
together with the other states.

Bug: 78809704
Test: atest OverlayHostTests OverlayDeviceTests
Change-Id: Ia785554ed2bcf7679888c3ccdaeaedca1430a477
2f1944bf0e225b0fd96d57cfbca40fb717e4f475 10-Apr-2018 Mårten Kongstad <marten.kongstad@sony.com> OMS: rebase settings when overlays update

When an overlay package has been upgraded, OMS needs to reconcile any
previous settings about the overlay with the new state of affairs.
Sometimes it is possible to rebase the OMS settings on the new
information [e.g. the overlay has changed categories]; sometimes the OMS
settings have to be scrapped [e.g. the overlay has changed target
package]. Update OMS to do The Right Thing.

Bug: 78809704
Test: manual (adb shell stop, adb push specially prepared overlays, adb shell start, adb exec-out cmd overlay dump)
Change-Id: Icd1ae633dbee5b5ca957fa6b652af6209b4b1260
54a514eda04fe8765ab3e93e5b84b790e21cf179 09-May-2018 Rubin Xu <rubinxu@google.com> Merge "Allow profile owner to disable iris/face on personal keyguard" into pi-dev
7df104c4bba8a619883532839ac28b7a856216f5 09-May-2018 Jiyong Park <jiyong@google.com> Merge "Basedir of a bundled app is added to the permitted paths" into pi-dev
785d618b1a4c66d885cafec34ed1981daee6736d 19-Apr-2018 Victor Hsieh <victorhsieh@google.com> Allow only selected priv apps to run OOB

- Add pm.dexopt.priv-apps-oob-list to allow selecting specific packages
to run OOB, in a comma-separated string of package names. When set to
"ALL" (default), all priv apps will run in OOB.
- Add a global config priv_app_oob_list to persist the state for
- Also make background dexopt to respect the config.

Test: 0. Reset previous OOB settings.
1. settings put global priv_app_oob_list \
2. cmd package compile -m speed -f com.google.android.gms (then
com.android.vending, com.google.android.googlequicksearchbox)
3. dumpsys package dexopt
# .vending and .gms are "verify", .googlequicksearchbox is
# "speed".
Test: settings put global priv_app_oob_list 'ALL' # see the same result
Test: settings delete global priv_app_oob_list # see the same result
Test: atest SettingsBackupTest
Bug: 30972906
Bug: 63920015
Change-Id: Iba47b4763a026cdc94939db0a743822278917269
caec3f0acb1033464b24475ad50a3a97b41d008f 09-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Introduce hidden constant EXTRA_PROVISIONING_USE_MOBILE_DATA" into pi-dev
9856d151f2f7403a43fe1717c351814c2529586d 09-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Camera: Specify session parameter build requirements" into pi-dev
6802e2a5536c2151dac14daa4ee44d0187d97ece 20-Apr-2018 Winson Chung <winsonc@google.com> Clean up Recents animation api

Bug: 73714156
Test: Ensure you can still swipe up

Change-Id: Ie70ed0edb05f54d17d3989895b86e07851c44c06
173020c2ef0a1dc109a9a39afc3e107badcd407e 05-May-2018 Winson Chung <winsonc@google.com> Expose the system ui visibility flags and translucent state with snapshot

- Allow SystemUI/Launcher to determine whether the snapshot is of a
translucent activity (to reduce overdraw by skipping drawing task
background) and also the sysui visibility flags are (to determine how
to update the nav bar while animating before the app is started.
- Fixing issue where the recents animation was reporting task fillsparent
state instead of the app's fillsparent state (as we do in normal remote

Bug: 79228291
Bug: 77984778
Bug: 78659249
Test: atest FrameworksServicesTests:TaskSnapshotPersisterLoaderTest
Change-Id: I19bdf7f780e7d94014d6a115bf84fa614b1dffa0
3128ebd880b2284ee6459e8b0e137d44807a3346 09-May-2018 Yohei Yukawa <yukawa@google.com> Fix a typo in the API doc of TextView#setKeyListener()

Fix: 79436805
Test: make -j docs
Then check out/target/common/docs/offline-sdk/reference/android/widget/TextView.html#setKeyListener(android.text.method.KeyListener)
Change-Id: I6c0d2a3af9434240c4e6e931185bc4f21b2e2b52
1f4097860987a7e8337f7ffb101488512698e69c 01-May-2018 Bo Zhu <bozhu@google.com> Change the root of trust for CryptAuth Vault Service

Change-Id: I99899e7e6c090cf22cf31b0b4d5fd3e33dcb2f8f
Bug: 78920513
Test: adb shell am instrument -w -e package
3e9331125af5a71d9a22df453558284e976d7a29 09-Apr-2018 Mårten Kongstad <marten.kongstad@sony.com> Add missing fields to OverlayInfo.hashCode

OverlayInfo.category was inadvertently omitted when calculating the hash
code for an OverlayInfo.

Bug: 78809702
Test: atest OverlayHostTests OverlayDeviceTests
Change-Id: Id196307f75569d851503ffd8ef778aec50c2de37
2776ed56b846ff34e45467f7618a679049d16f3f 08-May-2018 fionaxu <fionaxu@google.com> add install action for carrier id to system API

Bug: 79426800
Test: Manual
Change-Id: Icd3e9ae527dc17ab5762aa57df596f058de08d5b
d2bebd43a49d53c3298f6eebbf67bede834e9438 09-May-2018 Phil Weaver <pweaver@google.com> Update a11y when alpha changes

We were only updating accessibility in View#setAlpha,
but View#setAlphaNoInvalidation would also change alpha,
and accessibility would never find out.

Bug: 78101543
Test: TalkBack now works on nightlight conditional and
battery saver slider.

Change-Id: I1ebb62aa7f4de700b2d7fbaae8dbbd1c84fc4ece
7af8fe3e295f40b6c4e9d247fcfa5069735af1c9 08-May-2018 Rohan Shah <shahrk@google.com> Merge "Add knobs for tweaking blocking helper thresholds" into pi-dev
0c2985384b4f9022569614e6d330aa09aad8a99e 08-May-2018 Makoto Onuki <omakoto@google.com> Merge "Pre-cache more system servers" into pi-dev
e059e45b053454deb1044123a5a65ba725fb952c 08-May-2018 jiabin <jiabin@google.com> Fix shutter sound cannot enable.

Bug: 79307231
Test: run cts and take picture with/withour dnd mode.
Change-Id: I9d4166d07b38ffae735aa63dad075bdb2def9a5a
eca99a0ae1f5578f30e75d215418049bc39181dd 30-Apr-2018 Alex Chau <alexchau@google.com> Introduce hidden constant EXTRA_PROVISIONING_USE_MOBILE_DATA

- EXTRA_PROVISIONING_USE_MOBILE_DATA is to indicate mobile data should be used for device owner provisioning
- This constant is hidden as API for P is already frozen. The constant hardcoded by developers in a QR code or NFC payload, which should work in P regardless if the constant is hidden.
- Our team will be responsible of communicating this new extra to developers desposite it's not appearing in public javadoc

Bug: 78594515
Test: None
Change-Id: I06000cf9156ef54adc3c8fe12fdb3fa73075a859
330dd0b244b58b3da2e49b14d2ebc5693424388a 08-May-2018 Dianne Hackborn <hackbod@google.com> Merge "Make android:cantSaveState an optional feature." into pi-dev
dfd3c653cef679b05a5e4f79b2e894b5b0e55c37 08-May-2018 Abodunrinwa Toki <toki@google.com> Fix TextClassifier logging.

No logs were being sent via the TextClassificationManagerService to
the TextClassifierService.
Also, SelectionEvent.getSessionId() is nullable. Handle appropriately.

Bug: 79418429
Test: manual - manually tested via a debugger. Auto tests coming soon.
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Change-Id: I196885d9b03c0c11cae7686a5835d14791065e78
4589565b63a116cb8d72b2dfbc6c53bb07caa6ea 07-May-2018 Makoto Onuki <omakoto@google.com> Pre-cache more system servers

Bug: 78792330
Test: Boot system
Change-Id: Id65d9f7d9a697e3c85b410e5da4028a712e4347a
8ea760c8158b27129a9838338d209d8841be0cc0 08-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge changes I1539580e,I8452e799 into pi-dev

* changes:
Volume dialog mulit-streams have 8dp padding
Check if alarm and now times are in schedule
0350dab5b690652f78024a211c993f32fb766876 04-May-2018 Rohan Shah <shahrk@google.com> Add knobs for tweaking blocking helper thresholds

Added both blocking helper parameters to Global Settings to allow for
tweaking stats/values. Added listeners for value updates (so that
channels are updated properly with new thresholds).

Bug: 77143005
Test: manually, test cases
Change-Id: Ia5cfb29ca40500a694261bd5e9e60fa1f34e742a
291b944d89e15ee6236e0f2dcc97126bbfeb639c 08-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Adding batterystats history to proto dump." into pi-dev
7dd7c5ceda2c51d378169541aea4d160a4a15587 08-May-2018 Jan Althaus <jalt@google.com> Remove custom schema parsing in favor of Uri

This allows TextClassifier models to add support for additional protocols
after launch.

Bug: 79407639
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Change-Id: I6781bf476f8c81d2106e2fb73b8f4629068bb0af
4b7853ec5f749453359992daf2488a18b948f858 04-May-2018 Beverly <beverlyt@google.com> Check if alarm and now times are in schedule

Bug: 77570224
Bug: 79230399
Test: ScheduleCalendarTest
Change-Id: I8452e799189dab0559b49f1e62b18b7106929cd3
0c227d47cccc8e9994e5c3a3cbcd3348ee7a675d 04-May-2018 Emilian Peev <epeev@google.com> Camera: Specify session parameter build requirements

Session parameters are subset of the supported capture
request parameters. They are passed as part of the capture
session intitialization and only require the initial session
parameter values. Update the documentation and make clear that
additional outputs, tags etc. should not be passed when building
the session parameter capture request object.

Bug: 79225608
Test: Documentation builds
Change-Id: Id2651ea1d8dc8e3ebd9ebfca84eca2bb67694bf4
71a9531806d9d37f5482c4d242f95416c04715bf 17-Apr-2018 Kweku Adams <kwekua@google.com> Adding batterystats history to proto dump.

It will only print out a dump for userdebug or eng builds.

Bug: 77727638
Test: flash device and check output of incident proto and
'dumpsys batterystats -c --history'

Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
c8e4fad8623c27667b7078722e071e336020dc3a 04-May-2018 Dianne Hackborn <hackbod@google.com> Make android:cantSaveState an optional feature.

This doesn't make sense on things like watches and appliances,
so make this an optional feature that the device must enable.
If the feature is not set, then the system will ignore
the app's request.

Bug: 76213401
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: I91abf9d86ec14fa632e3bcc83c4a3febade5d2e4
88cc74cd6bc7df3068c1b9529050820f5ac2c45a 07-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "New FIELD_AUTOFILL_COMPAT_MODE field." into pi-dev
7ca1b03ece5c3ce9d6bec19675a4a9e0b2ba67ea 07-May-2018 Howard Ro <yro@google.com> Merge "Re-enable the logging of APP_BREADCRUMB_REPORTED atom" into pi-dev
1116652087c5889a98ff6d736e127fc0e97dbe37 07-May-2018 Felipe Leme <felipeal@google.com> New FIELD_AUTOFILL_COMPAT_MODE field.

This field is used on pretty much all Autofill metrics, except

Test: atest CtsAutoFillServiceTestCases
Test: adb shell logcat -b events | grep sysui

Bug: 79351659

Change-Id: I2e2f3dcc780a3896162b158926f5ee89c7cb342d
be6d7f90e8487f16e9459011f3b85ca354429f14 04-May-2018 yro <yro@google.com> Re-enable the logging of APP_BREADCRUMB_REPORTED atom

Bug: 78613419
Test: manual, cts, unit tests
Change-Id: I279158c8031eda3ee648053ae6a0d13fde7f1176
29d9eba79b82761d0d5019b3f05017fe20f1637b 03-May-2018 Jiyong Park <jiyong@google.com> Basedir of a bundled app is added to the permitted paths

For bundled apps, add the base directory of the app (e.g.,
/system/app/Foo/) to the permitted paths so that it can load libraries
embedded in module apks under the directory. For now, GmsCore is relying
on this, but this isn't specific to the app. Also note that, we don't
need to do this for unbundled apps as entire /data is already set to
the permitted paths for them.

Bug: 79211269
Test: m -j
Test: permitted paths of PrebuiltGmsCore contains

Change-Id: Id9a874fcec8479e952ab94cf33b2537f9aacd691
89f979849a5cf2fa4e16d4f24ab41409f16a9956 03-May-2018 Jack He <siyuanh@google.com> Bluetooth: Fix HFP SCO logic and documentation

* Call setBtScoActiveDevice and setBluetoothScoOn both in AudioService's
broadcast receiver so that these two methods must be triggerred in
intents are sent and we no longer need to handle race condition by
synchronously checking active device in setBluetoothScoOn
* Default sco audio mode when no headset is active should be virtual
voice call, as many HFP devices do not accept SCO audio without an
ongoing call
* Synchronize checkScoAudioState() method with mScoClients
* Add helper functions connectBluetoothScoHelper and
disconnectBluetoothScoHelper to call various SCO setup and tear down
methods based on sco audio mode
* Try raw, virtual call, and voice recognition mode when disconnecting
externally started SCO
* Add new sco state SCO_STATE_DEACTIVATING to allow back to back calling
of startBluetoothSco and stopBluetoothSco

Audio Manager:
* Modified AudioManager logic so that removed devices callback is called
before newly added devices

* Modified BluetoothHeadset so that start and stop SCO using virtual
voice call no longer need a parameter and will use active device by
* Modified documentation around various sco mangement APIs to match
their expected behaviors

Bug: 76114959
Test: VoIP calls sanity test cases
Change-Id: Id50db88f4ff36069b0f392c81dd9d90c24cd2206
b88217bd17da6d3794374dd77261b69107389882 05-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Fix spelling errors in BluetoothGatt documentation" into pi-dev
564942d0655e841fcb7c7dd7032f04b8fb45a111 05-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Convert RTT background throttle to a settable value (1/2)." into pi-dev
c87223b718a8e87adc87773d0340bac4d4a766ef 03-May-2018 Stanley Tng <stng@google.com> Fix spelling errors in BluetoothGatt documentation

Correct "paramter" to "parameter". Correct "connectoin" to connection.

Bug: 79198797
Test: Compile
Change-Id: I98646eec66da2aaa6f74ae2db35ea914c6a105a1
(cherry picked from commit 505c05839b8b28c5c465c2a537cf3da8a2004e63)
c870309921dab30893f26409625058f0eddf5a18 02-May-2018 Michael Wachenschwanz <mwachens@google.com> Add limits to App Usage Observer Api

Added a minimum time limit for App Time Limit Observers and a maximum
number of observers an app can register to AppTimeLimitController

Also fix small bug with mDpmInternal initialization

Change-Id: I8c0861d79711149f3ecd92ba4660f7b207e9b921
Fixes: 78890515
Fixes: 79230583
Test: atest AppTimeLimitController
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java#testAppUsageObserver
7bfb942e2d240dc1c52bfd0926517a7dbd3942fb 04-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Propagate calling UID to AM from CrossProfileApps" into pi-dev
a1dbe9cbfa0610107df7c47a4d5388a8e484d7d7 02-May-2018 Brad Stenning <stenning@google.com> Add a path to allow detection of task changes to the top of the ActivityView


Test: Manual with and app that registers for the new event.
Change-Id: I26aa2f6cd0ada1eb777364213c159e1e7d951a33
1ed9f4294c408dade7575cae9a7814f79b965be6 04-May-2018 Andrii Kulian <akulian@google.com> Merge "Schedule local activity relaunch" into pi-dev
018166c16eb70f5f2d7f7af313cdeb711c2609f7 04-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Just drop the default WP bitmap, don't explicitly recycle it" into pi-dev
8aec7be10eb87507a5dc1d8e264c8b6225b1e185 04-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Update dnd defaults for new users" into pi-dev
ec41a069fd30d02de6d6b1db6aa150e94ade504d 04-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Reset statsd and correctly record the dump reason when system server restarts/crashes." into pi-dev
320e3b546f9b87c69c553326894399ea64bd34b1 04-May-2018 Andrii Kulian <akulian@google.com> Schedule local activity relaunch

If local activity relaunch is executed immediately, and if
recreate() was called from a lifecycle callback, then existing
instance of activity will be destroyed while ActivityThread may
continue using it to finish performing a transaction item.
To remove this double lifecycle loop we now schedule local activity
relaunch on client thread instead of executing it immediately.
It worked in similar way until changes in b/30060825.

Bug: 78576150
Bug: 64610483
Bug: 30060825
Test: ActivityLifecycleTests
Change-Id: Ic0cef229f2f9df0fa40066d8540c4b29da7bdc58
892f3d32293b8358c72da4a94633827abbda640b 02-May-2018 Yangster-mac <yanglu@google.com> Reset statsd and correctly record the dump reason when system
server restarts/crashes.

Test: statsd test
BUG: b/79161505
Change-Id: I0646c764964f6eafde91f9ae0179a1c837af320d
6fb01a8a566b3e4bfb71f3030e2c4ebdabad18a0 04-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Add app op for Bluetooth scans" into pi-dev
625de7758b548cac9328f141f9191b0c06dfd631 04-May-2018 Rob Carr <racarr@google.com> Merge "SurfaceControl: Close CloseGuard when destroying surface in transaction." into pi-dev
1b59867b9fdbd5a87f9323932b85dae287b16b39 03-May-2018 Andrii Kulian <akulian@google.com> Merge "Preserve custom activity intent on relaunch" into pi-dev
10a7cc127531c1917eab11fb953b2dcc84b7ec95 03-May-2018 Julia Reynolds <juliacr@google.com> Update dnd defaults for new users

Test: flash new device
Change-Id: I83ecf3394724a1efd952c01514272924cd289e34
Fixes: 78778706
f4e0438a46e7d9194338933ca5689dc769e43a57 03-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "In place split install native support" into pi-dev
06637b97dd3f8e30131127d3ef0dfe4b89c157f2 03-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Make safe label more safe" into pi-dev
929ea3615761d3e47a84a48117868d2a7d813088 03-May-2018 Selim Cinek <cinek@google.com> Merge "Fix new notification showing timestamp "now" after turning off DND" into pi-dev
297965f29e12282ab5d190799dc2ff3d97385aab 03-May-2018 Benjamin Miller <benjaminmiller@google.com> Merge "Docs: noted that DISALLOW_INSTALL_APPS prevents DPCs installing apps." into pi-dev
d733159b457a96bbfffe74bfeed43f705762d025 03-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "WIDGET_TYPE_UNSELECTABLE_TEXTVIEW is missing in the WidgetType" into pi-dev
f5cb5e55250d892bc3b8de9fbe59b7464b1d874f 03-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "old paths contains all entries when updating" into pi-dev
7790f2a4e1eee48c33957cc4ac079c8bce64c0ad 03-May-2018 Richard Uhler <ruhler@google.com> Merge "Fix leak of WeakReferences on mThemeRefs list." into pi-dev
f1c3ed1e81a030654e84b24794d89182a908156e 03-May-2018 Benjamin Miller <benjaminmiller@google.com> Docs: noted that DISALLOW_INSTALL_APPS prevents DPCs installing apps.

Bug: 72428023
Test: make ds-docs and inspect output
Change-Id: Ifc31378b7061d10b73de183e3c64864d608975b1
6e4039588222338ad8ccf1de68b90188aed5201d 03-May-2018 Todd Kennedy <toddke@google.com> Make safe label more safe

* limit the absolute maximum size of the label to 50000 characters
[which is probably far more than necessary, but, can be dialed down]

* use a string buffer while processing the string [instead of creating
multiple string objects]

Bug: 62537081
Test: Manual. Install APK in bug and see that it can be uninstalled
Change-Id: Ibf63c2691ad7438a123e92110d95b1f50050f8b1
b9656a93aac435cefaa4ca0e1b06495d690ba019 02-May-2018 Todd Kennedy <toddke@google.com> old paths contains all entries when updating

In certains circumstances, only the base and split APKs were included in
the "old paths" list when updating the application info. Instead, this
list should contain _all_ elements, including any additional libraries
that may be added to the overall classpath.

Bug: 77342775
Test: Manual. Install a package. Install a split with --dont_kill. See that the path doesn't contain duplicate entries
Change-Id: Id9739cce215ab07bff1b17966583c0cf51a0b34a
dd6a0dbf2f882b62e70430d6d4deceae0fbfe4f1 26-Apr-2018 Richard Uhler <ruhler@google.com> Fix leak of WeakReferences on mThemeRefs list.

Periodically remove references from the list whose referents have been
garbage collected.

Bug: 73961798
Test: Device boots.
Test: Take a heap dump of systemui and manually check that the state of
ThemeRefs looks reasonable.

Change-Id: I691027feb5dd217bcb60406b28897b9614e2a845
e9db89cc76f205747a490108ce1a994ae179205c 03-May-2018 Mathew Inwood <mathewi@google.com> Merge "Pass package name to runtime." into pi-dev
ea19d32a9b6d7b3bb5f49e90d1b596cbaec49dc7 02-May-2018 shawnlin <shawnlin@google.com> Fix new notification showing timestamp "now" after turning off DND

DateTimeView won't update timestamp until the view is attached to
window and received TIME_TICK intent.

Update timestamp on onAttachedToWindow().

Test: manual 1) turn on DND 2) send a notification and wait some time 3)
turn off DND and check the timestamp
Fixes: 77970557

Change-Id: Ia8420aacf5b91b0bb9cbec561629ddbfc8de4f67
770c4030691f11ca36ef0028a336a27eda2049ef 03-May-2018 Andrii Kulian <akulian@google.com> Preserve custom activity intent on relaunch

An activity can have a custom intent set via Activity#setIntent().
This was lost in ag/3305584

Change-Id: I88f3e164d2cf7f6c62989bba05cd84b9b83befc3
Fixes: 73181785
Test: ActivityThreadTest#testCustomIntentPreservedOnRelaunch
6b590c3934c6663e647909fbdcabc1d42a125547 02-May-2018 Dianne Hackborn <hackbod@google.com> Add app op for Bluetooth scans

Bug: 78480444
Test: manual
Change-Id: I0e747ed5301640af04ec4d6ef2ba5ee6c2de495a
Merged-In: I5a88abc8f26e7505ebfbd76137f13f75be6e5ff9
f7d3e028ae068bc370053a78e40be20e2020c771 02-May-2018 Jeff Sharkey <jsharkey@google.com> Merge "Return to modifying raw /mnt/media_rw paths." into pi-dev
1c827da635732826136bf75046e968cbb4554acf 02-May-2018 Christopher Tate <ctate@google.com> Just drop the default WP bitmap, don't explicitly recycle it

Recycling invalidates it out from under any client code that might
have retained the reference previously. That's not sociable.

Just drop the internal cache reference. The underlying storage will
be properly freed by GC if it's genuinely not being used anywhere

Change-Id: I94e0e2ba2b78daa40c8026e6fc72fda3bed57ae3
Fixes: 79108131
Bug: 74534423
Test: atest android.content.cts.ContextWrapperTest#testAccessWallpaper
067749725e6a7c5638ea386db64ed71bed2fc867 02-May-2018 Chia-I Wu <olv@google.com> Merge "Update Configuration#isScreenWideColorGamut doc" into pi-dev
12f404e3e33c21a4f0d634698bef94c219ec48ab 02-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Work on issue #77931346: The notification that should not be named appeared" into pi-dev
53e86ba235f1c290edd53d4d565499d73a0b7f25 02-May-2018 Chia-I Wu <olv@google.com> Update Configuration#isScreenWideColorGamut doc

Clarify that the method does not imply the screen is color-managed.
A global color transform may still be applied depending on the user
settings, such as night light, accessibility, Boosted, or Stretched.

Bug: 78012876
Test: builds
Change-Id: Ie9cdf455cf4ca93be2357a5313cd63555ab91ff9
4cf738204f091914a64167ef4b2dfe550f5b17fe 23-Apr-2018 Victor Hsieh <victorhsieh@google.com> Avoid using 0 for fs-verity extension ID

* Adjust size and order of some fields
* Fix Merkle tree size calculation bug

Test: Verify fs-verity works with kernel patch
Bug: 67380979
Change-Id: I58f14cfe9630c1ff62ed64dbf333bb1c9bfe0fb1
4dd4314744022566af2c53cd5bb79d19faae21a0 02-May-2018 Tony Mak <tonymak@google.com> WIDGET_TYPE_UNSELECTABLE_TEXTVIEW is missing in the WidgetType

Test: None

Bug: 72534351

Change-Id: I9cde8d98d2cd32aae91513fd65010011e3570470
90f197efe50464202c3f357f17c96cc885c81a15 02-May-2018 Mihai Popa <popam@google.com> Merge "[Magnifier-43] Refactor to remove code duplication" into pi-dev
724990d5ff2beaca1140c47a737c513a743d3c54 02-May-2018 Mihai Popa <popam@google.com> Merge changes I63f2b185,I0d749c1a into pi-dev

* changes:
[Magnifier-42] Fix bug in window positioning
[Magnifier-41] Fix behavior in windows with insets
c418d5adc5ce69d1edd4b35292e8da5e79a17ab9 02-May-2018 Rubin Xu <rubinxu@google.com> Allow profile owner to disable iris/face on personal keyguard

This is similar to their existing capability of disabling fingerprint
on personal keyguard.

Bug: 78449641
Test: builds
Change-Id: Ia1d6a40a3ff30366af52435ad51c44a9f7612304
f298068a7fd9e8249eca86d74ed4bcf5a6410582 30-Apr-2018 Mihai Popa <popam@google.com> [Magnifier-43] Refactor to remove code duplication

Since Ic5b5f6ca687db8b5d842f0ab20eac70f1fd2f85e, the magnifier can be
the child of a diffent surface than the one its content is copied from.
This initially led to much code duplication accross different methods,
making the code quite difficult to understand. This CL performs a small
refactoring, removing some of the TODOs and making the code a bit

Bug: 78876353
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ifa26f94ba2e4983446f058f016af6010c1017ea7
227034b863d6720a3fb1438efa52fd6a8fcf4c09 27-Apr-2018 Mihai Popa <popam@google.com> [Magnifier-42] Fix bug in window positioning

The position of the magnifier surface is always clamped inside its
parent surface. As of Ic5b5f6ca687db8b5d842f0ab20eac70f1fd2f85e, we are
always trying to make the magnifier surface a child of the main
application window, if possible (before, if the magnified view was a
SurfaceView, we were making the magnifier a child of the SurfaceView's
surface). However, the CL did not also update the clamping, continuing
to clamp to the SurfaceView space when the magnified view was a
SurfaceView (even if the magnifier was child of the main window). This
was making the magnifier window to be wrongly positioned on the screen
when the magnified view is a SurfaceView. The current CL fixes this.

Bug: 78876353
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I63f2b185f58e62e8ad6eadf788e641fb1de07b04
0450a167592afe509fc068c87adfe9b452323e20 27-Apr-2018 Mihai Popa <popam@google.com> [Magnifier-41] Fix behavior in windows with insets

The CL fixes the magnifier's behavior when its parent window has
positive insets in its surface:
- we compute the content copy coordinates sent to the pixel copy request
relative to the surface the content is copied from. We were clamping
them inside the visible region of the magnified view as returned by
belonging to the view which is magnified. However, the method returns
coordinates relative to the window. Therefore, the CL offsets the
visible rectangle with the window insets, to account for them.
Otherwise, when the insets were non-zero, on a text line we were
allowing the magnifier to display content from the left outside of the
text line, while a certain region at the end of the text line could have
never been magnified
- when clamping against the visible view region, when the surface we
copy from is a SurfaceView, #getGlobalVisibleRect is still returning
coordinates relative to the main window, whereas the coordinates we are
trying to clamp are relative to the surface of the SurfaceView. In order
to make the visible rectangle relative to the surface of the SurfaceView
instead, this CL negatively offsets the visible rectangle with the
SurfaceView position in the parent surface
- the selection/insertion handles are hidden when they overlap the
magnifier. To check this, we intersect the magnifier rectangle with the
rectangle of each handle. However, when we were performing this check,
the magnifier rectangle was relative to the surface, whereas the
handles' rectangle was relative to the main window. The CL negatively
offsets the magnifier position with the surface insets, to make both
rectangles relative to the window.

Bug: 78621162
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I0d749c1abb38520fe8fc477d22d6523f470e9abc
de32b83499151ad8e0b47bd90cb0a87cdfb7cf01 30-Apr-2018 Tony Mak <tonymak@google.com> Propagate calling UID to AM from CrossProfileApps

Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java
Test: atest FrameworksServicesTests:com.android.server.pm.CrossProfileAppsServiceImplTest
Test: Try the API in TestDPC

Fixes: 78869781

Change-Id: I9b8721f6b5189e566345c2afee7d559a57670e71
37b6ca82ed56767b88f9d15296668dd728a659dd 02-May-2018 Mathew Inwood <mathewi@google.com> Pass package name to runtime.

When binding an application in ActivityThread, pass the package name to
the runtime so it knows which package is running in the process.

Bug: 77517571
Test: m
Change-Id: Ia646599ca45b76ebcd068fcc50df23659e89b82b
55c2d4106ac6e18c8e006029ac1140eceb5ef405 02-May-2018 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #78480444: Start tracking uid state in app ops" into pi-dev
025d4a59fced3af7acfccef9cbae13735ddce7c8 01-May-2018 Dianne Hackborn <hackbod@google.com> Work on issue #77931346: The notification that should not be named appeared

Keep track of whether a foreground service has been shown in a
notification channel and, the first time one is, make sure the channel
is sufficiently important regardless of what the user or app last
set for it.

Bug: 77931346
Test: runtest systemui-notification
Change-Id: Idecad2dceb8cc918feec91ca1ee26edf3d3ab7de
2378a4a3faa989a51c1aea8a4dd325c9f0235a58 26-Apr-2018 Dianne Hackborn <hackbod@google.com> Work on issue #78480444: Start tracking uid state in app ops

Introduce new app op mode that uses uid state to determine whether
the caller has access. This will determine what noteOp() and
startOp() return, based on the state of the uid.

Bug: 78480444
Test: atest FrameworksServicesTests:AppOpsServiceTest
Test: atest CtsPermissionTestCases:AppOpsTest
Change-Id: I12b744b74f3129782dbda9567043f5170919b5d3
Merged-In: I55fd74023cc4dae8151372e28c3afc7d259c7a1c
b3972f9d2351a877fc0be5841da3289d5a487ebf 02-May-2018 Michael Wachenschwanz <mwachens@google.com> Merge "Add Stable Charging Threshold for AppStandby" into pi-dev
da8e229b9c310c2f82111764c654ff687287e02c 02-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Add OP_PLAY_AUDIO to control shutter sound." into pi-dev
14de2930ba6a9d23a746e354b41bd9ede544eee7 02-May-2018 Kevin Chyn <kchyn@google.com> Merge "refactored Log statements to Slog" into pi-dev
09ba7e0bae2be35cb5767bb2de627d38f27381dd 01-May-2018 Evan Rosky <erosky@google.com> Merge "Don't clear focus during transition animations" into pi-dev
7f556daa41b727bef3da1e8bad02a89ed904f32b 01-May-2018 Tyler Gunn <tgunn@google.com> Merge "Require READ_CALL_LOG permission to see phone numbers in phone state." into pi-dev
1fc69c5eda0e512debf9b0ce52166f699f4bb11e 01-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Add personalization state paused constant" into pi-dev
66aa41291a84f2cc56efb0c1407a588a8ae88992 01-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Fix docs for a11yNodeInfo#refreshWithExtraData" into pi-dev
fd7d5779c321c1a5d31fccef925faa37311de616 01-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge changes from topic "jr-onboard" into pi-dev

* changes:
Update 'dnd is hiding notifications' view
Update zen onboarding flow
Change zen defaults for upgrade and new users
220fc4f3b1f4e45b18d85d8ae6065673b5043a34 01-May-2018 Phil Weaver <pweaver@google.com> Merge "Fix bug and docs assuming progressBar min is 0 instead of getMin()" into pi-dev
849943340e4fda418bf86512c29df69db3d4c31f 01-May-2018 Phil Weaver <pweaver@google.com> Fix docs for a11yNodeInfo#refreshWithExtraData

I think an early version of this API was a bitmask.

Bug: 78922344
Test: make
Change-Id: Ib50257d39a9d60ddc33f792640065e6643ccc3aa
b00d5ea59a5218cde5d7b2e84572f6fd26611f25 01-May-2018 Jeff Sharkey <jsharkey@android.com> Return to modifying raw /mnt/media_rw paths.

We thought we could push everyone through sdcardfs, but secondary
devices mounted in a stable location don't give full write access to
apps holding WRITE_EXTERNAL_STORAGE, so system internals still need
to reach behind sdcardfs.

To keep sdcardfs in the loop about changes that we make behind its
back, we issue access(2) calls which should be enough for it to
invalidate any cached details.

Bug: 74132243
Test: manual
Change-Id: I727cd179a5a825b16ec4df6e2f41a079758d41c5
eac8a05d19d0c29f8e4310db62d5ed41bc4773b9 01-May-2018 Makoto Onuki <omakoto@google.com> Merge "Propagate calling UID to AM from LauncherApps" into pi-dev
1f580571182b298bf10322e1ef5f7c801404ae72 27-Apr-2018 Julia Reynolds <juliacr@google.com> Change zen defaults for upgrade and new users

- Upgrade -> migrate suppressScreenOn and suppressScreenOff to
- New -> all visual effects are off, starred contacts are allowed
to call

Also fixed an NPE noticed while testing this CL

Test: runtest systemui-notification
Change-Id: I1efd6e3f9bc7519b2fb769bae62ffa1aaae59cb6
Fixes: 78778706
Fixes: 78768955
618033a1c76cddcf8d1197fb8714fcbc08bdbbd5 01-May-2018 Julia Reynolds <juliacr@google.com> Merge "Update logic for interruptive notifications" into pi-dev
32491b6f8e90e5d70db498102c30cd5eaa639abe 01-May-2018 Chris Wren <cwren@android.com> Merge "Add implementation for SliceMetrics" into pi-dev
b6e04d5383047f05beafcbb8d76886de47bf10e3 01-May-2018 Wei Wang <weiwa@google.com> Convert RTT background throttle to a settable value (1/2).

Bug: 69323456
Test: Manual test. Unit tests with runtest.sh.
Change-Id: I7dd3efc0ef3f0a12303f927da134abbd2383deb6
ff910d2ba8d0e9e79677188d66ec993a505b7ea3 01-May-2018 Robert Carr <racarr@google.com> SurfaceControl: Close CloseGuard when destroying surface in transaction.

As this signifies releasing the native resources protected by the guard. See comment
for more indepth discussion.

Bug: 78629612
Test: Manual.
Change-Id: Iee9fe9558b1fee171789580c48f4890c2be1c219
d4390a52e544f34e4c3dad7347dc5e6c43fa5776 01-May-2018 Joshua Mccloskey <joshmccloskey@google.com> refactored Log statements to Slog

Test: it builds
Change-Id: I9fdc5ad6767b02f42b768c1709b22d9f4d2d4e6b
Fixes: 76183279
24c47597142a9f0b6e3194ca3987726482a1979b 01-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Substituting the app name also on the public content view" into pi-dev
1ae7fd5f4470c3f93186548d8f118662e944b329 01-May-2018 Gene Karshenboym <genek@google.com> Merge "Implement RadioMetadata.toString." into pi-dev
43bda82c1088c00d23c152be5b3b7c82b3a4374a 30-Apr-2018 Ajay Nadathur <ajayns@google.com> Add personalization state paused constant

- Add a new constant USER_SETUP_PERSONALIZATION_PAUSED to inform
interested listeners when personalization is paused.

bug: 78898802
Test: Manually tested and verified
Change-Id: I4481c38e31a8b47dfc98d8733b446885899d4a67
ed07b96aef925507990df6b6c04355c5975ca03d 30-Apr-2018 Selim Cinek <cinek@google.com> Substituting the app name also on the public content view

Test: add notification with substitute name, observe correct public notification
Change-Id: Ib682a363c47f8925d54413e1edb20c0b8ce2e8b9
Fixes: 78605862
1bea237aa296a35c263f0c4965ba0f5a140cd848 13-Mar-2018 Patrick Baumann <patb@google.com> In place split install native support

This change makes it possible for apps installed with the DONT_KILL flag
set to obtain access to newly installed native libraries while avoiding
double load of existing native libraries prior to the install when
loaded using System.loadLibrary.

Bug: 72047376
Test: manual - used sample app to verify availability of native libs
Change-Id: I331eaa48da1f8dee424584911317ec3fba92f873
331a22e39a95e335da6f401aa4caee8efb3781de 30-Apr-2018 Rob Carr <racarr@google.com> Merge "Detach children when stopping app." into pi-dev
e5c6045070adcac613f4581c9ac010d4313423be 30-Apr-2018 Julia Reynolds <juliacr@google.com> Update logic for interruptive notifications

- Only count visual changes for non-foreground service notifications,
because users consider the notification to be one 'session'
- Don't count every remoteviews update, but those where the layoutid
or sequence number has changed.

Bug: 78643290
Test: runtest systemui-notification
Change-Id: I49483d26ebe63329ef2d6d3f10dd730c310fcf2a
69b1fce562fdc8c416756f9b0cfb5e435a4f5c61 30-Apr-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Truncate newline and tab characters in BluetoothDevice name" into pi-dev
7f1944a365a402ea1943526df09cb9e64309e4f9 30-Apr-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Add documentation for what to use for SS changes" into pi-dev
14186bfe08e7f23f481d9004c73535a6aecd9d78 30-Apr-2018 Makoto Onuki <omakoto@google.com> Merge "Log slow message delivery on Looper" into pi-dev
dd2e6c502f385c8884437cbe9f4610acd9b95483 30-Apr-2018 Tomasz Wasilczyk <twasilczyk@google.com> Implement RadioMetadata.toString.

This is required for metadata debugging.

Bug: 78885613
Test: build, run radio, watch logs
Change-Id: I63393bf555ede396a04f50897490049568b089dd
d63dffd8cdf35010ac0f37b791560e99278e43c2 19-Apr-2018 Chris Wren <cwren@google.com> Add implementation for SliceMetrics

Bug: 76150975
Test: atest cts/tests/tests/slice
Change-Id: Ide07b6b490434841978df86794b048b997d523be
712886fd979f58b0de7cefc3bce885ad7f4493b6 28-Apr-2018 Makoto Onuki <omakoto@google.com> Log slow message delivery on Looper

Sample log:
04-27 15:30:17.306 1000 942 942 W Looper : Dispatch took 222ms on main, h=Handler (com.android.server.job.JobSchedulerService$JobHandler) {42042fc} cb=null msg=7 start=48162 end=48384
04-27 15:30:17.306 1000 942 942 W Looper : Delivery took 235ms on main, h=Handler (com.android.server.job.JobSchedulerService$JobHandler) {42042fc} cb=null msg=4 start=48149 end=48384
04-27 15:30:17.773 1000 942 942 W Looper : Dispatch took 445ms on main, h=Handler (android.app.ActivityThread$H) {5df4c77} cb=android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA@badd538 msg=0 start=48406 end=48851
04-27 15:30:17.828 1000 942 942 W Looper : Drained
04-27 15:30:24.389 1000 942 942 W Looper : Dispatch took 718ms on main, h=Handler (android.hardware.soundtrigger.SoundTriggerModule$NativeEventHandlerDelegate$1) {d7e9947} cb=null msg=4 start=54749 end=55467
04-27 15:30:24.389 1000 942 942 W Looper : Delivery took 621ms on main, h=Handler (com.android.server.media.MediaSessionRecord$MessageHandler) {5851574} cb=null msg=7 start=54846 end=55467
04-27 15:30:24.499 1000 942 942 W Looper : Drained

Bug: 78590632
Test: Boot and check log
Test: setprop log.looper.1000.android.bg 1 and runtime-restart and check log
Change-Id: Ief1fc65b40b8a3d583879f55a76288e3dba6be7d
8e7f8ad3cea52f7cb83af986cead0c4691ccb445 27-Apr-2018 Abodunrinwa Toki <toki@google.com> Merge "FloatingActionMode.setOutsideTouchable" into pi-dev
12902265648ec6739a81091d4f014af81ab2e956 27-Apr-2018 Abodunrinwa Toki <toki@google.com> Merge "TC: Fix null PendingIntent being passed to RemoteAction" into pi-dev
29daa92be91d0a756f2486d49cadefee24f24467 27-Apr-2018 Robert Carr <racarr@google.com> Detach children when stopping app.

Prior to the implementation of detachChildren we handled this
case via the "mWindowStopped" codepath in SurfaceView.java which this
CL deletes. That codepath however causes confusion due to it's failure
to set null the SurfaceControl, meaning we may not necessarily
recreate it when resuming if we didn't hit any other code-path
to do such as happens in linked bug 78588930. Anyway it seems clearest
to handle all these preserve-child-surfaces-on-tear-down cases via
one mechanism (detachChildren).

Bug: 78588930
Test: Manual.
Change-Id: Iac7c0bc0c6b4da0d405bdc2b57d13d5c881611b0
a973d530df653009168544b3e6aafda442c1367c 27-Apr-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "camera2/legacy: Fix expected errors on eglSwapBuffers" into pi-dev
fb699bcf1c63b6a533689cacf66f0a81e5645c21 27-Apr-2018 Evan Rosky <erosky@google.com> Merge "Use correct windowingMode when computing override config" into pi-dev
1a34274336c19b50173ea60071dfc6427d40dbf6 26-Apr-2018 Makoto Onuki <omakoto@google.com> Propagate calling UID to AM from LauncherApps

- So that AM can perform all the necessary caller checks, except for the cross-profile/user check.

- Note PixelLauncher is the recent app which gets extra privileges. So I used ShortcutLauncherDemo
and a 3p launcher for manual tests.

Fixes: 78635323
Test: manual test, with a 3p launcher. (nova)
- Launch primary profile app -> launches fine
- Launch work profile app-> launches fine
- Launch suspended work profile app -> "can't open this app" dialog is shown.
- Launch the primary counterpart of the suspended work profile app -> launches fine.
- Launch work profile app in quiet mode, with separate work challenge
-> "turn on work profile"? dialog is shown
-> then "cancel" -> nothing happens.
-> then "turn on" -> "re-enter your pin" is shown -> type pin -> work profile app starts fine.
- Launch work profile app without separate work challenge
-> "turn on work profile"? dialog is shown
-> then "cancel" -> nothing happens.
-> then "turn on" -> work profile starts and the app starts fine.
- "App info" on work profile app -> Setting page opens fine.
- "App info" on primary profile app -> Setting page opens fine.

Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest*.java
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/LauncherApps*.java

Change-Id: Ie665a8890407d05c1d877f04d9c5c3a1caad18e1
06c0c3a9330c0ccf7e130222b738bfc4caad596b 27-Apr-2018 Chia-I Wu <olv@google.com> Merge "Add COLOR_MODE_AUTOMATIC" into pi-dev
f955e56d51dac0fade192b544af5679d3d8193ac 26-Apr-2018 Tyler Gunn <tgunn@google.com> Require READ_CALL_LOG permission to see phone numbers in phone state.

Incoming and outgoing call phone numbers are visible in the phone state
broadcast and via the PhoneStateListener. To enhance user privacy, change
to require the READ_CALL_LOG permission in order to receive the call
phone numbers.

This means to see phone numbers:
1. android.intent.action.PHONE_STATE - requires READ_PHONE_STATE and
READ_CALL_LOG permission.
2. PhoneStateListener#onCallStateChanged - now required READ_CALL_LOG

To support this new behavior, added sendBroadcastAsUserMultiplePermissions
method to context to allow sending the broadcast to all users while
requiring the two permissions.

Bug: 78650469
Test: Created PHONE_STATE broadcast receiver in test app and verified that
when no permissions are granted, the phone number is empty for incoming
and outgoing calls.
Test: Granted Phone state permission to test app and verified that phone
number is not populated.
Test: Granted test app read call log permission and verified that phone
number is populated.
Test: Created PhoneStateListener in test app and verified that when no
permissions are granted, phone number is empty for incoming and outgoing.
Test: Granted read call log permission to test app and verified that both
the incoming and outgoing numbers are populated.

Change-Id: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
8ba6a53270d81f86c7264a3b89385a3d0b9341ab 27-Apr-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "Enable Notifications on AndroidTV" into pi-dev
a750da196031e2159aa8ff1f42934f20b87dfc96 27-Apr-2018 Sudheer Shanka <sudheersai@google.com> Merge "Schedule external stats sync on battery level change with a delay" into pi-dev
640d4d5f43e17d66f4800a02d3e5706bb4a1ca8a 27-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix PersistableBundle C++ -> Java interop" into pi-dev
6bdd4aca964d5d9a18fb66d926330f4296643ab4 26-Apr-2018 Makoto Onuki <omakoto@google.com> Fix PersistableBundle C++ -> Java interop

PersistableBundle.java expects items to be sorted by the hash codes
of the keys, but PersistableBundle.cpp isn't compatible to it.

PersistableBundle.java now knowns what was parceled by C++
because it now uses a different magic, and change the unpercel

Change-Id: Ia516f80b6d48dcb9f981767e0e64303434f39fb4
Fixes: 65744965
Test: adb shell sm fstrim and check logcat
253827f207be31399a21c390f90ce3ffe4b020c0 24-Apr-2018 Abodunrinwa Toki <toki@google.com> TC: Fix null PendingIntent being passed to RemoteAction

Problem was RemoteAction(...) takes a non-null PendingIntent but
TextClassification.createPendingIntent(...) returns a nullable PendingIntent.

Bug: 78515224
Test: manual
- Disable Contacts apps in settings
- Select a phone number in a TextView
- Verify that a Phone smart action is displayed
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Change-Id: Icab581d4eef38b4801d1b9ee3af04ffefd1eec6f
10b77a39a266e376c4cb7beef3d9543073f75466 27-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Using a list to store usage events" into pi-dev
5ca5cb6c5350d8f79beb418251cad90eb152813e 26-Apr-2018 Michael Wachenschwanz <mwachens@google.com> Add Stable Charging Threshold for AppStandby

Delay parole when charging to ensure the device has some time to charge
and avoid a spike is activity on plug in.

Change-Id: If85f097249aeed6b64f43a22f4d25ff0a070febb
Fixes: 78040839
Test: atest AppStandbyControllerTests
0719c6af4442e1be5de766582398b8e6efb7b180 24-Apr-2018 Sudheer Shanka <sudheersai@google.com> Schedule external stats sync on battery level change with a delay

and fix locking in scheduleCpuStatsSyncDueToWakelockChange().

Bug: 74146897
Test: atest cts/hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2891dfb8a0aedf429232f45e26deab93c738506e
df34b49fa2920cdc81a94b438c5abbeb9409f320 20-Apr-2018 Lloyd Pique <lpique@google.com> camera2/legacy: Fix expected errors on eglSwapBuffers

SurfaceTextureRenderer::swapBuffers interpreted EGL_BAD_SURFACE as
indicating an abandanoned buffer queue. But the EGL 1.4 lists additional
errors that also indicate extreme failure: EGL_CONTEXT_LOST, and

Discovered while debugging CTS test
on ARC++ x86 boards.

Test: cts-tradefed/android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface
Bug: 64496778
Bug: 36063477
Change-Id: I782f2c923aa5ff2442bbcf3dfb09861e129a2872
(cherry picked from commit 3511f99cf986a9fe7a67a8aee301e05f1be07f62)
2e3bf46039dc98e78bb79eeef0e72bc161b1cfb3 26-Apr-2018 Hansong Zhang <hsz@google.com> Truncate newline and tab characters in BluetoothDevice name

Test: manual
Bug: 73173182
Change-Id: I7f2201cab36adf7f01d1a794d783cb78a536811f
f60fb12d39774e2f626660d357a4384cdaf0e72c 26-Apr-2018 Felipe Leme <felipeal@google.com> Fixed typo on TextValueSanitizer sample.

Test: is an overkill here
Fixes: 78641592

Change-Id: I968d55830dfe9551eb4d1e1c8cd79651d674f8eb
b0e388823bef00975176a11ba269c29b062ca786 25-Apr-2018 Evan Rosky <erosky@google.com> Use correct windowingMode when computing override config

The StackWindowController was calculating task bounds with
the WM-side windowingMode instead of the AM-side.
In this case, we are resizing during a windowingMode change
(fullscreen -> freeform). Since the windowingMode isn't sent
to WM-side yet, the smallestScreenWidthDp was set using
the old windowingMode resulting in the wrong resources being

This change makes windowingMode one of the parameters (like
bounds/density) used to adjust the configuration.

Bug: 71028905
Test: ActivityStackTests and WindowConfigurationTests still pass.
Open playstore maximized, go to an app page, restore window.
Layout should now be appropriate for the smaller window.
Change-Id: Idcb538a768cd983ab9eac0d61a6dbea3e9dc64a5
76f04073f9a69bea351c3afeb3671782f35bed4a 26-Apr-2018 Philip P. Moltmann <moltmann@google.com> Compute correct rejected time

Fixes: 78632929
Test: atest FrameworksServicesTests:AppOpsServiceTest

Change-Id: I34e1de6658c89c40cae3a8bb6e9fdb4e7fd80795
9ea13ca0b67e77c5efda1c94c141dc49987c0745 26-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Autofill: new UX for TV and support themes" into pi-dev
59efe9734e5499c9f1a325df480247b57e0c8da4 24-Apr-2018 Alexey Kuzmin <alexeykuzmin@google.com> Default vibration amplitude resolution added

Test: On sailfish, set vibration intensity to High, lock the phone and
unlock with FPS. Vibration should be played.
Bug: 76129874

Change-Id: I546341e55fa0e6de0af1d22c8e8e07d67670f0b9
Merged-In: I546341e55fa0e6de0af1d22c8e8e07d67670f0b9
30f59b26356f59a1e38b8b7b4879b19532ff085c 09-Apr-2018 Kristian Monsen <kristianm@google.com> Enable Notifications on AndroidTV

Also fix some tests that were broken on TV.

Bug: 78285926
Test: runtest systemui-notification

Change-Id: Icf4e5a1e02c3075b466305023c986ada52e9ec93
Merged-In: Icf4e5a1e02c3075b466305023c986ada52e9ec93
977871a96ceebc1e27e0fdb551f9c19403d16f89 26-Apr-2018 Mihai Popa <popam@google.com> Merge "[Magnifier-40] Always child of main window" into pi-dev
819e90d3f6b8296e367f753b141861351ea7f50f 16-Apr-2018 Mihai Popa <popam@google.com> [Magnifier-40] Always child of main window

Previously, we were making the magnifier surface a child of the main
window unless the magnified view was a SurfaceView, in which case we
were setting the SurfaceView to be the parent of the magnifier. In
Chrome, where the magnified views are usually SurfaceViews, this caused
the magnifier to be displayed underneath the omnibox, which was a
terrible user experience when trying to magnify the first lines of text
on a page. This was because the omnibox had a higher Z than the
SurfaceView, and therefore a higher Z than all children of the
SurfaceView (including the magnifier).

This CL sets the parent of the magnifier surface to be the main window's
surface when the magnified view is a SurfaceView as well. Therefore, the
magnifier becomes a sibling of the Chrome omnibox and, by giving the
magnifier a higher Z, it ends up being rendered on top.

Bug: 77926365
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ic5b5f6ca687db8b5d842f0ab20eac70f1fd2f85e
413f5fc297a1231697d04a64d40f0d695df2fbe6 26-Apr-2018 Ruchi Kandoi <kandoiruchi@google.com> Update the Open Mobile API version

The current implementation is inline with OMAPI version 3.3

Test: None
Bug: 64994044
Change-Id: I22f969e99f4dfc677931adf3494b47d6972d026d
(cherry picked from commit c46670ddbd3bb5089cf71388a589839e57bebe70)
4620d9b3a3e09884683e0a76c6b85b76405b276b 26-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED" into pi-dev
60aa35b756707a16d310c222a36edbcef9d56ed4 25-Apr-2018 Suprabh Shukla <suprabh@google.com> Using a list to store usage events

Moving UsageEvent.Event objects to an array list sorted on the event
timestamps as there can be multiple events with the same timestamps.

Test: atest android.app.usage.EventListTest
Existing tests:
atest android.app.usage.cts.UsageStatsTest

Bug: 74406113
Change-Id: Idc7f2a8db6e5a9499b3b0b74efbf014b17fa495f
fcefeb25acdea789e2c32ef0169d3cabf891036c 25-Apr-2018 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #78480444: Start tracking uid state in app ops" into pi-dev
1e0e7176bdbae9fd1f47351e6ed100c303535cab 14-Mar-2018 Chia-I Wu <olv@google.com> Add COLOR_MODE_AUTOMATIC

COLOR_MODE_SATURATED disables color management and thus treat any
color space as panel color space. COLOR_MODE_AUTOMATIC is similar
to COLOR_MODE_SATURATED in that it stretches color spaces to panel
color space, but the stretching is color space aware.

persist.sys.sf.native_mode is extended to be a integer, where

0: use DisplayColorSetting::MANAGED
1: use DisplayColorSetting::UNMANAGED
2: use DisplayColorSetting::ENHANCED

Bug: 73824924
Test: manual
Change-Id: Ia356958d8e1fbae90f244ded7111de2e45aa4b3c
16c671dc9a0a7e90a16a2998f97fa605a7a63a67 25-Apr-2018 Nathan Harold <nharold@google.com> Merge "Rework Exception Handling for IpSecManager" into pi-dev
36b86c28f88e4c7853a4255a0fd9b754cbb547c4 16-Apr-2018 Dake Gu <dake@google.com> Autofill: new UX for TV and support themes

1. Define default Themes for autofill window and save dialog.
(http://go/theme_autofill). Phone uses light themes, TV uses
dark themes.
2. Apply autofill theme to RemoteViews passed from autofill service.
So this can make sure the textColor of RemoteViews matches
the background of autofill theme uses.
Updated public javadoc that autofill service should not
hardcode color values.
3. A new TV ux that occupies half screen height (go/autofill-for-tv).
TV autofill now passes unhandled physical keyevent to app window
in the same way phone/tablet does.
4. Fixed ATV autofill window to be SYSTEM_DIALOG, so it wont be
clipped by app activity window (DialogLauncherActivityTest).

Bug: 71720680
Bug: 74072921
Test: CtsAutofillTest

Change-Id: Ib570227b0958b1800e8f0600b8aec36478568d74
7a7b2369fe999c8ad9712eadafcbbc31b695daa6 25-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Temporarily allow StackView to use a canvas.clipRectUnion" into pi-dev
3f9aaad4dc6e801c7af68757d3661b58bcd122a2 25-Apr-2018 Phil Weaver <pweaver@google.com> Merge "Add config value for fingerprint gesture support" into pi-dev
0e90cf29c78611b7ce25328f4afb30f00f06a594 25-Apr-2018 Phil Weaver <pweaver@google.com> Merge "Copy links to orginal text in a11y node info" into pi-dev
c364536807ea19045557a64c6792049754682699 25-Apr-2018 Phil Weaver <pweaver@google.com> Merge "A11y isHeading takes old API into account" into pi-dev
778ce66697b61aa43bf4078c10c097b2fb2384f8 20-Apr-2018 Makoto Onuki <omakoto@google.com> DO NOT MERGE Make "Want to start battery saver?" dialog better.

- Don't line-break in "Battery" (only in English)
- Add "Learn more" link.

Bug: 78261259

Test: Manual test with:
- adb shell dumpsys battery unplug
- adb shell settings delete secure low_power_warning_acknowledged
- Enable battery saver
- Make sure the link is clickable if a link is set.
- Make sure there's no "learn more" link if the link is not set in strings.xml

Change-Id: I83364f628dd596a4d50bf2aca4db7cbfe7cf4909
ddeb90aa9db108d4a2e5aadc778a726b65e5c921 04-Apr-2018 Nathan Harold <nharold@google.com> Rework Exception Handling for IpSecManager

In order to properly support EOPNOTSUPP this CL
applies a consistent approach to handling Exceptions.
Hereafter, all exceptions that aren't of a special
method-specific type (such as SpiUnavailableException)
will all be returned to the calling process unchanged.
At the API call site, the ServiceSpecificException,
which is really an Errno, will be inspected and either
converted to an unchecked exception for types we know,
or it will be converted to an IOException in cases where
that method can return a checked exception. In cases
where we do not expect an errno, we will simply throw
a generic RuntimeException. This means all API calls
will now properly throw UnsupportedOperationException
and may be CTS tested accordingly.

Bug: 72420898
Test: runtest frameworks-net
Change-Id: I4a00e221618896223fcdb4b4279fb14cd14e34d8
cd1f30b4392ed7fdb50befa2f2190e1be4eada43 24-Apr-2018 Dianne Hackborn <hackbod@google.com> Work on issue #78480444: Start tracking uid state in app ops

We now push uid states down from activity manager in to app
ops, and it uses them to keep track of access/reject times for
each uid/package at the various states.

Bug: 78480444
Test: manual
Change-Id: Ia0bc9174b60b4bf0851834961cc48507a6a60951
a09c06a6c10b6c96eea669a4873dd17aa530f10c 24-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Merge "Actually @hide unwanted capability methods." into pi-dev
bb5f10924cfbb943a36424d2d94ce19494c68040 29-Mar-2018 Chet Haase <chet@google.com> Fix bug and docs assuming progressBar min is 0 instead of getMin()

This code and docs predates the existence of get/setMin() on ProgressBar,
should have been updated when we introduced the new min property.

Test: Ran TalkBack
Bug: 74357845
Change-Id: I318f26bb8ecacc5ecdbf7d026d8568f871cf2369
(cherry picked from commit 25886a160bbc001ef51a9459edaf5c3f010c7229)
6f8ec1fd8c159b09d617ed6d9132658051443c0c 24-Apr-2018 Phil Weaver <pweaver@google.com> Copy links to orginal text in a11y node info

Not doing this copy results in us keeping
mOriginalText around. That is a CharSequence that
can contains Spans that reference other Views and
other expensive stuff.

Fixes: 78511639
Fixes: 75602764

Test: make
Change-Id: I977646311167f8d13e1c4a5c8fc38372e6d1ff3c
29cb76849c94bdbd95439e372360a51720c6b067 11-Apr-2018 Abodunrinwa Toki <toki@google.com> FloatingActionMode.setOutsideTouchable

Make floating toolbar outside-touchable for link action mode in
non-selectable TextView.
This allows the user to be able to dismiss the toolbar by tapping
outside of the toolbar.

Bug: 78099871
Bug: 73156794
Bug: 78298142
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsViewTestCases:android.view.cts.ActionModeTest
Change-Id: I8e3b460d0b1baee48d4f9cb3f92e73926eeee231
ad8159bea0693a756e5b8f8e9aa2e17fdfecd1ce 24-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check self permission in BackupManager#isBackupServiceActive" into pi-dev
4019c394052c689dd1586188880f1fc40c644c1e 24-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Clarify SystemUpdatePolicy" into pi-dev
2bf65c6e5c8068ec498aa1940a2ea77b11db6b6e 24-Apr-2018 Bernardo Rufino <brufino@google.com> Check self permission in BackupManager#isBackupServiceActive

Old method only checked for IPC caller, method isn't an IPC, adding
check for self permission as well.

Bug: 78467264
Test: atest com.google.android.gts.devicepolicy.DeviceOwnerTest#testBackupServiceActive
Change-Id: If9eed90f2deaaf1a4f2376fdf1881e62ee8954fb
53790c1c8faf81aa4ee534b119519090b2bbd94f 24-Apr-2018 Selim Cinek <cinek@google.com> Merge changes from topic "notification_reply_action" into pi-dev

* changes:
Cleaned up the paddings of the messaging layout and smart replies
Changed the size of the largeIcon
Moved the disabling from alpha to manual color blending
Updated the color of the reply button to be more neutral
Updated the reply icon
Disabled reply action when pending intents are cancelled
Split the reply icon permanently from the right icon
5f18904a007cd4005bc6ae6e5e8cbe0944e31010 24-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add spinner for smart replies." into pi-dev
1c72fa0249c364143d0818d129b6dc7f70054752 23-Apr-2018 Selim Cinek <cinek@google.com> Cleaned up the paddings of the messaging layout and smart replies

Refactored the code such that the reply icon's inset was substracted
from the overall paddings to make all of them consistent. This
will also help in the future as we don't have to update those
paddings manually anymore.

Test: test all sorts of combinations with Notify
Change-Id: I8c6c9951bc73c88d95cb443c8e618c7adca7ebd3
Fixes: 78441535
4717d862a06b5c320c5a7526d2e06bc9591436f0 19-Apr-2018 Selim Cinek <cinek@google.com> Updated the color of the reply button to be more neutral

The primaryTextColor wasn't a good fit, because it was
drawing too much attention being pure black. We're now
taking the default color instead. It's also used for
active permissions now.

Test: add notification, look at reply button.
Change-Id: If390c66e927a92a1115250abb7254fafe81b054c
Fixes: 72750728
d83203cde49842eec04cd9d8b43a20acf6cd227e 18-Apr-2018 Selim Cinek <cinek@google.com> Disabled reply action when pending intents are cancelled

Previously the user could open inline reply even when the
action was already cancelled. This also enables listening
to pending intent cancellations.

Test: manual
Fixes: 77811784
Change-Id: I4ae164081c6abdeb60a8e78d61bf5e4f26cca1d3
19c0ccaa8c59975aebfa4582b6038f261b6bb3d4 20-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Actually @hide unwanted capability methods.

Bug: 77601789
Test: builds, boots
Test: make doc-comment-check-docs
Change-Id: I7a913b83ab5110047d187564b3a1b0bbe1631942
a840c328e7305ba9492e699a8d6cc8794b2ab6ba 21-Apr-2018 Winson Chung <winsonc@google.com> Expose API to hide the IME during a recents animation

Bug: 73285089
Test: Swipe up from app with IME open, ensure that it closes
Change-Id: I95ce59291f11285c853e8b3029638119c21f7e38
167710981c30ec8b23ecd7367a00c1d8fee7d263 24-Apr-2018 Winson Chung <winsonc@google.com> Merge "Add windowing mode to task snapshot." into pi-dev
6bc6e21be7922e2df531e75abd7a82459208fb4c 23-Apr-2018 Sudheer Shanka <sudheersai@google.com> Merge "Rate limit battery external stats collection in takeUidSnapshot(s)." into pi-dev
8cd89cddc10ee1f02dd68fb7e8a4480c889fcf41 23-Apr-2018 Evan Rosky <erosky@google.com> Don't clear focus during transition animations

If a view is suppressing layout, it is probably part of a
transition animation. In this case, we don't want to defocus
a focused view which may eventually have a size.

Bug: 78302781
Test: issue in bug is resolved. Transition CTS tests still pass
Change-Id: I983f41bcd68056d2150d4db29c781b63a2c321c2
a4fa8d5bd4fcdde51cd4d0ada6a99a5ebc302a88 21-Apr-2018 Winson Chung <winsonc@google.com> Add windowing mode to task snapshot.

Bug: 78155683
Test: atest FrameworksServicesTests:TaskSnapshotPersisterLoaderTest
Change-Id: I4e562d818416a30d6759baef37c74b6d9c514a00
8d1553b9b1be06100ce4f4cc4c8c5088b48995a2 21-Apr-2018 Victor Hsieh <victorhsieh@google.com> Verify best signature algorithms of all signers

The previous implementation does not verify signature algorithms of all
signers. It's possible that the attacker can take an old apk (with
digest and signature of old algorithm) and add their own signer block
with new/P digest and signature. In this case, the old implementation
only verifies the attacker's signature, thus the attacker can change apk
content easily.

The solution here is to verify digests of all best signature algorithms
by all signers.

It is expected to increase verification time, if the apk does have
multiple signers with different type of digests.

Test: apks still install
Bug: 78359754
Change-Id: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
Merged-In: I607edf219c25a2a7adfa27a21a94e9bfefbb6cec
(cherry picked from commit 2f2ced93e3176d71dbd23e7f71a3d78b6dc09830)
cef96f69d7b6bc2c435db0905ee37b3a48f1c865 23-Apr-2018 Rob Carr <racarr@google.com> Merge "ViewRoot: Check Surface validity before initializing renderer from draw()." into pi-dev
e56013aa312608c4cd7ea12d5bab1594534b137e 23-Apr-2018 Sudheer Shanka <sudheersai@google.com> Rate limit battery external stats collection in takeUidSnapshot(s).

Bug: 74146897
Test: atest cts/tests/tests/os/src/android/os/health/cts/SystemHealthManagerTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2e01146718c3ce65d230308097622b958cb2897a
5ee0f5c1d71d27dbdad69914f592874136dc271a 23-Apr-2018 Siyamed Sinir <siyamed@google.com> Merge "Update Emoji.java for emoji 11" into pi-dev
a0f6de8ab2d78445fe0259ef0f5f00e25a3f7d19 06-Apr-2018 Kenny Guy <kennyguy@google.com> Add spinner for smart replies.

Add a spinner to MessagingGroup that is enabled
when the user has clicked on a smart reply.

Bug: 73607490
Test: atest SystemUiTests

Change-Id: I4d892c19b5df2b443761819929a83f016967e217
fcf3d6e5e2e354f46f6968b963ee9731cf4ee73d 18-Apr-2018 Rubin Xu <rubinxu@google.com> Clarify SystemUpdatePolicy

Bug: 69734091
Test: make ds-docs
Change-Id: Ibd40f4c6bdc2e70ffe41c785c5a5b389fbeabd78
5bdf9530a04dd4284498eb31c5e5fb0f8e6987a3 23-Apr-2018 Jorim Jaggi <jjaggi@google.com> Merge "Remove prolonged animations" into pi-dev
384804b42deaa7a679f8afbb0c7c69cf4aa68f06 18-Apr-2018 Selim Cinek <cinek@google.com> Split the reply icon permanently from the right icon

Previously these would overlap, but they are now completely

Test: ensure that all notification styles still work with the new affordance.
Change-Id: I16f5f863b4afac27494a4a7615631bca240ca532
Fixes: 72750728
130a2503d8e8138be33b81179e5aabcc209fdd13 21-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Extend adoptable override to force on or off." into pi-dev
5007c67a70708980731ebdc7020181579f151d4f 21-Apr-2018 Andrii Kulian <akulian@google.com> Merge "Don't require post-execution state for onActivityResult" into pi-dev
466b71e1a287bd20560f1bf10db15e5fa7f2c8d1 20-Apr-2018 Phil Weaver <pweaver@google.com> Add config value for fingerprint gesture support

Also correcting docs for using the fingerprint gesture

Bug: 76419487
Test: Verified with a test a11y service that gestures are
not available. Adding a unit test to verify this case.

Change-Id: I90233613777013e8b117a2d94f767be292c80019
46e58e1b4086aa0e3eb62f9cdae0eefaea08943f 20-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Give CTS a way to force-poll network stats." into pi-dev
66dfd0129231e1b5822ad06a29b4109fd9a1d744 20-Apr-2018 Julia Reynolds <juliacr@google.com> Merge "GetActiveNotifications should never return null" into pi-dev
e55b009a3d3dbdef759704e0a5fce086d2e3a76e 20-Apr-2018 Andrii Kulian <akulian@google.com> Don't require post-execution state for onActivityResult

According to the documentation, onActivityResult() should be called
immediately before onResume(). This, however, was not always the case
in previous releases and fixing this caused some app compatibility
This CL removes required post execution state for ActivityResultItem.

Bug: 77695691
Test: ActivityLifecycleTests
Change-Id: Id8c02e9b49f9758aac616e37948570722d802de8
901c04270f5968137d5c2911c5174003f3e2ecfe 20-Apr-2018 Jeff Sharkey <jsharkey@android.com> Extend adoptable override to force on or off.

Virtual disks are adoptable by default, but for debugging purposes
we want to treat them as unadoptable in some cases. Add the ability
for the "sm" shell command to force on/off, or return to default.

Bug: 77849654, 74132243
Test: manual
Change-Id: Ieda317396624ca081e5dd9568795483f684f9297
503e1fdcd12d2448807d408f00a361bff0857cab 20-Apr-2018 jiabin <jiabin@google.com> Add OP_PLAY_AUDIO to control shutter sound.

The camera will play shutter sound through native layer instead of Java
layer. That will cause shutter sound to bypass AppOps check. Add
OP_PLAY_AUDIO checking to avoid shutter sound playing while DnD.

Bug: 78136756
Test: Taking picture in Message with enable/disable DnD.
Change-Id: Iba5e7ab19cf5565ba3f074d2aba194b60e18265f
94a38b35e907fc560d4beec3bfb78360411609a3 20-Apr-2018 Julia Reynolds <juliacr@google.com> GetActiveNotifications should never return null

Test: runtest systemui-notification
Change-Id: I53e7a4a2a9f05318dd97ffb096658a4f8bcebc8a
Fixes: 70396956
686fab14645298ca04f23f0e10a64e839e32703f 20-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SmartLinkify - handle keyboard clicks" into pi-dev
4e02e255d48eb468e6f9c96ffe8df0cb8d1c5fa8 20-Apr-2018 Felipe Leme <felipeal@google.com> Document -n option on intent specification.

Test: adb shell am|grep "\-n "
Bug: 74618452

Change-Id: I5bc86abdd1ce244aa91c0f1110e525778c1da39a
c3c8d16380e3d7a54aa290061c8ea5a127027c46 20-Apr-2018 Jeff Sharkey <jsharkey@android.com> Give CTS a way to force-poll network stats.

Collecting network statistics is pretty heavy, which is why we're
throttling callers. However, to keep CTS running fast, we provide a
way for tests to force a poll event, instead of making them wait for
the throttle timeout.

Bug: 77908520
Test: atest cts/tests/tests/app.usage/src/android/app/usage/cts/NetworkUsageStatsTest.java
Change-Id: Ia792f0cd495023366ff8c4839df54e7da2ae8331
66b48dfb9e051026bb696f5b43f9b06e0905b92c 20-Apr-2018 Jorim Jaggi <jjaggi@google.com> Remove prolonged animations

Didn't work anymore since the animation refactoring. Doesn't look
like we still need it, and only causing issues with stuck

Test: go/wm-smoke
Test: Dock task from recents
Change-Id: Ibb3543d15f42fc7689c3ad705aee693eba93e8b7
Fixes: 77993227
5e12ebfffd813fc7035c9eef60220914dc92482f 20-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Defer resizing invisible stacks while drag resizing" into pi-dev
a2015451a74a56ba695becb73c1f67fa19e1f7e3 20-Apr-2018 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Don't check program selector's type for equality." into pi-dev
33fa382b8fd453a2f972092b2da1b38d4fd3e47f 16-Apr-2018 Abodunrinwa Toki <toki@google.com> SmartLinkify - handle keyboard clicks

Bug: 77998709
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: Ibb95a736248643949a7b521368374084f9f133ca
a6d6aab0e0c2cb297cda9ad6a94bbe934ba515f6 19-Apr-2018 Adrian Roos <roosa@google.com> Defer resizing invisible stacks while drag resizing

Works around a source of jank when drag resizing in split
screen mode: instead of immediately resizing the (potentially
numerous) invisible secondary stacks, we defer that until
the user lets go of the handle.

Change-Id: I3b9faa83005fa86185d4e51b2849e3a826b7f6a9
Fixes: 78214347
Test: Open a gazillion (resizeable) tasks. Enter split screen. Drag handle, verify there is no jank
Test: atest RectTest
f12a2130a42ae6c7d05c4edcd2cc2f922cc9c129 20-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add the list of private DNS addresses to LinkProperties" into pi-dev
c72ee1a4f2b10ba3ac43daeb40f2a1135ce3b12a 20-Apr-2018 Mathew Inwood <mathewi@google.com> Merge "StrictMode: fix non-SDK API usage detection." into pi-dev
9419b114582c50bebd2b02733a24cf34f6bf68e0 11-Apr-2018 Chalard Jean <jchalard@google.com> Add the list of private DNS addresses to LinkProperties

Test: atest android.net.LinkPropertiesTest, also new tests pass
Bug: 73641539
Change-Id: If33a35b1354a67db09411ff098f20064797296ad
ddb15c471c708fd2eedc7193099ec80dd205065f 20-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev
1c75189a0adcf4f3a3739f622580dc3983c137fb 20-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix the implementation of BluetoothCodecStatus.equals()" into pi-dev
1c0d00fac4a03b2fb4a5c5ea47e1c080baab65cb 20-Apr-2018 Winson Chung <winsonc@google.com> Merge "Workaround to ensure we cancel the recents animation prior to starting home" into pi-dev
a291ce625a4a36d22c764abf31c88ea32f2de688 19-Apr-2018 Pavlin Radoslavov <pavlin@google.com> Fix the implementation of BluetoothCodecStatus.equals()

Previously, the BluetoothCodecStatus.equals() implementation
was incorrect when comparing arrays of capabilities.
In the new implementation, the arrays are compared correctly,
and also the ordering of the capabilities in each array is ignored.

Also, added unit tests for class BluetoothCodecConfig and class

Bug: 73404858
Bug: 73379307
Test: Unit tests (in frameworks/base)
runtest --path core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecConfigTest.java
runtest --path core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecStatusTest.java

Change-Id: If22087465397b7c4175c33f7d1909a15d957fb24
Merged-In: If22087465397b7c4175c33f7d1909a15d957fb24
(cherry picked from commit 9d36e6babc38cf7017726a587b656bdd6f8b0051)
4dddd61fa8c89ad26f699bde2a1eb8732df9ad1d 20-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "revert_save_info" into pi-dev

* changes:
Document compatibility mode limitations.
Revert "Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode."
9c05605f52cf6d84241da553d90887ca1bad87dc 19-Apr-2018 Felipe Leme <felipeal@google.com> Document compatibility mode limitations.

Test: mmm -j108 frameworks/base/:doc-comment-check-docs

Fixes: 77655074

Change-Id: I527d882850442c7e6e9379b1b423673885e07f2b
a7f3e9c7cb35ad252cdb417aa604e0b2358e83e4 19-Apr-2018 Felipe Leme <felipeal@google.com> Revert "Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode."

Save has many limitations on compat mode, so we better not change the SaveInfo
behavior but rather document then.

This reverts commit 4f74a018c8ee9801f1d5ce2c7ec726251efc4fbf.

Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityTest \

Bug: 77655074

Change-Id: I36bd28ca546dcedefe75de7815b76b8b5827aee3
993890fbf4ae46122df8716251ac33e2a651e60b 20-Apr-2018 Abodunrinwa Toki <toki@google.com> Merge "Fix non-unique PendingIntent issue with TCImpl." into pi-dev
0d5aa574d64c1f04925429dbccc5e344df1598ff 05-Apr-2018 Stanley Tng <stng@google.com> Cleanup documentation for LE CoC in BluetoothAdapter

Test: Compile
Bug: 77631591
Change-Id: Ic3c7f13e560534a048bf5c8b274fe62190c214c7
(cherry picked from commit dac8e140184f3ac52210ff3638af3f53edca1ba0)
fb4da73e76ed3068ecd7ef87b8f4acf188d0a867 19-Apr-2018 Stanley Tng <stng@google.com> Merge "Clarify API doc for BluetoothGattServer::addService" into pi-dev
0ad6283da79c5f5e7cda0dd10030b9d4be2cb6e8 19-Apr-2018 Jeff Sharkey <jsharkey@android.com> Protect usage data with OP_GET_USAGE_STATS.

APIs that return package usage data (such as the new ArtManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.

Bug: 77662908
Test: atest vendor/xts/gts-tests/hostsidetests/dexapis/host/
Change-Id: I7a85d959f1682d2bd5cf3684415e368fece88101
71791f95c6f2fd1f06e174ce7ca6cc0b58ea3f9d 19-Apr-2018 Tomasz Wasilczyk <twasilczyk@google.com> Don't check program selector's type for equality.

As the comments of the whole class says, primary ID is the field used
for checking for equality of the selectors. Current implementation also
checks program type, which is a deprecated field that can be inferred
from primary ID.

Test: open car.Media, add AM station to favorites
Bug: 78296701
Change-Id: I0423f831c2fdca2d1d126ed8a3b8fe40f28022ac
703719be15d4ab520caeecf9e13e6e801f29bd12 19-Apr-2018 Winson Chung <winsonc@google.com> Workaround to ensure we cancel the recents animation prior to starting home

- It is possible for the call from SystemUI to cancel the recents animation
to be processed and handled after the virtual key has been processed in
PhoneWindowManager. This causes a misordering in which the canceling of
the Recents animation clears the pending start activity remote animation
(which is waiting for app transition ready).

Instead, move the canceling of the Recents animation to PhoneWindowManager
where the nav button is handled, to ensure that we cancel the animation
on the same thread before we start the activity.

Bug: 73188263
Test: Only able to reproduce so far artificially, which points to this

Change-Id: I1f3477acdf988953a5b3cef2e3b2b402af2d9909
Signed-off-by: Winson Chung <winsonc@google.com>
dd61c7e8e7736914c476a47627ca9f7a12588a83 19-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix screen on count text dump" into pi-dev
62bb0802f9963c286c2c319b5e4447f43dce736d 19-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't crash during layout of non-attached but focused view" into pi-dev
80923d5913f0cf42cf353a44fc533aa4936a1d6e 19-Apr-2018 Robert Carr <racarr@google.com> ViewRoot: Check Surface validity before initializing renderer from draw().

Imagine we have a ViewRoot for a PopupWindow so it's view visibility
will not directly be affected by the stopped state, but we still
will end up destroying the surface. We could see a handler queue like this:
("handleStopped", "performTraversals"). If there were no size changes
we won't call relayout and we won't notice we have lost the Surface
and it seems there is nothing to prevent us from continuing in to draw.
However, if we have handled STOP then the surface is now destroyed. Ensure
we respect the stop signal and the released state it sets on the Surface. The
original intent of this code-path should be preserved in the case that
the client receives a new surface from relayout even if it hasn't yet received

Bug: 62536731
Test: Manual
Change-Id: I0eccd4dbfd00f9f61ad37086299f986463082a1f
adcb6cac12b5af9d632a4ecbb30bdeac32e22a01 13-Apr-2018 Siyamed Sinir <siyamed@google.com> Update Emoji.java for emoji 11

This CL removes the Emoji 5.0 info from Emoji.java since they are
supported by ICU. It adds emoji added in Emoji 11.

Test: atest android.text.EmojiTest
Test: Verified that ICU handles Emoji 5.0 emoji
Test: Verified hardware keyboard backspace with hair color emoji
Test: Visually verified cursor moves with hardware keyboard

Bug: 77148691
Change-Id: I40b290fcea201cf5e35ad4c461f8d8056b8c3739
(cherry picked from commit 213388d2548360b2726493ffc583e5d78a8b012f)
4b976ad270c624b9ebd3721f0a4499edbe7379dc 19-Apr-2018 Lei Yu <jackqdyulei@google.com> Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED

APP_STANDBY_ENABLED is controlled by server side to do experiment.
Before this CL, Adaptive Battery is hooked up to this flag, so
even though if user turns it off, it may be turned on by server.

the feature in settings UI side.

AppStandbyController looks at both flags and enables standby
only if both are true.

Bug: 78153913
Test: Build
Manually change both flags (through UI and adb)
Verify dumpsys usagestats shows the correct state
for mAppIdleEnabled.
Change-Id: I1fb4461f382e1ee87000fdc38962d94a17891c1e
904a931cfc5f2ffd6fd0c0fb03718abca37b5ee5 18-Apr-2018 Abodunrinwa Toki <toki@google.com> Fix non-unique PendingIntent issue with TCImpl.

As per the referenced bug, we're running into issues where apps are
being fired with stale intents. The reason is because we need intents we
fire to be unique by Intent.filterEquals. Some of the intents we
generate put unique data in the intent extra which is not considered by
filterEquals. The solution here is to create PendingIntents with unique
request codes (using classifiedText.hashCode()).
See more info about this in

Bug: 77930684
Test: manually tested broken scenarios. See referenced bug
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Ib7275f94ca5ada51e4ba191742d4b614df12e1ea
3f8884829f6dcea454a74c6cf18e4bd89cf70acc 19-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adjust media.codec process group upon request from mediaserver" into pi-dev
d329ae80104c5562261d663a3184c9b6c99633f3 19-Apr-2018 Makoto Onuki <omakoto@google.com> Merge "SyncManager: Dump per-source last sync time too." into pi-dev
dbdf5df96e2b8d97de89720da256c8296dbbec4f 19-Apr-2018 Makoto Onuki <omakoto@google.com> Merge "Split provider / service dumpsys into platform and non-platform" into pi-dev
611443e98441783762e63e14b39fe8a7e01282fa 19-Apr-2018 Mathew Inwood <mathewi@google.com> Merge "Fail gracefully if we get a bad API whitelist." into pi-dev
39997ea603d5f16de556964a5440d87cfe579175 19-Apr-2018 Beverly Tai <beverlyt@google.com> Merge "Don't mute ringer if apps can bypass dnd" into pi-dev
d82a743002cacd9eb073b09929dab4930213e97d 19-Apr-2018 Mathew Inwood <mathewi@google.com> StrictMode: fix non-SDK API usage detection.

The warning dedupe logic in the runtime meant that only the first usage of
each API was detected. Disable this logic when DETECT_VM_NON_SDK_API_USAGE
is enabled.

Test: m
Test: $ atest android.os.cts.StrictModeTest#testNonSdkApiUsage
Bug: 78268765
Change-Id: Iba1127b84180b9a5e5eb68abc4691ccad082b80e
1cd96854d4b396fa083fe2cd58b94a111f7a12cb 19-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Visit Uris in RemoteViews for granting purposes." into pi-dev
9f6bb5b7617822c1a6c42d5f2530610bc4c84fdc 09-Apr-2018 Mathew Inwood <mathewi@google.com> Fail gracefully if we get a bad API whitelist.

If we send a bad API whitelist to the Zygote, it causes it to close the
socket. If we take no further action in AMS, it results in the same list
of exceptions being sent when we re-open the socket, resulting in it again
being closed. This results in no longer fork/start any new processes.
Since the list is persisted, this would result in the device entering a
boot loop upon reboot. Since no apps could be started, we cannot recover.

So in the case that the exemptions list causes problems, clear out the
list so we don't try to send it again next time. This means we will see
a single failure, but future attempts will succeed (obviously without
any whitelist). The device should not enter a boot loop.

Note, the test below relies on the fact that we can send at most 1024
arguments in a command to the Zygote (MAX_ZYGOTE_ARGC), and that each
item on the list is a separate argument.

Test: adb shell settings put global hidden_api_blacklist_exemptions \
Test: $(for i in {1..1025}; do echo -n $i,; done)
Bug: 64382372
Change-Id: Ie47095d516c247ff6a8d667a2ac9b7be45f1acda
23b3118f288d2beff0519ca294baac8093995989 19-Apr-2018 Jeff Sharkey <jsharkey@android.com> Visit Uris in RemoteViews for granting purposes.

RemoteViews end up passing around Uris, so we need to extend Uri
permission grants for them to ensure the recipient of a Notification
object is able to render its contents.

Bug: 9069730
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification
Change-Id: Id31b5adaf2ee66113a1b503e32126aeddbf97b28
4d5d3a0254bc9e5c79d39a7bf04ab43820fe5bcf 19-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added more documentation for dialogMessage" into pi-dev
a5843ebb5936e3e5d951bf80438e9c55d430dcda 19-Apr-2018 Tim Murray <timmurray@google.com> Merge "ActivityManagerService: add restricted cpuset" into pi-dev
30715222275bd3632eef0dbf24cf9f2896e8141f 19-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make Instrumentation more robust to other inputs" into pi-dev
d0c1b23e06ef350ce9d6bb3f6fcc2f7de5e50216 13-Apr-2018 Stanley Tng <stng@google.com> Clarify API doc for BluetoothGattServer::addService

Clarify that the caller has to wait for onServiceAdded callback before
calling BluetoothGattServer::addService again.

Bug: 72717069
Test: Compile
Change-Id: I20b031c724ba64bfd71cf10e58e587f69e4a2555
(cherry picked from commit 4b5cf4856064efbc018c0f2b4d6d3ff199403ee0)
3e03ab93121ec8c3e01474218a3dc8a7082153c4 12-Apr-2018 Suprabh Shukla <suprabh@google.com> Added more documentation for dialogMessage

Added explanation that callers can use a format string which takes a
single argument which is the name of the suspended app that the user
tried to launch.

Test: make docs

Bug: 77507744
Change-Id: I0a5259048332030385265ceab9c7d76766abac7d
d58b65cd31531445dd2dd53ae3135a9a85149d8f 19-Apr-2018 Evan Rosky <erosky@google.com> Don't crash during layout of non-attached but focused view

Verifies that there is a viewrootimpl before calling its

Bug: 77193567
Test: N/A
Change-Id: I301c3aede3d0f7e1d2abf6fe5bb3d852f697577b
a194a6bee36365b7aa2cdf3e86fe26e600ef338b 18-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "add dump report reason to reports" into pi-dev
37520f0e06e2cfab05f6ba4084c0f54371f3ec5c 13-Apr-2018 Chong Zhang <chz@google.com> Adjust media.codec process group upon request from mediaserver

Add method to allow dynamic adjustment of cpuset of media.codec
process. Only accept requests coming from mediaserver.

Bug: 72841545

Change-Id: Idb09d9a5162691503ecf6d811a528d9160326358
2ad19e51463f2f4b5633fa9c155fd9fc75f387a6 18-Apr-2018 Derek Sollenberger <djsollen@google.com> Temporarily allow StackView to use a canvas.clipRectUnion

StackView currently expands the clip of the view which is a prohibited
operation in API Level 28. This CL currently allows this specialized
use case to work in this situation until we can update StackView
to not clip to its bounds and then just intersect with this clip
provided by its parent.

Test: CtsWidgetTestCases
Bug: 77642155
Change-Id: Icc003ad3946bb226368ec2030d4707753f4f55e9
e36018b2724b5ae40180f956b16c3e276855b99b 17-Apr-2018 Chenjie Yu <cjyu@google.com> add dump report reason to reports

+ also change uidmapping version numbers to int64_t

Bug: 78132855
Change-Id: Iac7ea93e4bf651bd65bd03383e7ab4971af4fc29
Fix: 78132855
Test: gts test
4799045275f5b5dcdcfc91f476d8ad644a6ea55d 17-Apr-2018 Jordan Liu <jminjie@google.com> Add documentation for what to use for SS changes

Since the broadcast is deprecated in favor of the ServiceStateProvider,
the documentation should reflect this.

Note that the LteEarfcnRsrpBoost has not been migrated into the provider
so this also needs to happen.

Bug: 33756364
Fixes: 78188866
Test: no behavior change, ran make
Change-Id: Ia15a7408bdc79927438fa243cce77b262bbb66c4
e96443e5a7b37d4922b709d55a4ea55f401b7c98 18-Apr-2018 Jason Monk <jmonk@google.com> Make Instrumentation more robust to other inputs

Test: atest cts/tests/app/src/android/app/cts/InstrumentationTest.java
Change-Id: I2d55274ab19c4687ce85c086f2da61a4316b8096
Fixes: 70720100
3ef2d6d9d8c773cf1ad482dcb3a61f9011cd99d6 18-Apr-2018 Rob Carr <racarr@google.com> Merge "ViewRoot: Ensure we release surface from setWindowStopped." into pi-dev
3091d60a70d51336284dead6de101839fb7af37a 18-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add AccountManager key rotation awareness." into pi-dev
86d076f9d3ef7da272cb840ae9ad8bf78e435525 17-Apr-2018 Beverly <beverlyt@google.com> Don't mute ringer if apps can bypass dnd

Test: atest RankingHelperTest
Change-Id: I587e5b8d4f6cfe3b384c5b4b9e72de12b6639b6f
Fixes: 77729075
af52d9815a3078a4aa3d92236854ecae902aa338 18-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add setting for GNSS location request update duration" into pi-dev
fef10a47a810f375f762e77240718774a5f518aa 13-Apr-2018 Tim Murray <timmurray@google.com> ActivityManagerService: add restricted cpuset

Test: CTS
bug 78197570

Change-Id: I9dd8daba6426b42b7e7e9388dbdac7bd8110b6ca
0c179a94a92a33faa4e0070d10502816ba56180e 18-Apr-2018 Jason Monk <jmonk@google.com> Slices: Don't use public namespace for internal intent

Test: manual
Change-Id: I21bc0a367456b58de195d71fc29cca0dbbca6927
Fixes: 78214697
6013e5cc961b64c7cbddb59dbef9fb249d364e9e 18-Apr-2018 Julia Reynolds <juliacr@google.com> Color and text changes

Change-Id: I2b1837ffd16911be20b5d5f9a7007ff3071265ab
Fixes: 78191129
Fixes: 77810424
Fixes: 78196346
Test: manual inspection
f921b507eab27310e4ebb9c9d445e5d677c7956c 18-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Transitionless crashes" into pi-dev
54926ba6a9624845ca6d7161c35fef75d00a99c2 18-Apr-2018 Kevin Chyn <kchyn@google.com> Merge "Don't delay the FINGERPRINT_ERROR_CANCELED message" into pi-dev
ff03f0cfe4c1fa8f6c2264ecd307c3bff8b9bfec 18-Apr-2018 Qingxi Li <qingxi@google.com> Merge "Add Global Settings to device whether show Carrier menu" into pi-dev
850c6662b0f1f46e8f439562e3ef3d8615aa8708 18-Apr-2018 Sudheer Shanka <sudheersai@google.com> Merge "Update Instrumentation.newActivity to pass non-null application." into pi-dev
303c4bbb40945c399647487a98ace75cdedccd3a 10-Apr-2018 Dan Cashman <dcashman@google.com> Add AccountManager key rotation awareness.

Replace checkSignatures() calls in AccountManager with a new,
rotation-aware call to PackageManagerInternal. Also add a new
AUTH cert capability to reflect the distinction between these
permissions and others.

Bug: 77651077
Test: Builds. CtsAccountManagerTestCases
Change-Id: Idd412cd984acf7d37555deb5879f2d6a0a10c2b6
90902651b1d28ce37c7ea363e883ac4736638390 17-Apr-2018 Mike Ma <yanmin@google.com> Fix screen on count text dump

dischargeScreenOffCount already includes dischargeScreenDozeCount.
Original code deducted dischargeScreenDozeCount twice. This only affects
text dump in bugreport. Proto and checkin dump are not affected.
Test: manual
Fixes: 78187276

Change-Id: Id93465ca75a4a1078e8f280a38b74b696ec62dd2
58a0d51472ebbe7e66af1b730e1ba184ed967a03 17-Apr-2018 Kevin Chyn <kchyn@google.com> Don't delay the FINGERPRINT_ERROR_CANCELED message

Test: tested with test APK

Change-Id: Ic975870c6f815b5f7dfa4c7f2d8bf5554fbb1c5b
Fixes: 78185698
0b575a3cdfce8cd5394044c4c6a7092487ba93cb 16-Apr-2018 Makoto Onuki <omakoto@google.com> Split provider / service dumpsys into platform and non-platform

Also extend the timeout to 60 seconds.
- Because each provider / service dump may time out, the total time should relatively be large.

Bug: 78017892
Fix: 78017892

Test: Manual test with the following dumpsys commands:
dumpsys activity provider all
dumpsys activity provider all-platform
dumpsys activity provider all-non-platform
dumpsys activity provider com.android.providers.contacts/com.android.providers.contacts.VoicemailContentProvider
dumpsys activity provider com.android.providers.contacts/.VoicemailContentProvider
dumpsys activity provider contacts
dumpsys activity provider voicemail
dumpsys activity provider 4d45a78

dumpsys activity service all
dumpsys activity service all-platform
dumpsys activity service all-non-platform
dumpsys activity service bluetooth

Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/DumpTest.java
Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/ParseUtilsTest.java

Test: Manual test with "adb bugreport" with adding sleep(10s) to ProviderMap.dumpProvider()

Change-Id: I00bce0090b8dbb947d7f8b1e5d01bb8a70d84bd8
ead1271f1c25ff0649239880dbc1be8ac817ef82 12-Apr-2018 Qingxi Li <qingxi@google.com> Add Global Settings to device whether show Carrier menu

Add Global Settings EUICC_SUPPORTED_COUNTRIES. When the device enabled
esim UI by default and the users in eSIM supported countries, even if
eSIM is not provisioned, carrier menu will be shown. This global
settings will be updated by eSIM mamanger when the phone boot up.

Bug: 77638033
Test: E2E
Change-Id: Ib3ac8bcdfab56d6cd7c12e48318f1794af5bc1aa
eb59580abd6b26f6d9cf61ea5ea7a58f4652be6f 17-Apr-2018 Patrick Baumann <patb@google.com> Checks that secondary instrumentation ABI matches

This adds checks that the secondary ABI for an instrumentation package
matchs that of its target before using it when forced and warns of

Change-Id: I394427721c83cbd1c3c6af6cee24a93b18d8c65f
Fixes: 77152863
Test: gts-tradefed > run gts -m GtsBackupHostTestCases -a armeabi-v7a do not all fail with NPE
935772129d244122e23308b812765d4591a3c04f 10-Apr-2018 Adrian Roos <roosa@google.com> Transitionless crashes

Suppresses app transitions when an activity finishes due to crashing.

Fixes: 70640329
Test: "Dev Tools" > Bad Behavior > Crash main thread, verify there's no transition.
Change-Id: I51c4b98b793794b013c266a1dee3fb2e7faf4bd7
5037beea1c118ee9aa9d9d3f314a228d5f80c727 17-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Docs: update the method description for installKeyPair() to cover parameter change." into pi-dev
15d35c127437539dcb6c8f028d5ea580051f185d 17-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed power manager CTS test." into pi-dev
f74cf940fe39297ad3afef9f28d40c838dac7bf7 17-Apr-2018 Makoto Onuki <omakoto@google.com> SyncManager: Dump per-source last sync time too.


Per Adapter History
mak...@gmail.com/com.google u0 [com.google.android.gms.people]
Per source last syncs:
OTHER Success: 2018-04-16 17:03:38 Failure: 2018-04-16 17:04:27
LOCAL Success: N/A Failure: N/A
POLL Success: N/A Failure: N/A
USER Success: N/A Failure: N/A
PERIODIC Success: N/A Failure: N/A
FEED Success: N/A Failure: N/A
Last syncs:
2018-04-16 17:04:27 io-error Source=OTHER Elapsed=0s Reason=AutoSync Extras=[]
2018-04-16 17:03:38 success Source=OTHER Elapsed=5s Reason=AutoSync Extras=[]
2018-04-16 17:03:20 success Source=OTHER Elapsed=3s Reason=AutoSync Extras=[]

Bug: 76035392
Change-Id: Id73cb10636897c4fe45caad5df13dca8b75381bd
Fixes: 76035392
Test: Manual test with dumpsys content with triggering various syncs
d7732b4c8a4232d609bab257aec59865c9b6aa43 17-Apr-2018 Makoto Onuki <omakoto@google.com> Merge "Add 1-day sync stats in syncmanager dumpsys." into pi-dev
936c0868f8e5d71d61449b94e16a56e1ceaea424 17-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev
8be1197c5dba21b785e9f24ae9ade2c9a082ae9c 17-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Fix a description for MONOCHROME camera capability" into pi-dev
17d2de09cb455da3478a5ea63a7be948a1910bd8 17-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds a code when statsd sends intent to getData." into pi-dev
82f36b120dcbc2a1670e5dd54141eb6ccaadd34b 17-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Replace PackageInfo#signingCertificateHistory field doc reference." into pi-dev
5291268754f80b35cfe7fc35c6179a7953a23f43 17-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove implementation of deprecated RecoveryController methods." into pi-dev
e942b914a497f905617f1912e1d44aa5877d93e1 16-Apr-2018 Dan Cashman <dcashman@google.com> Replace PackageInfo#signingCertificateHistory field doc reference.

During API review, PackageInfo#signingCertificateHistory was changed
to PackageInfo#signingInfo. This was not reflected everywhere in
the documentation. Update it.

Bug: 74831530
Test: Doc change only, builds.
Change-Id: I497cdd732dffacf376ac05f7ccd181004c947210
30601459a707e27c0302e8793fca473f0fb8c9ca 16-Apr-2018 Phil Weaver <pweaver@google.com> A11y isHeading takes old API into account

Bug: 77729403
Test: New linked CTS test
Change-Id: Idd87fa98619a77a45431beb00683bf6e8a3674b3
116e05cbba0f851c0d5c0da3e1c664444ea5b6f2 16-Apr-2018 Caxton Chan <caxtonchan@google.com> Merge "Enable feature flag for audio output switcher." into pi-dev
9498621f416d0fac032a34cf5fbd0cfcffbff8e6 12-Apr-2018 Makoto Onuki <omakoto@google.com> Add 1-day sync stats in syncmanager dumpsys.

The stats currently shown in sync manager dumpsys is the total *since wipe* so
they're usually pretty much useless.

So let's add "today" and "yesterday" stats too.

- Also add "# failures" and "# cancels".
- Also split up SERVER to OTHER and FEED (i.e. subscribedfeeds).

Bug: 76035392
Test: Boot, run some sync, then do "cmd content reset-today-stats"
- Also tested with actually setting the clock to 23:59 and wait
- Check the result with "dumpsys content".

Sample output:
Authority Syncable Enabled Stats Loc Poll Per Feed User Othr Tot Fail Can Time Last Sync Backoff
com.android.calendar 1 true Total 0 0 0 1 0 7 8 0 2 8s FEED SUCCESS
Today 1 5 6 7s 2018-04-12 15:21:24
Yestr 0s
com.android.chrome 0 false Total 0 0 0 0 0 0 0 0 0 0s
Today 0s

Change-Id: Id0ea42435a9f759e47d4b9490292759270f8e9a5
3a385f81a3e8f3e4bcc4c58e8e144a0ab449148a 11-Apr-2018 Hidenari Koshimae <hidenari.koshimae@sony.com> Camera: Fix a description for MONOCHROME camera capability

Test: Compile
Bug: 77902724
Change-Id: Ibb6a1d4b5f80a0c4d0e3f29625b03a827a3ed80c
6b649257377b4ba2dd8a2a02b8dd692a72a2cc1e 16-Apr-2018 Jeff Sharkey <jsharkey@android.com> Protect usage data with OP_GET_USAGE_STATS.

APIs that return package usage data (such as the new StatsManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.

Add noteOp() method that can be called from native code.

Also add missing security checks on command interface.

Bug: 77662908, 78121728
Test: builds, boots
Change-Id: Ie0d51e4baaacd9d7d36ba0c587ec91a870b9df17
ed2a3cadc1eaea962b9be0ebc180e090ab03a6b8 16-Apr-2018 Ricky Wai <rickywai@google.com> Merge "Update PackageManager.getInstalledPackages() docs" into pi-dev
6858bb9ab1e867245370a8edf9e348ddc5ceec31 16-Apr-2018 Robert Carr <racarr@google.com> ViewRoot: Ensure we release surface from setWindowStopped.

Otherwise, we may attempt to reinitialize the ThreadedRenderer with
a Surface which is not actually valid, e.g. from handleWindowFocusChanged.
Entering a code path where the threaded renderer does not heed the
stopped signal. This change ensures isValid returns false when the Surface
is not valid preventing us from calling initialize/initializeIfNeeded, or
udpateSurface. Unlike a previous iteration of this CL, we take care to do so
after invoking the WindowStopped callbacks so that SurfaceView has
a chance to tear down.

Test: go/wm-smoke. More extensive manual testing.
Bug: 62536731
Change-Id: If5e51f8aef7957ad87a23015fe100095f9502bc9
26b030d829adee248752061855737d0981ad6103 16-Apr-2018 Dan Gittik <dangittik@google.com> Fixed power manager CTS test.

Added an annotation necessary to allow the power manager CTS test to
access the non-public method nap.

Test: adb install -r \
adb shell am instrument -e class android.os.cts.PowerManagerTest \
-w android.os.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ida939f074654bef351e2b8fd563c8463431ce9c6
Fixes: 77907164
216b50ad972a5f4a7f9de8377c0497fdafbc0197 16-Apr-2018 Bryce Lee <brycelee@google.com> Merge "Remove temporary logging." into pi-dev
2754777d304d824d6b4db78627a0fb534d5d1803 16-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "ViewRoot: Ensure we release surface from setWindowStopped."" into pi-dev
56a5620b4117149b0b48f12b0c260e8fc03e7c9a 16-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Convert the BrightnessController to a log scale control." into pi-dev
892ee93977dfc260c3b7b590ea86bcc9093bc4d0 16-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I478047cc,Ibe16ffd7 into pi-dev

* changes:
DisplayCutout: Ensure stable insets cover top cutout
Cutout: Use stable density for inflating simulated cutouts
8040fd1b62ee4dbb8ac3941f3666d7fbe6bcd3e6 16-Apr-2018 Benjamin Miller <benjaminmiller@google.com> Docs: update the method description for installKeyPair() to cover parameter change.

Update the description to cover the parameter changed from (boolean)isUserSelectable to (int)flags.
Bug: 78113127
Test: make ds-docs and inspect generated HTML.

Change-Id: I8356ffd2d0a61f4c2c62bbf2440a6315399a33ef
630108fc5f00455d1b7903c93ec9df79334e3ea1 16-Apr-2018 Chavi Weingarten <chaviw@google.com> Revert "ViewRoot: Ensure we release surface from setWindowStopped."

This reverts commit 35274cb0ce90ce4381e534d1c04c9d919eb588fc.

Reason for revert: b/78110749
Fixes: 78110749

Change-Id: Ib1b15e4f7325cb265574090b658514fc0b3c4021
535c420139d0f38d0488aba2304e276c1d5f161b 16-Apr-2018 Adrian Roos <roosa@google.com> Cutout: Use stable density for inflating simulated cutouts

Change-Id: Ibe16ffd792040e753d54d7085ba74e8880de111e
Fixes: 77961334
Test: Set density to Very large, enable simulated cutout, verify it still looks reasonable.
585ff988bbc116f318741f3ed3916ed44558a3fb 13-Apr-2018 Michael Wright <michaelwr@google.com> Convert the BrightnessController to a log scale control.

Currently, the BrightnessController's UI is a linear scale control on
top of a linear backlight control, but humans perceive brightness on a
roughly logarithmic scale. By moving to a non-linear control, we both
give users more fine-grained control over the brightness of the display
as well as a UI that works more intuitively.

Test: manual
Bug: 73810208
Change-Id: I67090ad7c4ced0420314458473c9124cb9c61906
cc12c5fb1152188ebe3da21b35dd39b932121c34 16-Apr-2018 Benjamin Miller <benjaminmiller@google.com> Doc change: removed reference to the reverted Password Blacklist feature.

Bug: 73750934
Test: make ds-docs and inspected HTML output.

Change-Id: I545ef13219dc994a4f157cc6f2380eac59331498
745d2c98f9467f1befb7ec3a6c485333d4f1b437 13-Apr-2018 Dmitry Dementyev <dementyev@google.com> Remove implementation of deprecated RecoveryController methods.

Bug: 78021839
Test: manual
Change-Id: I8a8a23f1cc14e7b9ffe1e758b6f35906d1a5cf2f
4af3d1a4a4addff435dbde2f21ff75e194555f5c 14-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add an action to launch scanning settings" into pi-dev
9eb0a655cc95ba15a439fe8bbe6e130c16cb8ced 14-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Return "null" cycles for deprecated callers." into pi-dev
d37bc23f5094ebb803abe93c9e3ca27698da35a9 13-Apr-2018 David Chen <dwchen@google.com> Adds a code when statsd sends intent to getData.

If the data receiver is experiencing delays, there may be a queue of
multiple intents to collect the same data. This timestamp makes it
easy in the receiver to de-dupe these requests to call getData.

Also, we update how StatsCompanionService gets the snapshot by
requesting data for all known apps. I notice that Keep seems to have
a uid active even when it appears uninstalled.

Bug: 77981668
Test: Flashed marlin-eng and manually verified.
Change-Id: I509e19383ec4a5da8746dd0c76ac71a948c6877d
58aa11bd1f8f6492eb1cb37d74669d11f3669d35 12-Apr-2018 Lifu Tang <lifu@google.com> Add an action to launch scanning settings

Needs to launch scanning settings from other apps

Bug: 77823544
Test: build and flash
Change-Id: If02b359dcbfee79b34b6b66abb3cf36a2a3412e3
51c1904b9517e42c733e00d383a620614359445a 13-Apr-2018 Wale Ogunwale <ogunwale@google.com> Merge changes from topic "bumping-api" into pi-dev

* changes:
Finalizing P SDK
Finalizing P SDK
e67463db5f88a7a73765d6f09dc605fa21dc26d3 13-Apr-2018 Jeff Sharkey <jsharkey@android.com> Return "null" cycles for deprecated callers.

Callers using the deprecated Pair<ZonedDateTime, ZonedDateTime>
interface don't always check hasNext() before calling next(), so
give them (null, null) results instead of throwing.

Bug: 78020489
Test: builds, boots
Change-Id: Ibaeac646fa4e12e3e748cd7c706524d51dbeaafe
75bb177d958193392bf66cd5cffaf534aff43149 13-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ViewRoot: Ensure we release surface from setWindowStopped." into pi-dev
ca1dcfb23e6a02eb4ea6dd8eaff1074086b6bb86 13-Apr-2018 Michael Wright <michaelwr@google.com> Merge "Revert "Fixed power manager CTS test."" into pi-dev
4d6b454b455008376a5aa2928180a7e60e77b3ed 13-Apr-2018 Michael Wright <michaelwr@google.com> Revert "Fixed power manager CTS test."

This reverts commit 48fed61da3f3671850aae3c521a3e6f088169de2.

Reason for revert: m checkbuild failing
Bug: 77907164

Change-Id: I7f75dafc049581a7a5393c3cf0108c488eecaf48
1d0d514dac43857f4475648a331eeccd481aa4db 12-Apr-2018 Bryce Lee <brycelee@google.com> Remove temporary logging.

This changelist reverts the following CLs that added temporary

Fixes: 71506345
Test: presubmit
Change-Id: Icfc016a752e5ac2bfb1537be67cda1c4ea3e6442
62444d495005637c89b867163a06e57a5bc47107 13-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed power manager CTS test." into pi-dev
a4e8196cf8ed75c1d42e3e14c41ff15bc74fddc8 13-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't show ringer status if dnd overrides it" into pi-dev
48fed61da3f3671850aae3c521a3e6f088169de2 13-Apr-2018 Dan Gittik <dangittik@google.com> Fixed power manager CTS test.

Added an annotation necessary to allow the power manager CTS test to
access the non-public method nap.

Test: adb install -r \
adb shell am instrument -e class android.os.cts.PowerManagerTest \
-w android.os.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I91e591be608f5040bc035a203d7e94c83d50bf15
Fixes: 77907164
9964f70f6afb2e72ce560c6c692aae3fc4b79993 12-Apr-2018 Ricky Wai <rickywai@google.com> Update PackageManager.getInstalledPackages() docs

Update the docs about getInstalledPackages() returns installed apps
on current user not on the device.

Test: NULL
Change-Id: I3d9c48be54f6355dc1701d2c359785a575fbc1db
878d0e90b5cca05658b7f6b0bcc00dc3f5be838f 13-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a new ssid field in NetworkCapabilities." into pi-dev
df88614db2c408a45518bd51a28705b542525c73 13-Apr-2018 Benjamin Franz <bfranz@google.com> Merge "Silently ignore force stop API for protected packages" into pi-dev
b03a6229b82ba16520468ddda79ac1ee395aa983 11-Apr-2018 Chalard Jean <jchalard@google.com> Add a new ssid field in NetworkCapabilities.

Bug: 77891227
Test: frameworks-net
Change-Id: Ifba33ecd48ccecce7e8f8d05ff70bb85653f6163
9d86920cb4245c7f27cb56c18e9101c4e11ad8d7 13-Apr-2018 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Fix AM band range." into pi-dev
b672c1f97ce213e44b92251e4d339e7d42a7bb2c 13-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix pinned slices returning different Uris." into pi-dev
199286b084988976b3e5dd186210552b96e33d08 13-Apr-2018 Jason Monk <jmonk@google.com> Fix pinned slices returning different Uris.

Test: cts
Bug: 77980070
Change-Id: I3c5ba18e40a58371e2c9ccade9d565b38ad12a54
35274cb0ce90ce4381e534d1c04c9d919eb588fc 12-Apr-2018 Robert Carr <racarr@google.com> ViewRoot: Ensure we release surface from setWindowStopped.

Otherwise, we may attempt to reinitialize the ThreadedRenderer with
a Surface which is not actually valid, e.g. from handleWindowFocusChanged.
Entering a code path where the threaded renderer does not heed the
stopped signal. This change ensures isValid returns false when the Surface
is not valid preventing us from calling initialize/initializeIfNeeded, or

Bug: 62536731
Test: For the monkeys.
Change-Id: I65939a29db4db70c6eb6bc4b258a9ed09a86e0ce
3da5f3b2ddf35ed436cd9a0c6a349c59c97f8d78 12-Apr-2018 Wale Ogunwale <ogunwale@google.com> Finalizing P SDK

Bug: 77588754
Test: builds
Change-Id: Ic06cad790a3dc53d012a7c43dfac911fc6dc61e7
b9826dd191f118d19afbb531adeb038e40fa55ae 12-Apr-2018 Beverly <beverlyt@google.com> Don't show ringer status if dnd overrides it

If DND is overriding the ringer then:
- Don't show silent/vibrate ringer in status bar
- Don't show silent/vibrate ringer status in QS

Change-Id: I0c921905c6b06e1379b497dd1ac9e3fce483d5fd
Test: manual
a85db7888ec5877e3c4a0c4fc1a9066700d757cb 12-Apr-2018 Stanley Tng <stng@google.com> Merge "Add min_ce/max_ce parameters to requestLeConnectionUpdate()" into pi-dev
e0a25acf08702a201e0721d85a5d19c4d5c6c6ce 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Changed the appearance of phone call notifications" into pi-dev
396cacaaa8c41e19a835e1a64f76314cd2db49f5 11-Apr-2018 Selim Cinek <cinek@google.com> Changed the appearance of phone call notifications

The old design didn't work at all because of various
paddings. The new design adds more paddings and a
new button style

Fixes: 72814598
Test: runtest systemui
Change-Id: I4b4ac0790afe45db97f912740446c6da09620be3
e273f08c0bdd6bb6549a7da5bb50f9d33698d256 12-Apr-2018 Julia Reynolds <juliacr@google.com> Add method to get blocked app count

So we can sure it in settings

Test: runtest systemui-notification
Bug: 73018368
Change-Id: Ib0185e97f8e1cec1864ca1e4efb23bf8db097901
bbb35c0ba6e6c80a44af45b1a891394b532e001e 19-Mar-2018 Stanley Tng <stng@google.com> Add min_ce/max_ce parameters to requestLeConnectionUpdate()

Add new test parameters, min_ce and max_ce, to the SL4A tests for LE
Connection-oriented Channel (CoC) feature. This CL passes these 2
parameters to native stack.

Test: Run cmd: act.py -c $MY_SL4A_CONFIG -tc BleCoc2ConnTest
Bug: 77528723

Change-Id: I9d3d74f671772014209f8114c2d1b8ba606c54d5
(cherry picked from commit 148dd5bf861ad2caac0c53a53ee5154bfa413405)
8e7f23a74c0bba06275402e7a0ca321537e7c6fc 12-Apr-2018 Rohan Shah <shahrk@google.com> Merge "[Notif] Allow locking importance on notification" into pi-dev
fb10508cfa955a738adb81ce5817155c1403a297 12-Apr-2018 Wale Ogunwale <ogunwale@google.com> Merge "Clean up APIs before declaring API 28." into pi-dev
aab3304a22ab3778bad9b7fc9a8d113fee9cd727 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix broken target SDK checks." into pi-dev
99a238adf1705b3b6584bb4beef6a696fbf228dd 12-Apr-2018 Phil Weaver <pweaver@google.com> Merge "Move accessibilityHeader from TextView to View" into pi-dev
651d0335c1372e2b25f632da6ffd18fcd1ce6835 27-Mar-2018 ryanywlin <ryanywlin@google.com> Enable feature flag for audio output switcher.

Bug: 74130772
Test: Build
Change-Id: I04d0276681488c73c62b1f9ab6114c948bb50482
590e1b2aa5ba09aaa4c3562430c56113e694da9d 11-Apr-2018 Rohan Shah <shahrk@google.com> [Notif] Allow locking importance on notification

Currently locking only works on channel - this CL allows doing
so on the overarching notification too. Added locking field in
appropriate places in record and surfaced it to other bits via
the RankingHelper.

Test: Visually, reproduced organically (+ deleting /data/ files)
Fixes: 77775657
Change-Id: Ie46093921dd6c1ae3533ded7b87faaa475a631e4
a26e7559003b4f83553bf1d6c3b0d9558ec20005 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add stats logging to ServiceManager and NPMS" into pi-dev
ba6f173cb1ee3ecdd0f7278cca08e9fe2acb57db 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add API to compute charge time remaining." into pi-dev
49392d335af8559169238bb9cb4fc2911192adea 11-Apr-2018 Makoto Onuki <omakoto@google.com> Add stats logging to ServiceManager and NPMS

- Do an event log every N getService() calls with total time spent
in getService().
where N = 100 for core UIDs and 200 for other apps.

- Do an event log if getService() takes longer than N ms.
where N = 10 for core UIDs and 50 for other apps.

... with some extra throttling.

- Do the basic "stats logger" log for updateNetworkEnabledNL() and

This CL also enhances StatsLogegr so it now can show the slowest call
and the max # of calls per-second.

Bug: 77853238
Test: Manual test:
- Insert a SIM card
- Set data limit
- toggle airplane mode
- toggle wifi
- toggle mobile data

- "dumpsys netpolicy" and "dumpsys activity processes" and check the stats
- also check "adb logcat -b all | grep ' service_manager'"

Change-Id: I5789541063f95d0eac501189816c8604a4571ba0
f0b9fbebc0fa36c9603e21e4d0e60f0bd6495419 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "APIs to disable data usage notifications." into pi-dev
dc7687a29b113276294dea9c0b58b7a1e2e6941f 11-Apr-2018 Tomasz Wasilczyk <twasilczyk@google.com> Fix AM band range.

Test: open radio app, it doesn't throw any errors anymore
Bug: 75970985
Change-Id: I1d35fe02abf3c8de20c4426867f855feab3277d5
378207114e50c52909dd67c496829c06171007f2 12-Apr-2018 Sudheer Shanka <sudheersai@google.com> Update Instrumentation.newActivity to pass non-null application.

Activity.attach expects a non-null application, so pass an empty
applicaiton if Instrumentation.newActivity is called with a null obj.

Change-Id: If4a131ef46f101b8b4a726886fe76412c45c30ec
Fixes: 73294588
Test: atest tests/app/src/android/app/cts/TabActivityTest.java
928167e04475d45413bef579b6b03c6c3eca591f 12-Apr-2018 Michael Wright <michaelwr@google.com> Add API to compute charge time remaining.

This is so unbundled applications (e.g. dreams) can present a charge
time indicator that is in sync with the rest of the system.

Bug: 77919650
Test: manual
Change-Id: I7d62dea4fd49eb173b4f052a0fc36f4e7ce5b6bb
5d9498a62ca996a50354d03bdae65194c480448f 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Updating BatteryStats to account for Ambient Display sipper." into pi-dev
f24335ec85daaa110a367bf88003cdc94c5ffec1 12-Apr-2018 Chet Haase <chet@google.com> Merge "Add targetSdk check around new LinearLayout weighted measure behavior" into pi-dev
aeed443b5bf9ee23b123a9d52cc77cd7bb0b4069 12-Apr-2018 Mihai Popa <popam@google.com> Merge "[Magnifier-39] Hide both handles on overlap" into pi-dev
0a5570d49df7d438b618616e439192f3c216cfe8 10-Apr-2018 Jeff Sharkey <jsharkey@android.com> APIs to disable data usage notifications.

Certain carriers have requested the ability to disable the warning,
limit, and rapid data usage notifications shown by the OS, so give
them that ability on a per-subId basis. (The notifications are still
enabled by default.)

Unhide NOT_CONGESTED to match setSubscriptionOverrideCongested().

Fix bug in getPrimarySubscriptionPlanLocked() to find the first
currently active plan; the first non-recurring plan may be no longer
active. Fix bug in SubscriptionPlan which allowed invalid negative
or zero-length Period objects.

Bug: 77851691, 77506882, 77662747
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Test: atest android.telephony.cts.SubscriptionManagerTest
Exempt-From-Owner-Approval: SDK deadline, responding to API feedback
Change-Id: Ib6e6dbadd5022937c3f0661ab4b66aa617f0b5af
3990ee1c9fcd8f801220edec94e6bef3009809b5 11-Apr-2018 Jeff Sharkey <jsharkey@android.com> Clean up APIs before declaring API 28.

As part of finalizing an SDK, we need to ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.

Someone forgot to replace Slice.getTimestamp() with Slice.getLong().

Bug: 77588754
Test: builds, boots
Exempt-From-Owner-Approval: SDK finalization
Change-Id: Ic0ec91a43d161a69c1e840c42046ad500b7aeca0
b2943a864ed4f9ff637d51e5c7483b84dc30bb5f 11-Apr-2018 Julia Reynolds <juliacr@google.com> Merge "Show onboarding screen from dnd tile" into pi-dev
960a0c6c5761405090e53ba930dec85e93de0ebb 11-Apr-2018 Daniel Cashman <dcashman@google.com> Merge "Add SigningInfo class to expose package signing details." into pi-dev
9054656c203a9188f4283587d75de896087990f2 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Trim the invalid uids and tags when reading uids/tags from chain." into pi-dev
6f42d1bac267d9ba36240ddb33f1860ec2c5b688 11-Apr-2018 David Pursell <dpursell@google.com> Merge "MessageQueue: explicitly remove FD event listeners." into pi-dev
c2375d9b3d517cf5b54d7a49fb7f9bb945c0cbd1 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix docs and bug in SliceManager#bindSlice" into pi-dev
fcbbb726033a2846201cbe60f4eacbcfdc30f20c 11-Apr-2018 Colin Cross <ccross@android.com> Merge "Revert "Update docs to match encryption requirements"" into pi-dev
4da177489448ac20ad50b2ec339c9e1be66ccd77 11-Apr-2018 Colin Cross <ccross@android.com> Revert "Update docs to match encryption requirements"

This reverts commit cebb55ea9d98dc7ba93eed520b874ac24ff96800.

Reason for revert: broke docs builds

Change-Id: I3a4b8d274141efec90fae2ed0b9324194288c635
68e5f0f2427398db1187cfaf8454f92fd335f7b6 11-Apr-2018 Nathan Harold <nharold@google.com> Merge "[DO NOT MERGE] - Hide Tunnel Mode IpSec API" into pi-dev
6b317915e8ffa28066744e597fd5404a09240f22 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "StatsManager throws exceptions" into pi-dev
9553a11557528a91d5a51134e9a20c26f5ef69cf 11-Apr-2018 Chavi Weingarten <chaviw@google.com> Merge "Synchronize stack position and size update for split screen" into pi-dev
fb55bd87067fc044056e6f12ee36bd7c8d08cdc5 11-Apr-2018 Mathew Inwood <mathewi@google.com> Merge "Configurable sampling rate for hidden API access log events." into pi-dev
2370f368d4df81da9fea85718ccce858047a05ca 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DisplayCutout: Draw anti-aliased bounds in soft overlay" into pi-dev
441ef0b94b2366eace7ce76c0598b854ca4076c3 11-Apr-2018 Phil Weaver <pweaver@google.com> Merge "Fix AccessibilityEvent#getContentChangeTypes doc" into pi-dev
c4e5ecf703e4648eef9e5cb3065f85d744d8dcb5 11-Apr-2018 Julia Reynolds <juliacr@google.com> Show onboarding screen from dnd tile

Increase the DND version and reset the setting so those who
are upgrading P->P see the new flow.

Test: manual
Change-Id: I9286f022d1fa6520305ff03dbce54c4eec0e371a
Fixes: 77658931
cb8488822cc34c933b8e7f6f0907f4cbb33485d9 21-Mar-2018 Chet Haase <chet@google.com> Add targetSdk check around new LinearLayout weighted measure behavior

Bug: 73827180
Test: Existing CTS tests in LinearLayoutTest
Change-Id: I88dfde3743d0f954cd275be6a0032fe30ef55c03
(cherry picked from commit 28230e5efa86aa324fef3e95395d61a4518fa804)
f81bf7fa7582f55a31435f37e02de5c03014cc19 26-Mar-2018 Benjamin Franz <bfranz@google.com> Silently ignore force stop API for protected packages

Bug: 75997475
Test: manual
Change-Id: I804aafe2404eeaac732fed51cf6d3d2e45a3b5bb
51072a8b6faf6a92dfe3f063caa5fe645c3d8440 11-Apr-2018 Adrian Roos <roosa@google.com> DisplayCutout: Draw anti-aliased bounds in soft overlay

To do so, we cannot use the Region from DisplayCutout, because it is conceptionally
a binary Bitmap. Instead, we need the exact curve as a Path.

Also fixes a theoretical bug where the DisplayCutout
was cached even though the display height changed.

Change-Id: I9356f4589186fedc5dc95010c7bd1a1fa20edf5e
Fixes: 77868940
Test: Enable display cutout in developer options, verify the edges look smoth and not jagged.
Test: atest DisplayCutoutTest
61aebf6d39c1a7a697a7690741b2505e9668bfc0 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Check permissions only against packagesettings"" into pi-dev
4d1b57dad36984dabd1924e41a86640b9c51684e 11-Apr-2018 Bo Zhu <bozhu@google.com> Merge "Add an API to check whether the recoverable keystore is enabled" into pi-dev
97b9b5304ce78b237081e48cf1a55bf40e1977f2 11-Apr-2018 Patrick Baumann <patb@google.com> Revert "Check permissions only against packagesettings"

This reverts commit b00eb6459127018ec7641f407d5873a0c417416d.

Reason for revert: Boot issues after OTA
Bug: 76228188
Fixes: 77888575
Change-Id: I5ca2605cb6befea46ce50198bc72bdd4b6e84f1a
4800d9a9e76ba778003fea28927887ed8db7b382 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[WebView Tracing API] documentation fixes." into pi-dev
5ffacd06acd5bec7722cb1a3fccd392ee189ed06 10-Apr-2018 Jason Monk <jmonk@google.com> Fix docs and bug in SliceManager#bindSlice

Test: cts
Change-Id: I812af1eda072c2af0b29454a05ea777d8f4c3c62
Fixes: 73123733
f1657a827f9b060801dccd345d78c2d534d46db0 11-Apr-2018 Florian Mayer <fmayer@google.com> Merge "Address API comments on NetworkStats#getDefaultNetwork." into pi-dev
bfa13fe76fcb8cbe801f3f4f0045aedafb7cb668 11-Apr-2018 Robert Berry <robertberry@google.com> Merge "Update docs to match encryption requirements" into pi-dev
b6bba333998a8d1f516f15bb06ae594d7d767bf4 11-Apr-2018 Jan Althaus <jalt@google.com> Merge "Minor TextClassifier fixes" into pi-dev
13a89c94031cf93fa60478803f2ace9127a5f7f9 09-Apr-2018 Jan Althaus <jalt@google.com> Minor TextClassifier fixes

- Fix incorrect nullable annotation (usage/APIs already correct)
- Fix outdated doc reference
- Fixed visibility of TextClassification fields

Bug: 74461129
Test: N/A
Change-Id: I107cc978c9385ac2ad706fa8e0a8a3ecb215cf36
27fd8217c136febba8b33223e630548f7ed7d08e 10-Apr-2018 Lenka Trochtova <ltrochtova@google.com> Hide mandatory backup's API.

Bug: 77801801
Bug: 73750212
Bug: 64012357

Test: make RunFrameworksServicesRoboTests
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test
cts-tradefed run cts -m CtsBackupHostTestCase

Change-Id: I7699755309b3fbff7c3fec2a06a0f409fd4087de
6dba3936a2f8beacfa44e86265f3095d060b7b9d 02-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Address API comments on NetworkStats#getDefaultNetwork.

Bug: 76449091
Test: android.app.usage.cts.NetworkUsageStatsTest passes
Change-Id: I7f21e0bd7bc4b726058fc2e25542ff2c3173fabe
2188383b8abfc495c67ed76932a73502aa13b835 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Review of suspend/unsuspend APIs" into pi-dev
1856d61f9a7f18b9ebfd51f40243773dca1d8d89 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove unwanted capabilitiy from the java-doc" into pi-dev
788f87dab63338c0a964c3c70fee2c3544efe1a8 11-Apr-2018 Remi NGUYEN VAN <reminv@google.com> Merge "Do not register callback for < MIN_THRESHOLD_BYTES" into pi-dev
555767b6161d1f15924b394b8167afb27b863e6a 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "API Review: Rename getStandbyBucket to getAppStandbyBucket" into pi-dev
0486b927b3cc83113ef7b863f4a7331c8182d1a4 10-Apr-2018 Nathan Harold <nharold@google.com> [DO NOT MERGE] - Hide Tunnel Mode IpSec API

Hide the tunnel mode of the IpSec API because
there is a disincentive to launch it without
a supported customer use case. That use case,
IWLAN is having its APIs hidden, so we should
hide these as well to avoid constraining future

Also, due to issues with the lifetime of the NATT
management object, this API needs to be hidden
until such time as the lifetime of the Keepalive
can be handled independently of the lifetime of
a Transform.

Bug: 72523623
Test: compilation (api removal)
Change-Id: I076030bdbab1cd7d69f6a034577d529970b050dc
46d03c29145ad7229ba8eb0070859210021bf238 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ensure colors for active permission icons" into pi-dev
4f71629002ae1da22ca1c07ce11b9cca9b272d97 11-Apr-2018 Bookatz <bookatz@google.com> StatsManager throws exceptions

When StatsManager fails to connect to statsd, it now throws an exception
for the caller to catch. It also throws an exception of the config being
added is of an unreadable format.

Due to backwards compatibility issues, the old APIs could not be
changed, so new ones were made to replace the old ones. The old ones are
now temporary and will be removed when the compatibility issue is

Bug: 77648233
Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases
Change-Id: Ibea05883a29b9b3ef9927d2f8fe295eb99832ab7
7a65c44d0397a8791b34ff2e0bc96d7e3acaab6b 11-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Notify a11y when view attached to parent" into pi-dev
90980b42080c88b0b31ccbbbe1760037b26de8f7 04-Apr-2018 Tim Volodine <timvolodine@google.com> [WebView Tracing API] documentation fixes.

Some fixes to the WebView Tracing API related documentation.
In particular this patch makes sure that:
- the defaults are correct,
- the examples are correct,
- the formatting is ok,
- the text for parameters etc.. is formatted consistently,
- the documentation is spellchecked and typos corrected.

BUG: 63750258
Test: manual inspection of the generated html documentation
Change-Id: I53ac1a1d003e519739464b8d8554f3d8262c46e4
ef72895a481098cff572013b48be12afbd02ed23 11-Apr-2018 Kweku Adams <kwekua@google.com> Updating BatteryStats to account for Ambient Display sipper.

The sipper was added in http://ag/3667626 but BatteryStats wasn't
updated to properly output the data.

Bug: 77877717
Test: flash device and check batterystats output
Change-Id: Ibf98545a147f2d62dd29c57dd7efa14ed4c58aa6
be43ac86865c8013bef120f1f327c2cfe98ebfe8 05-Apr-2018 chaviw <chaviw@google.com> Synchronize stack position and size update for split screen

When entering split screen, the secondary window changes position so
it's below the primary split screen when minimized. The WSA at the same
time is also changing size to fit the area. However, the size doesn't
change until the client requests a new size and a frame with the correct
size comes in. This causes the stack to update position before the
resize which causes content to get cut off and then a jump when the resize

This change updates the WSA position as soon as it recognizes that the
stack changed position due to entering split screen secondary. The WSA
sets its position as the negative of the stack position, making the
calculated window position at (0,0). When a relayout is requested, the
WSA's position is requested back to (0,0), deferring until the new frame.
This will put the WSA position at (0,0) when a frame with the correct size
is drawn. This places the window position at the stack's new position in
the same transaction that a WSA frame with the new size is drawn.

Change-Id: I8c88d7784f827d66926fb5c382af2346028dc48f
Fixes: 74354855
Test: Entering split screen with quick step is smooth
Test: Entering split screen with old launcher still works
11fa71845bead86b27600ef8712365065defece2 11-Apr-2018 Phil Weaver <pweaver@google.com> Move accessibilityHeader from TextView to View

I put it on TextView to try to scope it as narrowly
as possible, but an ImageView could be a heading, as
could a LinearLayout that holds a TextView (like a

Bug: 77726494
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I9313ce6de25b5893db450f23499b151a4f08afda
96212bca06842f223a0e9e377e2c00a2008c96a2 11-Apr-2018 Suprabh Shukla <suprabh@google.com> Review of suspend/unsuspend APIs

Clarified the package extras bundle returned from
Moved the bundle arg to the last in LauncherApps.onPackagesSuspended and
clarified the contents of the Bundle.
isPackageSuspended(String) now throws a NameNotFoundException if the
package is not found.
Also, removed a permission check from isPackageSuspendedForUser.

Test: builds, boots, existing tests:
atest com.android.server.pm.SuspendPackagesTest

Bug: 77518983, 77517955, 77507744, 77801528
Change-Id: I06b5f69f8f8a079c206863cb6122e90be58366cd
2d3932eb4df005b8ebb630ad89cd9a804fdd9ede 08-Mar-2018 Jason Monk <jmonk@google.com> List<SliceSpec> -> Set<SliceSpec>

Test: update-api
Bug: 73123786
Change-Id: I5668023eda0efcadf40a20259a92624e6680659f
9107b53c6d8f6d930733f2c23bede1c547f9f500 11-Apr-2018 Jason Monk <jmonk@google.com> Merge "Revert "List<SliceSpec> -> Set<SliceSpec>"" into pi-dev
e280990dd6d0041d66cd9cbb03062fe9439f45b4 11-Apr-2018 Jason Monk <jmonk@google.com> Revert "List<SliceSpec> -> Set<SliceSpec>"

This reverts commit e2a04b3ea41ebec00afe50db89846920235f23cf.

Bug: 73123786
Change-Id: I1f09893fb3c68650340495f2833eb678099a895f
ae42e1d0c2bb16b0d6d443fac8d104157d49fa14 11-Apr-2018 Jason Monk <jmonk@google.com> Merge "List<SliceSpec> -> Set<SliceSpec>" into pi-dev
5c9f527e3328c2f3a96cdeb5052b969c1ff66493 04-Apr-2018 Dan Cashman <dcashman@google.com> Add SigningInfo class to expose package signing details.

Attempt to simplify the exposure of package signing information via
PackageInfo by creating a new class and corresponding methods for
querying a package's signing information.

Bug: 74831530
Test: PkgInstallSignatureVerificationTest
Change-Id: Idbc008b41a921f89cefb224b26f910da4d238dea
b95c90ce2d10a93c680b2ddbdf7ad61feb3abf5a 10-Apr-2018 Bo Zhu <bozhu@google.com> Add an API to check whether the recoverable keystore is enabled

Bug: 77690455
Test: It builds
Change-Id: I94be0e341d8a3e0fa9a5f9af8beda60e08a449e8
aa1a911d9a0f797748b001c41bd8df2f517b318c 10-Apr-2018 Jeff Sharkey <jsharkey@android.com> Fix broken target SDK checks.

Consider an app targeting the final API 28, but running on an older
build where "P" is still API 10000. Those apps need to be treated as
legacy apps.

In general, the logical pattern that should be used when enforcing
target SDK behaviors is below.

For applying behavior to legacy apps:
if (targetSdkVersion <= Build.VERSION_CODES.N_MR1) {
if (targetSdkVersion < Build.VERSION_CODES.O) {

For applying behavior to new apps:
if (targetSdkVersion > Build.VERSION_CODES.N_MR1) {
if (targetSdkVersion >= Build.VERSION_CODES.O) {

Bug: 77865751
Test: builds, boots
Change-Id: Ia83bd446a940751d51a6542c7a5b9cca174c5296
b887b23ad3cc6d072cd30ae70705cc6f4145cb65 10-Apr-2018 Julia Reynolds <juliacr@google.com> Ensure colors for active permission icons

Test: manual
Change-Id: I74c91109efaacad4f7743681877b874f77bda630
Fixes: 74512508
fd34bcc397d53ebccb699df360cc995ddb677bd8 10-Apr-2018 Eugene Susla <eugenesusla@google.com> Merge "[DO NOT MERGE] Avoid sending content changed a11y events from wrong views" into pi-dev
02db955ed8b944bf13b135b73275301b2c39491d 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I3a35ed86,I74a9c767 into pi-dev

* changes:
Update incorrect documentation
Ringer toggle should obey theme color
e901d69ea66c990d8ba728a75622e39e9543f397 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "setPackagesSuspended now overwrites all the state" into pi-dev
964631d1a78842f4297d875012b0ebe1c08cd06d 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Slice permissions++" into pi-dev
e2a04b3ea41ebec00afe50db89846920235f23cf 08-Mar-2018 Jason Monk <jmonk@google.com> List<SliceSpec> -> Set<SliceSpec>

Test: update-api
Bug: 73123786
Change-Id: Ia618a35fbe81d2aeb5f58d58add0a14069f21bed
42c686861c76f49cc5dd97335b9308224dc2cab5 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update JNI interface of GetBounds in PrecomputedText" into pi-dev
82a9cf60f36ad3c08e87945814b0a4455d9bdb3a 10-Apr-2018 Julia Reynolds <juliacr@google.com> Update incorrect documentation

Test: make
Change-Id: I3a35ed86600b3b12ced4aecc35a0415e8e05a502
Fixes: 77862126
5177da3b01c2b8e23ff3820fe07b5761e8ee4d36 07-Feb-2018 Santos Cordon <santoscordon@google.com> Add SCREEN_BRIGHTNESS_FOR_VR to set of public settings.

This will allow the settings to be adjusted by any third party app,
just like SCREEN_BRIGHTNESS is today.

Additionally adds the default value to the SystemSettings database
on initial setup.

Test: After clean install check that the default value is in the DB via
'adb shell settings get system screen_brightness_for_vr'
Test: Verify that SCREEN_BRIGHTNESS_FOR_VR can be changed by a 3rd party
app with WRITE_SETTINGS permission.

Bug: 73090564
Change-Id: I93d167ab23652c39b0cf815eb40935be26b857a6
(cherry picked from commit 5956f49210f32b8ceabf860f904b5ca77ec9631c)
ff1575f0596791a1eeba37f52408331c29cb0193 09-Apr-2018 Amith Yamasani <yamasani@google.com> API Review: Rename getStandbyBucket to getAppStandbyBucket

Change-Id: Ifa0f5d0dba95d8bc6c2af814649594e9ca4a6c47
Fixes: 76831039
Test: Builds
04194fef78ecd75ea09cb9c75c211f5170e6f91d 04-Apr-2018 Mathew Inwood <mathewi@google.com> Configurable sampling rate for hidden API access log events.

To reduce log spam, we do not log all hidden API accesses. This CL allows
configuration of the sampling rate of the log events so it can be tweaked
later if necessary.

Test: m
Test: $ adb shell settings put global hidden_api_access_log_sampling_rate 65536
Bug: 64382372
Bug: 77517571
Change-Id: I659c22bd504564da58d972f94b774a9af4039386
64c8e13b2a82d3decc38659b62b5ff4f8696c26c 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix javadoc xrefs." into pi-dev
2bb626836ccc79d6ead1a9992652bf8ccb3506fd 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a condition in AppWidgetHost to honor config_enableAppWidgetService." into pi-dev
52b4692192ac913b57fc9f13b1d878982fe44eed 10-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Offer to format data sizes in either IEC or SI." into pi-dev
bf3eedcc6b340bc03c72cdb45305a8f93dd5b382 06-Apr-2018 Jason Monk <jmonk@google.com> Slice permissions++

New permissions system for slices. Its up a little disk space at the
optimization of CPU/Mem usage, and most importantly doesn't have a
limit on the number that can exist.

Test: runtest --path frameworks/base/services/tests/uiservicestests
Test: runtest --path cts/tests/tests/slices
Test: manual grant through SliceBrowser
Bug: 77323760
Change-Id: Ie601bca042a7b28113a511383ca7e3a35c7c8c71
e5d97dd6f9e10c21568ae96a000e58834015bee9 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add link to onboarding screen" into pi-dev
9139bbfa9bc6e517654f59b60d2379fe5da614d0 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Different hidden API enforcement policy for P & pre-P." into pi-dev
9aa1c9e9256674de2e75d0fa1d61cc10a85d416b 09-Apr-2018 Julia Reynolds <juliacr@google.com> Add link to onboarding screen

Test: runtest systemui-notification
Bug: 77658931
Change-Id: I70210b5d5e0de27ff38a6b2f5d8201266b6ec4d6
082147cfe180e7e0117adaf3b1dfa84d7f01570e 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added system-wide minimum brightness curve." into pi-dev
1ab3025cc761862392db757ed8c12de0574443f5 03-Apr-2018 Mathew Inwood <mathewi@google.com> Different hidden API enforcement policy for P & pre-P.

Also make these configurable so we have the flexibility to change it if

Setting the policy inside ActivityManagerService is not ideal, as that
means that AMS is the only place where the policy in ApplicationInfo is
correct. It should really be set inside PackageManagerService. However,
if it's set there, it would get out of date when the settings change, and
we'd have to update inside AMS anyway. So putting it only here seems ok
for now.

Test: $ adb shell settings put global hidden_api_policy_pre_p_apps 2
Test: $ adb shell settings put global hidden_api_policy_p_apps 2
Bug: 64382372
Change-Id: Ic4cbbb1e6464623e90c17ae08c0b6cbbe0dfa125
1f596e0c2ea6437c7a689b7d6c928d5eb9765056 10-Apr-2018 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #77721907: Add global setting to hide all error dialogs" into pi-dev
415716915ee20ffa10b89845889c471224fcbc6a 09-Apr-2018 Jeff Sharkey <jsharkey@android.com> Offer to format data sizes in either IEC or SI.

Add flags to let callers specify if they want IEC (power-of-two) or
SI (power-of-ten) units when formatting bytes.

Continue using SI units by default, since certain folks seem to have
strong opinions about that.

Bug: 76159924
Test: atest android.text.format.FormatterTest
Exempt-From-Owner-Approval: previous PS approved
Change-Id: I0074bb2578c2230e938b3f39c2564b1083feb825
3f345a99f71b922daa5750ba232a84ddaaba222b 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check permissions only against packagesettings" into pi-dev
d06a9004edefd250f7aa614efb714a40447ff7f5 04-Apr-2018 Remi NGUYEN VAN <reminv@google.com> Do not register callback for < MIN_THRESHOLD_BYTES

This also avoids returning a nonzero multipath preference
if remaining data is low but nonzero.

Bug: b/72877610
Change-Id: I2459ded06de77d284ae1fe81a60d9e1df56b0c26
Fixes: b/72877610
Test: Tests in go/ag/3842960 pass
45b9e40a4f23f36be88f7474660e931b58aedf1e 10-Apr-2018 Suprabh Shukla <suprabh@google.com> setPackagesSuspended now overwrites all the state

Earlier setPackagesSuspended ignored the rest of the paramters when
suspend state did not change. This was a problem because then there was
no good way to update the other parameters without unsuspending the app,
which is not desirable.
Removed setSuspendedPackageAppExtras as now they can be update with this
Also sending broadcasts when packages get unsuspended due to suspending
package removed.

Test: Existing tests pass:
atest com.android.server.pm.PackageUserStateTest
atest com.android.server.pm.SuspendPackagesTest
atest com.android.server.pm.PackageManagerSettingsTests

Bug: 77522553
Change-Id: I72a3c228d3d65c430e242da97b2bc6997ec6a135
a1b3aa27dd5a9abdc2825bcd06bedd3e135cc9e9 10-Apr-2018 Christine Franks <christyfranks@google.com> Merge "Whitelist DISPLAY_COLOR_MODE setting for B&R" into pi-dev
21c6043542444f13aeff38f90425bb5021341cb4 10-Apr-2018 Phil Weaver <pweaver@google.com> Fix AccessibilityEvent#getContentChangeTypes doc

Bug: 77649040
Test: make
Change-Id: I8716bd37972a5c8c0777640a3264effbaae66667
daafeb35a1a10198e1cff62831ffefa8676fa185 10-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Update storage wizard to latest UX mocks." into pi-dev
75f9459c2185ed52f675881d0cd207ae3f2eb646 10-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Disable roaming sanity checking." into pi-dev
eed55b3b1593667eb6443ecf21a0613072f2508c 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make isSameTrustConfiguration public API" into pi-dev
5e0d36041172a6393e8028184854d3c175f48051 10-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "API council requested tweaks to SubscriptionPlan." into pi-dev
a5bdeabf1536d69b49ea76d6dc9c899c085c98ed 10-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Clarify PackageManager.hasSigningCertificate docs." into pi-dev
2b3f6d5c4c43d1a523ffdc73e0a435ea09140893 10-Apr-2018 Jeff Sharkey <jsharkey@android.com> Disable roaming sanity checking.

We've traced down all code paths where NetworkInfo.isRoaming() and
NET_CAPABILITY_NOT_ROAMING can disagree, so we're only left with
noise that happens from NetworkAgent race conditions when someone
asks for a NetworkState between pending NetworkInfo and
NetworkCapabilities updates.

We can look at adding a way for a NetworkAgent to update these
two objects atomically, but not for this release.

Bug: 70174865
Test: builds, boots
Change-Id: I830e1fc6dc922e9eb7f8c2698d75181e00aaf7fb
5fa895ed7f0c7234af1dcb9eb6f704438b23afab 09-Apr-2018 Yangster-mac <yanglu@google.com> Trim the invalid uids and tags when reading uids/tags from chain.

Test: manual test.

BUG: b/77817908
Change-Id: I5570c9bd0e76290e09ba84388db027dc272039a6
1269960d992d94c00a66197bf35a96060cdc1300 31-Oct-2017 Christine Franks <christyfranks@google.com> Whitelist DISPLAY_COLOR_MODE setting for B&R

Bug: 68664032
Test: make -j100 && atest SettingsBackupTest && atest
Change-Id: I1d38acfcd3e6a0c228ae6891581b3218d4a67e6b
d74a971fc2f3464acc7083fbc79f04d6ab46bc9d 09-Apr-2018 Benedict Wong <benedictwong@google.com> Merge "Force creation of Socket upon Transform application" into pi-dev
b00eb6459127018ec7641f407d5873a0c417416d 05-Apr-2018 Patrick Baumann <patb@google.com> Check permissions only against packagesettings

Prior to this change there was a chance that an updating app would not
exist in mPackages and cause a permission check for that app to fail.
This change moves all permission checks to use mSettings and the cached
package it contains to do the checks.

Change-Id: I0717bddbb08b1d0dbab3ea79fa0d2067aa858753
Fixes: 76228188
Test: Manual - system starts, permission checks work before / after update
bb5b3af85f5422c153e957461020ec50b251fb21 09-Apr-2018 Pavel Maltsev <pavelm@google.com> Remove unwanted capabilitiy from the java-doc

Per API council feedback remove unwanted capaibility from public API
java docs

Bug: 77601789
Test: make docs
Test: build and flash
Change-Id: Ia7fd6d79546bf99448f8f2bda0370c7230ea4527
8ecf40491be046f0cbd534c9b9fbc5d270f24b02 09-Apr-2018 Beverly Tai <beverlyt@google.com> Merge "Update dnd settings summary" into pi-dev
b35baa53f70efa42b985f83a0cf0fb205de01900 09-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "ContentResolver should handle dead system_server." into pi-dev
46270712917d8e3cdf29af63b290a6ebf4a9b369 02-Apr-2018 Jeff Sharkey <jsharkey@android.com> Update storage wizard to latest UX mocks.

Changes to support Settings updates.

Bug: 76097999
Test: manual
Change-Id: I8944d4cb7be6a406d5cb6be25ff261b7631b3331
6a66f4e8cf3527fe6cbd33c46d17691e40c65056 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Helper methods for settings screen" into pi-dev
1264d880e2c85786d3f8eedecb8e141471e2cd04 04-Apr-2018 Mehdi Alizadeh <mett@google.com> Adds entries for Swipe Up Enable in Settings.Secure

Bug: 77549883
Test: None
Change-Id: Ie346c4f527fa014eadbfaa1d81d7f8a5f37f653f
bd8ce384dcc313b1a3507563b875b6b54d0bb4ab 03-Apr-2018 Daniel Cashman <dcashman@google.com> Clarify PackageManager.hasSigningCertificate docs.

Address API review by describing relationship between the
PackageManager.hasSigningCertificate() methods and the PackageInfo
GET_SIGNING_CERTIFICATES method, as well as differentiating the
UID documentation from the package-name based one.

Bug: 74831566
Test: None, doc change.
Change-Id: I11c556325f9b2efbc2e5e1cf896b9c58db092ae8
82b17ca3400c7dc23d5df0c2dc1d4d7532c71107 07-Apr-2018 Dianne Hackborn <hackbod@google.com> Fix issue #77721907: Add global setting to hide all error dialogs

adb shell settings put global hide_error_dialogs 1

This forces the same behavior as other devices that hide all

Bug: 77721907
Test: manual
Change-Id: I93e03d55f885f1874c33f46cad8cede0c759063b
70df72232148340a5f3ea85f0892272901939f49 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "More knobs for connectivity experiments." into pi-dev
d565f049575cb63fef1b92c47599da928a118112 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expose TestAPIs needed by GtsOsTestCases" into pi-dev
c907d2137bdb4f56e81810d0d191c2e6bdfd6554 09-Apr-2018 Jeff Sharkey <jsharkey@android.com> ContentResolver should handle dead system_server.

Use the common rethrowFromSystemServer() pattern. Carefully only
throws for calls going to system_server; leaves existing behavior
intact when calling a ContentProvider.

Bug: 77671218
Test: builds, boots
Change-Id: Ie5e0763fb5e62b832f2b6a03c8f9d72dab3bf89a
6a67b8640b5ed69ea1cf994f6015ae9a008435ff 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Support bluetooth not using MultinetworkPolicyTracker" into pi-dev
6f34a9b2d3cfdb8184b939e7ddb2161202d898fd 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "NO PARTIAL RERUN: Do not return recycled bitmaps" into pi-dev
fdef00a5ae431f9b5152c408a74bcee75641848c 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update Javadoc of setLockTaskEnabled to reflect known issue" into pi-dev
0997a32523a0295ab56e7c38b5683f11a1899677 09-Apr-2018 Eric Sandness <sandness@google.com> Merge "Permission Check For DPM.getPermittedAccessibilityServices" into pi-dev
706edbd776edeceb95cff604914fea5aeeb7cdde 09-Apr-2018 Jan Althaus <jalt@google.com> Merge "Fixing broken logging of OTHER events" into pi-dev
2946fba398a09f144cc64e0ccb070bc682b85a67 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only match addresses without zip codes if at the end." into pi-dev
47f4280b4fe9dd92474ab1fa7bffec81c609a7cb 09-Apr-2018 Julia Reynolds <juliacr@google.com> Helper methods for settings screen

Bug: 77657376
Test: make -j RunSettingsRoboTests
Change-Id: I2002cf98f26312e074c40c085044c60f7ce52ff7
ef5bb6fd702dbaac58f5807f1d653bbf723474bd 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add haptic constants" into pi-dev
d7375ac9d79b86ffae9fc1e0d92505b6bfa57eb0 12-Mar-2018 Erik Kline <ek@google.com> Support bluetooth not using MultinetworkPolicyTracker

This required advancing the IpManager to IpClient refactoring
(Bluetooth used IpManager and friends). Most importantly, the
Bluetooth code used WaitForProvisioningCallback, so this is
moved into IpClient proper now. Also: some more renaming

Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
Bug: 62476366
Bug: 72663849

Merged-In: I5e5b2c59ad3ea9ad574e8e683bcab3b09cfe0791
Merged-In: I89b45310181d952129fb2294db63654da9b4057f
Change-Id: I9eee2a9d5c31cdd48a054a7edc3403584efb1864
(cherry picked from commit 8d1fe54be1b605846cca9dfe4a966b3c5e739caa)
3a7e021169c7afa8755c28a1295f3eff17ff8381 09-Apr-2018 Annie Meng <anniemeng@google.com> Merge "Don't backup/restore screen brightness" into pi-dev
1f2c6dea41adc4416e87aea76ad013aee22c00cf 09-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix crash when modifying Selection" into pi-dev
5ab98de315122ee135c4ef31eaf8208101da25b1 03-Apr-2018 Eric Sandness <sandness@google.com> Permission Check For DPM.getPermittedAccessibilityServices

Require the callers of DPM.getPermittedAccessibilityServices(userId) to
hold the MANAGE_USERS permission. The only known callers of this API
are settings apps that already hold this permission.

Bug: 62343414
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test: com.google.android.gts.devicepolicy.DeviceOwnerTest
Test: Manually checked accessibility settings in DO and PO modes
Change-Id: I8ee3f876fcaffa63636645f0f59709cd147254ef
219e139651f85423248459fb20cc06ad41a56307 09-Apr-2018 Robin Bennett <robinbennett@google.com> Merge "Add setting/experiment to send keycode sleep for ungaze when Home is the foreground activity." into pi-dev
61df45cd185fb2711ec2d5310679756ead6b7ad7 07-Apr-2018 Lucas Dupin <dupin@google.com> NO PARTIAL RERUN: Do not return recycled bitmaps

There's also no need to offload WallpaperManager#forgetLoadedBitmap
because Bitmap#recycle is asynchronous - and the whole method is

Fixes 77597550
Test: atest cts/tests/framework/base/activitymanager/src/android/server/am/ActivityManagerMultiDisplayTests.java

Change-Id: I88014e21bd05e10c2f524393bb637596708e4e63
4f9d750e91061923da90ef174a592fc59d0eff9e 07-Apr-2018 Jan Althaus <jalt@google.com> Merge "Remove legacy logger" into pi-dev
5a03094ebc91df1c64a2232be648ac3ed26657ce 04-Apr-2018 Jan Althaus <jalt@google.com> Remove legacy logger

Migrate DefaultLogger implementation to SelectionSessionLogger.
This cleans up after the API refactor and fixes two bugs:
- All events are currently logged twice.
- Interfaces accept a null signature, but it currently crashes the legacy logger.

Bug: 73392698
Bug: 77659305
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsWidgetTestCases:EditTextTest
Test: Manually examined logs
Change-Id: I0d2b925abf5cab12d71fc2cc0fa527530c86ab10
739199f3e9f3bc987ff4d33dbf07ab4403b10468 07-Apr-2018 Jan Althaus <jalt@google.com> Merge "Fixing incomplete RemoteAction clone" into pi-dev
35b3057627387102496b647c90740af4dd6b833d 07-Apr-2018 Jan Althaus <jalt@google.com> Fixing broken logging of OTHER events

This bug means we never received logs for events like 'Web Search'

Bug: 77659305
Test: atest FrameworksCoreTests:SelectionEventTest
Change-Id: I6f79897f548d0d19710578e309e0b645bb78e1e3
298fabe6b52561f4e81ef9091184968fc1ab6a00 07-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Autofill should clear the UI filter when a value is updated to null." into pi-dev
2eae1e3a45e66cb72be375fa52cd89b2a1e31573 07-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Merge changes from topic "unwanted" into pi-dev

* changes:
Add @param tag for state in queryDetailsForUidTagState.
Remove unwanted capability code per API council feedback.
156a7ebf1796a5b42074ab92876573537c7a6e60 05-Apr-2018 Felipe Leme <felipeal@google.com> Autofill should clear the UI filter when a value is updated to null.

Test: VirtualContainerActivityCompatModeTest:testDatasetFiltering
Fixes: 77652152

Change-Id: Ifc7b8f759684fe35d1aa9218dd39b8dcf7ac4e4f
1a249607f94bcb2e3473ae92b3e9dcab06665b85 07-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds a start flag to set FLAG_ACTIVITY_MATCH_EXTERNAL" into pi-dev
06d4cda1acf770a49bdd1311d70442eb341ee490 07-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "hid-device-app-name" into pi-dev

* changes:
Show Bluetooth HID Device connection status in Settings
Bluetooth: Add hidden API to get current user of HID Device (1/3)
66b90a035f13d3ad0f7399cd8978c890a38ec935 07-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added nullability annotations to API" into pi-dev
f80809ffd7b6ea8eb120ce5ccb343582c2757ea0 04-Apr-2018 Philip P. Moltmann <moltmann@google.com> Expose TestAPIs needed by GtsOsTestCases

Test: atest GtsOsTestCases on pi-dev:taimen and oc-mr1:sailfish
Bug: 77497338
Change-Id: I5de976991a857bfbed2faa943822af542601fa8b
4c1453ac4540181f05d7644775d292b4b8fc62a6 06-Apr-2018 Jorim Jaggi <jjaggi@google.com> Merge "Early wake-up for transitions (2/2)" into pi-dev
229141f082f8f95791d7725765129f330a064aae 06-Apr-2018 Patrick Baumann <patb@google.com> Adds a start flag to set FLAG_ACTIVITY_MATCH_EXTERNAL

Test: manual - launch installed instant app from command line
Change-Id: I0e8532a683e3a68d2c81df222aab673d09c286ed
Fixes: 75967669
b8e1c6ec6954635046f5dea33827a564735acd8b 06-Apr-2018 Chad Brubaker <cbrubaker@google.com> Make isSameTrustConfiguration public API

Test: make update-api
Bug: 77690898
Change-Id: Ie802287344faa1ed240f982efcc58e6fd671c3f2
43470a309a0fe51d62d16acce400ee73db698126 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hearing Aid: change get/set active device (3/3)" into pi-dev
9af1378c82c2e39c40383af117c568257152eee9 23-Mar-2018 Eugene Susla <eugenesusla@google.com> [DO NOT MERGE] Avoid sending content changed a11y events from wrong views

The root cause of both attached bugs was the tree-merging algorithm in
ViewRootImpl.SendWindowContentChangedAccessibilityEvent converging on a
common predecessor that is marked not View#isImportantForAccessibility.

As a result, such unlucky content changed events were discarded.

Fixes: 72378611, 72950579
Test: ensure attached bugs are fixed
Change-Id: I3c3c66151b6cd4773de4eadd417709e9a61a7cf2
(cherry picked from commit 3fb3c590400ae7bcc9bc7d5baba5a29678f9e873)
2181bb70ff934c0b3ee5f5aa69c82e333a3eced9 06-Apr-2018 Nader Jawad <njawad@google.com> Merge "Removed call to setWillNotCacheDrawing and deprecated it as well as willNotCacheDrawing as intermediate caching layers are obsolete since hardware accelerated rendering was introduced in API 11" into pi-dev
eb53c228f062a895dd90a00b6f2d7e7dda3d8ca1 06-Apr-2018 Selim Cinek <cinek@google.com> Added nullability annotations to API

Certain methods where left out in the new APIs

Change-Id: Ide1e2f387a4918f2134254d862eeff06bfd3a730
Fixes: 74409592
Test: only non-semantic changes
cfaf8a1e5bea143b9604dd87078d22cd5d9b1b6c 06-Apr-2018 Torne (Richard Coles) <torne@google.com> Only match addresses without zip codes if at the end.

The old native implementation of findAddress only accepted addresses
without zip codes if they appeared at the end of the string. This was
probably a bug as the documentation implies this should work in all
cases, but fixing this bug has caused a lot of false positives while not
fixing very many false negatives and this functionality is being
deprecated anyway, so change it back.

Fixes: 75409267
Test: tested upstream in chromium; direct copy of that code
Change-Id: I3f3c300035cf02a23284737431bc6f94f542cbe7
ab3e7bdd62ec2707ed0bc6447f68b8f7f6012d0f 06-Apr-2018 Yu-Han Yang <yuhany@google.com> Add setting for GNSS location request update duration

Bug: 77696830
Test: atest SettingsBackupTest
Change-Id: I4514070ba12de2d1c4c47c03a9bf70d8f57fe197
ebcaeeb792688f1a35075d450e78212b46d03544 06-Apr-2018 Beverly <beverlyt@google.com> Update dnd settings summary

- Add null check for ZenModeConfig
- Add ability to include description for indefinite dnd

Test: manual, DndConditionTest, ZenModeSettingsTest
Bug: 76208187
Bug: 77704156
Change-Id: I88de555d2681e613dbcd7694087efef2504b4d51
28faced9734d509f8829ea710fe93bf33a4be324 06-Apr-2018 Fyodor Kupolov <fkupolov@google.com> Merge "Added dontSendToRestrictedApps broadcast option" into pi-dev
236a183e8bc0b29af9dee52dae6f061b134b6a3f 06-Apr-2018 Nader Jawad <njawad@google.com> Removed call to setWillNotCacheDrawing and deprecated it as well as
willNotCacheDrawing as intermediate caching layers are obsolete since
hardware accelerated rendering was introduced in API 11

ImageView's current implementation of setScaleType would manually
disable it's cache if the ScaleType provided was CENTER. This was end up
not drawing the ImageView if View.LAYER_TYPE_SOFTWARE was configured on
the ImageView as the cache no longer existed. Removed the logic to
conditionally disable the drawing cache and marked
setWillNotCacheDrawing/willNotCacheDrawing as hardware accelerated
rendering makes these facilities obsolete

Fixes: 77653694
Fixes: 72139649
Test: Created a test application with an ImageView and manually set a
ScaleType of CENTER and forced the ImageView to render in a software
layer to confirm that it would render properly with a drawable of the
test application's launcher icon

Change-Id: Ie73b1e0708a265e3cc2cc74ed13539f4219dbd7d
(cherry picked from commit 2ac86880d6888b0508cdb7d6b2f22a1329a66560)
122df868919f3e2b9a92d6e9dc66808884f3f080 28-Mar-2018 Dan Gittik <dangittik@google.com> Added system-wide minimum brightness curve.

The minimum brightness curve guarantess that any brightness curve
that dips below it is rejected by the system.
This prevent auto-brightness from setting the screen so dark as to
prevent the user from resetting or disabling it, and maps lux to
the absolute minimum nits that are still readable in that ambient

Test: atest BrightnessConfigurationTest.

Fixes: 77176207

Change-Id: Ibd1e83e9b147f3849d6c907f828cbe5950c8367f
cecec7bf5b881547ea8cd43d48892b0302175e08 06-Apr-2018 Selim Cinek <cinek@google.com> Merge "Migrated the Person class to its own file" into pi-dev
4e51877f5cbdb4a92568dce50c2bdc381cfbe861 27-Mar-2018 Clara Bayarri <clarabayarri@google.com> Fix crash when modifying Selection

The root of this bug was in the fact that Selection.removeSelection
removes two spans, the start index and end index of the selection.
Each span removal triggers Editor#onSpanRemoved, which in turn tries
to set a selection. This meant that if we started with selection
(100, 120), then removeSpan(start) was called, so we had (-1, 120),
then the onSpanRemoved code tried to set a selection so set it to
(120, 120), then removeSpan(end) was called, ending up in (120, -1).

There are two stages to this fix
1. A lot of our code assumes that when either start or end selection
are larger than -1, both are valid. Therefore when we have one of them
out of sync, we crash. Fixed this assumption in all the places I found

2. We didn't have a mechanism to use FLAG_INTERMEDIATE when removing
spans, only when adding them, so this CL adds a remove with flags. This
allows us to not trigger onSpanRemoved when only one of the selection
indexes is removed.
Because this is an added method to an interface, the default just
calls the existing method. The new method is implemented in
SpannableStringInternal and SpannableStringBuilder to read
FLAG_INTERMEDIATE and avoid sending a spans changed event.
Selection.removeSelection then uses FLAG_INTERMEDIATE when removing
the first of the two selection spans.

Note that 2. would be enough to fix the current bug, but we want to
avoid other implementations of Spannable from crashing in the wild.
In general, it seems like a good idea to verify both selection indexes
are valid whenever they are used.

Bug: 72101848
Test: atest FrameworksCoreTests:SpannableStringBuilderTest
Test: atest FrameworksCoreTests:SpannableStringTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsWidgetTestCases:EditTextTest
Test: atest android.text.cts.SelectionTest (note new test as well)
Test: atest android.view.inputmethod.cts.BaseInputConnectionTest
Test: atest android.text.DynamicLayoutTest
Change-Id: I0d647fad152d0bef0f2115a46c3d17ebd8642281
426095f665fcfaaf638977a2f675a387b3f61a3a 06-Apr-2018 Lucas Dupin <dupin@google.com> Merge "Trigger new frame after display is ready to turn on" into pi-dev
1ea7edd77e616a97f12af821e2f03c7e3b26d49a 20-Mar-2018 Alexey Kuzmin <alexeykuzmin@google.com> Add haptic constants

New hidden constants added to HapticFeedbackConstants.
Test: m update-api shows no changes
Bug: 74882420

Merged-in: I164a944b23e958e89b8d3064cb512cee739b27fd
Change-Id: I164a944b23e958e89b8d3064cb512cee739b27fd
28709538fe1bb6833a214633632119fc605a0d9c 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add deprecation notice to Linkify MAP_ADDRESSES" into pi-dev
6c7377944206f0c4a6ccd6e71eab720f358c78d3 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix typo in comments." into pi-dev
53765e00d8621d1b0b28cb9d877cacb751ed09c5 06-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Add @param tag for state in queryDetailsForUidTagState.

Change-Id: I22de424ccb2b30b2a56edd17dc982565b8aa7d4a
Fix: 77518425
Test: make doc-comment-check-docs
4c6f4a65b678c82bee81839f79f211acc725243e 06-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Remove unwanted capability code per API council feedback.

The addition of hasUnwantedCapability was late in the release
cycle and does not simplify the API enough to be worth it. The
recommendation is, in a future release, to do something more
complete: not just add something like addUnwantedCapability, but
also deprecate all the NET_CAPABILITY_NOT_xxx constants and add
opposite NET_CAPABILITY_xxx constants for use with it.

Fix: 77601789
Test: builds, boots
Test: atest android.net.cts.NetworkRequestTest
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: Ib98fb01da4a4a0bae464787b589ad88f45002eb8
35b218d735f8fffa5761a1d5ec47d5a94cc3282c 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Treat hidden API exemptions as whitelist." into pi-dev
7eeb0eb6d34ca4c52a95cc2f9745ab4ea6d63b32 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "gpuprio" into pi-dev

* changes:
Add ThreadedRendererCompat for Launcher use
Add ability to change context priority of RT GL context
5e986dccfd96876d9e07bf779237b10bf9985b28 06-Apr-2018 Mathew Inwood <mathewi@google.com> Fix typo in comments.

Keep the nitpickers happy.

Test: m
Bug: 77517571
Change-Id: I70374c05df3e366b5a0ce3bbb103dce28f48d4b8
892ebd02856f82fac9006babbc9aff43cc4bf71e 06-Apr-2018 Rubin Xu <rubinxu@google.com> Merge "Tweak SystemUpdatePolicy APIs" into pi-dev
aeeb24e9cd59e64722527671f68ecb7731a5ea19 05-Apr-2018 Annie Meng <anniemeng@google.com> Don't backup/restore screen brightness

We no longer want to backup and restore screen brightness as it could
leave the new device in an unusable state and doesn't make sense

Test: 1) atest SettingsBackupTest
2) atest SettingsValidatorsTest
3) Manual:
- Old backup set that has screen brightness does not restore with change
- Screen brightness does not backup or restore with change
Bug: 77583401
Merged-In: I8a6d950717e6aeb9bf6773c14708ee70069f9df0

Change-Id: I8a6d950717e6aeb9bf6773c14708ee70069f9df0
(cherry picked from commit 931b41b71a411dd714025970aeb752c71e86b239)
fffec6ea9d1c314dd03e80e1e9c80c5431a26295 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove WebView.getLooper()." into pi-dev
1f8757d35ff2876eda6f95a5bd9fdf310f3837cb 06-Apr-2018 Mathew Inwood <mathewi@google.com> Merge "Replace ALL_LISTS policy with JUST_WARN." into pi-dev
4147a83ae5709bdb22986b49798f05488e4579f1 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Remove deprecated RecoveryController API."" into pi-dev
767e25ed613201d93d293a4c8ead5a21c0fb2b22 04-Apr-2018 Jorim Jaggi <jjaggi@google.com> Add ability to change context priority of RT GL context

Test: Use method, observe GPU preemption behavior
Bug: 75985430
Change-Id: Idc08d37f8c95f52c5aab7edf09c0cbff72b8482d
aa763cd35f9a74a93a2fc8cee74e8455e504788e 22-Mar-2018 Jorim Jaggi <jjaggi@google.com> Early wake-up for transitions (2/2)

On some devices it's very likely that we fall into GL comp during
app transitions. However, SF offsets are chosen in a way such that
the time to finish a frame is just too tight to be completely jank
free when hitting GL composition in SurfaceFlinger. Thus, we
introduce the concept of a separate early offset, and wakeup
SurfaceFlinger at that time if we think that hitting GL comp is
likely, or we already hit GL comp in the last frame.

Test: Open app, check vsync offsets in systrace
Test: Open many dialogs/apps to fall into GPU comp.
Bug: 75985430
Change-Id: I461fdcd573583f3ea0348c8b23cc9945d33f8976
33d5138e132561d6c3c02fc0e265aa3c158f6798 05-Apr-2018 Mathew Inwood <mathewi@google.com> Treat hidden API exemptions as whitelist.

Update docs accordingly.

Test: m
Bug: 64382372
Change-Id: Ief8daf3badeb046b0461a3ebcd289e242d559070
c157e21249b01cca18e6712d69c719f245db51a7 06-Apr-2018 Robert Berry <robertberry@google.com> Revert "Remove deprecated RecoveryController API."

This reverts commit 0d55aa387a4ec65899fc82a1391e5533c85c3edb.

Reason for revert: aps_sidecar binary is still using some of these @removed APIs. Although HEAD of auth_folsom is fixed, aps_sidecar burned in framework is old.

Bug: 77629807
Change-Id: I2f03c7d12de30cc2eebd91bb65646caaa00fcd1d
63ee7f1610025fa14d8e6e2f1049823ba37f8c53 05-Apr-2018 Mihai Popa <popam@google.com> [Magnifier-39] Hide both handles on overlap

In general, since text insertion/selection handles are implemented as
PopupWindows, if they get to overlap the magnifier they are going to be
rendered above it. Therefore, we are trying to avoid this case.

Before this CL, we were only hiding the grabbed handle, when this would
overlap the magnifier. Since the magnifier would usually be displayed a
certain offset above the grabbed handle, this could only possibly happen
when there was not enough space for the magnifier above in the current

However, this is not enough, as in the case of selection, the other
handle could as well overlap the magnifier in certain cases. This CL
intersects the magnifier rectangle with the rectangles of both handles
and detects whether these should hidden or not.

Bug: 76459199
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Test: atest FrameworksCoreTests:android.widget.TextViewTest
Change-Id: I22519979eead276dbcf273f7c1a54d654fa251bc
f9583c41dce46321bdcd9cea7045a5bedbe0d59d 06-Apr-2018 Lucas Dupin <dupin@google.com> Trigger new frame after display is ready to turn on

Making sure that a frame will be pushed after the display is ready to
turn on by invaliding the clock after a delay.

Also removed unecessary binder call.

Test: cover prox sensor and wait 1 minute. repeat ~10 times
Change-Id: Ic1b8006781e5486822a5ab65b71b3c44980f2f16
Fixes: 71913808
b172d5b4375ecb1895d3d7bed3d94e4fac3551a2 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update IpSecManager to use InetAddress and prefixLen" into pi-dev
9acd673c0deb2652a55c52b9b80515d84b1945dc 24-Mar-2018 Selim Cinek <cinek@google.com> Migrated the Person class to its own file

Because we are expecting usage of Person across
other surfaces, we migrate the class out
of he Notification class which is already incredibly

Test: Migrated existing cts test
Change-Id: Ia487ae7965b5ca2b016245d21faa63e3b4628344
Fixes: 75980526
d7c3ba204c7a55e9b71ac8b478d445b310ac7b56 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ensured that the reply icon isn't showing on HUNS" into pi-dev
b1bcab2210b770ae6811fc0386766d2cd3449dca 06-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Implements GNSS satellite blacklist" into pi-dev
c1778c6dadf56fd6c7965ff3f49d8fb0cd0fd3e5 16-Mar-2018 Rajeev Kumar <rajekumar@google.com> Add a condition in AppWidgetHost to honor config_enableAppWidgetService.

Bug: 74039047
Test: make cts-verifier -j32
Change-Id: Iaca4e043443efeb695ebfd57c605e5cc1516a49a
(cherry picked from commit 3c9e79ea78ad3ece7f9cc9c3554470d93ece9fe2)
5ab3cf8bec827ed6cfa3a8e462751e8558728d20 05-Apr-2018 Vishwath Mohan <vishwath@google.com> Merge "Rename BiometricDialog to BiometricPrompt." into pi-dev
822ce4f3aa0c6df1b58b66d342694957ba63b4f9 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Activity interceptor dialog for suspended apps" into pi-dev
ab78047aa2720f1713d2d020b2ce21f594375463 05-Apr-2018 Jan Althaus <jalt@google.com> Fixing incomplete RemoteAction clone

Bug: 77631078
Test: atest CtsAndroidAppTestCases:android.app.cts.RemoteActionTest
Change-Id: Ifd6617baf67993141e2ee85def8fb84c88cbe3e7
d1366f604aa624c48c4f5636ea89f311e05da772 05-Apr-2018 Rob Carr <racarr@google.com> Merge "Forward Activity stop signal to attached windows." into pi-dev
ae938f54377d800458fdfa5dd97b82f7b791c473 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ConfirmationPrompt: Update for API review." into pi-dev
335b0d36dadc2f69046dda5c79323f3d92db7e20 05-Apr-2018 Richard Ledley <rledley@google.com> Merge "Add null check for Nullable argument." into pi-dev
fe85e4589bc17e899f471dde1b6573f4673a31b9 05-Apr-2018 Hall Liu <hallliu@google.com> Merge "Move RTT system setting to Settings.Secure" into pi-dev
bd2e79094623e5b1a89eff4e51eb7b295f2390da 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reduce log spam in TimeSparseArray" into pi-dev
ecf00cedb64d2e7b9082d540d49972fe391760ad 05-Apr-2018 Vishwath Mohan <vishwath@google.com> Rename BiometricDialog to BiometricPrompt.

Renamed to BiometricPrompt per API-council feedback.

Bug: 77494933
Test: m -j70
Change-Id: Ifed2b8f3439a7e671e0ce46d3a7db9f24871b16a
3f2c54b7820c3a568890700479230966fdbcf0a4 04-Apr-2018 Benedict Wong <benedictwong@google.com> Update IpSecManager to use InetAddress and prefixLen

LinkAddress constructors are currently @hide; this change updates
IpSecManager to use InetAddress and prefixLen, and then construct a
LinkAddress internally. LinkAddress is used over the binder interface to
IpSecService to ensure validity.

Bug: 77528639
Test: CTS, Java unit tests ran on walleye
Change-Id: I19e124adef6d9f4992d8293db3190bcf74c95848
cb331c32db391e1f3518ef873af23ee295a39cad 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixes non-web AIA internal launch" into pi-dev
003889a2757780825c543d04732e8d7a13cb254d 04-Apr-2018 Jan Althaus <jalt@google.com> Add deprecation notice to Linkify MAP_ADDRESSES

Bug: 22362008
Test: N/A
Change-Id: Ib70e0cbdd8c454a96e5e75b906ace7b6f1e21cba
37317e166867a569dae7e5cbd8de8439eae57439 05-Apr-2018 Jan Althaus <jalt@google.com> Merge "Makes TCS methods non-abstract" into pi-dev
5f77b6a35a6de6b3c7439ef8432e5992c31dfb2b 05-Apr-2018 Richard Ledley <rledley@google.com> Add null check for Nullable argument.

Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Bug: 77624093
Change-Id: I527c4e7f6758c699d4d4e7258cf8474f833040c7
a4d6570b2fd990d61b68e7bd20f1b917d4715710 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Copy ApplicationInfo#versionCode field" into pi-dev
66c7ea91b413c9d812047288efb343c16b23d865 12-Mar-2018 Yu-Han Yang <yuhany@google.com> Implements GNSS satellite blacklist

Bug: 38269641

Test: m -j ROBOTEST_FILTER=GnssSatelliteBlacklistHelperTest RunFrameworksServicesRoboTests
Test: atest SettingsBackupTest
Test: Tested with adb on device

Change-Id: Ifaa330bf74353ea5c8826f0000d1935258b8dbf2
a6d02fb1041bf19161fd4d74bcf5a1cd87495245 05-Apr-2018 Mathew Inwood <mathewi@google.com> Replace ALL_LISTS policy with JUST_WARN.

It seems pretty unlikely that we'd ever want to disallow access to the
light greylist in P, since doing do would break do many apps. We don't need
this policy here as an opt-in for apps now, since the StrictMode work will
achieve the same thing.

Instead, make a "just warn" policy which allows access to all APIs, but
leaves the detection and logging logic in place. This gives us the option
of disabling enforcement, but still gathering logs to find out which apps
use which APIs.

Bug: 77517571

Test: Boot device
Test: Hardcode policy of HIDDEN_API_ENFORCEMENT_JUST_WARN and verify log

Change-Id: I588f347716a79ac5887b74763c8afc16b3be699b
39ccc7e388bb6e5e6972497258750c06d0a4e959 04-Apr-2018 Jan Althaus <jalt@google.com> Makes TCS methods non-abstract

This only affects System API

Bug: 77563695
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTestBug:
Change-Id: Ie927ffe3a4678b7a622c139a5431b89e8f22c6e4
c8f5480981f987cb40989f387deeea360670f018 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "StrictMode: Add support for warning on non SDK API usage." into pi-dev
1b2f37401818b04cf4908d5aa9017eab44fe5662 28-Mar-2018 Rubin Xu <rubinxu@google.com> Tweak SystemUpdatePolicy APIs

* Introduce a FreezePeriod class that represents a single freeze period
and is defined by two MonthDay instances.
* Add ERROR_UNKNOWN to ValidationFailedException
* Make SystemUpdatePolicy final
* Document SystemUpdatePolicy.InstallationOption and add IntDef to getType()

Test: runtest frameworks-services -c com.android.server.devicepolicy.SystemUpdatePolicyTest
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testSystemUpdatePolicy
Test: gts-tradefed run gts-dev --module GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerTest#testSystemUpdatePolicy
Bug: 74976911
Change-Id: I85cf636c3a98c97bd03b7b296c3130028051a791
11f058225f1f4e1ea75cb77a0d964ba1e9578a40 29-Mar-2018 Benjamin Franz <bfranz@google.com> Update Javadoc of setLockTaskEnabled to reflect known issue

Document the known issue that setLockTaskEnabled does not take effect if
the activity is already in the foreground or running in the background.

Bug: 72806000
Test: make docs
Change-Id: I2b571cee553dbc8a11147ebe4d444e5f69ce96b2
0e650c1c55d22a2721f38759d41a2706721474d2 05-Apr-2018 Mathew Inwood <mathewi@google.com> Merge "Exempt platform-cert signed apps from hidden API checks." into pi-dev
73961397e5ba774dcb7cdd60772647dce2d528fb 05-Apr-2018 Rubin Xu <rubinxu@google.com> Merge "Device ID attestation: Add feature flag." into pi-dev
7b7e87eeb522c18c9808e6cb03cdc6dd307d7ae2 05-Apr-2018 Richard Ledley <rledley@google.com> Merge "Use Collection instead of List for entity list" into pi-dev
3c3af1406e9fc8afbe9593df6c23fe3d4daa6b42 30-Mar-2018 Suprabh Shukla <suprabh@google.com> Activity interceptor dialog for suspended apps

Added an AlertActivity to intercept the start for an activity belonging
to a suspended app. More details will be shown if the suspending app
also defines an activity to handle the API action

Test: Added tests to existing classes. Can be run via:
atest com.android.server.pm.SuspendPackagesTest
atest com.android.server.pm.PackageManagerSettingsTests
atest com.android.server.pm.PackageUserStateTest

Bug: 75332201
Change-Id: I85dc4e9efd15eedba306ed5b856f651e3abd3e99
44e41012ecaad1c8e5d78e0efb3b6d9d997a4108 03-Apr-2018 Hall Liu <hallliu@google.com> Move RTT system setting to Settings.Secure

Bug: 76449217
Test: manual
Change-Id: I85620d5b834aa7e04579212f3fd5cf6c0498b570
da26eb3382de885a01933f55dec9b19505cb763f 31-Mar-2018 Fyodor Kupolov <fkupolov@google.com> Added dontSendToRestrictedApps broadcast option

Sets whether pending intent can be sent for an application with
background restrictions

Test: manual
Bug: 77237719
Change-Id: I9acc2471f1dbd657ed9a6dd93888e04a6ae48d61
fe99686d8ab57035b0ed06b9e2a0cb5e21b0d400 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hiding windows for suspended packages" into pi-dev
36b414bc2de065ead88a384a8e877788a5db32f1 30-Mar-2018 Jeff Sharkey <jsharkey@android.com> More knobs for connectivity experiments.

Keep the same default values in place for calculating opportunistic
quotas, but now allow experiments to override these values.

Tests to verify behavior of defaults.

Bug: 72353440
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Change-Id: I38c225fd141b2e94085ca4cce17ecd51fee3f3aa
2b26f83f12013c0e14b920093ff81f55d7a78987 05-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "autofill: fix window location in splitwindow and dialog" into pi-dev
0fc6d03b628c8cbe80e3c2c14aaf8c6944b32d1e 31-Mar-2018 Jeff Sharkey <jsharkey@android.com> API council requested tweaks to SubscriptionPlan.

Return new shiny Range<> object instead of Pair<>. Tell developers
what permission to check on refresh broadcast. Describe what
exceptions might be thrown, and that an empty list is okay.

Allow creation of plans with richer Period object, instead of forcing
them into rigid week or day options.

Protect SubscriptionPlan broadcast.

Test: atest android.util.RecurrenceRuleTest
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Bug: 74945820
Change-Id: I7e555798e0cfaa214ca93d9df627c6443fc5d986
3b8f09b3c56fc81148a06af68dde58022bc042fe 29-Mar-2018 Hansong Zhang <hsz@google.com> Hearing Aid: change get/set active device (3/3)

* setActiveDevice() returns false in error case, e.g. when the device is
not connected
* add getActiveDevices() instead of isActiveDevice(), which returns a list
that must have two elements: left and right, or empty list on error

Test: manual
Bug: 69623109
Change-Id: I48f3388c56434d0c21e09bd8b794e58848cd8794
(cherry picked from commit 8d799f8340d0219280f27cc35f0c02dae5922b74)
7838027fb089238a6044b9bda4385bf81f90ab50 04-Apr-2018 Patrick Baumann <patb@google.com> Fixes non-web AIA internal launch

This change plumbs the original uid of a startActivity call through to
PackageManagerService#queryIntentActivitiesInternal so that we properly

Test: manual - launch previously failing instant app
Change-Id: I0a62195f67c2e08315ce2d87f1d8c516c2327ba6
Fixes: 77489209
291988ef59d9270c4eb051c9084180e4c88a1063 04-Apr-2018 Makoto Onuki <omakoto@google.com> Merge "Simplify service wrapper initialization + make robust" into pi-dev
8664e9561312c2288fa1ac541ea3d10ef0e4f52d 04-Apr-2018 Daniel Cardenas <danielcar@google.com> Reduce log spam in TimeSparseArray

Change-Id: I8574f9e84be4e27be3946ed361475691d6ea03e0
Fixes: 77587733
Test: Build, excersize elfin device, monitor for logspam
d6997b05e0a1538ff55a106d053093700fc22eb2 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix TCS crash due to API changes." into pi-dev
c2def58ec0ab96c90f6d786526c5446f9d12be70 04-Apr-2018 Patrick Baumann <patb@google.com> Copy ApplicationInfo#versionCode field

This compatibility change ensures that apps built for pre-P that rely
on reflection to access ApplicationInfo#versionCode don't crash. The
move to long version code introduces a new field and all modifications
of the field are wrapped in a method that ensures both the new and old
fields are set appropriately.

Test: manual - impacted app runs
Change-Id: I5fb37c65b0fb04042dda12479d1e1a76590daa3d
Fixes: 74393568
d67070e1c108df3cbcc085651484c6b6e52b9e46 30-Mar-2018 Makoto Onuki <omakoto@google.com> Simplify service wrapper initialization + make robust

- Simplify the logic, no more AtomicIntegers.
- Make robust -- if we know we've successfully created an instance before,
but the instance is now gone, re-initialize again.
- Added CTS.

Bug: 75964116
Fixes: 75964116
Bug: 71882178
Fixes: 71882178
Test: Manual test with UC Browser
Test: atest /android/pi-dev/cts/tests/tests/content/src/android/content/cts/ContextTest.java#testGetSystemService_multiThreaded
Change-Id: I12a9834d0f62e90e6f5d806a124cbdade415440c
e269a5ac62448c7ce65d7a5cdc0a1f15c3481462 04-Apr-2018 Fyodor Kupolov <fkupolov@google.com> Merge "Fix reading exception from Parcel" into pi-dev
640e9b9bf4b031f9df75178d2049d88f02755524 03-Apr-2018 Dake Gu <dake@google.com> autofill: fix window location in splitwindow and dialog

autofill should use relative location to app window as PopupWindow
is based on relative location.

The fixed reverted changes made in compatibility mode CL that made
autofill window TYPE_SYSTEM_DIALOG.

Changing PopupWindow to use absolute screen location is another fix
choice, but it does not allow autofill window to be automatically
moved when app window changes location (e.g. adjust split window
separator or bring up IME)

The autofill window switches to TYPE_APPLICATION_ABOVE_SUB_PANEL with
IME disabled. So it still appears above IME and most other app
windows, unless app window is TYPE_APPLICATION_ABOVE_SUB_PANEL too.

Fixes: 73555917
Bug: 77587135
Test: manually tested compability mode with chrome amazon login
manually tested splitted window
atest CtsAutoFillServiceTestCases

Change-Id: I6b8ecf3fe7a91cebea1f7a868f4b15fbed8b0051
fb0abe1feb2cadcee2a3edb2028e1da04bb8a8d5 03-Apr-2018 Seigo Nonaka <nona@google.com> Update JNI interface of GetBounds in PrecomputedText

Bug: 77495049
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text

Change-Id: I54a70a91f6fba90720b702b52ed6ad430e17c87d
654598b542174440837f16d8b899f776c2e25478 04-Apr-2018 Dmitry Dementyev <dementyev@google.com> Merge "Remove deprecated recoverable keystore classes." into pi-dev
ce70473a89325bbc11f81d0fc530888d8782fbea 04-Apr-2018 Dmitry Dementyev <dementyev@google.com> Merge "Remove deprecated RecoveryController API." into pi-dev
5e9b4c7c338e31b9acc2e4d3fb877202e435a32e 03-Apr-2018 Benedict Wong <benedictwong@google.com> Force creation of Socket upon Transform application

This change forces Socket and DatagramSocket to populate the
SocketImpl, ensuring that the socket file descriptor can be
retrieved when applying Transport mode Transforms

This is done by calling getSoLinger(), triggering a getImpl(), which
triggers setImpl() if needed.

Bug: 77491294
Test: Added tests in IpSecManagerTest, ran on walleye
Merged-In: I40da08b031357710eb794e0f866aec5660c79594
Change-Id: I40da08b031357710eb794e0f866aec5660c79594
(cherry picked from commit d175a3d3a01cfdb5ab6d4e61d15950583f8006d6)
c5138d2697ea2c8d6a0fce7c0a458859036393a3 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add hasUnwantedCapability method" into pi-dev
c4020ffcabda67a8d16fda496d9a5abd1880dabe 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Mark networks with OEM_PAID always restricted" into pi-dev
9d89543d48b1bd286355f3b2730bee954c8dda1f 04-Apr-2018 Mathew Inwood <mathewi@google.com> Exempt platform-cert signed apps from hidden API checks.

This means that APKs signed with the platform cert are allowed to use
hidden APIs, even if they are not on the package whitelist, and if they are
not in the system image. It will also allow a number of packages to be
removed from the package whitelist.

Also remove all platform cert signed apps from the package whitelist, as
there is no longer any need for them to be in there.

Bug: 64382372
Test: device boots
Change-Id: Id805419918de51f946c1f592581bab36ae79de83
ab669a01a7cbb77107e4335f4940f4e39da0e2d7 03-Apr-2018 Richard Ledley <rledley@google.com> Use Collection instead of List for entity list

Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Bug: 76448224

Change-Id: I354fa05f14b22075c2172624925f5b953956f3a4
1870e2dec4c397e6e758c2325e11e6826dcae520 02-Apr-2018 David Zeuthen <zeuthen@google.com> ConfirmationPrompt: Update for API review.

Misc. changes but notably the ConfirmationDialog class was renamed to

Manually tested by updating sample Android Confirmations application
to use updated API.

Bug: 77242268
Test: Manually tested.
Change-Id: I1caa3c6bff9486b43ba111329d1ef83c3b67baf9
ae82e7ad280e55dca22014c6abc857372229f89c 04-Apr-2018 Abodunrinwa Toki <toki@google.com> Fix TCS crash due to API changes.

- Brings by old deleted APIs and hides them
- Except parceling and hidden APIs that won't have been called anyway
- Option holds a reference to the Request object so we don't have to
rebuild it

Bug: 77523413
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest
Change-Id: I4277c48a950c3334439649373885ed7fe54f898e
706fbe7ed36354c6fe3f7e67617ce12f2e630e32 03-Apr-2018 Tony Mak <tonymak@google.com> We should show custom title for suspend app dialog

BUG: 77523074

Test: Suspend an app, observe the new title.

Change-Id: I85f3d47e05332f7593a885130fd30dc5fd0a9960
1193a35bcdee2df2ac3880131e8890f50019ceb1 28-Mar-2018 Robin Bennett <robinbennett@google.com> Add setting/experiment to send keycode sleep for ungaze when Home is the
foreground activity.

Bug: 77253874

Change-Id: Ic799eec8439786ae20bb366b9d4e93ec30d34070
b2e6e45d009e7c9148e69bf2c1f0b46917bee7b0 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Throw ServiceSpecificException if calling app tries to initialize certificates with lower version. Earlier, the code just returned silently, giving no indication that updating certs failed." into pi-dev
83c1e74b1e41f2c093da80ae0eba2442f348cd77 30-Mar-2018 Lorenzo Colitti <lorenzo@google.com> Mark networks with OEM_PAID always restricted

Bug: 68762530
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Cherry-picked from AOSP with no conflicts

Merged-in: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
Change-Id: I173ee0a3bc1797d03ba34c5f025844eaada87ee4
(cherry picked from commit efbacc0ccb70917b2782272e6b8f1a0fb3f56cbe)
9ab1da20525d31837b450e5f22243d89f2fbb997 04-Apr-2018 Remi NGUYEN VAN <reminv@google.com> Merge "Add settings to configure default multipath quota." into pi-dev
69c71423ecd1858e1dd6407a96ed7609dc379e85 03-Apr-2018 Suprabh Shukla <suprabh@google.com> Hiding windows for suspended packages

Suspended packages get their activities intercepted at start, but they
can still show system_alert or toast_windows from other components.
These need to be hidden when the app goes into suspend and unhidden when
it is unsuspended.

Test: atest com.android.server.wm.WindowStateTests

Bug: 77498821
Change-Id: I9ac446f20feb23e2090ba306b4435c46b9aeec95
3ec4b8ccfdad94f7393743ba0d56602dc9bb4dc3 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use client-side version of inTouchMode" into pi-dev
7694926d37a8684e77c9d806bec6e06324de0965 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[DO NOT MERGE] Sort A11yService#getWindows by layer descending" into pi-dev
baca867094b6fa17c0113e31c53a4560f00c85a7 03-Apr-2018 Hansong Zhang <hsz@google.com> Bluetooth: Add hidden API to get current user of HID Device (1/3)

Bug: 69136526
Test: test with apps using HID Device profile
Change-Id: If0e49840257c877c975c2da176a08e613668cbc3
(cherry picked from commit 347ef4099e0d2b1334efd22e6ca7d5cc5464b4eb)
3f7bd97df9e6e4b74f2cf1ec908c24f3c8c77e4f 03-Apr-2018 Robert Carr <racarr@google.com> Forward Activity stop signal to attached windows.

Simply put there is nothing ensuring PopupWindow's stop using
the Surface before the app is stopped. Since PopupWindow's are
detached from the main View Hierarchy teardown of the main window
provides no such guarantee. It seems enough to forward the "WindowStopped"
signal from ViewRoot to other ViewRoot's using the token of that ViewRoot.

Bug: 62536731
Test: Manual
Change-Id: Ib431f49be7e06a6397a40c11ec7e842a8bc5caf9
5fa07c09865acbcbaeba37971db1388083198aef 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "fw_quickstep_update" into pi-dev

* changes:
Reparent recents animation task leash to app animation layer
Allow recents animation to override divider minimized state
Prevent unnecessary reordering of the home stack
7065aedba05a20483e62ddfc40e6fe422436fb75 04-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add method to get blocked channel counts" into pi-dev
bd573236f8f419161c56be72876a0546f650f947 26-Feb-2018 Eugene Susla <eugenesusla@google.com> [DO NOT MERGE] Sort A11yService#getWindows by layer descending

This is what A11yService#getWindows promises in the javadoc.

Fixes: 71581072
Test: using testback ensure the order is correct
Change-Id: I5038c4de29c60e235b65751f7bd7771ef35eb339
(cherry picked from commit f40da1a884493b6af61e3b978fdf7c7ff059b2dc)
5631f665a6d048c92e0ba76932885a11a71c8751 29-Mar-2018 David Pursell <dpursell@google.com> MessageQueue: explicitly remove FD event listeners.

When removing an FD listener from a MessageQueue, the MessageQueue waits
until the next event callback on that FD to remove it from the
underlying native Looper.

This works as expected most of the time, but due to the epoll rebuild
logic in the native Looper, there is a rare condition where FDs can get
stuck in the Looper:
1. Register two or more FD listeners.
2. Unregister FD1 listener and close FD1.
3. Before the Looper processes FD1, get an event on FD2 and close it.
(3) will trigger a rebuild of the epoll set but as FD1 is no longer
valid it cannot be added back to the epoll set, and the MessageQueue
will never get the final callback to clean it up.

Each time this happens:
* There is a small memory leak (24-32 bytes) in native Looper
* Rebuilding the epoll set incurs slightly more processing
* An error is logged for each lost FD on each epoll rebuild
This is fairly minimal, and does get cleaned up if the lost FDs is
re-opened during an epoll rebuild (since it can now be added back in),
but worst-case if a process somehow triggers this on a large number of
FDs it might be noticeable.

It seems worth it to just remove the FD explicitly right away to avoid
this case altogether.

Bug: 64083817
Test: [aosp_x86-userdebug emulator] adb shell am instrument -w \
-e class android.os.cts.MessageQueueTest \

Change-Id: I5093ca0d576473f490347ab4244af11a2835d23a
(cherry picked from commit 57f25ad657598248888b664454ac590b2ade3967)
2888404df83f2bf6d6004daa1f41547ab98d6419 03-Apr-2018 Evan Rosky <erosky@google.com> Use client-side version of inTouchMode

Was bindering into WM service pretty often due to this which was
causing some jank

Bug: 72236832
Test: Related touchmode/focus CTS tests still pass
Change-Id: Ia0f89429b67464beea07c702d8fe2d8b813f8d38
a1fc0255b81134785002f7eb25a11bf8ec513b72 03-Apr-2018 Ruchi Kandoi <kandoiruchi@google.com> Merge changes from topic "omapi" into pi-dev

* changes:
Add an Executor for the onConnectedListener
Make OMAPI stricter
23174b7eaeb93918451c36bbbfad94bafd44bdd6 03-Apr-2018 Aseem Kumar <aseemk@google.com> Throw ServiceSpecificException if calling app tries to initialize
certificates with lower version. Earlier, the code just returned
silently, giving no indication that updating certs failed.

Change-Id: I3eb1b9f423791a655b47b3e76c20a170e2b632c0
Bug: 77533356
Test: runtest frameworks-services -p
2214b828e5e527cc12a75970edbf3faf7f8c2384 02-Apr-2018 Takamasa Kuramitsu <takamasa.kuramitsu@sony.com> Fix reading exception from Parcel

It fails to read exception from Parcel using
Parcel#readException(int, String) because this method doesn't take into
account the remote stack trace info added in writeException().

Test: Manual
Bug: 77495513
Change-Id: I7b646b4a591306832897a42c4ed205d00019cc2b
1317162eb4d4ca3ba2dc914ccccdcdff5bbf2e29 03-Apr-2018 Phil Weaver <pweaver@google.com> Notify a11y when view attached to parent

Bug: 73493821
Test: Verifying that vibration settings UI works

Change-Id: Id3c9e87fdd0ad5c49d8bd6e86b2c15977c9b09ca
80a2bba9a695f7ad058f17b7d39089a98d40f335 03-Apr-2018 Nathan Harold <nharold@google.com> Merge "Add AppOps Checks for MANAGE_IPSEC_TUNNELS" into pi-dev
592dadbd43fcb7c5d67e737adb34d07923da90c4 16-Mar-2018 Nathan Harold <nharold@google.com> Add AppOps Checks for MANAGE_IPSEC_TUNNELS

Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
7b02d98470ec3602fadc77ae5218aee930c46771 03-Apr-2018 Gustav Sennton <gsennton@google.com> Remove WebView.getLooper().

We want to rename the method WebView.getLooper() to
We have already added the method WebView.getWebViewLooper() so with this
CL we remove the method WebView.getLooper().

Bug: 74831609
Test: make
Change-Id: I2d3c8ddeae032aa27ae3eed30d952a06b0abe854
3275d9a004a45f4a2a9e30bbe7c662955ebdb9ff 03-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: sort getCameraIdList output" into pi-dev
3a2d4143eeca73c557df24cb78428629a9bb5546 03-Apr-2018 Seigo Nonaka <nona@google.com> Merge "Make getText hidden and getWidth/getBounds public" into pi-dev
f2e499d7b5130fd6439a2e9541d31bf8cad781ad 30-Mar-2018 Julia Reynolds <juliacr@google.com> Add method to get blocked channel counts

Test: runtest systemui-notification
Bug: 72442731
Change-Id: I9ff30003edd0325f0ee0ad7154962c38523f9218
74519453645018daf7180eaf273283c801cd2633 03-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Update external camera orientation guidelines" into pi-dev
cebb55ea9d98dc7ba93eed520b874ac24ff96800 27-Mar-2018 Robert Berry <robertberry@google.com> Update docs to match encryption requirements

Bug: 70900575
Test: none, it's documentation
Change-Id: I9b85063bca636dca3085b187b736664f8d3f3c53
ad1b2a9cc1d43e7d36e46b0afce65fb981b189bc 28-Mar-2018 Narayan Kamath <narayan@google.com> StrictMode: Add support for warning on non SDK API usage.

Adds new API methods to enable and disable these warnings.

Bug: 73896556
Test: StrictModeTest

Change-Id: I049812fcdc79f191ab627766f66fc6f51b82e3d1
Merged-In: I096ce4c355c79cde1b98c3f48d392cd0b2ea5d98
6f13e973f7c4eeb588d5ca4cd034649268e52131 03-Apr-2018 Dan Sandler <dsandler@android.com> Fix javadoc xrefs.

Change-Id: Iadde9e2ddf500b28373838cfe38ab7b677f80ce5
Fixes: 71866610
Test: make docs
e0ec992630dbcb39776cf42d1489745abdd4b1d0 29-Mar-2018 Remi NGUYEN VAN <reminv@google.com> Add settings to configure default multipath quota.

Bug: 72631572
Test: Tests in go/ag/3828171 pass
Change-Id: I795debd0328ea7cad32c968cb4b407928e054528
80def873892d96650f46b60f5be682428f7c976c 03-Apr-2018 Dmitry Dementyev <dementyev@google.com> Remove deprecated recoverable keystore classes.

RecoveryController and related Parcelables were moved to a different package long time ago. Only very old recvoery controller implementations used it.

Bug: 74944591
Test: atest RecoveryControllerHostTest
Change-Id: I803b7d8a813f7e6c3606dc77afb2e0a3d916ec3f
41d6d7c42436baae1a9084c237350e21c22f57f1 03-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Throw invalid cert exception when deprecated initRecoveryService method"" into pi-dev
0d55aa387a4ec65899fc82a1391e5533c85c3edb 02-Apr-2018 Dmitry Dementyev <dementyev@google.com> Remove deprecated RecoveryController API.

1) Mark all deprecated methods as removed.

Bug: 74944591
Test: atest RecoveryControllerHostTest
Change-Id: I2dd88d2ba0b9fb254327ee85b9d983ab10eb061b
1364455fd77916d07ae3b6a48d90a9e23f88392d 03-Apr-2018 Bo Zhu <bozhu@google.com> Merge "Expose the JNI scrypt function in a standalone Java class so we can use it in RecoverableKeyStore as well" into pi-dev
0f23660488737dfd901365edcc0be9c000ebc5a9 03-Apr-2018 Dmitry Dementyev <dementyev@google.com> Revert "Throw invalid cert exception when deprecated initRecoveryService method"

This reverts commit 50bc7e42d73c9ca8d77dcd538619c6d6eeaf6dea.

Reason for revert: API is still used by old binary

Change-Id: I3c8348211baa26245786abda6360a8df96e2d223
Bug: 77293264
c610677258779173392ee145b1f1f2af6296813e 03-Apr-2018 Gil O'Neil <goneil@google.com> Merge "Made a note that app names may not contain delimiter characters" into pi-dev
cccd67b574c39547195fe06b781cb3bfd8d9d4dd 03-Apr-2018 Remi NGUYEN VAN <reminv@google.com> Merge "Fix network usage stats on 464xlat tethered." into pi-dev
4ccefebb7873f2c00af507c5b830a803bfd53a1e 03-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: fix errorFlag logic" into pi-dev
09856135e35c069bab58e7487ccfc733b9a6811c 01-Apr-2018 Bo Zhu <bozhu@google.com> Expose the JNI scrypt function in a standalone Java class so we can
use it in RecoverableKeyStore as well

Bug: 77325751
Test: It builds. No caller code yet.

Change-Id: I6ff847cff2efbd023612e51fe35be980f27f162d
285797a45a83b20ccdf75a4ca7a762a285e54561 03-Apr-2018 Mihai Popa <popam@google.com> Merge "[Magnifier-38] Avoid deadlock causing ANR" into pi-dev
3cafea070100f5305f8ef0938af28b4b87d71957 03-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Merge "Allow applications to query for foreground/background data usage." into pi-dev
6a5809398a84074eaebbf81b50184451400b5a1f 02-Apr-2018 Ruchi Kandoi <kandoiruchi@google.com> Add an Executor for the onConnectedListener

Test: Run CtsOmapiTestCases
Bug: 76448978
Change-Id: Ieb30b8935961db25bd058e1c41c127fa5a4437ff
0594af6dc37f091d62991a6923fb4eeaf8db61f6 03-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add ROLLBACK past signing cert capability." into pi-dev
886fc6aef0a33d3f9ab7c30b019187609d71facd 02-Apr-2018 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #74404949: Screen state usage API" into pi-dev
629a5f9705368990515ca4754f58f2d4ffb78a1e 31-Mar-2018 Daniel Cashman <dcashman@google.com> Add ROLLBACK past signing cert capability.

Add a new capability that may be granted to past signing certificates
after changing to a new signing certificate that will allow applications
to go back to a previous signing certificate. This capability is
intended to not be granted, but may be added later in the event that
a signing certificate change caused undesirable behavior.

Bug: 73927694
Test: PkgInstallSignatureVerificationTest
Change-Id: I7453a2da00e740a55de45e7b144f308a9bc33772
(cherry picked from commit a1d0cf74f93bc6cdef054e73c9f09f44cc44d501)
3f6b7714a7afd826c2e66d1baf747469145f8d77 02-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't use a copy of window params when showing a dialog." into pi-dev
5d983d2ba930c101072aec11cb328fb498707568 29-Mar-2018 Mihai Popa <popam@google.com> [Magnifier-38] Avoid deadlock causing ANR

A deadlock between the UI and render threads caused by magnifier is
currently making the running app to become not responding. The deadlock
could happen in the following scenario:
1. The UI thread sets a frame callback and asks mRenderer to sync and
draw the current frame. A draw task is enqueued by RenderProxy in the
C++ code
2. The UI thread starts an InternalPopupWindow#destroy() on the UI
thread and acquires mLock
3. mRenderer#destroy() is called on the UI thread, which enqueues a
destroy task in the C++ code. However, this is implemented
synchronously, so the UI thread will wait until the destroy task is
dequeued and executed
4. Since the draw task was enqueued before the destroy task, this will
be executed and the frame callback will be called on the render thread
5. The frame callback tries to acquire mLock. However, this is held by
the UI thread, so the render thread has to wait for it. At the same
time, the UI thread cannot progress either as it is waiting for its
destroy task to execute.

The CL adds a new lock which is used by the UI thread to mark its
intention to #destroy(), such that the render thread will know about
this before trying to acquire mLock and starving.

Bug: 75276625
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Iedf2948350fcf8dd9c819c085b31b7ccaf2db7c5
67d3dfd9681d8a3307e19a947e110ce60d7e25cb 02-Apr-2018 Pavel Maltsev <pavelm@google.com> Add hasUnwantedCapability method

If you put values into the Builder, you should be able to observe
those values on the built object.

Test: atest android.net.cts.NetworkRequestTest

Bug: 74945408
Bug: 72828388
Change-Id: Ib4026b8d7370d570f1b606f0d221d00fed6e787d
38af02e75b6fa3925cf33186212ae867efe8a58b 02-Apr-2018 Andrii Kulian <akulian@google.com> Merge "Don't finish activity on duplicate resume request" into pi-dev
8303baf4d0b1e41f6a4eba41a6c49f4e04157ff7 02-Apr-2018 Sudheer Shanka <sudheersai@google.com> Merge "Update uid state used for bucketizing data in fg vs bg states." into pi-dev
15d403dd6a3b780141530f1f44185256fd3f4aed 29-Mar-2018 Felipe Leme <felipeal@google.com> Don't use a copy of window params when showing a dialog.

When a Dialog's show() method is called, it makes a copy (l) of its window param
and change the copy's softInputMode before calling wm.addView(). This call ends
up calling WindowManagerGlobal.addView(view, l, display, parentWindow),
which in turn sets the application token from the parentWindow into l and stores
l on its mParams map.

Later, when the dialog layout is changed (for example, if it's resized), the
original params ends up passed to WindowManagerGlobal.updateViewLayout(),
which in turn updates it's internal mParams with it, hence losing the
application token (as the token was set in the copy).

Then, when Autofill (and possibly Assist) is triggered to that activity, the
Dialog's view hierarchy is ignored because WindowManagerGlobal.getRootViews()
ignores views whose params do not have an application token.

This CL fixes this issue by passing the original dialog's param to the wm
method and resetting the softInputMode that was changed, rather than making a

Test: atest DialogLauncherActivityTest
Test: manual verification with Twitch

Fixes: 68816440

Change-Id: I55f510ab7a44030bc368221b7db1a221bc2e09c8
151108a2c66dd55663bea9e3f686793418d5f047 30-Mar-2018 Seigo Nonaka <nona@google.com> Make getText hidden and getWidth/getBounds public

This is from advice from API review.
- make getText() hidden
- make getWidth()/getBounds() public.

Bug: 76448719
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text

Change-Id: Ic22a266a932cda60de6d8b37b8bbf5704291b953
7f5670fdcdafd06920edc67b81039395da547fcb 02-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make addUnwantedCapability method public" into pi-dev
ffe1c2a266f5b4f2da93bdf0fadc3f40d74329d0 02-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Restore saveLayer APIs back into the public API." into pi-dev
75525b39f4deb8409825fd43195d5f82628ef3e5 27-Feb-2018 Remi NGUYEN VAN <reminv@google.com> Fix network usage stats on 464xlat tethered.

Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52
84b317cecfa5b849dc7632a3a2fb56568cee18ca 02-Apr-2018 Lorenzo Colitti <lorenzo@google.com> Allow applications to query for foreground/background data usage.

Currently the NetworkStatsManager APIs allow applications to
query for their own data usage by UID and tag, but do not allow
applications to query by foreground/background state.

This is causing popular apps to resort to parsing xt_qtaguid
stats files directly. Because this is no longer allowed for apps
targeting P and above, provide replacement functionality.

This API allows apps to query for data usage for a given state,
but not to receive data usage broken down by state. This is
consistent with how the current UID and tag APIs work. It is also
not an undue burden on apps: there are currently only two states
of interest (FOREGROUND and everything else), and even if we add
states in the future, unmodified apps can still obtain total
traffic using STATE_ALL.

Bug: 72977484
Test: New CTS test added in other change in this topic.
Change-Id: Ic8c9194569ffd599b49e4a8197c5c2ea0ec3f7f7
bf9dfb16be7d58b473cff96a3ab9ac3b2ff33b43 02-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "TextClassifier API updates." into pi-dev
6f5a8db2e93bc358b211f576aa91cf9fdc7a88de 02-Apr-2018 Remi NGUYEN VAN <reminv@google.com> Merge "Add method to NetworkStatsService for UID stats." into pi-dev
138148425cf55d38402ac038e31b0a838d3facfe 02-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fills font metrics before passing to ReplacementSpan" into pi-dev
21306849e6f3dc57385e61a694905e4b12b227d9 02-Apr-2018 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #77230164: Add app op to control foreground services" into pi-dev
4ab18af48a240c0987fb12e71e8d040befe09ade 01-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Magnifier-36] Fix content clamping inside view" into pi-dev
bf0877470423233d19d0935e993178c4746b319c 01-Apr-2018 Dmitry Dementyev <dementyev@google.com> Merge "Throw invalid cert exception when deprecated initRecoveryService method is used." into pi-dev
080c8542b68cf17a0441862c404cb49ce0e86cfe 27-Mar-2018 Abodunrinwa Toki <toki@google.com> TextClassifier API updates.

1. Wraps TC queries in Request objects
2. Adds create/destroyTextClassificationSession system APIs
3. Adds the session Ids to system API calls
4. Change setSignature() to setId() on result objects
5. Plumbing to make the API updates work as things currently work
6. Hide Linkify.addLinksAsync APIs

Bug: 74461129

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Change-Id: I933ada8b37ef9893331a265e3b4fc08e043f1029
6e44808890cac7809555b9ff63ff8e88e644b562 27-Mar-2018 Mihai Popa <popam@google.com> [Magnifier-36] Fix content clamping inside view

We try to never display in the magnifier content that does not belong to
the magnified view. If the magnified view has one or more scrollable
containers, these have to be considered in order to find out the visible
portion of the view which is not masked by scrollable containers.

The previous logic for computing the visible region was wrong when one
of the containers was a ViewPager, whose getScrollX() returns the scroll
relative to all pages, rather than the currently visible one as the
logic was expecting. This CL replaces the old logic with a

Bug: 74359490
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ib6b63a35436aa691f29c13a0789688f23bfca9f1
0b8c82e66078b842c9bf4a0297e90303e5aa4c1a 30-Mar-2018 Bo Zhu <bozhu@google.com> Throw an exception if the given root alias is unknown

Bug: 76433465
Test: runtest frameworks-services -p

Change-Id: I3a213ab0cd3b0e9c002bc44d4ce929977e119e81
e1059d9f5e6c48b386a944e397a32915510b1590 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Renamed KeyFallbackEvent to UnhandledKeyEvent and exposed dispatch" into pi-dev
50bc7e42d73c9ca8d77dcd538619c6d6eeaf6dea 31-Mar-2018 Dmitry Dementyev <dementyev@google.com> Throw invalid cert exception when deprecated initRecoveryService method
is used.

Throw unsupported operation exception when older version of RecoveryController is used.

Bug: 77293264
Test: atest RecoveryControllerHostTest
Change-Id: I0003104a4305444fac0092f4f6929545cf7c9413
703f31db6356c1d26129786d8bc7aba06e5c5e37 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add subtype for layout direction to Slice" into pi-dev
374f6a26f903d65b10c5ade608c1a7b8fdba168c 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fingerprint user canceled message should not be delayed" into pi-dev
8b60ebc6a69cf28cfdc3a0dcc4ce15031a0b7b38 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expose e.getMessage() from the exceptions in RecoverableKeyStore" into pi-dev
3378aa9f88101d77bc52c1a00b257c752bd8c193 31-Mar-2018 Dianne Hackborn <hackbod@google.com> Work on issue #74404949: Screen state usage API

Add events for the keyguard being shown and hidden.

Bug: 74404949
Test: atest CtsUsageStatsTestCases:UsageStatsTest\#testInteractiveEvents
Change-Id: I038e03cf4ba80669d7d17c3d66b98ee81050abc8
a6d6a5aa799b02682820e8be0f1210cf5d53c6df 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adding LauncherApps apis for suspended packages" into pi-dev
35201a6af29d3bbb3404ce63eda96d4969ea836f 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add some methods to manage slice permissios" into pi-dev
d05c00fbb6f1a93a4c76374402f849ea4cf4bd30 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Require signing cert history certs to be unique." into pi-dev
c230125cd27b1e0848e91ae510cf38f828ac6985 27-Mar-2018 Ruchi Kandoi <kandoiruchi@google.com> Make OMAPI stricter

- Channel implements java.nio.Channels.Channel.
- openBasicChannel(aid) and openLogicalChannel(aid) is added back.
- Add finalizers for the classes.
- SecureElementListener -> onConnectedListener

Bug: 76448978
Test: CtsOmapiTestCases
Change-Id: I7f92c4dcb5c08a72d32ac9440872ab853badec1d
(cherry picked from commit f0082409b56ea9c5e2b0839c87ee37db26789b59)
c50aded51d02477b29cdfff269e96ed91928eab1 31-Mar-2018 Kevin Chyn <kchyn@google.com> Fingerprint user canceled message should not be delayed

The user canceled message is different than the other fingerprint errors
since it is caused by the user explicitly tapping on the UI at which
point the dialog will be already dismissing/dismissed. So the error
should be sent immediately to the application.

Test: manual test with FingerprintDialog, modified to show when the
error messages are received

Change-Id: Ia2a3b0a7ac9c8cfcbd6055045a95fc06aa02c61a
Fixes: 77337939
35147b2dae7dbf19a670b86aede67a41c60d37b5 31-Mar-2018 Benedict Wong <benedictwong@google.com> Merge "Disallow Reserved SPI Allocation" into pi-dev
209af08eca265eb2af741bd2fa807802636ec570 30-Mar-2018 Mady Mellor <madym@google.com> Add subtype for layout direction to Slice

Test: make
Bug: 73123366
Change-Id: I1446dadd8a50e7682d640aa55a7d4a20faf52416
4d0a5fd7e77ee9bd19ee365efd215851b2f1b863 30-Mar-2018 Evan Rosky <erosky@google.com> Merge "Restored focusableViewAvailable logic on visibility change" into pi-dev
19b41f34a5cb29c621848e352220017b46cf66f1 27-Mar-2018 Suprabh Shukla <suprabh@google.com> Adding LauncherApps apis for suspended packages

The suspending app can provide a Bundle of information to be used by the
launcher for handling suspended packages. Added APIs:
- getSuspendedPackageLauncherExtras(String, UserHandle): To retrieve
the launcher extras for the given package and user.
- Callback#onPackagesSuspended(String[], UserHandle, Bundle): A
callback that will be invoked with the package names and the launcher
extras whenever sent packages are suspended.

Test: atest com.android.server.pm.SuspendPackagesTest

Bug: 76119578
Change-Id: I505d134809639a57c3314f994af34d576d905e74
36f2d8a4e1247b4556d10691eb8e40b26122f92c 30-Mar-2018 Benedict Wong <benedictwong@google.com> Merge changes from topic "encap-api" into pi-dev

* changes:
Require explicitly supplied truncation length
Clarify UDP encapsulation socket API
41d2dd2f266eb8dc50afcda253f04f1c7e9ccc0e 30-Mar-2018 Bo Zhu <bozhu@google.com> Expose e.getMessage() from the exceptions in RecoverableKeyStore

Bug: 77327780
Test: runtest frameworks-services -p \

Change-Id: Ibf04d6405e6468bfdfef0a8cb8e6e96bffbbf3a2
e9d9b4b9a27f419fbd6096698f692b474939cb48 28-Mar-2018 Dianne Hackborn <hackbod@google.com> Fix issue #77230164: Add app op to control foreground services

New app op added.

Bug: 77230164
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest\#testForegroundServiceAppOp
Change-Id: I59f2f03850da4b9f5550e82ba28f175e4779e783
4807ae257b930bec1b485882dfb18329f7ca07af 23-Mar-2018 Evan Rosky <erosky@google.com> Renamed KeyFallbackEvent to UnhandledKeyEvent and exposed dispatch

This new naming clashes less with the existing notion of FLAG_FALLBACK
in KeyEvents.

Bug: 72562800
Test: ViewTest#testUnhandledKeys
Change-Id: Ibd713860601e62d955443fe6811fd974b5bb0092
0903665f97435d27a893d45927e4a019008cadd6 30-Mar-2018 Seigo Nonaka <nona@google.com> Fills font metrics before passing to ReplacementSpan

Bug: 74518333
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
Change-Id: Ifbc8625882919e6498a2758433e80f059a797fd4

Change-Id: I6181fd712aae38e0bba702374e01a40ee3b522dd
4ced90cb12c915db0cac0bbea25a1b8a43d93164 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add auto-grant permission slice API" into pi-dev
01a0288ca1e38e82556ff65ad379b01179c2b7d1 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix fs-verity per fs-verity spec change" into pi-dev
2d4f01ba7f544f1bd772239a0f19946b01ed98d9 29-Mar-2018 Derek Sollenberger <djsollen@google.com> Restore saveLayer APIs back into the public API.

The saveLayer APIs are restored from @removed but will treat input
as ALL_SAVE_FLAGS and generate exceptions on newer API levels.

We internally used these calls in one situation that now use a
different @hide API to support the previous behavior until we
refactor that code.

Partial revert of "Remove deprecated android.graphics.Canvas APIs"
This reverts commit 7b837616ae88cbdaf12600cee23b5188e5531937.

Bug: 77276963
Bug: 73777445
Test: CtsGraphicsTestCases
Change-Id: I7acd4ffd5ac41a58d2be8b48cf50119c2b896708
71888552d8101140ce50b085a9b0897bce377e7f 30-Mar-2018 Jason Monk <jmonk@google.com> Add some methods to manage slice permissios

Test: update-api
Bug: 77323760
Change-Id: I72284957c7dfc3bcf12bb24a6be4902762e95fed
f557c3b56547de332b1f116f316b3a81dabd230d 16-Mar-2018 Winson Chung <winsonc@google.com> Allow recents animation to override divider minimized state

- When swiping up while in split-screen, the animation should be able to
adjust the docked divider minimized state so that we don't wait until
launcher is repositioned to the front in order for the divider to

Bug: 73118672
Test: Enter split screen, swipe up and ensure the dock divider moves
(Note, there are still unrelated clipping issues)

Change-Id: Id71f91eaf2f06b3c33628a2199cc94c82e235471
6a38fca2d81e5d5bc0343c57e4db3629c3a9a619 29-Mar-2018 Winson Chung <winsonc@google.com> Prevent unnecessary reordering of the home stack

- Just cancel the recents animation in-place when handling the home button
to prevent it from being repositioned to the bottom (which stops home)
and then starting it again (which restarts it)

Bug: 74405472
Test: Press home from an app, ensure launcher stop is only called once
Change-Id: Id41aa2f77c01767cc2c35445458b8f2db81200fc
7790a2f2d1b5d7bd25b182fd58047a2a2bda5caf 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add more AppComponentFactory docs" into pi-dev
912853be102cc854f77d25f0946f4e6435b100b9 30-Mar-2018 Dmitry Dementyev <dementyev@google.com> Merge "Remove deprecated generateAndStoreKey method implementation" into pi-dev
8982a81f3c63a9e08c693e503d75db46ce9c19eb 30-Mar-2018 Pavel Maltsev <pavelm@google.com> Merge "Add OEM_PAID capability to system api" into pi-dev
e6b1a7804d962d06263329792b8b65050ad45d91 30-Mar-2018 Jeff Sharkey <jsharkey@google.com> Merge "API council requested tweaks to NetworkRequest." into pi-dev
42e03f87565ed950cc1d82bb405d79ad65273d69 30-Mar-2018 Jason Monk <jmonk@google.com> Add auto-grant permission slice API

Test: slice manager tests
Bug: 77313888
Change-Id: I21e9200c5c8cd7ff812d3f5eac997a704a9b86a2
10d19e98081bec0e2ee5274f2c46d02d036ce89f 29-Mar-2018 Daniel Cashman <dcashman@google.com> Require signing cert history certs to be unique.

Bug: 73943012
Test: android.appsecurity.cts.PkgInstallSignatureVerificationTest
Change-Id: Id7e91c60f1619ef793d73a9dd736debf7ad2ae0c
(cherry picked from commit ef05408bcdcb32d005f91ca295a1e514845a58f4)
ea3377b4d47cf590548428df230b713231793ea6 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Slices: Fix up some formatting and add examples" into pi-dev
cd21f1c5c2d0145ec48c727c13e07377b4b22312 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make battery saver suggestion configurable" into pi-dev
0186b42f2ae7e2c7b3e88043c2d1cb255f09514e 30-Mar-2018 Brian Young <bcyoung@google.com> Merge changes from topics "niap-asym-write-pi-dev", "niap-asym-write-api-pi-dev" into pi-dev

* changes:
Restore "Add "Unlocked device required" parameter to keys"
Add "Unlocked device required" key API
c138696489e2e3657e0b80b17cb691b4bbf038ac 28-Mar-2018 Jason Monk <jmonk@google.com> Add more AppComponentFactory docs

Test: TH
Change-Id: I9978d182433a71a04d019304ebe59bd7de8bfeae
Fixes: 74408467
69196f6fadf2445c2b9c06c17162d0cd3dfaeb5a 30-Mar-2018 Rubin Xu <rubinxu@google.com> Merge "Remove password blacklist API" into pi-dev
df3788dcd8c9ca0858c884b6f8f1166eeb9761f5 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't exit dnd rule for old alarms" into pi-dev
d490937854d06e29d9214fc030b18b192ce946dd 30-Mar-2018 Robert Berry <robertberry@google.com> Merge "Update RecoveryController JavaDoc" into pi-dev
93f38d7b3a5bda2bd9bcc7def67936370b40e306 29-Mar-2018 Robert Berry <robertberry@google.com> Update RecoveryController JavaDoc

Try to encode as many requirements as possible into the Recovery Agent

Bug: 70900575
Test: None, it is documentation
Change-Id: Iae05be24fa29d885f560943f256fd8d7ca692cf7
b6a920124f28422877f59bfb32719099a0067d76 05-Mar-2018 Remi NGUYEN VAN <reminv@google.com> Add method to NetworkStatsService for UID stats.

Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.

Test: runtest frameworks-net, CTS tests pass.
Bug: b/72107146
Merged-In: I31c5b9b4a7c6e72910152415894a137f000a5858
Merged-In: I2527d95000c7500c824ede70f87ecb38e21ed323
(cherry picked from aosp 088ff6824f13145ea52207bdead0d7e454a6f3ce)

Change-Id: Ie80f1bb21124241f3414f9be77aceac9a44ec6d1
9c1597bff7322da30432ef9a044de6a376fca6fa 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix socket leaks in various android.net.Network methods." into pi-dev
0f8c8bb01a9454d788bfc447fdf82b45cbd4fae7 28-Mar-2018 Nathan Harold <nharold@google.com> Disallow Reserved SPI Allocation

Disallow the allocation of SPIs in the range
reserved for future use by RFC 4303.

Bug: 77205120
Test: runtest frameworks-net
Merged-In: I05e26ed34b5871f1a07d5bd7b58b79a64cd74b67
Change-Id: I05e26ed34b5871f1a07d5bd7b58b79a64cd74b67
(cherry picked from commit 7f606ee8e57d9d8b7c5d0cb2a78421aa02efb385)
1a8d1a51cfada41f10dbcffb4b0840a48773ca4b 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Clarify documentation for getActiveNetworkInfo and friends" into pi-dev
bd2c0fa813105b94a18dda76fb81e8d8e9b96a1c 30-Mar-2018 Remi NGUYEN VAN <reminv@google.com> Merge "Allow null subscriberId in NetworkStatsManager." into pi-dev
bfa67c81bf88b842fdb63b63b0cfd96e021f82af 28-Mar-2018 Benedict Wong <benedictwong@google.com> Require explicitly supplied truncation length

Instead of providing default truncation lengths (based on RFC or
otherwise), this change imposes a restriction that the truncation length
must be supplied for all auth or aead algorithms.

Bug: 77204048
Test: Updated tests, ran on walleye
Merged-In: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
Change-Id: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
(cherry picked from commit bb7f2820f5bcccf8618078c2cbe4ea9836797e3b)
6ea93c4bcaf5c2c8489695308e77b659b70b64d4 28-Mar-2018 Benedict Wong <benedictwong@google.com> Clarify UDP encapsulation socket API

This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.

Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Merged-In: I0afebd432c5d04c47c93daa1ce616d712aa323d7
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7
(cherry picked from commit 4c987ebade580d4abc8a3d549e0df90baab33140)
86f5bb1a8cfe2d169767fb723d315955dda3a0e6 28-Mar-2018 Dmitry Dementyev <dementyev@google.com> Remove deprecated generateAndStoreKey method implementation

Bug: 77156834
Test: GTS, apct.
Change-Id: I23791fced21308467afc60cc16efc4aee7074134
5a041d1a24f8a8e2de20f909f605e8e87b766b54 29-Mar-2018 Chalard Jean <jchalard@google.com> Clarify documentation for getActiveNetworkInfo and friends

For VPNs it's unobvious what these methods do, so document that.

Bug: 70917007
Test: Comment changes only. Checkdoc passes.
Change-Id: I31ec1aea356d88d969eaf9fc7d8c2ed13ce924eb
786b7ad2604709b63dac4675a0477b58c7532068 05-Mar-2018 Remi NGUYEN VAN <reminv@google.com> Allow null subscriberId in NetworkStatsManager.

Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I8296220472a9ba37044dd1a5ede9bdb45d3ed339
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
Merged-In: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
Merged-In: Ia84d2c7cc63bf8b8bf30f133e0382fd7103bf490
(cherry-picked from aosp I4b39e7031416cb33b23d89aa36ff0f774eaa942f)
c0b767a93717ed9b51cf2beae105785445718fec 30-Mar-2018 Lorenzo Colitti <lorenzo@google.com> Merge "Add Network.fromNetworkHandle()" into pi-dev
929ce0086a03fa13af0c7f4e323c065fd467c629 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AppStandby exemption: sync requested by FG apps" into pi-dev
dedc5d71413432b334dc97bc6d49d898f9eeed9f 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Return PERMISSION_DENIED instead of NPE when missing ActivityManager" into pi-dev
986fae20eafc3b36e5f827d70edb3863cb4817d0 30-Mar-2018 goneil <goneil@google.com> Made a note that app names may not contain delimiter characters

This includes ":" and ";"

Bug: 77241786
Test: None
Change-Id: Iabbfa7770e599d1fcd6ff76a55358d5e71e03a2b
68256e09d907df071a8d83d7c6221a091ca81f26 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I3e542532,Id8f2147f into pi-dev

* changes:
Update notification blocking documentation.
Wait before computing contact affinity
3cda0f298934526d95e8ed1f2d10610febdf5015 30-Mar-2018 Bo Zhu <bozhu@google.com> Merge "Minor correction to the javadoc to match implementation" into pi-dev
dab50eecfd1ba6ecf954d379acaaaaaf1d726fc2 30-Mar-2018 Benedict Wong <benedictwong@google.com> Merge "Add documentation for TCP interactions with transforms" into pi-dev
d9e2acba96ed59c40de15b37e813e1369d9e5169 30-Mar-2018 Andrii Kulian <akulian@google.com> Don't finish activity on duplicate resume request

With ActivityLifecycler infrastructure duplicate resume situations
are limited to double-relaunch scenario and there shouldn't be any
incorrect resume requests. This means that there shouldn't be any
reasons to finish activity when trying to resume it.

Bug: 77240441
Test: android.app.activity.ActivityThreadTest
Change-Id: I70a3fcbff72954ff673b2020be3134be367cd823
ba94b9ab002758a19e016f7c06f003def5b61ad4 30-Mar-2018 Bo Zhu <bozhu@google.com> Minor correction to the javadoc to match implementation

Change the number of bytes for the length prefix for salted hash to be
4-byte instead of 1-byte

Bug: 77294103
Test: None
Change-Id: Ifa2739c757539e9b7d2aaa1ea702de0148a311ba
e21576fd28d2d99ceff304650d678fadafa804f8 30-Mar-2018 Erik Wolsheimer <ewol@google.com> Return PERMISSION_DENIED instead of NPE when missing ActivityManager

Bug: 75005160
Change-Id: I710c5ee9f3d679240bf708102ef508041d0a3122
ee1661f7cdf912f492023a75afa5178cde4a69ec 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Handle public volumes and otherwise invalid UUIDs." into pi-dev
2d3e4b743713ea4c5fbe321a3f5bd225d35aba65 30-Mar-2018 Dmitry Dementyev <dementyev@google.com> Merge "Add support for testing mode root certificate." into pi-dev
46e83ebf27a73fb6d3eb520ae605ae374dc840d5 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Minor javadoc fixes." into pi-dev
04446f9f68b904f13eac0a161ddea97f6a42912f 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow PO to call setSystemSetting." into pi-dev
3708933872cabb63f0a3042fe611cbb36d435b21 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Magnifier-37] Hide handle when overlaps magnifier" into pi-dev
2254fe2e04fe2d06fd8ea43b2f8ca3b8ed56cec9 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only return internal path when not visible." into pi-dev
369dd4257ca7928ca525ff1e1391fe985bee113b 30-Mar-2018 Beverly <beverlyt@google.com> Don't exit dnd rule for old alarms

Bug: 77209521
Test: atest ScheduleCalendarTest
Change-Id: I394a6a74872f76f90b75238593197bb6c50531ef
75ad2496ebd8162771687510dfe40b5316cb38bc 28-Mar-2018 Makoto Onuki <omakoto@google.com> AppStandby exemption: sync requested by FG apps

Bug: 72443754
Fix: 72443754

Test: atest ${ANDROID_BUILD_TOP}/frameworks/base/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
Test: Manual test with contacts sync:

Precondition: Put the contacts sync in RARE bucket.

adb shell dumpsys deviceidle tempwhitelist -r com.google.android.syncadapters.contacts
adb shell am make-uid-idle com.google.android.syncadapters.contacts
adb shell am set-standby-bucket com.google.android.syncadapters.contacts 40

Test 1: Toggle contacts sync from the Settings -> Account

- Make sure a sync happens.

Test 2: Mutate a contact on the WEB

- Sync is scheduled, but won't run because it has no network access.
- am set-standby-bucket com.google.android.syncadapters.contacts 30
- Sync run runs.

Test 3. adb shell requestsync -n ACCOUNT -t com.google -a com.android.contacts

- Sync is scheduled but won't run.

Test 4. adb shell requestsync -n ACCOUNT -t com.google -a com.android.contacts -f

- Sync is scheduled but it still won't run.

Test 5. adb shell requestsync -n ACCOUNT -t com.google -a com.android.contacts -F

- Sync now runs

Change-Id: I1eb972ed321d2a1a782ae23ccb806671926d3e6b
74896e21a7782ca63d09c570d42999d6cc8859ab 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed annotation typo." into pi-dev
92006c1764a79728c6f43ce6a30ab5a482167cbd 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add permission hint, update permission slice structure" into pi-dev
57ca3da24f26164104aecbcebf345cfcfac17a66 28-Mar-2018 Dmitry Dementyev <dementyev@google.com> Add support for testing mode root certificate.

1) Add Certificate
2) Helper class for end-to-end tests
3) Only create snapshot for passwords with special prefix in test mode
4) Sync only keys with insecure prefix in test mode.

Bug: 76433465
Test: adb shell am instrument -w -e package

Change-Id: I6edc8c4716c3a034b6b79c7aa6f4b8478e9a3c9e
adaf68cd627e6d8447c061ead91bd5ad95013f91 27-Mar-2018 Eran Messeri <eranm@google.com> Device ID attestation: Add feature flag.

Add a feature flag to find out if Device ID attestation is supported or
not, as it is an optional feature.
Otherwise, the cts tests could not meaningfully say if the device
correctly supports this feature or not.

Bug: 72642093
Bug: 73448533
Test: Modified CTS tests.
Change-Id: Ia6ba47a5262412ab24afa700d1b891be10a21df9
49c27f2267b3742a2f1b59cd23b94dbbfa42295e 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a SystemApi to control display saturation." into pi-dev
8d2b053611fe4a52602c125bf1f577c12083848a 29-Mar-2018 Julia Reynolds <juliacr@google.com> Update notification blocking documentation.

Change-Id: I3e5425321d127fbf11adfa1c4ac5bed53fc73e03
Fixes: 73750866
Test: make
18f325012d1c807f2b0a9c577868722cc5fe4252 29-Mar-2018 Jeff Sharkey <jsharkey@android.com> Handle public volumes and otherwise invalid UUIDs.

Public volumes have short UUIDs (which aren't valid 128-bit UUIDs),
so we can't pass them around. Even if they were valid UUIDs, we
don't handle clearing cached data on them, and they most likely
don't support fallocate(), so don't match them.

Test: manual
Bug: 74132243
Change-Id: Ib855eb869a86392e96ced94a9926c0b32b87e57e
7a33063b39c0a48e57d7146adfc4640a8944adec 29-Mar-2018 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Fix empty program list filter handling." into pi-dev
c0281f10f5e79243abd087bb664054ac6ad6370b 28-Mar-2018 yuemingw <yuemingw@google.com> Allow PO to call setSystemSetting.

As system setting is per user, we should allow PO to call it.

Bug: 77204777
Test: runtest -x services/tests/servicestests/src/

Change-Id: I84152fa04adb441955b48b676be6e792134b52c2
18bbed586595cd6bb4c77d5edac03316bb3a5645 29-Mar-2018 Jeff Sharkey <jsharkey@android.com> Only return internal path when not visible.

When a volume is visible (wrapped in sdcardfs), we need all file
operations to go through that sdcardfs layer to keep it in sync.

Test: manual
Bug: 73922090
Change-Id: I14f1f4743f470a6cbc78030e1ea8411f9910a5b9
b1b423a46f187c978ba7d7b7572890ea8e75ba56 27-Mar-2018 Mihai Popa <popam@google.com> [Magnifier-37] Hide handle when overlaps magnifier

In most cases, the magnifier will be displayed above the current line,
so it will not overlap with the handle being dragged. However, when
there is not enough space in the current surface for the magnifier to be
displayed above the current line, the handle can overlap with the
magnifier. Since the handle is implemented as a different window, we
cannot really control the z ordering between them, and we noticed that
the handle will be rendered over the magnifier, which looks bad. This CL
better handles this situation, by hiding the handle when it would
overlap with the magnifier.

Bug: 76459199
Test: manual testing
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Test: atest FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Id5a17fd964360df6094f9e2680e5bcca886c4d2d
8ce43a5e701de4ddb2f1e281b946d5ea96711d06 29-Mar-2018 Felipe Leme <felipeal@google.com> Minor javadoc fixes.

Test: echo 'In TH we trust!'
Bug: 74830976

Change-Id: Ib88fc0b0275e87ea31d22759507b4c29c7849c05
3a021b3762a7ddeb365a0a660a88f4187497ffb6 29-Mar-2018 Rubin Xu <rubinxu@google.com> Remove password blacklist API

Bug: 73750934
Test: compiles
Change-Id: I4a73ea47285b7d0be06f84d45a5166a6642c29cf
7cdba9fcf0089075d6f932fee50d647a440621ba 29-Mar-2018 Felipe Leme <felipeal@google.com> Fixed annotation typo.

Bug: 73648631
Test: not really

Change-Id: I4a10642f05e28e5e324ca5b40e50a29138f49b8b
50ac4d2c60fab6e5c99459ba7c88e694777df0af 29-Mar-2018 Jeff Sharkey <jsharkey@google.com> Merge "Switch reference time to ZonedDateTime" into pi-dev
d0c78f9f28599ac97dbca06c1634238f9b25be40 29-Mar-2018 Tomasz Wasilczyk <twasilczyk@google.com> Fix empty program list filter handling.

Also, fix some minor issues about program list fetching.

Test: manual
Bug: 74353024
Change-Id: I77546b806f2d9de9505e64335af47e99079cea3e
7516514148bd182b29c4b171888567bac9f67b66 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Improved documentation of AutofillFieldClassificationService.onGetScores()" into pi-dev
462e29da9ba854eb3651dd9664b09a2852a05141 22-Mar-2018 Bryan Mawhinney <bryanmawhinney@google.com> Add a SystemApi to control display saturation.

Allows an app with the appropriate permission to reduce
(make more gray) the saturation of colors on the display.

Test: manual
Bug: 77189882
Change-Id: I2b7b065d07bd2ca24730b2e8c52d161c22b307ab
64faa5b60febaa8cf96202f09d100851c6c8bd67 29-Mar-2018 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Indicate whether BandConfig initialization is required or not." into pi-dev
f3faf62adcac557b6fb9042f3b39954691cf8eb3 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Root (uid=0) should be core. Fix UserHandle.isCore()." into pi-dev
925a04b775d6b39b9beaf0ba67b4e9fca7fb7f17 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix StatsCompanionService pull on bucket ends" into pi-dev
a1652cfcce547183a426cc710691c740b2e46aa7 29-Mar-2018 Jan Althaus <jalt@google.com> Switch reference time to ZonedDateTime

Bug: 74838195
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Change-Id: I0df9dddf415fa558435553336a8a0a15621e9b05
c8156c6a524dcb5c3c40e744dd9eccc73fafb80d 29-Mar-2018 Jeff Sharkey <jsharkey@google.com> Merge "API for granting/revoking runtime permissions." into pi-dev
e5f9e833e5c8860ad7c07ee7808dedc7c1ab8ae9 29-Mar-2018 Eran Messeri <eranm@google.com> Merge "DPM: API review for installKeyPair" into pi-dev
27926edc3b737823bd6bc3146b6e73a69f8dfe3a 27-Mar-2018 Tomasz Wasilczyk <twasilczyk@google.com> Indicate whether BandConfig initialization is required or not.

The broadcastradio HAL 1.x requires waiting for onConfigChanged callback
to indicate the initialization is done, while HAL 2.0 does not have the
config setting (at the tuner session level) at all.

This change makes it possible to cleanly workaround race condition in the
radio app retaining support for both HAL revisions. Future versions of the
RadioManager will provide a method to open a session without taking care
about these nuances.

Bug: 74353024
Test: manual
Change-Id: I5de2d5e5c33626fcf0cfbbaf121d0b13e53d0bae
8e07a26233aed4fa6b788724ac5538a1ee95472a 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Utilize verbose KeyChain errors" into pi-dev
bb0bcc4460c5a1de4ace272f009f92a1337022ff 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Clear app data before full restore for specified packages" into pi-dev
89bb993293f0d7a524d1404184a55584b59bb67c 29-Mar-2018 Paul Jensen <pauljensen@google.com> Fix socket leaks in various android.net.Network methods.

Bug: 72124526
Test: make CtsNetTestCases
Change-Id: I3398b67272360f894e01a8cdfbc47b17d77c2330
4af1781776f304c848e1a0ece34a0f5f3b5780ff 28-Mar-2018 Paul Jensen <pauljensen@google.com> Add Network.fromNetworkHandle()

This is the counterpart to Network.getNetworkHandle() and facilitates
native code calling back to Java with network handle values from

Bug: 77210159
Bug: 64148938
Test: make CtsNetTestCases

Change-Id: I032b959d84180c063a79ddd97c35e7384b0f50a1
5b53875fdc24c041d198838bce294aa6e631b2e2 27-Mar-2018 Artem Iglikov <artikz@google.com> Clear app data before full restore for specified packages

In some cases (deferred restore) the app data needs to be cleared even
if the app has implemented backup agent. As a quick fix introduce
transport can fill prior to restore.

Bug: 69069240
Test: adb shell settings put secure packages_to_clear_data_before_full_restore com.google.android.apps.nexuslauncher && adb shell bmgr restore com.google.android.apps.nexuslauncher
Change-Id: I2a4651365d9cf4747f32d2ba69312f54cd03d118
6169239b942fc2f6e8721b219f84b506c106fbe1 26-Mar-2018 Eran Messeri <eranm@google.com> Utilize verbose KeyChain errors

As KeyChain reports detailed error codes about failure to generate keys
or attestation records for them, log these detailed errors and throw an
exception if the hardware does not support Device ID attestation.

Bug: 72642093
Bug: 73448533
Test: cts-tradefed run commandAndExit cts-dev -s -a x86_64 -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement -l DEBUG
Change-Id: Ib12efcf48c158373e1fc28cc51d67e70282d029e
52c15f1699e60c0701cc21a69847a005efe87bc9 29-Mar-2018 Robert Berry <robertberry@google.com> Add warning comment about serialization

As it's important we do not break serialization of KeyChainSnapshot
(as it could fail in weird and mysterious ways if we did), add
comments warning anybody editing those files to also update the
serializer and deserializer, as well as appropriate tests.

Test: none, just adding comments
Bug: 73921897
Change-Id: If73162b8fb2a0b44fd954b72c9030cd9e042282b
f15d4f4dc5de372f10ce530f3d1ce3cb0355ebbe 23-Mar-2018 Eran Messeri <eranm@google.com> DPM: API review for installKeyPair

Per API council review, make installKeyPair take a single, integer flags
argument rather than two boolean ones.

Bug: 71818124
Test: cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement -l DEBUG
Change-Id: Ia04f8d617ae0d1db028bd9bcef3a4bf486449468
3a5dabbb10861a5cea627936c56693550345b9a8 29-Mar-2018 Benjamin Franz <bfranz@google.com> Merge "Update to lock task features API" into pi-dev
78931a0f95a9406029eda9f438321d8087206966 29-Mar-2018 Eric Sandness <sandness@google.com> Merge "Permission Check For DPM Get IME API" into pi-dev
1a0a941c20eb746868d0de52e3806f69c74d335f 28-Mar-2018 Chenjie Yu <cjyu@google.com> Fix StatsCompanionService pull on bucket ends

+ change StatsPullerManager internal time units to be consistent
+ use series of alarms for pullers, instead of use setRepeating

Bug: 76223345
Bug: 75970648
Test: cts test
Change-Id: I9e6ac0ce06541f5ceabd2a8fa444e13d40e36983
fe930f2023f8f69ffb481c88c81967396e9ce2dd 29-Mar-2018 Mathew Inwood <mathewi@google.com> Merge "Configurable hidden API exemptions." into pi-dev
50c069e489068cb7f70145303352141016e19017 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fallback to ML prediction after short ACTIVE states" into pi-dev
37594c892de575cfbfe02db23088a7f4c22c22e3 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add slice pinning to list of reasons for usage" into pi-dev
4f52f3fd522093d555a6962bccea6f052ac51a06 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Bluetooth HIDD: Remove unplug()" into pi-dev
cfa0f19fa1839a91fc33d66a10a89262f1a02a85 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Properly filter alert window notifications" into pi-dev
33c5a847079ba1b33f03ab1f1901b0e9f45c4659 20-Mar-2018 Mady Mellor <madym@google.com> Add permission hint, update permission slice structure

Test: atest cts/tests/tests/slices
Bug: 75500766
Change-Id: Ic26dbaa121a3745174a6e21171f35abad69c61de
b0558905c5a842f292fbf860ae6a6c2cbb9f6ddd 29-Mar-2018 Ricky Wai <rickywai@google.com> Merge "Add adb command to force generate network watchlist report for testing" into pi-dev
822dfea6ca80fbb206798cccaca292d7c9bcc5a1 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix keywords hint and add some hints and a subtype to Slice" into pi-dev
cbc3ccec61814d911f9730fd63c32a87b126eb55 29-Mar-2018 Makoto Onuki <omakoto@google.com> Root (uid=0) should be core. Fix UserHandle.isCore().

Bug: 77240427
Change-Id: I057e8f50370fb1cd74ff2ebdab41990a682cec6f
Fix: 77240427
Test: build & boot
Test: "am set-standby-bucket com.google.android.apps.docs 40" will override ACTIVE
d993dcfe13866d5e7bf4f957d64830bfe9b1c823 11-Feb-2018 Sudheer Shanka <sudheersai@google.com> Update uid state used for bucketizing data in fg vs bg states.

decide whether to allow network access for an uid or not but
PROCESS_STATE_TOP is used for bucketizing data in fg vs bg states.
It's possible that even though user restricts background data uasge
for an app, the bg data usage amount displayed to the user is > 0.
As this could be confusing, use PROCESS_STATE_BOUND_FOREGROUND_SERVICE
for bucketizing in fg vs bg states too.

Bug: 63907204
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Test: manual
Change-Id: Ib506e421043fbe1052b6d0068ebf01d288faba21
4b410fa9f9a2f5a6ce3dc5cc6547a2b25fa49e0c 28-Mar-2018 Hansong Zhang <hsz@google.com> Bluetooth HIDD: Remove unplug()

Remove the hidden unplug() API because it is not used and it can cause
the remote device to be unpaired. System apps should use unbond() and
user apps should not use reflection to invoke it.

Bug: 67866553
Test: SL4A
Change-Id: I1bdc06dbb5460c9fd52230b78cbf9434a4349d24
(cherry picked from commit dbc6d14f6ec399e63cee29adbe01fffcb166500f)
631f55ba540651744d6e9856fac70d77b50dfefa 29-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Change MeteredDataDisabled function names for clarity" into pi-dev
312c1c2b5fb3864c288133834ff691d576340a60 29-Mar-2018 Pavel Maltsev <pavelm@google.com> Make addUnwantedCapability method public

Allow apps to specify a list of capabilities that network must not have
in order to satisfy the request.

Bug: 72828388
Test: m -j
Change-Id: I91ee54963f7b92899c7a107b3a450b268c62fd8d
9a2d959eff3bb321fa91f19cbcf5d46c186ac484 29-Mar-2018 Joshua Baxter <jbax@google.com> Merge "docs: fixed a couple of typos" into oc-mr1-dev
am: 651ffd426c

Change-Id: Ie6fb97aae76637023657d751f6ad0ebbc74ff284
651ffd426c6d9cb8ffb9dc638b7bca77bea77a7d 28-Mar-2018 Joshua Baxter <jbax@google.com> Merge "docs: fixed a couple of typos" into oc-mr1-dev
20d30e522654d26a30b2afc3a03410e9bc0219ce 28-Mar-2018 Felipe Leme <felipeal@google.com> Improved documentation of AutofillFieldClassificationService.onGetScores()

Test: echo 'In TH we trust!'

Fixes: 74830976

Change-Id: Ia1c002fa3b340810789b9cca9d7c4b71ea083230
362b3522d1d4fef8f277eb13f600a47cfa7d1835 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "fix SliceMetrics typo and disambiguate logTouch" into pi-dev
88f8de612ddc5d975710a0e169bf0cf3ffd1998e 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add autobackup XML support for test BackupTransport flag" into pi-dev
889b21d1810ddc99c697d863dc2ac0bf0d1dce37 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Add MONOCHROME camera capability" into pi-dev
119d10deb9605502df829becc14d2a0d57a2a50a 28-Mar-2018 Abodunrinwa Toki <toki@google.com> Merge "Implement Stateful TextClassifier APIs." into pi-dev
3154dcf94a4f451d2b32607b30cdd070e61bd2ae 28-Mar-2018 Amith Yamasani <yamasani@google.com> Fallback to ML prediction after short ACTIVE states

When an app is temporarily elevated to ACTIVE state for some
reason, keep track of the last predicted bucket and drop back
to that if the ACTIVE state ends.

Also keep track of prediction during a forced ACTIVE state, even
if it's not applied right away.

Bug: 77158823
Test: atest AppStandbyControllerTests
Change-Id: Ic6de6c24bb25c5392ac5b41a2c05889d94f23436
3c7de110cc6b719d985eb2ba799b7329720a539f 28-Mar-2018 Julia Reynolds <juliacr@google.com> Properly filter alert window notifications

Test: atest SystemUITests
Change-Id: Ie07ffeb7a96469d985261c9a1edb1d7ce82af5c5
Fixes: 77162311
dedfd8fec770b0c82bfee639a2832c8419aa757f 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Convert compilation reason and filter to int-enum before logging" into pi-dev
d778da33d91956f3eb44bb3a6e8bd7570d088315 28-Mar-2018 Jeff Sharkey <jsharkey@android.com> API council requested tweaks to NetworkRequest.

If you put values into the Builder, you should be able to observe
those values on the built object.

Test: atest android.net.cts.NetworkRequestTest
Bug: 74945408
Change-Id: I9aacceb82c98f7881f0eb5e1106d89d469b816a7
13c4b14e922fc25e547942d37f29824f34041d60 28-Mar-2018 Jorim Jaggi <jjaggi@google.com> Merge "Add different animation for transitions with translucent apps" into pi-dev
86ed912f5afb6384e38d87c517ce6b25aa4466f4 28-Mar-2018 Vishwath Mohan <vishwath@google.com> Merge "Refactor FingerprintDialog to BiometricDialog" into pi-dev
b1adae546c85a136135ee20334c1db2035457c86 28-Mar-2018 Jiuyu Sun <jiuyu@google.com> Merge "Add grant and revoke default permissions to active LUI app." into pi-dev
39cf42c9273bc496a89476a0b637874fa21940a2 28-Mar-2018 Robert Berry <robertberry@google.com> Add autobackup XML support for test BackupTransport flag

We need this to be able to write a CTS test.

Bug: 73710054
Test: runtest frameworks-core -p android.app.backup
Change-Id: I37d4b64d40426c5de47308394e21baebd542ad52
08a75e0ee7c659c99b3c3bd19d7cf050a75eaa67 28-Mar-2018 Jan Althaus <jalt@google.com> Merge "Change TextClassification to use RemoteActions" into pi-dev
59ecb96da96b214fe12274e42a8a3cdaa69ba7a2 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Improve the JavaDoc for SOFT_INPUT_STATE_UNSPECIFIED" into pi-dev
36716eb4709503f2ef370c6f67273440cd91d18c 23-Feb-2018 Brian Young <bcyoung@google.com> Add "Unlocked device required" key API

This adds the API methods and values for keyguard-bound keys, but
contains none of the actual functionality.

Test: CTS tests in CtsKeystoreTestCases

Bug: 67752510

Merged-In: Iccd7dafd77258d903d11353e02ba3ab956050c40
Change-Id: Iccd7dafd77258d903d11353e02ba3ab956050c40
(cherry picked from commit fd75c7232aebc8690f004de3486b3b9a44f3e0b0)
39b9fb373c8da878199e0da39647db6fca53b4de 27-Mar-2018 Jason Monk <jmonk@google.com> Slices: Fix up some formatting and add examples

Test: TH
Change-Id: Ia95306d9a44e6a9861958bd7f2b3b697a7ecb4cc
Fixes: 76462142
Fixes: 76461933
744e6f1738336bed5ef1ff8cbd4139b4113b4c0f 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Also allow avoiding gfx acceleration at runtime" into pi-dev
95712fe0cb5c93240a9053ca0094f872054b7923 28-Mar-2018 Adrian Roos <roosa@google.com> Merge "DisplayCutout: Add clarifying images to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES" into pi-dev
23bc81d34a2c605fd3c18f341a32860d1d4790b4 27-Mar-2018 Jeff Sharkey <jsharkey@android.com> API for granting/revoking runtime permissions.

Expose these as public API, since they're useful for devices where
the raw "pm grant" or "pm revoke" commands can be flaky.

Test: builds, boots
Bug: 75315597
Change-Id: I2de94587945f08fd09ebe729bb9872542a11ef26
98a9d206be7e2c87b58d0d59c7a0ccc53eb22dd0 26-Mar-2018 Jorim Jaggi <jjaggi@google.com> Add different animation for transitions with translucent apps

None of the existing animation really work with transitions in
which a translucent app is appearing/disappearing. Add a separate
animation for that and change all existing transitions to these
new transition types in case we detect that only translucent
activities are appearing/disappearing.

Test: Sharesheet animations
Test: go/wm-smoke
Change-Id: Iffe57b7664dddf647d723c91d115ade60c12ad33
Fixes: 37953606
Fixes: 70730519
Fixes: 72649981
Fixes: 72686618
813a4bee765c70da8ae93483d3f0bfdcc8c0d484 28-Mar-2018 Adrian Roos <roosa@google.com> Merge "DisplayCutout: Fix attrs.xml javadoc" into pi-dev
ad1da317644d642c69a3e920af7446a853528f7a 27-Mar-2018 Adrian Roos <roosa@google.com> DisplayCutout: Add clarifying images to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES

Fixes: 76462084
Test: make doc-comment-check-docs, open $ANDROID_BUILD_TOP/out/target/common/docs/doc-comment-check/reference/android/view/WindowManager.LayoutParams.html, navigate to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
Change-Id: I8a9df979cbb062896fa874a163414a4f8a095b21
f8aa7bc15271d06136683c2fc47eb2f235ce647b 10-Mar-2018 Yin-Chia Yeh <yinchiayeh@google.com> Camera: sort getCameraIdList output

Since API1 camera ID (int) can now be used as array index
of getCameraIdList output.

Test: mix internal/external camera and try CtsVerifier tests
Bug: 72261912
Change-Id: I7cc28f47d100424ebe1ce6f7b61f60c233688538
78ae1060c6950c274ef833a5ef64fdd5787056d2 26-Mar-2018 Benjamin Franz <bfranz@google.com> Update to lock task features API

1. Throw if notifications is given without home feature, as this
configuration allows potential escape routes.

2. Default power button menu to be on in order to be consistent with
existing lock task behaviour before P.

Bug: 71790952
Bug: 74381063
Test: manual
Change-Id: I2383c087a18739a158d55edcd84d22d1abdb887a
8faeab8735f1a5759b24583d55853a488639546b 16-Mar-2018 Mathew Inwood <mathewi@google.com> Configurable hidden API exemptions.

Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test: Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509

(cherry picked from commit 2c6f97d4c9e09a89ef3b0a96539bf6a9ab8d326c)

Merged-In: Ib1245b69da4dac50c6968f1be62f1a74591dc433
Change-Id: I7b590f272fdcfcda5f18e216788ac34bc58beaed
3abc7511b881e3fcc3de8c8c87093bd661bd0f91 28-Mar-2018 Emilian Peev <epeev@google.com> Camera: Update external camera orientation guidelines

The external camera orientation and facing should not be
used for the jpeg orientation calculation.

Bug: 72261912
Test: Android compiles without errors
Change-Id: I552c09ae8dada2122396128011f7b82a9889e126
20d346eafec9404fb6f5b8eeb9a18ad794b4ca9a 23-Mar-2018 Jan Althaus <jalt@google.com> Change TextClassification to use RemoteActions

Behavioural changes:
- Every action now as an icon, and instead hints via RemoteAction whether
the icon should be shown or not.
- Icons are now taken from the app default, not the activity.
(That way, we can construct a lightweight resource backed Icon)
- Legacy intents are no longer parceled for security reasons.
(TextClassificatio wasn't parcelable in O)
- TextClassifications built with the new API will always return null for
getIntent, but provide a getOnClickListener.
- Accessibility descriptions are now provided for action mode items.

Testing changes:
- Removed URI checks from TCM test because PendingIntent hides this info.

Bug: 73950205
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsWidgetTestCases:EditTextTest
Change-Id: I6706d2c342a8bbb9de0146a48c8b8aac9d9c7d83
77e0b7b821a4d334606f07c7626aa59f9bee8446 28-Mar-2018 Narayan Kamath <narayan@google.com> Merge "Build: Remove MIN_SUPPORTED_TARGET_SDK_INT from public API." into pi-dev
d9c9fff1399e09ae49c6cd6e131d884e9e0bc96e 22-Mar-2018 Pavel Maltsev <pavelm@google.com> Add OEM_PAID capability to system api

Some system apps should be able to request OEM_PAID networks. This
makes a lot of sense when Android is used as in-vehicle infotainment

Bug: 68762530

Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Change-Id: Ic916de7522a9f803a2410bc4e3e82101fd9d0dbd
601861fd1cce308320ebe21e47a48e0c9c68de55 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Merge "Minor clean-up in NetworkCapabilities" am: 539f85a18d am: b1e2bfe4df am: 8a956a5141" into pi-dev
0c1c9cd7f2a343bb7bb9881326d7bb34db2e2fad 25-Mar-2018 Svet Ganov <svetoslavganov@google.com> Add API to query if a UID is active

Test: cts-tradefed run cts-dev -m CtsCameraTestCases

Bug: 72863398

Change-Id: I4bacfd87cac782ef178e9a279cd833b229150ae1
7eee509df57b25195187ef7d3555efdd54b25cfc 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Optimizing TimeSparseArray#put in case of collisions" into pi-dev
ebd87bf39564067080a868063876091c723e2f79 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use on-screen text in a11y text changed event" into pi-dev
3844e1d83c86dbedbfe060930f23749332896f2b 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Unload wallpaper bitmap and release HwuiContext" into pi-dev
88be5a6cee59868eaee6f7b52fd8b2e6f6f28429 23-Mar-2018 Abodunrinwa Toki <toki@google.com> Implement Stateful TextClassifier APIs.

Outstanding work tbd in other CLs
- Introduce request objects with session Ids
- Implement character based indexing for Selection events.

This CL hides the old Logger API but still keeps running so that we can
check that the modifications to the new API does not break anything.
We will remove the old Logger once we're convinced this is stable.

Please refer to I3c9ceea0863099fc4f0a5ce5e823c648ee9c4521 for previous
reviews related to this CL.

Bug: 74461129
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Iea744f1fa5964b4399290c31863ebeffa99af8d3
11866a4242fce0df45ff95930e3453093c68e8ea 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hide activities when AOD comes in" into pi-dev
1c73370df4c6b8399a264923e1f370b64019fca3 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Sending MY_PACKAGE_SUSPENDED to suspended apps" into pi-dev
2ae75ba1abd6f02415f93e21ff805e9bdbc5372b 28-Mar-2018 Joshua Baxter <jbax@google.com> docs: fixed typo
am: eb5d2d96ad

Change-Id: I60e1befd90c14fe0ef6b3b8813bb2a791f8a7399
930f9a54b84b0c975241eaae1dbe99b8045d9456 16-Mar-2018 Mady Mellor <madym@google.com> Fix keywords hint and add some hints and a subtype to Slice

Test: make
Bug: 76461875
Bug: 74338434
Change-Id: If1357f7709cfa9c43fe6882f4b2979d9ab84067d
092f75439788ba2e7fa21b4f4d614f7d6b7d0851 21-Mar-2018 Phil Weaver <pweaver@google.com> Use on-screen text in a11y text changed event

The beforeText in a text changed event was coming from
the underlying CharSequence, not what was on the screen.
As a result, it was not sent for password fields. Now
we just provide whatever is on the screen, which is
obfuscated to the same degree it is for a user looking
at the screen.

Bug: 75324441
Test: Verified with password field in TalkBack sample app.
Also atest CtsAccessibilityServiceTestCases

Change-Id: Ib7a10313d2f9d0e44d2052e81e47f19967a67bc4
a2cf00a011e634f98b7e86ee025bfe489ec15f4f 28-Mar-2018 Suprabh Shukla <suprabh@google.com> Optimizing TimeSparseArray#put in case of collisions

Adding a linear check instead of binary searching everytime. Logging
only when the displacement is greater than 10 millis.

Test: python system/extras/boottime_tools/bootanalyze/bootanalyze.py\
-r -c system/extras/boottime_tools/bootanalyze/config.yaml -n 10
atest android.app.usage.TimeSparseArrayTest

Bug: 76435713
Change-Id: I8f4df59e84fc196d0f63f9433d01ebc759f104c4
41c25cee06abec189ba60b9b76454867c2d64cfd 27-Mar-2018 Lucas Dupin <dupin@google.com> Unload wallpaper bitmap and release HwuiContext

To decrease sysui memory usage

Test: adb dumpsys meminfo
Fixes: 74534423
Change-Id: I3cb4a5927e8d6b20a7aeba3fda253f0ba4cc18f6
df369da85f60e8d6f8c4688dd45444669ddaf6d3 28-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Modify Open Mobile API to follow Android API guidelines" into pi-dev
a754785cf949113a7ae09893c101558f4737f3cd 28-Mar-2018 Yohei Yukawa <yukawa@google.com> Improve the JavaDoc for SOFT_INPUT_STATE_UNSPECIFIED

SOFT_INPUT_STATE_UNSPECIFIED is a tricky mode because its de facto
spec is that the system can do whatever it thinks valid.

Despite the fact that this is the default value for newly created
Windows, unfortunatelly there is no clear spec about what would happen
regarding whether the system thinks the software keyboard should be
shown or dismissed.

This CL doesn't change the behavior, but it just attempts to clarify
the behavior in JavaDoc.

Bug: 73793727
Bug: 77152727
Test: make -j doc-comment-check-doc
Change-Id: I69dab7c7018da89ba57fe2f5c8e718ef95985307
ce68c5d6154d482d77434bf65a3f65ec20fc4372 08-Mar-2018 Pavel Maltsev <pavelm@google.com> Merge "Minor clean-up in NetworkCapabilities" am: 539f85a18d am: b1e2bfe4df
am: 8a956a5141

Bug: 72828388
Test: frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Change-Id: I2f45d2c70c7c0142ae3b3ce9e6329c5f25b63380
(cherry picked from commit feb8d1498a822730e29cf346fe3382e3f5293a58)
bc064d4b4b7685876b8cc48830e7571a5a3ecb2e 27-Mar-2018 Makoto Onuki <omakoto@google.com> Make battery saver suggestion configurable

Test: Manual test with: settings put global low_power_mode_suggestion_params start_nth=2,end_nth=3
Bug: 74120126

Change-Id: If165892477b41547a3880e2e961a38328b33c5bd
00f3c4333e37a7f02320abc8293e692bf0c41b14 28-Mar-2018 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #74404949: Screen state usage API" into pi-dev
41a25211de08327c5178fb5f168e1154871a08d6 27-Mar-2018 Chris Wren <cwren@google.com> fix SliceMetrics typo and disambiguate logTouch

Bug: 76461931, 76461916
Test: make docs
Change-Id: I25c453effbfa7037c036eed81aac26fff30cc55a
420fe002f1d35e870d519344a13de9f6501e4ddb 15-Mar-2018 Benedict Wong <benedictwong@google.com> Add documentation for TCP interactions with transforms

Updates API documentation to mention that TCP sockets where transforms
are deactivated will not send FIN packets.

Bug: 74851550
Test: API updates only
Merged-In: I8169f221c8c747538a8bddfbf02dcc73c9337189
Change-Id: I8169f221c8c747538a8bddfbf02dcc73c9337189
(cherry picked from commit 7d31a2f3579eff80c3cef07feadf77dbfcbfcd17)
17b6490ce18092091c523f9a364f2effd76289f3 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Regularize some wallpaper APIs" into pi-dev
9a841a65190a3b825cfe738ebcd4afaaf99e07ff 27-Mar-2018 Joshua Baxter <jbax@google.com> docs: fixed a couple of typos

Test: make ds-docs

Bug: 36948822
Bug: 36946883

Change-Id: I4de699dc7d5a69e456b0656de890f76b9787aafa
452ae34af55cba26e6597fd3708f9e2bd5b0485f 27-Mar-2018 Makoto Onuki <omakoto@google.com> Merge "Add auto battery saver suggestion notification/dialog" into pi-dev
3787f7319818918b39ed4795018066a4cfc1e8f6 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Track USB data link in batterystats" into pi-dev
5681efd1af8f2d6372d0fca31187bb4c5d306390 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Iba4e52c2,I81160755 into pi-dev

* changes:
Public volumes only browsable by mounting user.
Public volumes are only visible to mounted user.
a86783b87d63c5824d379945286c7bf82cda9d94 21-Mar-2018 Calin Juravle <calin@google.com> Convert compilation reason and filter to int-enum before logging

Test: adb logcat -b events | grep sysui_multi_action
Bug: 73102540
Change-Id: I052df3d4e65ef16b43190c14a236421945c86e21
(cherry picked from commit c7a44be7b3faef307f47db479bd6b06846201cf9)
ced54398cc0dfd2f782153560c2ffd0eb8743045 26-Feb-2018 Dianne Hackborn <hackbod@google.com> Work on issue #74404949: Screen state usage API

Add usage stats tracking of screen time. There are two new
events, one for when the device is an interactive state, the
other for when it is non-interactive. Also add a whole new
usage stats API for retrieving aggregated data that is associated
with general events, not particular packages. In this case
it allows you to find the time the device spent interactive
and non-interactive and the count of the transitions in to
each of those states.

Bug: 74404949
Test: atest CtsUsageStatsTestCases:UsageStatsTest\#testInteractiveEvents

Change-Id: Ibe6d55e2aecb0c8519b1358644378ec5c7a4250d
dea705ba5905dc7f88b9a367725af16f3689c444 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove feature flag for battery settings" into pi-dev
cf87df15310611ae4e5229b19c5a4942e54185b5 21-Mar-2018 Vishwath Mohan <vishwath@google.com> Refactor FingerprintDialog to BiometricDialog

This CL changes FingerprintDialog into the more generic
BiometricDialog, which OEMs will be able to extend as necessary to
provide support for alternate biometric modalities.

Bug: 74831038
Test: m -j50 FingerprintDialog (from the associated CL on this topic)
The app works and authenticates successfully.
Test: make update-api -j56

Change-Id: Ic398ef0a0b448be68dbe3330b30779f93f567243
828ffa45a123709ad659dd0d9eee56d8506e756b 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Recover dataset picker when view fail to autofill." into pi-dev
3801d3a7d97e280b025ba210885915a4ab9a6171 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera2: Add distortion correction support" into pi-dev
47a65c79c94ac605e3a17e66555f2db7ac05b9d1 15-Feb-2018 Lucas Dupin <dupin@google.com> Hide activities when AOD comes in

Display timeout does not lock the keyguard, which means that
activities won't immediatelly disappear.

We need to factor AOD into to equation to make sure that
the user won't see phantom activities under the status bar
window when the display times out.

Fixes: 73120928
Test: open Settings, wait for display timeout
Test: Wait for display timeout, press power, see launcher
Test: Launch maps, start navigation (FLAG_SHOW_WHEN_LOCKED)
Test: Go to AOD, press power button: activity is occluding keyguard
Test: Press home: bouncer shows up
Test: Unlock: maps goes into pip mode
Test: Go to AOD and back to lock screen: keyguard visible
Test: Expand maps, go to AOD, back to lock screen: maps is occluding keyguard
Change-Id: I9b7512313af2f851d8788ec53de7880bce3bed2c
926a97cd3f1b0d569c296660cdd012bb2ece108e 25-Mar-2018 Mike Ma <yanmin@google.com> Track USB data link in batterystats

Record USB data link state in addition to plug & charging state, since
modern USB controller can keep USB data link connected with minimum
current. Device is not acutally charging at those times.
Test: manual
Fixes: 76209292

Change-Id: I0710d547399a631d594488a524682ccc32a25ce6
b57843059abc8a2d31e70ede923d08f765fbe30b 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Tweak FingerprintDialog" into pi-dev
0cf0d1368a8530204229d09b030398df59f66f8e 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WebView: clarify shouldInterceptRequest docs" into pi-dev
812e87ecba60a386f624b9dd68097d0ba9aac973 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove deprecated android.graphics.Canvas APIs" into pi-dev
49f08edf7d08101dfc00920f2abb1dab2280cd7e 27-Mar-2018 Felipe Leme <felipeal@google.com> Recover dataset picker when view fail to autofill.

When a dataset is selected, the framework tries to autofill all views belonging
to it. But if one (or more view) failed to autofill, we should let the user
recover by tapping the view again.

This scenario typically happens when views are recycled.

Test: atest MutableAutofillIdTest#testViewGoneDuringAutofillCanStillBeFilled
Test: atest CtsAutoFillServiceTestCases # manually retrying flaky failures

Fixes: 76149637

Change-Id: I7a6352c68b4a7d5e4cb80a7346c66efd831f21c8
52c6295e22e6eb205300a5471c67ef26ae9466fa 22-Mar-2018 Makoto Onuki <omakoto@google.com> Add auto battery saver suggestion notification/dialog

Spec: go/ebs-low-battery-mode-flow

- Basically when the user manually enables battery saver 4 times,
we show this notification to suggest turning on "scheduled"
(i.e. auto) battery saver.

- We show it through 8th time. If the user hits "no thanks",
or if auto-saver is enabled already, we will not show it.

- Introduced a new notification channel "HINTS" with

Bug: 74120126
Test: Manual test with ll development/scripts/battery_simulator.py

Change-Id: I713abc59dc7caee6882ba848c3e3aabaf778c2bd
8b7fcc3dab9b1ecbafdaa790109fc0b62401f12c 27-Mar-2018 Tyler Gunn <tgunn@google.com> Merge "Add exception catching for BlockedNumberContract methods used by Telecom." into pi-dev
0000d8aef85058d290527efd452bd3ac7bc09804 27-Mar-2018 Jeff Sharkey <jsharkey@android.com> Public volumes only browsable by mounting user.

We can't browse public volumes mounted for a different user, so don't
return an Intent claiming that we can, since it'll just fail.

Test: manual
Bug: 74056525
Change-Id: Iba4e52c2672258b981d2912875e55949bb35e310
b3c20232f1c0f0edc81c52fb52bccfcf407f62e4 27-Mar-2018 Joshua Baxter <jbax@google.com> docs: fixed typo
am: 3639e2f929

Change-Id: I6f7381045bb25fdcc9f86e3e2dd0d7b8c4eda853
d1257462c2c8e611fe2c52739d4d3cf5a676ea37 27-Mar-2018 Jeff Sharkey <jsharkey@android.com> Public volumes are only visible to mounted user.

New lower-level security fixes are blocking access, so make these
upper-level APIs reflect those properties.

Test: manual
Bug: 68857050
Change-Id: I81160755180f4f419d8577ea1f18a6ece10c560c
57378939c51541166ea670c1ddea963bd04a567e 27-Mar-2018 Eric Sandness <sandness@google.com> Permission Check For DPM Get IME API

Require the caller of DPM.getPermittedInputMethodsForCurrentUser() to
hold the MANAGE_USERS permission. The only callers should be settings
apps which already hold this permission.

Bug: 62343414
Test: Manage IME list in the Settings app
Test: com.google.android.gts.devicepolicy.DeviceOwnerTest#testPermitInputMethods
Change-Id: I0d162f8f51d16e403a950ee5d942502c2cf20181
eb5d2d96adf4f016b9af65e9daef0de2e6c0df59 27-Mar-2018 Joshua Baxter <jbax@google.com> docs: fixed typo

Test: make ds-docs

Bug: 36944055
Change-Id: I52c6d6404340ada5a18b99fd37a2f1d75af00677
dbac87dd408e4e42374c4ef29317a19bb7e4778b 27-Mar-2018 Andrii Kulian <akulian@google.com> Merge "Use transaction for local activity relaunch" into pi-dev
f45b3a1136ebe31126f992c26e5378c661bbc440 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Magnifier-35] Do not show when text is large" into pi-dev
91c361dcbb1a480c9c8ddec855ac1400117de226 26-Mar-2018 Narayan Kamath <narayan@google.com> Build: Remove MIN_SUPPORTED_TARGET_SDK_INT from public API.

It's not required. Also, amend the javadoc to reflect the current
state of affairs.

Bug: 76418791
Test: make update-api && make checkapi
Change-Id: I7d68a0ab33967679af8cfc4161c8283d4471b561
a9975804a2366585deb9a88ca91ebb589a879fd3 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "API council requested tweaks to JobInfo." into pi-dev
1d0b15510aa0452340ea9fd00938adda32c09635 22-Mar-2018 Ruchi Kandoi <kandoiruchi@google.com> Modify Open Mobile API to follow Android API guidelines

- Add @Nullable/@NonNull to input arguments for APIs
- Remove deprecated methods openBasicChannel(aid) and
- SecureElementListener is converted to a stand-alone interface
- serviceConnected() callback is renamed to onServiceConnected()

Bug: 64994044
Test: Run Cts Test
Change-Id: I503044a26a81dae8befb87fb8e8ac96d19de883b
(cherry picked from commit d785fc4f6d238fcab6e2dbfbf53a57e14f248ec4)
87526af33c9d49f7761c0b5bb1365584b67231ee 27-Mar-2018 Adrian Roos <roosa@google.com> DisplayCutout: Fix attrs.xml javadoc

Fixes an issue with the javadoc for windowLayoutInDisplayCutoutMode.
Removes @tags from enum javadocs, because they get merged into a table,
which does not support inner @tags. Instead, use <code> tags which work
in that context.

Also replaces @see tags with {@link} tags in the attr javadoc, because
the enum value table gets appended, but it is invalid to have text after
an @see tag.

Change-Id: Ib97e9aa82e173d99a467132a0d403793d7297e61
Fixes: 76448223
Test: make doc-comment-check-docs, verify output at $ANDROID_BUILD_TOP/out/target/common/docs/doc-comment-check/reference/android/R.attr.html#windowLayoutInDisplayCutoutMode
894469ce0eaa705739e885f4a1b007f73f714e01 21-Mar-2018 Mihai Popa <popam@google.com> [Magnifier-35] Do not show when text is large

There is no point in displaying the magnifier when the text is large
enough. In this CL we are using the font metrics of the TextView to
decide whether the magnifier should be displayed or not.

Bug: 70608551
Test: manual testing
Change-Id: Icb2fb4412b6b930dfb3322e51fd0139152cf9d39
baa5cc8fefc7ed72ef94a5bcd3e8db21eac88653 27-Mar-2018 Tyler Gunn <tgunn@google.com> Add exception catching for BlockedNumberContract methods used by Telecom.

The content resolver can throw in some instances when using the blocked
number provider. Rather than crashing all of telecom, adding exception
handling to provide graceful fallback in these cases.

Test: Compile / build
Bug: 74965829
Merged-In: Iae4c2dfc912e0d2a4194deb62568ee2f78ce4e22
Change-Id: Iae4c2dfc912e0d2a4194deb62568ee2f78ce4e22
(cherry picked from commit b408ebe55737438ac257872cb7f26e21701ec459)
fda8ec03114b5f94a0583f2a6e5d34664053f0ae 21-Mar-2018 Ricky Wai <rickywai@google.com> Add adb command to force generate network watchlist report for testing

Test: atest com.android.server.net.watchlist
Bug: 76102046
Change-Id: Ie31650f0b8e6d7481eae098c76eac2866b097b67
8474ca024666b3df235d3f073c0bdb7136629457 27-Mar-2018 Jeff Sharkey <jsharkey@android.com> API council requested tweaks to JobInfo.

Split network estimates into separate download/upload values, and
add missing accessor methods.

Test: none
Bug: 74945408, 74032541, 74032817
Change-Id: I4c92b8a867690dc4f048701f13142655c3370958
7b837616ae88cbdaf12600cee23b5188e5531937 22-Feb-2018 Derek Sollenberger <djsollen@google.com> Remove deprecated android.graphics.Canvas APIs

Bug: 73777445
Test: compile
Change-Id: Ie68f2fbe3c3be82f3c20529d535875d4cc204b7c
b429012907e8b48bf88c5ec5e91312c3379ca325 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add link to notification app listing in shade" into pi-dev
9f36c26f83cbb29c947c681c750340401e62e768 27-Mar-2018 Eric Sandness <sandness@google.com> Merge "Permission Check For DPM.isDeviceProvisioned" into pi-dev
c6d9f7ce1d6d152c55431e9ea95302a954bc49b9 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "More flexible API enforcement policy." into pi-dev
3cc7c4fc7677815149065018b3b64e58262b9c0d 27-Mar-2018 Yueming Wang <yuemingw@google.com> Merge "Add javadoc to explain ApnSetting conflict." into pi-dev
1ad8367249f07869ec86ade432ba74e885b33763 27-Mar-2018 Eric Sandness <sandness@google.com> Merge "Permission Check For DPM.getUserProvisioningState" into pi-dev
df30c7d2e0bd59a1ed92d63bd1b4dc9c320e2ab6 27-Mar-2018 Eric Sandness <sandness@google.com> Permission Check For DPM.isDeviceProvisioned

Require the caller of DPM.isDeviceProvisioned() to hold the MANAGE_USERS
permission. The only callers should be within the framework itself, or
apps involved in device provisioning which already hold this permission.

Bug: 62343414
Test: Set TestDPC as Device Owner and use it to reset password
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test: com.android.server.locksettings.LockSettingsServiceTests
Test: com.google.android.gts.devicepolicy.DevicePolicyManagerTest
Change-Id: Ie53deb5ba8679a5b431f2a8da60ec9710c44d56f
6586f05457e496bbb6119cc43d77694b38336dd1 21-Mar-2018 yuemingw <yuemingw@google.com> Add javadoc to explain ApnSetting conflict.

As per discussion with Amit, it's better to define "conflict"
of ApnSetting in DevicePolicyManager API javadoc.

Bug: 72153573
Test: not required.
Change-Id: I765dace36a3c9c491c988dc0a87479cdec620e37
e3299533b5f07480bf009d3acb42a63a19b7ebac 22-Feb-2018 Mathew Inwood <mathewi@google.com> More flexible API enforcement policy.

This CL adds the basics to set black, dark gray or light gray list
enforcement, rather than just black as before. It's not possible to
actually set the policy per-package yet.

PackageDexOptimizer still uses a single bit, for API checks on/off, rather
than the new enum. It assumes blacklist enforcement internally. This can
be improved in a follow up CL.

(cherry-picked from commit e52130ae4cf3b046b38a09fc7cc7712f5b7fb83d)

Test: m
Test: Boot device

BUG: 73337509
Change-Id: Ieb4bd9cc439c6a5b8fb9424d8902d8b46aec309f
Merged-In: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
914aa7da7f0d74f5de358daa616c50cbf5bd9c30 20-Mar-2018 Andrii Kulian <akulian@google.com> Use transaction for local activity relaunch

To know that onPostCreate callback should be executed we should use
TransactionExecutor for the entire transaction. It will fill
PendingActions object during the launch and the callback will be
triggered after onStart.
This CL changes local activity relaunch to use Lifecycler
infrastructure. We should immediately execute local recreate
requests, because if we wait until the scheduled message to be
handled, we may already be in a different state and final state
request in the scheduled relaunch transaction will already be

Bug: 72029061
Bug: 64610483
Bug: 76088057
Bug: 73747058
Test: ActivityLifecycleTests
Change-Id: Ia53ecd199c83d030932c4493064e58568805f2a5
992d0785422479dceddc6591736a4b5f3ab65933 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Integrate autofill session lifecycle with URL bar changes when on compat mode." into pi-dev
349e214dc20448c54ca0f906054f6c69678cb481 27-Mar-2018 Holly Jiuyu Sun <jiuyu@google.com> Add grant and revoke default permissions to active LUI app.

Grant the camera permission to the active LUI app since LUI uses QR scanner
to download profile.
Before it, revoke the previously granted permissions first.

Bug: 35068517
Test: test on phone
Change-Id: I2db9597eed423835b9499ef6000579b5ee5b2cb6
9a6bc76ee8f09181ef7c9ad34b1a51ba4c77737f 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "API council requested tweaks to TrafficStats." into pi-dev
01f2ff1aa474784048dcfeec6c0aca086dc19f01 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Report final progress when finished copying." into pi-dev
df101a459692cda5c73d149c582d68dc42ece852 27-Mar-2018 Jerry Zhang <zhangjerry@google.com> Merge "Write descriptors for Mtp in UsbService" into pi-dev
0bff5a6dfa4a37414ca7831db41f772125125a6a 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "API council requested tweaks to SystemClock." into pi-dev
b15bcea4d4c05f04212729ca7a4016269a5df1d4 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "API council requested tweaks to DataUnit." into pi-dev
db010230c1974866986bd01986f1601dd09961ac 27-Mar-2018 Nate Fischer <ntfschr@google.com> WebView: clarify shouldInterceptRequest docs

No change to logic, this only changes documentation.

This clarifies how shouldInterceptRequest behaves for various URL
schemes as well as other edge cases (e.g., redirects).

Bug: 74841041
Test: make docs (manually verify)
Change-Id: Id59033590ea6025a00ae39c7b05486be082973e7
fee443bfabea4f1f04dc12f9478b6a244bd55de6 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move FIRST_SDK_INT to @TestApi." into pi-dev
3639e2f92921ee03f501ae9feffd675c96ba0080 26-Mar-2018 Joshua Baxter <jbax@google.com> docs: fixed typo

Test: make ds-docs

Bug: 36941741

Change-Id: I451d8095bcc5d30dbefe3503441d718a69d821ca
2fd43ba63ef336f9e0edc9c742b85507c46b3bc9 23-Mar-2018 Suprabh Shukla <suprabh@google.com> Sending MY_PACKAGE_SUSPENDED to suspended apps

Added new broadcast actions MY_PACKAGE_SUSPENDED and
MY_PACKAGE_UNSUSPENDED, which are sent to the package that is affected
by the suspend state change. A suspended package also receives a bundle
of app extras to pass more information. This makes it easier for
packages to deal with being suspended/unsuspended.

Also updated some existing documentation to make it clearer.

Test: atest com.android.server.pm.SuspendPackagesTest

Bug: 75036698
Change-Id: I772cf0c023669bc946e07ced4ebccfa74f6835b2
a1ff74c68dad21694403d6aa8abb42337cbca658 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Stop using DynamicLayout in case of non selectable PrecomputedText" into pi-dev
d3a6af439e9f8d74893238557bb8ae54c84d1c3e 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add the AVRCP Target Service (2/2)" into pi-dev
d982f561ccd404e1ece80748cc2912fef03bfb3f 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix random SmartLinkify-related TextView bugs." into pi-dev
51248bf60789b2fca61f2a5ce75808d58f63046d 22-Mar-2018 Shuzhen Wang <shuzhenwang@google.com> Camera: Add MONOCHROME camera capability

Test: Camera CTS
Bug: 74597035
Bug: 64691172
Change-Id: I0315faada2e69acfe3617fabe3e52563701e8ee7
0a9258f435d847765d94881497c42df831ca98e8 16-Mar-2018 Ajay Panicker <apanicke@google.com> Add the AVRCP Target Service (2/2)

Add the AVRCP Target constant to Bluetooth Profile. Also remove redundant
public static final modifier on the constants.

Bug: 68854188
Test: Compiles and local test with service enabled
Change-Id: If2ec607fc704c225f8903d438fe970dfafac25f1
(cherry picked from commit 38c3073ba2532db7b5adf5f7f96cef847771c41b)
Merged-In: If2ec607fc704c225f8903d438fe970dfafac25f1
5b4a0d6751273f365d6e04ebb8f52dc2acc826a8 27-Mar-2018 Dmitry Dementyev <dementyev@google.com> Merge "Use Builder instead for KeyChainProtectionParams." into pi-dev
80c4be88e0c108e3cb4c528c078c53fde6676af3 26-Mar-2018 Amith Yamasani <yamasani@google.com> Add slice pinning to list of reasons for usage

Bug: 73455786
Test: atest AppStandbyControllerTests
Change-Id: Ia7980a8396a47d88959051329409f0ff39e81977
acbde7d5d3092e2f6a763844eb2d770311b932a6 27-Mar-2018 Jeff Sharkey <jsharkey@android.com> Report final progress when finished copying.

Test: none
Bug: 74120182
Change-Id: I984d38505545b5f18dd3dd9a3c6f714a9ea86edd
9360a31f5fecb77d4716e333a8b97418e0ae6b56 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make PackageManager#getNamesForUids testable." into pi-dev
4c4efd09decb639588a77bf4bb7d807a360c3bc6 26-Mar-2018 Lei Yu <jackqdyulei@google.com> Remove feature flag for battery settings

Bug: 76027338
Test: Build
Change-Id: Ie15e7b05d81e93a9db0569a3e7c00faf9c9a60e3
dba919af3a01576bf170506306972a71e7f42032 16-Mar-2018 Kevin Chyn <kchyn@google.com> Tweak FingerprintDialog

FingerprintDialog optional fields should not take up space when null
FingerprintDialog error messages should be delayed until dialog is dismissed

Fixes: 75281164

Test: manual test with FingerprintDialog apk

Change-Id: Iaa95fc8c95b7c9f5fc5d8563ea37fc1f6497fabd
fc704e2fd7cdaf903a3ab1da7db21f80c6c261fe 26-Mar-2018 Jason Monk <jmonk@google.com> Merge "Security fixup for Slices" into pi-dev
110a7c20f401771759bac6231c61938723dfb113 26-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Sticky battery saver" into pi-dev
ae1324a32ea4addea2d36ed2e86a239529decad7 26-Mar-2018 Jeff Sharkey <jsharkey@android.com> API council requested tweaks to SystemClock.

Test: none
Bug: 73952114
Change-Id: Idd7aae5161a2326920860a6a9c7137369a4d8b3d
ed1c9af6536be8d331d8df41babeda9a446d0355 21-Mar-2018 Julia Reynolds <juliacr@google.com> Add link to notification app listing in shade

Test: atest SystemUITests
Bug: 74318867
Change-Id: Ic309dfb08be0d41b7d524adc1b5910ab61b2d9fb
0c5daa19e374c628027e1dafd5f94e7dccc1c3b8 23-Mar-2018 Seigo Nonaka <nona@google.com> Stop using DynamicLayout in case of non selectable PrecomputedText

DynamicLayout is required when
- The text is Editable.
- The selection is enabled on TextView.

This CL stops using DynamicLayout when the TextView is not selectable
TextView and the input text is PrecomputedText.

Bug: 72998298
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text

Change-Id: Ic4a66ad3ed8868570735e3199879b74132a8c4aa
d52c532df7c7c481bf6e482c37f4e0ee02618fce 26-Mar-2018 Chris Craik <ccraik@google.com> Merge "Remove incorrect @NonNull annotations on getDrawable() and variants." into pi-dev
eb738c1c507ef9ad1ab78a238e10a05c729c0b0b 26-Mar-2018 Jeff Sharkey <jsharkey@android.com> API council requested tweaks to DataUnit.

Test: none
Bug: 71584606
Change-Id: Ic516dd7645e150586d7dd2e389e7663a32924ecc
121d565b65ab66e1e2804fc89c58e88cd91804fd 26-Mar-2018 Jeff Sharkey <jsharkey@android.com> API council requested tweaks to TrafficStats.

Test: atest android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 71584606
Change-Id: I4be8a47d54a04f17cbaac735d543ff7d6370376d
16d9db57f513eb13eeb2486d2d4770f59faf5550 26-Mar-2018 Dmitry Dementyev <dementyev@google.com> Use Builder instead for KeyChainProtectionParams.

Use Builder to create KeyChainSnapshot it tests.
Bug: 75952916
Test: apct
Change-Id: I5ab8c864a7ccc55dafa40867ec4364a705738d86
0c8ce322a3107933d16082e00c77fbe501dc3c07 23-Mar-2018 Felipe Leme <felipeal@google.com> Integrate autofill session lifecycle with URL bar changes when on compat mode.

The contents of a browser URL bar is typically changed for 2 reasons:

1.User entered a new URL.
2.Form was submitted and the URL changed.

On scenario #1, the current session should be canceled, while on #2 it should be
committed. Scenario #2 is already handled when the service sets a SaveInfo, so
this CL handles the other cases:

1.Focus on URL bar is ignored so it does not trigger a new partition.
2.If URL bar changed and service didn't set a SaveInfo, the session is canceled.

Fixes: 76027553

Test: manual test with Chrome
Test: new tests on VirtualContainerActivityCompatModeTest:
Test: atest CtsAutoFillServiceTestCases

Change-Id: I19d2aa4c8b25def0d5eca1c59cfdc2ffe33dd388
1da8bb1d8e538cd7c248d9478fb511cd4ff8e343 26-Mar-2018 Jeff Sharkey <jsharkey@android.com> Move FIRST_SDK_INT to @TestApi.

Test: atest android.os.cts.BuildTest
Bug: 71555186
Change-Id: I92732b930834d9c1e4150417bb3ee8b6839e2b3e
105540da419d7ec1da86f3c0ad6e5e2173deeb8e 21-Mar-2018 Christopher Tate <ctate@google.com> Regularize some wallpaper APIs


+ support clearing wallpapers, with similar permissions to setting
+ support adjusting padding, with similar permissions as defining
wallpaper dimension hints (which behave somewhat similarly)

Bug: 62343054
Test: atest CtsPermissionTestCases:NoWallpaperPermissionsTest
Change-Id: Ia25f2791a20564c58096a25e6e189aa3b06b411c
c4d58b8978454a3cf7ecdd4d7205fbdf68ca9cd7 24-Mar-2018 Evan Rosky <erosky@google.com> Restored focusableViewAvailable logic on visibility change

Since visibility effects children, it's state change should
report focusableViewAvailable even though it, itself, may
not be focusable.

Bug: 76027633
Test: CTS View_FocusHandlingTest
Change-Id: I83f949ec33bcac02e75e21727a120d3018d9382a
a3cd7b9d53cdc98952365b12a8f9d5623726ed52 19-Mar-2018 Makoto Onuki <omakoto@google.com> Sticky battery saver

- When battery saver is enabled manually (i.e. via PM.setPowerSaveMode()),
it'll stick, and we'll re-enable battery saver even after a reboot
or a charge.

- Extracted all battery saver state transition logic into a separate

Fix: 75033216
Bug: 74120126
Test: Manual test with "dumpsys battery set ...."
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
Change-Id: If020cd48f341b339783fe09dd35bc7199e737a52
Test: dumpsys power
Test: incident_report power
Test: atest CtsBatterySavingTestCases
abeb04ed557f33e33886270ad037a83bb4576737 26-Mar-2018 Philip P. Moltmann <moltmann@google.com> Make PackageManager#getNamesForUids testable.

Fixes: 76161011
Test: atest android.content.pm.cts.PackageManagerTest
Change-Id: I857d489ec9981839d63a5b934b4aaa0d2709be85
520969191b37ddfca441b8065543fd0dee7dd74e 22-Mar-2018 Abodunrinwa Toki <toki@google.com> Fix random SmartLinkify-related TextView bugs.

1. Preserve selection when the TC times out. (See: SelectionActionModeHelper)

2. Fix highlight/toolbar flicker when tapping on a smart link.
- Highlight flicker happening because we reset the selection while in
the process of starting a link action mode.
i.e. onLinkDown: show highlight
onLinkUp: start the link action mode asynchronously
onLinkUp: reset the selection to an insertion cursor*
onLinkActionModeStarted: reset the highlight
*Fix: Don't reset selection while starting a link action mode.
- Toolbar flicker happening because the toolbar positions itself over
the current selection. The way link highlights have traditionally
been done is to set the selection to the links bounds*
*Fix: Hide the toolbar for a few milliseconds when changing
selection for smoother transition.

3. Fix Paste menu overriding link action mode toolbar after a recent
"Copy" action. The Paste menu appearing is a feature. Whenever the
user inserts a cursor after just copying some text, we show the Paste
menu as a way to make it easy for the user to select the text.
Because of the problem described in (2) above, changing the selection
to an insertion triggers the Paste menu feature. Fixing (2) fixes

4. Fix IME popping up on non-selectable + focusable TextViews.
See: imm.showSoftInput(...) in Editor. And see comment in the code
around that. We should only pop up the IME for editable text.

Fixes: 73872461
Fixes: 75985239
Fixes: 76011461

Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: If9ddb7f4e6d4db480ba4a495a22f7f2924ab937e
e1c76d71e747d9bb1e5ecdb2ffc5fe254cba174b 26-Mar-2018 Ricky Wai <rickywai@google.com> Merge "Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc" into pi-dev
8cb2aba54d97ad89be44867683edce2b500f30f0 26-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "executor_api" into pi-dev

* changes:
Camera: Accept user-supplied executors in capture sessions
Camera: Async camera manager calls should use executors
3ff20e2257c3d7158289ff3252e53cd5dfef85f4 26-Mar-2018 Benjamin Franz <bfranz@google.com> Merge "Expose hidden API to check whether a given package is state protected" into pi-dev
a5b29ffffe82e504726c1bbd288023c5d081e0c3 26-Mar-2018 Dmitry Dementyev <dementyev@google.com> Merge "Remove unimplemented RecoverableKeystoreManager APIs." into pi-dev
6da53af9c55ba2231cd2f47c7dffb150f2c22a89 24-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Guarding collisions in TimeSparseArray" into pi-dev
5dbb3fe124cfc1d08320448aa397a5b2279ecb73 24-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix BoringLayout with PrecomputedText" into pi-dev
ca697c621e448a50e1c0d8a021e37efa7a6a0983 24-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Pass all relevant resolver info to netd" into pi-dev
96b341e43a7ee7c283b08ad8568036407fc04ab3 24-Mar-2018 Martijn Coenen <maco@google.com> Merge "Add new trace tag for AIDL." into pi-dev
cccad1971e4f04db7c8db8b0a9d6afd95937fc5e 19-Mar-2018 Victor Hsieh <victorhsieh@google.com> Fix fs-verity per fs-verity spec change

- Reorder and adjust fields per fs-verity format change.
- Since header + tree is no longer full page size, pass the length with
shared memory (which is full pages).
- Fix offset and padding of patch extension.
- It is now required to issue the measure ioctl (via
assertFsverityRootHashMatches) right after fs-verity is enabled.

Test: adb install a new priv app, saw fs-verity log in dmesg. Read the
whole file successfully.
Bug: 30972906
Change-Id: I480ae2b5debaf76ef24dadf2d79d1903c7967f03
775e291c2e4a033ea8f721a1d7eb38391c5bf9ae 24-Mar-2018 Nathan Harold <nharold@google.com> Merge changes from topic "data-service-grant-policy" into pi-dev

* changes:
Add Permissions Grant for TelephonyDataService
Add a Method to Revoke DefaultGrant Permissions
117e7f3c76a02060b423cc370aadc0325ccebd9d 04-Mar-2018 Erik Kline <ek@google.com> Pass all relevant resolver info to netd

Test: runtest frameworks-net passes
Test: manual testing of opportunistic and strict mode works
Bug: 34953048
Bug: 64133961
Bug: 72345192
Merged-In: I96f7747b8f0bb38d95579b688b4c2d068f1229cf
Merged-In: Ia4d896c4cc33c02f0c46d5d4c760cc33b13dff0b
Change-Id: Ia4f1905e1fa60e7a468c2246fb809191d2ba796b
(cherry picked from commit e5dac904d361a349f1cfc48500a678d22e3a7316)
53145635e4fd724208e01db1ef6187a2212d6090 24-Mar-2018 Seigo Nonaka <nona@google.com> Fix BoringLayout with PrecomputedText

The special logic for PrecomputedText in BoringLayout has problem.
The special logic is no longer necessary since TextLine is now aware of
PrecomputedText. So, just removing special logic from BoringLayout.

On the other hand, the metrics parameters check in TextLine has removed
Ie73bce52c6c673cda58973ddad04627a7cf2e5e9, but that was wrong. TextLine
can be used by BoringLayout too. Thus, need to reject PrecomputedText
if the given TextPaint is not compatible with given param.

Bug: 76227465
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text

Change-Id: I172b5f655402e797b53b9667b49cb4ab89ec0dc0
85d0e6edd20f6dab6d25f9f475ee462bef85ba98 24-Mar-2018 Selim Cinek <cinek@google.com> Ensured that the reply icon isn't showing on HUNS

Change-Id: I227547237afc53095e792c96b019bb717c213b1c
Fixes: 76112268
Test: runtest systemui
2811d92483d8cad0c69309ce4f2ca42866fb1774 23-Mar-2018 Suprabh Shukla <suprabh@google.com> Guarding collisions in TimeSparseArray

TimeSparseArray - used to store UsageEvents - can keep at most one event
per millisecond, which can result in an event being replaced by another
event that occurred close enough that the system records it at the same

Test: atest android.app.usage.TimeSparseArrayTest

Fixes: 73832306
Change-Id: I860a101ab098f65d5c5832758832f43572865690
0bbaf189c259f7d3154737c4284023921dc821b0 24-Mar-2018 Dmitry Dementyev <dementyev@google.com> Add more NonNull annotations to RecoveryController API

Bug: 73959762
Test: none
Change-Id: I648c20a099d4ac1c002f4f467d7189a8bc019560
9cd3e43d86ea00fb93ef7561bb309e3a53f1a582 24-Mar-2018 Dmitry Dementyev <dementyev@google.com> Merge "Add NonNull annotation to more parameters in Recovery Controller." into pi-dev
603b911e48feab811089dd0208284f82de4da034 24-Mar-2018 Andrii Kulian <akulian@google.com> Merge "Revert "Use transaction for local activity relaunch"" into pi-dev
444885b10d28db7580c46368c5a3492bdc4e1efe 24-Mar-2018 Wale Ogunwale <ogunwale@google.com> Merge "Don't show unsupported sdk warning in test harness." into pi-dev
4da14e00fc5919a7e36fe6d7d7e63512eb23bb4a 23-Mar-2018 Dmitry Dementyev <dementyev@google.com> Remove unimplemented RecoverableKeystoreManager APIs.

Add some Nullable annotations.

Bug: 75952916,74859770
Test: apct
Change-Id: I25710263a1ba806d49ec11638dab00f3513631a8
e3d2c4134495f6e75c71e4f3d730596010d6d929 24-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix SurfaceView Background" into pi-dev
0049ec1410bcbf500ab2b57a66c4e00cc6da993d 24-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed AutofillServiceHelper.assertValid() so it throws the right exception." into pi-dev
352da45bbb325b38a38714a93867d36cc71ca069 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Properly set input type on autofill compat mode." into pi-dev
ba22b7f4fdd0c8d7c8550a3aa03c3f360ceaf503 23-Mar-2018 Android Build Merger (Role) <noreply-android-build-merger@google.com> Merge "Merge "docs: fixing bug 36982027 and 30636712, typos" into oc-mr1-dev am: 5b0a4eea8d" into pi-dev
1057fc37f52c4353abfdba9de9ed929864b5e833 23-Mar-2018 Todd Kopriva <kopriva@google.com> Merge "docs: fixing bug 36982027 and 30636712, typos" into oc-mr1-dev
am: 5b0a4eea8d

Change-Id: Iff4044c52e7ccdf6f7f879b9d5457ce1458b21bd
525b18286487bd6335095216289964a730e144aa 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add flag to control blocking Smart Replies for apps targeting an Android version below P." into pi-dev
fd4ae0b2ddd58f6acbb19632f20e40024e3d85b1 23-Mar-2018 Dmitry Dementyev <dementyev@google.com> Add NonNull annotation to more parameters in Recovery Controller.

Use Builder instead of deprecated constructor for KeyDerivationParams.
Bug: 75952916
Test: adb shell am instrument \
-w -e package com.android.server.locksettings.recoverablekeystore \
Change-Id: I223e4dc1aa92cbde60e53b364ed74a452d3f6bbd
87f9818319fec1227cadd4fe3566409e71386d73 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added TestApi for default focus highlight" into pi-dev
5b0a4eea8dd4c36d4501d053869fce1cd8a8ee82 23-Mar-2018 Todd Kopriva <kopriva@google.com> Merge "docs: fixing bug 36982027 and 30636712, typos" into oc-mr1-dev
5e11e5e6cc38242dbf6a6709b1cfc563d3c8dc31 23-Mar-2018 Luis Hector Chavez <lhchavez@google.com> Also allow avoiding gfx acceleration at runtime

This change adds a way to make ActivityManager#isHighEndGfx() return
false at runtime by inspecting the value of ro.config.avoid_gfx_accel.
This is useful for running Android on Chrome OS devices, since a single
image can be made to run in both physical hardware and an emulator.

Bug: 65602168
Test: Added `ro.config.avoid_gfx_accel`, isHighEndGfx() returned false.
Change-Id: I1599ad9b385f9ef43f923886e6d5358ae07632e0
4069f7a167a290bade2bd87ff7d1dbb6970fea46 26-Feb-2018 Richard Ledley <rledley@google.com> Add flag to control blocking Smart Replies for apps targeting an Android version below P.

Bug: 73802997

Test: atest SmartReplyConstantsTest

Change-Id: Id340cba09da7931ff6a4689802b3a5f594852a72
(cherry picked from commit 28944cbdcf15128b664ccdaed44c59d3fc64d1db)
ec150609e486a4a99e83012553520f4f34e18fc1 23-Mar-2018 Felipe Leme <felipeal@google.com> Fixed AutofillServiceHelper.assertValid() so it throws the right exception.

Test: atest FillResponseTest SaveInfoTest
Bug: 76097200

Change-Id: Id643007e2d038cc6948cdb8d66c5454048d5f632
c380e18e31cdc922d42b11c016482857ad47b9a9 23-Mar-2018 Felipe Leme <felipeal@google.com> Properly set input type on autofill compat mode.

Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.VirtualContainerActivityTest#testAutofillSync\

Fixes: 76173462

Change-Id: Ie400ed5d4426febc34b02f68d6be4d86bc11034f
4efdab2a7489b0d59eb9a35b96a2969e657eca00 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "HIDD: Address API Review concerns" into pi-dev
386fd704342e40824c5ac4c987329792ed641fda 23-Mar-2018 Robert Carr <racarr@google.com> Fix SurfaceView Background

When refactoring to not use global transaction when setting
position I failed to account for the forwarding done by the
background wrapper.

Bug: 76099976
Bug: 76110573
Test: Manual. go/wm-smoke
Change-Id: I2cff8e571f12e69cefbd1ea35538fd71beaf1ec4
1194b0bdfed798cae594c6e80c13855ea6618f3b 23-Mar-2018 Chris Craik <ccraik@google.com> Remove incorrect @NonNull annotations on getDrawable() and variants.

For compatibility, had to continue returning null when drawables could
not be decoded. Fix annotation to match pre-P behavior (the behavior
was reverted separately).

Fixes: 69543526
Test: make

Partial revert of Ib01eca970c5c9969998ce5b265b120aa7048b41a

Change-Id: I5f612f47793c3f04cf9874e13efdc13397ddd4e8
73b7722c13ecc8eaf1d6439e4537cb7e10f53405 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not throw KeystoreException for when a key does not exist" into pi-dev
6045d66aa242ca665354e9558d61fdcc9b5bd03d 23-Mar-2018 John Reck <jreck@google.com> Merge "Add isPivotSet/resetPivot" into pi-dev
5bdf06353798f13ceb40c21b023e3fcfb17ad0ad 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Bluetooth: preserve one advertisement slot for GMS core"" into pi-dev
8808edb063650f4497e6a31f8fbe4d2bcbdf227f 23-Mar-2018 Amith Yamasani <yamasani@google.com> Merge "Provide app launch count in UsageStats" into pi-dev
ac11238291b9e1b692f4e9ebe92f85a39c28f284 23-Mar-2018 Jason Monk <jmonk@google.com> Security fixup for Slices

- Allow slice providers to override grant flow
- Remove overriding caller, that was a terrible idea
- Move where the same app check happens to allow for CTS

Test: CTS
Bug: 69168488
Change-Id: I61c81c0665a08420b7bc83e3660657b62b2cd6a8
3780c09c764dac607228744f63ee5e7bb924c5ee 23-Mar-2018 Eric Sandness <sandness@google.com> Permission Check For DPM.getUserProvisioningState

Require the caller of DPM.getUserProvisioningState() to hold the
MANAGE_USERS permission. All callers should be apps involved in device
provisioning, which already hold this permission.

Bug: 62343414
Test: Run Device Owner sync auth provisioning manually
Test: Set up work profile with managed account manually
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test: com.google.android.setupwizard.tests.activity.QrScanControllerTest
Change-Id: Ib85433586d4dfb89019ca223fb925aca3d4bbf67
46312b3999f2305f42e0e18926ec0ea0067bcd75 23-Mar-2018 Andrii Kulian <akulian@google.com> Revert "Use transaction for local activity relaunch"

This reverts commit 77d73605979a19e377c97df1c82a2dfd8e3a71cd.

Reason for revert: b/76088057

Bug: 72029061
Bug: 76088057
Change-Id: Ib1212740bcd5dd0fe8de87521e716c17b93c30cd
9753e774ce38bfe7f390f94c267b24c524616a2a 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hearing Aid Profile: set and get activeDevice" into pi-dev
7384995cf80ed0e93943e2aa872bff435784bafd 23-Mar-2018 Alice Sheng <alicesheng@google.com> Merge "Add setting for disabling swap." into pi-dev
991b971acbb4675636ccab8b3d9ba891c5f7d936 23-Mar-2018 Kurt Marcinkiewicz <kurdt@google.com> Merge "Allow specifying a network for SNTP time sync" into pi-dev
4341a66b03aa8ba03de09db4bd446312c47176be 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Annotate RemoteInput#SOURCE_* with @IntDef" into pi-dev
14372aaabcebec33c1b8f0a19b665bf65503c758 23-Mar-2018 Mihai Popa <popam@google.com> Merge "[Magnifier-34] Keep magnifier inside its surface" into pi-dev
14faa2d49b05b083d922f1281488a347055e2bc4 23-Mar-2018 Zach Johnson <zachoverflow@google.com> Revert "Bluetooth: preserve one advertisement slot for GMS core"

This reverts commit 7020b015e91f7df4915a14783a6c6317a97cef35.

Reason for revert: This breaks platforms that only support a single advertising slot.

Bug: 76135219
Test: advertising does not work, revert change, advertising works
Change-Id: Ib8c823eb9990cc06bad95c8c3ad0129afb245e00
95f2965a749ce81451217bf520b41b2c945ececb 23-Mar-2018 Dmitry Dementyev <dementyev@google.com> Merge "Prepare KeyChainSnapshot to removing deprecated getTrustedHardwarePublicKey method." into pi-dev
7ed5fb3e1d61786d1987fdef5c9a9b4591b4930a 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "bug73953366_bug74605221" into pi-dev

* changes:
Camera: Complete transition from handlers to executors
Camera: Camera shouldn't throw 'RejectedExecutionException'
Revert "Revert "Camera: SessionConfiguration should use Executors""
364dbf1c9e695e339508fda9184fba797ed5491a 23-Mar-2018 Dmitry Dementyev <dementyev@google.com> Merge "Update RecoverableKeyStoreManager methods to throw NullPointerException when null is passed as @NonNull argument." into pi-dev
651ac4d1195c1149d3715355aa8ba291a8fea36c 23-Mar-2018 Ricky Wai <rickywai@google.com> Merge "Use sha256 of a string as seed in RapporEncoder.insecureEncoder" into pi-dev
8e2731bfeffeba32345f8b14d70dae3b8ba17353 16-Mar-2018 Petr Cermak <petrcermak@google.com> Annotate RemoteInput#SOURCE_* with @IntDef

This patch addresses a request from the API Council (http://b/74409378).
It defines a new RemoteInput.Source annotation for RemoteInput source

Bug: 74409378
Test: atest RemoteInputTest
Change-Id: I78a006b6a600ea0c0603b2591d1a29596074a44e
9ec7026e924104acaee5cc5bac8888ae5452f3be 23-Mar-2018 Bo Zhu <bozhu@google.com> Merge "Unhide the enum/function for the password hashing algorithm scrypt" into pi-dev
2f0184fa894780e3b3b81be6361b135bdfb0170f 21-Mar-2018 Emilian Peev <epeev@google.com> Camera: Accept user-supplied executors in capture sessions

It should be possible for clients to pass executors instead of
handlers in any method that accepts capture result listener.

Bug: 3767382
Test: Camera CTS
Change-Id: I605c001533e93e6294d265fcd4d3d5783c313b8a
953b134f2da8817898e9927b035445e40af0332b 21-Mar-2018 Mihai Popa <popam@google.com> [Magnifier-34] Keep magnifier inside its surface

Before this CL, the magnifier window was sometimes displayed partially
out of screen or overlapping with the system bar. This CL prevents this
issue by clamping the magnifier inside its parent surface, also taking
into account the system window insets of this surface.

Also, the CL fixes two kindof unrelated small bugs:
- remembers to reset the previous show and pixel copy coordinates on
- when clamping the pixel copy coordinates inside surface, consider the
size of the copied content rather than the size of the window where
this is scaled and then copied

Bug: 74234779
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Iec3404123145aa95b37c88f4fbfa3918cbf24f9d
0ed26bc8b1bf04e79a5abceb6f13cf509b9d105a 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Delete unimplemented APIs from RecoveryController." into pi-dev
afc61792cbf3955cf4a298f8729d937e8166ae41 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Have the status bar listen to all macro-users VPN changes." into pi-dev
72f5755721ad22d4711e9e9cc8ef6107db91466a 23-Mar-2018 Robert Berry <robertberry@google.com> Do not throw KeystoreException for when a key does not exist

Bug: 75955240
Test: manual
Change-Id: Ibd2f4d7cd654752b69d2d22e803d4d1cc05c118f
1f654aa24738233f872f708e4e13a9c02af5d6f4 23-Mar-2018 Chalard Jean <jchalard@google.com> Merge "Have PermissionMonitor arbiter which app can access background networks" into pi-dev
63df4e248accfb3e74214fe5dda803b524e3134b 23-Mar-2018 Felipe Leme <felipeal@google.com> Merge "Improved autofill logging and dumping." into pi-dev
933dfc1cd6041d1e77d169be91818d5b31e36edc 23-Mar-2018 Aseem Kumar <aseemk@google.com> Delete unimplemented APIs from RecoveryController.

Bug: 74859770
Test: make update-api builds
Change-Id: Ic547e0ee2ef13995389a71369ffa736a7d83b78a
26aa91ab27c4064cc7e77267a1a4ef7544d35f5c 20-Mar-2018 Chalard Jean <jchalard@google.com> Have PermissionMonitor arbiter which app can access background networks

This will let ConnectivityService send the right callbacks to the
relevant apps.

Test: manual with apps
runtest frameworks-net
new tests for this functionality
Bug: 67408339

Change-Id: I6f08efd9e73c7e191f833d7f307a3bf4c9e2f0b4
40d8a45b23fef543f183bfc2a061ec7d96b6e252 22-Mar-2018 Bo Zhu <bozhu@google.com> Unhide the enum/function for the password hashing algorithm scrypt

Bug: 75024420
Test: none, it's just unhiding APIs
Change-Id: I9cbb327678d334079e2c660d85013f3073d4cb87
1e6a9dcecb92b4a9a8d3c60372821ba7cd830873 21-Mar-2018 Dmitry Dementyev <dementyev@google.com> Update RecoverableKeyStoreManager methods to throw NullPointerException when null is passed as @NonNull argument.

Mark serverParams as nullable. Null value can be used to prevent new
snapshots creation.

Bug: 73959762
Test: Test: adb shell am instrument \
-w -e package com.android.server.locksettings.recoverablekeystore \
Change-Id: I5c6ddd696b2882b3d27978b0146ff419bedaf5ee
3b67e06de57549cfa9b4db88b13d105126d7ad94 23-Mar-2018 Dmitry Dementyev <dementyev@google.com> Prepare KeyChainSnapshot to removing deprecated getTrustedHardwarePublicKey method.

Add null checks to getTrustedHardwareCertPath.
Remove unused and outdated PersistentKeyChainSnapshot class.
Use CertPath instead of public keys in KeySyncTaskTest.

Bug: 75952916
Test: adb shell am instrument \
-w -e package com.android.server.locksettings.recoverablekeystore \

Change-Id: Ifabe7d5fa250069ebe0885ce52ec29b01294f63a
e1a0b347a0719530f53f078da2486774e0770c67 23-Mar-2018 Evan Rosky <erosky@google.com> Added TestApi for default focus highlight

Bug: 62864111
Test: View_DefaultFocusHighlightTest
Change-Id: I2a74de3274351f0a7662715e723c25f4d7f8f6ed
d847d7d0a92bbf599ab1664431bbb04beab8ea92 23-Mar-2018 Jean-Michel Trivi <jmtrivi@google.com> Merge "Hide Media*2 APIs" into pi-dev
0cdac33f8f0d8d7d53cb4d286a99b4ed8008e3e9 23-Mar-2018 Felipe Leme <felipeal@google.com> Merge "Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode." into pi-dev
51856fde2bd2e7f00f4646900412d73dcb256d09 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Updated the styling for notifications" into pi-dev
da9ea34c029df809e6b833a483408662e13ca9a1 22-Mar-2018 Felipe Leme <felipeal@google.com> Improved autofill logging and dumping.

Bug: 76027553
Test: adb shell dumpsys autofill

Change-Id: I19ef88c71334c62292ed982e43d7a7e89b35f10e
3a582e73c115e693bab8cb6f213d275704b9c5d7 21-Mar-2018 Jean-Michel Trivi <jmtrivi@google.com> Hide Media*2 APIs

Bug: 76121592
Test: make offline-sdk-docs
Change-Id: Ic5eba5ba0b3ef9f11c582ab6db7d8d61934941dd
191ce9c442d08603fe9ae7d53e228fdf88456acc 27-Feb-2018 Ivan Podogov <ginkage@google.com> HIDD: Address API Review concerns

* Replace bare field usage with getter methods;
* Remove Builder;
* Move BluetoothHidDeviceCallback to inner class;
* Remove toArray() and equals();
* Throw IllegalArgumentException where applicable;
* Add an Executor parameter before Callback;

Bug: 72168436, 72168126
Test: make update-api, make, make sl4a.Common
Change-Id: I13095458bf3ded7a376e8d20fd13df12ef426693
(cherry picked from commit f2f5dc355fa9a962ded0d29368535796aa4116d8)
02c8d1b07fc5841029173ef9396ead24ef96ac2c 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make PrecomputedText Spannable for supporting selection" into pi-dev
0205fd10646785f6d573b487f8ad5f56470bff07 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add MANAGE_IPSEC_TUNNELS Permission" into pi-dev
3c0f0b3e8b02561faecf884e2cbdc35a7b48cbdc 23-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only print out services if they did something." into pi-dev
e9a7cb8158387d34214b55cf3333e964dd2afe51 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix smart_linkify_enabled flag." into pi-dev
a194d92495a298561879dde137e6342d0e6784e8 22-Mar-2018 Rose Liu <rongliu@google.com> Merge "Assign -1 as default value of window type and owner uid." into pi-dev
76ad1a3c212d09a2c843c1d845c20a4ec5bfd6e4 20-Feb-2018 Nathan Harold <nharold@google.com> Add Permissions Grant for TelephonyDataService

The Telephony Data Service is a privileged service
that provides Data capabilities *to* Telephony. A
data service that provides IWLAN may also use WiFi
as an underlying connection that tunnels Telephony
data services over WiFi using IPsec. The carrier-
config-driven permissions model causes the
framework to bind to an appropriate Telephony Data
Service, for a given carrier, and that Data Service
is responsible for providing Cellular data. Thus,
The TelephonyDataService needs sufficient
permissions to access cellular info necessary for
performing signalling for IWLAN. This includes
Phone state information and location information
such as the current Wifi access points and the
current cell towers. In addition, a Telephony
Data Service may require access to IPsec if the
data service uses the Android API to establish
IPsec, which is optional today.

Bug: 66955045
Test: wip
Merged-In: Ibe4f7806a47e2a50999376ff0a5a07dc5b332953
Change-Id: Ibe4f7806a47e2a50999376ff0a5a07dc5b332953
3a31f6c5ccd9c8e490ecb475262059e7f52717b3 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removed urlBarResourceId." into pi-dev
6affc07065083468c5580b04d3572ef6acbb138c 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "APIs to suspend packages with SUSPEND_APPS permission" into pi-dev
224e2fb2ef360f026ae2a8ab45d49e39ffc2561a 22-Mar-2018 Julia Reynolds <juliacr@google.com> Merge "Add vol up + power ringer toggle gesture" into pi-dev
402de825e7d1e27d34e56d71b6e2ef2e541c986d 22-Mar-2018 Wale Ogunwale <ogunwale@google.com> Don't show unsupported sdk warning in test harness.

Also, added test api AM.alwaysShowUnsupportedCompileSdkWarning
that allows for forec showing the warning for an activity
component running in a test harness.

Change-Id: I72f6a8425cb6adc6060c70b2165aa82b459769f7
Fixes: 75455658
Test: atest CtsActivityManagerDeviceTestCases:PrereleaseSdkTest
159788455c79fa47847d0c40fcee7aceff2551ae 21-Mar-2018 Nathan Harold <nharold@google.com> Add MANAGE_IPSEC_TUNNELS Permission

Add a new MANAGE_IPSEC_TUNNELS permission and
protect all IPsec Tunnel mode APIs with it.
This permission is only granted to the system or
through an AppOp.

Bug: 66955045
Test: compilation
Change-Id: I0f618373b500c493ef2211bece681f74652a1833
8a047a0c5207433769a084f524fd3f9ebed18da8 22-Mar-2018 Nathan Harold <nharold@google.com> Merge "Add AppOp for IpSec Tunnels" into pi-dev
14f3d22336999b39a1e51b0c3b1dc6dc025fdc71 22-Mar-2018 Kweku Adams <kwekua@google.com> Only print out services if they did something.

This also fixes a failing CTS test.

Bug: 74975371
Bug: 73490092
Test: flash device and check incident.proto output
Change-Id: I4d0f7d1b45b1b620d903f4b46cbdc04dfe314958
bc813eb26e3027856114a26312e36e4bad86bd86 21-Mar-2018 Amith Yamasani <yamasani@google.com> Provide app launch count in UsageStats

This counts the number of times the app was launched from outside
the app and ignores intra-app activity transitions.

Introduce a new permission for registering to observe app usage.

Fixes a bug where Settings couldn't force the app into another
bucket if it was recently launched.

Bug: 74335821
Fixes: 76100712
Test: Manual test using Settings
Test: UsageStatsTest to verify permission change
Change-Id: Ibd343c1cfa37089a3ac6fc30ba3194e21a9be499
3dac23bd4d6e77cae0fd7f2a79fd13444c223de4 14-Mar-2018 rongliu <rongliu@google.com> Assign -1 as default value of window type and owner uid.

Bug: 74622357
Test: Test with ag/3738015 together. Layers without buffers have window
type -1 and owner uid -1.

Change-Id: I6f010bf1327671a06874b75bc0a63a3fb010ced7
dfdd82e84fcd102ab9b4d2233d195a013914c2ae 05-Mar-2018 Kurt Marcinkiewicz <kurdt@google.com> Allow specifying a network for SNTP time sync

Permits syncing over a specific network instead of the default for
the process. This was causing an issue with Android Wear devices
paired with iOS where the default network is bluetooth
(see b/32663274).

This CL is in support of ag/3776564

Bug: 32663274

Test: adb shell am instrument -e class android.net.SntpClientTest -w \

Change-Id: Ic9fc169cf75457810d4992121d85d7642e350b90
4f74a018c8ee9801f1d5ce2c7ec726251efc4fbf 21-Mar-2018 Felipe Leme <felipeal@google.com> Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode.

Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest

Bug: 76027553

Change-Id: I432b4321801ca90a55a24e5e896578d5b2d63014
a86d5d5624d691b4b1906eae25a67ee19a600c80 20-Mar-2018 Ricky Wai <rickywai@google.com> Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc

Test: NULL
Bug: 74831039
Change-Id: I227ba1377a51821204cd5830e7da6ff3a15bca02
b70d84a68b7d6d864a358d632f28cdcc1fd9aa80 20-Mar-2018 Ricky Wai <rickywai@google.com> Use sha256 of a string as seed in RapporEncoder.insecureEncoder

Test: atest android.privacy.LongitudinalReportingEncoderTest
Test: atest android.privacy.RapporEncoderTest
Test: atest android.server.net.watchlist.PrivacyUtilsTests

Bug: 76001602
Change-Id: I42d569f34d29125e7adf898b9553053a42149bd4
b32b1ad3734e66d8df4940e741e35c228e9f8547 14-Mar-2018 Alice Sheng <alicesheng@google.com> Add setting for disabling swap.

Bug: 73089999
Change-Id: I89c50ae2badcb75c52652acaeb181a3161233375
021b57ab8df0927aa1f78a2f3bb01d5e70594b1a 09-Mar-2018 Suprabh Shukla <suprabh@google.com> APIs to suspend packages with SUSPEND_APPS permission

Changed the existing hidden api setPackagesSuspendedAsUser to a system
api setPackagesSuspended that can be called by apps with either
MANAGE_USERS or SUSPEND_APPS permission. Additionally, the suspending
app can now specify optional extra information meant to be used by the
suspended apps and the launcher to deal with this state.

The following other APIs are added:
- isPackageSuspended(): Apps can query whether they are in a suspended
- @SystemApi getPackageSuspendedAppExtras(String): Apps with permission
SUSPEND_APPS can get the appExtras passed to PM when suspending the
- @SystemApi setPackageSuspendedAppExtras(String, PersistableBundle):
Apps with permission SUSPEND_APPS can update app extras for a
suspended package.
- getPackageSuspendedAppExtras(): Apps can call to get the appExtras
passed in to PM when they were suspended.

Test: Can be run via:
atest com.android.server.pm.PackageManagerSettingsTests
atest com.android.server.pm.PackageUserStateTest
atest com.android.server.pm.SuspendPackagesTest

Bug: 74336673
Change-Id: I3b9ed2c8478b34ee2e8986f5f5fddb2839d102e3
6563833cf3c79e8cd211e32357422ae899674437 16-Mar-2018 Abodunrinwa Toki <toki@google.com> Fix smart_linkify_enabled flag.

The flag should only ensure that smart linkify calls behave in the
legacy way instead of totally disabling linkify.
Also, to keep the flag consistent with smart_selection_enabled and
smart_text_share_enabled flags, the flag should only disable the
SmartLinkify (i.e. Linkify.addLinksAsync) feature not TextClassifier
APIs (i.e. TextClassifier.generateLinks).

Also fixes issue with non-focusable TextViews by firing the primary
action instead of showing the floating toolbar. (b/73156794)

Bug: 75967597
Bug: 73156794
Test: bit FrameworksCoreTests:android.text.util.LinkifyTest
Test: bit CtsTextTestCases:android.text.util.cts.LinkifyTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: manual - checked behaviour turning flag on/off
Test: manual - checked behaviour with TextView.setFocusableInTouchMode(true/false)
Change-Id: I541f60161b9cd63ce7e57235607500f2fb0841e7
88b745cce3555c3c29acec29aa71240f3b71b22c 22-Mar-2018 Felipe Leme <felipeal@google.com> Removed urlBarResourceId.

It will be removed before the final P build.

Test: atest FrameworksServicesTests:AutofillManagerServiceTest CtsAutoFillServiceTestCases
Fixes: 74445943

Change-Id: I9bc243a3c1ae78f2c385dbb907d362d8ab16b34c
6d319b8aaa961862afac48010d96d03afb11fa1c 07-Dec-2017 Jerry Zhang <zhangjerry@google.com> Write descriptors for Mtp in UsbService

The current model for setting up a functionfs
function is:

UsbDeviceManager#setCurrentFunctions() ->
intent is sent to MtpReceiver to write the descriptors ->
init/hal waits for descriptors to write, then pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer

The main downside of this is a lack of reliability because
the Mtp process could be killed at any point. Normally, a
gadget is unbound if its control endpoint is closed. no_disconnect
works around this, but is still a little janky. In addition, the
extra intent delays the startup of the gadget.

With the new model, UsbDeviceManager writes the descriptors
on initialization. Since it is a system service, it won't be killed.

UsbDeviceManager#setCurrentFunctions() ->
init/hal pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
MtpServer calls UsbManager#getControlFd to get a dup of the control

Also modify permissions so system server can access mtp files.

Bug: 72877174
Test: Change usb configurations to ptp/mtp
Change-Id: Id17d2b5930f4e1f37ec1b4f00add9d594174ad49
33ed612ccaab47b238f460aaf91515b2c2b5b7b4 22-Mar-2018 Nathan Harold <nharold@google.com> Merge "Add NonNull Annotations To IpSec API Surface" into pi-dev
7cc9a817d4a0e2d0dc10f982b54f855351432a82 22-Mar-2018 Benjamin Franz <bfranz@google.com> Expose hidden API to check whether a given package is state protected

Bug: 75997475
Test: manual
Change-Id: I5e0da781af6d148aed2247175e8ee5d9f244ebe1
de6dfd93e5531e8111043c3b21af0d66b32f175f 22-Mar-2018 Felipe Leme <felipeal@google.com> Merge "Don't allow null ids on FillResponse.Builder.setAuthentication()" into pi-dev
b030730aa8c42ff6ddf17ace50df012254a1ba22 22-Mar-2018 Felipe Leme <felipeal@google.com> Merge "Fixed autofill service metadata name on javadoc sample." into pi-dev
c6bd1855656168119ab4ac62cbf0e7930551e846 22-Mar-2018 Robert Berry <robertberry@google.com> Merge "Unhide RecoveryController#getRootCertificates()" into pi-dev
3818de595b1b53a0fc9944d16d302169aff00384 22-Mar-2018 Robert Berry <robertberry@google.com> Merge "Unhide RecoverySession#recoverKeyChainSnapshot() method" into pi-dev
4e561f83cbfc1c05955f724db73c72366ad816eb 22-Mar-2018 Felipe Leme <felipeal@google.com> Merge "Renamed AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES." into pi-dev
df0b0d380d09a6a1e2d2faf5399d7874fc3a4b0d 22-Mar-2018 Felipe Leme <felipeal@google.com> Fixed autofill service metadata name on javadoc sample.

Bug: 72811034
Test: nope

Change-Id: I0367fa6ad1fa21c51dadb9706830bc50c3139cab
dddd69ef3eb72edacc4961dc6a6f1ab0cddcf416 22-Mar-2018 Michael Plass <mplass@google.com> Merge "Add Settings.Global.WIFI_SCORE_PARAMS" into pi-dev
5527286e08f9ba26ef49ad9019bd3968bdaa69af 20-Feb-2018 Mike Digman <digman@google.com> Add vol up + power ringer toggle gesture

It only runs when the screen is on.

Test: manual, invoking gesture with different system settings
Bug: 75252670
Change-Id: I934d0bbb0a9fffecf34ebaadf77f3e1241d4faf7
f9332469a4a575f75852fe04e3e17f7386b53b8a 22-Mar-2018 Robert Berry <robertberry@google.com> Merge "Small fix for the key grant alias used in importKey" into pi-dev
750b71c6512dad08e9c8eb59c2ad3c0d4fcfe79f 21-Mar-2018 Robert Berry <robertberry@google.com> Unhide RecoverySession#recoverKeyChainSnapshot() method

The other methods expose raw key materials, which is a security flaw. This
new API is already being used by GMSCore, via reflection (although falling
back to the old methods if it is not available). Would be good to switch it
on ASAP.

Bug: 74345822
Test: Tested with GMSCore
Change-Id: I30d53c9e825888d1122c72d23b7c1c10c6edb1e9
93d002ca5f94facfec75359999c910f914d7b7c4 21-Mar-2018 Robert Berry <robertberry@google.com> Unhide RecoveryController#getRootCertificates()

This is so we can add a GTS test to affirm that GMS devices include the
Google Cloud Key Vault root certificate.

Test: runtest frameworks-core -p android.security.keystore.recovery
Bug: 74621045
Change-Id: Ib6431f5739f3dff066832e6aa300dd9da5bc0727
98ea60c42766e973eb787a55a9b84ca91981c9e0 22-Mar-2018 Robert Berry <robertberry@google.com> Merge "Unhide the new RecoverySession#start with the alias for root cert" into pi-dev
bf121d2f13cb4f2f136fc1563553d93d8ba202d8 22-Mar-2018 Christofer Åkersten <akersten@google.com> Merge "Remove unnecessary Context from ApiLoader" into pi-dev
ae2f36890795963fadbe2afd8ff96bc163f6bfa8 22-Mar-2018 Julia Reynolds <juliacr@google.com> Merge "Fix index error" into pi-dev
f9593d62b3247a26e80bd0c693a6b86760bcf702 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds support for a fall-back model when the language-specific model is not found." into pi-dev
6bd3ab6dc6ad4001c387d7f4a4a2ce954be6ca16 22-Mar-2018 Christofer Åkersten <akersten@google.com> Remove unnecessary Context from ApiLoader

Bug: 76001644
Test: compile
Change-Id: I6ac81dac16374d90facfe33c68607c5c286b335f
024cf8a70736acd1fcdad249212c9359a25869d1 22-Mar-2018 Andreas Terzis <aterzis@google.com> Merge "Enable new data usage settings features." into pi-dev
616ede0964c19d138044b5a1e544133acdab75fa 09-Mar-2018 Chalard Jean <jchalard@google.com> Have the status bar listen to all macro-users VPN changes.

Bug: 73217368
Test: manual
Using Datally on work profile. Before this, enabling the VPN
does not show the key icon. After this it does.

Change-Id: I454eb8f3881a48af1b0187c2b14a2a399d3c2445
e7997a3ea7c5dea839220ae832ea5ff7a7dc7742 22-Mar-2018 Bo Zhu <bozhu@google.com> Unhide the new RecoverySession#start with the alias for root cert

Bug: 76033708
Test: none, it's just unhiding APIs
Change-Id: Iec1e44d24bb1704da082404566233ada83b8eb81
dcccfd974269e92ee1d4c908018419033bdb0c20 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ScheduledJobStateChanged: add stop reason" into pi-dev
b630550ed19798ad89d8e10b750c72f899ad3e92 22-Mar-2018 Makoto Onuki <omakoto@google.com> Merge "Updated the javadoc of ContentResolver.addPeriodicSync to correct the minimum interval of periodic sync." into pi-dev
2285a662eaaf81e8cfd9ffe554485410d7851477 22-Mar-2018 kopriva <kopriva@google.com> docs: fixing typo in reference document
am: 60b06bd217

Change-Id: Ie0a6380e8287d49b4d80f8742e51345372e5b8a9
4d6dc48d242a643acd846b4892803c8295740b64 22-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I7f413e38,I20aba7e9 into pi-dev

* changes:
Remove FlpHardwareProvider
Create the stubs lib for com.android.location.provider
c7f5a827d69e68931cd9f57cf7e158bc0055b7e7 21-Mar-2018 Selim Cinek <cinek@google.com> Updated the styling for notifications

The new notifications now have different font weights
and colors to make the shade more readable.

Fixes: 69168591
Test: runtest systemui
Change-Id: I0b635724fa122d292841e56efa84aa57fa364300
c5ab69469d53ffc5b55e91c5374da8b03dd4661c 21-Mar-2018 Bo Zhu <bozhu@google.com> Small fix for the key grant alias used in importKey

Bug: 74345822
Test: atest RecoveryControllerHostTest#testImportKey_ValidKey
Change-Id: I54812b3d7465ee508fe48886f5897470fe7455a0
8686e1f157f9d1e21cb39762d1ec495cc74afdb1 22-Mar-2018 John Reck <jreck@google.com> Add isPivotSet/resetPivot

Bug: 74825533
Test: CTS view tests in topic
Change-Id: Ib918bc5830d53ee0a83b13ab53ac6e8dd86c869f
fd4003bf0949a4a33200621d0c6f33dbebfa14d3 21-Mar-2018 Felipe Leme <felipeal@google.com> Renamed AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES.

The syntax of that setting changed from P Developer Preview1 to the final P, so
it's safer to use a new name than risk breaking devices during the update.

Bug: 74458004
Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest\

Change-Id: I1c507e8eae20f598dfe259178667ae6c2bc892ff
163a57d71e6844856b2c7a3a1dc9ce3b5e2100b5 22-Mar-2018 Fyodor Kupolov <fkupolov@google.com> Merge "Added BinderCallsStatsService" into pi-dev
ff61d8872c938b6223c6d4516bcc6112b1fe68ed 21-Mar-2018 Makoto Onuki <omakoto@google.com> Merge "Implement new BS warning / notification flow (1/2)" into pi-dev
1bb42067f077bed8c865d8cef2f4b397be4d996e 15-Mar-2018 Nathan Harold <nharold@google.com> Add AppOp for IpSec Tunnels

Add a new AppOp to allow bound system services
such as TelephonyDataServices and potentially
VPN providers to access the IPsec tunnel
management APIs. Since this is not directly
user-facing, and not all System apps should have
this privilege, the access is only granted via
an AppOp or to the system itself.

Bug: 66955045
Test: compilation (still WIP)
Change-Id: I0b0528c75c622d8538baeec019c3672cbed5d899
5c4a42d532d7fa25fec013dbe737db33179014f9 21-Mar-2018 Jan Nordqvist <jannq@google.com> Enable new data usage settings features.

Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests
Change-Id: I0d2942bf8b8e13ebefd7df899a6ecfc6595d1780
5c0d7b3a7f4e4c2a584f7e0ccf0d41bbfb201f96 21-Mar-2018 Liefu Liu <liefuliu@google.com> Updated the javadoc of ContentResolver.addPeriodicSync to correct the minimum interval of periodic sync.

Bug: 76033438
Change-Id: I1ccb7ae174f8f13dae24296a3fb7e9dfcd77c7fa
Fixes: 76033438
Test: javadoc only. presubmit only.
32ca41d02880686148cfa730897c575104cf045c 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove am/wm.proto which is redundant. The naming convention is defined in core/proto/README.md" into pi-dev
25960891466a5291c4e71309a07cb9f53fea9c16 21-Mar-2018 Felipe Leme <felipeal@google.com> Don't allow null ids on FillResponse.Builder.setAuthentication()

It would crash the system when save is invoked.

The issue was reproduced by passing a null id on
AuthenticationTest#testFillResponseAuthServiceHasNoDataButCanSave , but that
change was not committed because with the fix the builder would throw an

Test: atest CtsAutoFillServiceTestCases:FillResponseTest

Fixes: 76097200

Change-Id: Ifa8105ee1451ba7107082a94a538a8f84f50df18
095b9e8e1c58393bac6e5f409ab73fe91cc15263 21-Mar-2018 Nathan Harold <nharold@google.com> Merge changes I4c26aea7,I79911434 into pi-dev

* changes:
Check mOwnedByTransform to avoid DELSA on SPI
Expose add/removeAddress for IpSecInterfaces
5a366fbd819e17b420f8eb61f8b96434b71b8bb7 21-Mar-2018 Julia Reynolds <juliacr@google.com> Fix index error

Change-Id: I93cf18b35060a09a3b8f4be8e0b9b4682d390b25
Fixes: 76101440
Test: runtest systemui-notification
2f81559d293e09e6db706334b6b15a289ff1689a 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Return a boolean from the mandatory backup transport setter." into pi-dev
16a0dd2d5eeef320a80afe130e6c1e2946e8d2f1 20-Mar-2018 Makoto Onuki <omakoto@google.com> Implement new BS warning / notification flow (1/2)

- Show the battery saver confirmation dialog only for the first time.
- Start counting # of manual activations, which will be used in a
follow-up CL.

Bug: 74120126
Test: Manual tests with ./vendor/google_experimental/users/omakoto/android-battery-tester
Test: m -j ROBOTEST_FILTER=BatterySaverUtilsTest RunSettingsLibRoboTests
Test: cd frameworks/base/packages/SystemUI/tests && \
atest src/com/android/systemui/power/PowerUITest.java src/com/android/systemui/power/PowerNotificationWarningsTest.java
Change-Id: If6a081a6222e6a87c4cd332364c89856e7648a36
5cd64cc8012243c656875be6b84456caeabd60f5 17-Mar-2018 Nathan Harold <nharold@google.com> Add NonNull Annotations To IpSec API Surface

This CL adds NonNull annotations to a large
number of method returns and parameters as
part of API council feedback.

Bug: 72473424
Test: compilation (docstring-only change)
Merged-In: I2f865dde56fe12116c461ad98e9460bf1802ce18
Change-Id: I2f865dde56fe12116c461ad98e9460bf1802ce18
(cherry picked from commit 8fd26f67fdfdedb535ddb8c7d5ededa5dcba40f8)
38e09dd7e1e77c0cf1799b88225f8f006f50aab6 21-Mar-2018 Fyodor Kupolov <fkupolov@google.com> Merge "Include additional information in the dumpsys" into pi-dev
158a18108bdc726821f2d2b3119535a7c747130b 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WebView Tracing API: remove LARGE_BUFFER, make RECORD_CONTINUOUSLY the default mode" into pi-dev
1a07ccc07e9cc5b0ba8e8922979a486bd83f333d 19-Mar-2018 Tim Volodine <timvolodine@google.com> WebView Tracing API: remove LARGE_BUFFER, make RECORD_CONTINUOUSLY the default mode

This patch:
- remove the RECORD_UNTIL_FULL_LARGE_BUFFER tracing option, because
this does not appear really useful in the production setting as
the buffer size limit exceeds the device memory and can grow
uncontrollably large.
- make RECORD_CONTINUOUSLY the default mode for tracing, to make
sure the least memory is used by default (typically 4x less than the
previous default RECORD_UNTIL_FULL).
- add some missing IntDef values (to make them match with the constants)

BUG: 63750258
Test: CTS

Change-Id: Ib3698273dee776ebc7a8388fc1bd8c80255e3b63
1543171d3ea3c9c0cd3f958a789e35dd27b45df6 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Some Slices API refinement" into pi-dev
f801b8ae6974f3adc900c992f68aa5195cbf35a6 21-Mar-2018 Benedict Wong <benedictwong@google.com> Merge "Added implementation for VTI add/remove address" into pi-dev
d7582684b6db6077f2bdba92b485022b799a1aba 21-Mar-2018 Benedict Wong <benedictwong@google.com> Merge "Add support for auth-only transforms" into pi-dev
56681f761e941b1268cde9fc71de39d133280d27 09-Mar-2018 Lenka Trochtova <ltrochtova@google.com> Return a boolean from the mandatory backup transport setter.

Bug: 73813043
Bug: 64012357
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testGetAndSetMandatoryBackupTransport
Test: cts-tradefed run cts -m CtsBackupHostTestCase --test android.cts.backup.BackupDeviceOwnerHostSideTest

Change-Id: I7f47a41070b767a6be8b986be485b4ad782690cf
1918ef7569e90c70246e535478b26732b82d92d3 14-Mar-2018 Jason Monk <jmonk@google.com> UsageEvents for slices pinning

Test: atest frameworks/base/services/tests/servicestests
Bug: 73455786
Change-Id: I6a37f5525c29d3f47aa37e262c8834840309ba44
afbfb17df01fb5c1fe93ae4f1b9118004a42cb91 09-Mar-2018 Martijn Coenen <maco@google.com> Add new trace tag for AIDL.

So we can auto-generate tracing code for AIDL interfaces.

Bug: 74416314
Test: inspect atrace output
Change-Id: I42eee24358763305d6b4e954087f3331ad20f9b7
889e78cb28a59c678ce1310c94e25ba887e18571 21-Mar-2018 Robert Berry <robertberry@google.com> Merge "Add RecoverySession importKeyChainSnapshot method" into pi-dev
82235880f62e2689a38122d83ca795bd0e744df5 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use the new root cert file under the core/ folder" into pi-dev
695171695225d22f421cbd50f8e391c7620b82df 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add API WebView.getWebViewLooper()" into pi-dev
0fcacdddf466b22cc4fdbb3a16992bc34686cacb 14-Mar-2018 Lukas Zilka <zilka@google.com> Adds support for a fall-back model when the language-specific model is not found.

Bug: 74720318

Test: Builds and fall-back works.
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Change-Id: I5491af628c8406e42ca2cc971ad3a8b708ceb315
4a5c87def075c805d4fcae7ff01dd2e78ec27b1a 19-Mar-2018 Robert Berry <robertberry@google.com> Add RecoverySession importKeyChainSnapshot method

This imports the keys directly into the keystore of LockSettingsService,
allowing them to be accessed via the RecoveryController getKey method.
This is better as it does not expose raw key material to any app.

Bug: 74345822
Test: runtest frameworks-services -p \

Change-Id: I4991b0cff1d2fa2e5bd0b53a71c096499e93e98b
01cee8e6862cabe5dd1d7bfebaa82fc5bb255ee6 21-Mar-2018 Ben Lin <linben@google.com> Merge "Add new Intent start a package's Open By Default page directly." into pi-dev
b31ab6740d66b21a74ffa77b753ea3364288254e 21-Mar-2018 Bo Zhu <bozhu@google.com> Use the new root cert file under the core/ folder

This CL also adds an alias param to the RecoverySession#start method.

Bug: 76033708
Test: runtest frameworks-services -p \

Change-Id: I870f4f89bd6e319e1687a981aa04af0d23f3c922
a553477ddf55d170a66410ed325ae5e5d3005965 15-Mar-2018 Seigo Nonaka <nona@google.com> Make PrecomputedText Spannable for supporting selection

This is 2nd attempt of I072dfd70b9a687d9c47e310d8cdb34f988fbb32e

The root cause of crashing is unexpected copying of NoCopySpan by
SpannableString constructor. To prevent crashing, stop copying
NoCopySpan by passing ignoreNoCopySpan=true to SpannableString
copy constructor.

The original commit message is following:

To support selectable TextView, make PrecomputedText spannable.
By this change, TextView start using DynamicLayout instead of
StaticLayout. DynamicLayout requires boundary rectangle of the
text, so this CL also adds getBounds method to PrecomputedText
which retrieves measured boundary box from native.

By this change, the selectable TextView performance for the
precomputed text 10x faster. On the other hand, the performacne
for the non-selectable text gets 2.5x slower. However, we concluded
that we accept this performance regression since it still 10 times
faster than non precomputed text.

Here is a precomputed text performance result of TextView.
newLayout_PrecomputedText : 736,130 -> 1,648,694: (+124.0%)
newLayout_PrecomputedText_Selectable: 17,379,765 -> 1,700,146: (-90.2%)
onDraw_PrecomputedText : 1,274,921 -> 1,848,076: (+45.0%)
onDraw_PrecomputedText_Selectable : 17,367,238 -> 1,399,169: (-91.9%)
onMeasure_PrecomputedText : 752,875 -> 1,766,606: (+134.6%)
onMeasure_PrecomputedText_Selectable: 17,647,842 -> 1,810,704: (-89.7%)
setText_PrecomputedText : 92,894 -> 135,471: (+45.8%)
setText_PrecomputedText_Selectable : 145,134 -> 215,757: (+48.7%)

Bug: 72998298
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text

Change-Id: Ie98c75d8b4ba962eaf0a544357b2ff1ade891118
be8b90b966f8e75276a9a9158fab1a3057d637d9 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Stop creating PrecomputedText in StaticLayout" into pi-dev
60b06bd217a92279c89ae2743285c7e3cfaeb5af 21-Mar-2018 kopriva <kopriva@google.com> docs: fixing typo in reference document

Test: make ds-docs

Bug: 36998786
Change-Id: I7b0f5623eec608436eacd5d27d63a3f6b41cc419
6ed6340e3cd43fc111fb4916b380da61eba834c4 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "SoundTriggerJobService-steps" into pi-dev

* changes:
Throttle number of sound trigger operations / day
Add SoundTriggerDetectionService
Expose SoundTriggerManager and SoundTrigger APIs
efcd6e1ceb5363f37f49569f93e9ae9cfd20ddc2 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix confusing Log.e message in SpellCheckerSession" into pi-dev
6e7e028b62760c1884eef876186718ac8a2bebbb 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Screen off animation" into pi-dev
daec95a7f50d1227dd7129342ae667f0b5d30553 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Get current and default brightness configs." into pi-dev
c3328d648e827c8a65f46ed3a8b0ec96076b5ebe 20-Mar-2018 Seigo Nonaka <nona@google.com> Stop creating PrecomputedText in StaticLayout

No performance regressions are expected

create NoStyled Hyphenation : 17,849,966 -> 17,858,570: (+0.0%)
create NoStyled Hyphenation WidthOnly : 17,814,338 -> 17,801,205: (-0.1%)
create NoStyled NoHyphenation : 7,123,449 -> 7,068,308: (-0.8%)
create NoStyled NoHyphenation WidthOnly : 7,108,169 -> 7,074,908: (-0.5%)
create Styled Hyphenation : 12,179,203 -> 12,131,020: (-0.4%)
create Styled Hyphenation WidthOnly : 12,112,347 -> 12,241,311: (+1.1%)
create Styled NoHyphenation : 11,870,126 -> 11,880,442: (+0.1%)
create Styled NoHyphenation WidthOnly : 11,836,742 -> 11,860,292: (+0.2%)

create PrecomputedText Balanced Hyphenation : 697,713 -> 691,148: (-0.9%)
create PrecomputedText Balanced NoHyphenation: 517,113 -> 498,106: (-3.7%)
create PrecomputedText Greedy Hyphenation : 468,243 -> 455,015: (-2.8%)
create PrecomputedText Greedy NoHyphenation : 479,514 -> 461,617: (-3.7%)
create RandomText Balanced Hyphenation : 17,183,044 -> 17,049,811: (-0.8%)
create RandomText Balanced NoHyphenation : 7,183,745 -> 7,025,070: (-2.2%)
create RandomText Greedy Hyphenation : 7,130,841 -> 6,995,785: (-1.9%)
create RandomText Greedy NoHyphenation : 7,122,398 -> 7,037,074: (-1.2%)

draw PrecomputedText NoStyled : 520,306 -> 551,465: (+6.0%)
draw PrecomputedText NoStyled WithoutCache : 545,773 -> 566,956: (+3.9%)
draw PrecomputedText Styled : 826,044 -> 838,979: (+1.6%)
draw PrecomputedText Styled WithoutCache : 829,958 -> 841,749: (+1.4%)
draw RandomText NoStyled : 537,079 -> 545,428: (+1.6%)
draw RandomText NoStyled WithoutCache : 6,473,166 -> 6,445,194: (-0.4%)
draw RandomText Styled : 995,033 -> 1,015,913: (+2.1%)
draw RandomText Styled WithoutCache : 2,725,313 -> 2,770,604: (+1.7%)

newLayout PrecomputedText : 754,311 -> 718,130: (-4.8%)
newLayout PrecomputedText Selectable : 17,716,239 -> 17,484,046: (-1.3%)
newLayout RandomText : 16,657,952 -> 16,511,625: (-0.9%)
newLayout RandomText Selectable : 17,675,222 -> 17,520,653: (-0.9%)
onDraw PrecomputedText : 1,307,123 -> 1,280,009: (-2.1%)
onDraw PrecomputedText Selectable : 17,613,031 -> 17,404,379: (-1.2%)
onDraw RandomText : 17,369,256 -> 17,295,363: (-0.4%)
onDraw RandomText Selectable : 18,207,392 -> 18,077,660: (-0.7%)
onMeasure PrecomputedText : 748,537 -> 739,128: (-1.3%)
onMeasure PrecomputedText Selectable : 17,842,953 -> 17,784,459: (-0.3%)
onMeasure RandomText : 16,633,454 -> 16,549,182: (-0.5%)
onMeasure RandomText Selectable : 18,022,286 -> 17,873,919: (-0.8%)
setText PrecomputedText : 120,769 -> 119,496: (-1.1%)
setText PrecomputedText Selectable : 162,411 -> 150,809: (-7.1%)
setText RandomText : 11,096 -> 10,956: (-1.3%)
setText RandomText Selectable : 48,852 -> 48,593: (-0.5%)

Bug: 72998298
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text

Change-Id: I3af758ecc5a15975c4e59c6378faf7c14c3bd65b
681ec3128e3c3d7ea49bccff2e5615401ac92baf 21-Mar-2018 Fyodor Kupolov <fkupolov@google.com> Include additional information in the dumpsys

Test: adb shell dumpsys dbinfo system
Bug: 64262688
Change-Id: I43d76e505e4d5598994c9af3e615c572017f120c
4cc3a1c056f69ac4da1dc5055c36b7357e9f673c 08-Mar-2018 Jiyong Park <jiyong@google.com> Remove FlpHardwareProvider

After Treble's FLP merge into GNSS HAL, the FlpHardwareProvider is just
an empty shell. Removing FusedLocation and/or Flp + Hardware classes

Bug: 35726697
Test: m -j
Test: Open Google Map and then walk around. The dot moves as I walk.
Change-Id: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
0cf7b310125ea283f2177d705cb134e895ff32bd 21-Mar-2018 Yohei Yukawa <yukawa@google.com> Fix confusing Log.e message in SpellCheckerSession

With this CL, calling SpellCheckerSession#close() multiple times will
no longer show the following error message in logcat, which was quite

E SpellCheckerSession: ignoring processOrEnqueueTask due to
unexpected mState=TASK_CLOSE scp.mWhat=TASK_CLOSE

Note that with a recent CL [1], we now more often see the above
message. A typical scenario is:

1. App creates SpellCheckerSession x.
2. App calls x.close().
3. x is garbage-collected. ART calls x.finalize(), which internally
calls x.close() again.

[1]: I4e00c3a2cec93d1dacff20546e481fe757279661

Bug: 72974646
Fix: 72974646
Test: Made sure that no error message in question with a test app
that calls SpellCheckerSession#close() multiple times then
trigger SpellCheckerSession#finalize().
Change-Id: Ie9690860e6d0406dc6746cd03c28f693e65c1dde
6a7f167f67586921d372121327087e492da60188 21-Mar-2018 kopriva <kopriva@google.com> docs: fixing bug 36982027 and 30636712, typos

Test: make ds-docs

Bug: 36982027
Bug: 30636712

Change-Id: I70d6d216c714a31b7e762a203a27f6124642131e
db0e4f1d733392f5e7fca335d51cc17b6c7a23fb 21-Mar-2018 Selim Cinek <cinek@google.com> Merge changes from topic "heads_up_redesign" into pi-dev

* changes:
Added new appear and disappear animations for heads up
Polished the heads up experience
Removed the heads up scrim and replaced it with more elevation
Insetting heads up notifications
Ensured that the heads-up notifications are always rounded
d0661a081d273b6c89e487a6fdbfad6df4b6d66c 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Distinguish between createSurface error codes." into pi-dev
6c6e9cab42bccb44ebb4b30e7eab7394c0dbb759 21-Mar-2018 Yi Jin <jinyithu@google.com> Remove am/wm.proto which is redundant. The naming convention is defined
in core/proto/README.md

Bug: 72474563
Test: make sure the Android build
Change-Id: I2a90cbb6bb0b0c62fe4a0b81cb5bb3ea36381871
62fa81f7b493f44680aa6cad7c3d9e5b89a24cee 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move the trusted root CA certs for RecoverableKeyStore to our own folder" into pi-dev
35a4f4c4a6208774684aa9eaea9f00cbd66f3e22 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "API Review: Documentation improvement for standby buckets" into pi-dev
54ff524a2baa130cdcedfe158d2b61af251a2e25 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Introduce new constructor for not copying NoCopySpan" into pi-dev
6c0f42b3b53418cbe292263c40f6a724d932968f 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ability to hide/unhide suspended app notifications" into pi-dev
764f123b97b77bc818d1500eb6167b3e1bc3997b 21-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check if the given user is unlocked when unlock by token" into pi-dev
f1510fbe7a87bce9100a520240282d8565906fba 01-Mar-2018 Michael Plass <mplass@google.com> Add Settings.Global.WIFI_SCORE_PARAMS

For experimentally varying parameters of the framework's various wifi
scoring methods.

Bug: 65216267
Test: atest SettingsBackupTest
Change-Id: I6b1476aff8c18e4dd2b5ae8d41b5a48d2b4de283
c8f63060adc880eb6cfdee1e08cafcf2f379096a 20-Mar-2018 Nathan Harold <nharold@google.com> Expose add/removeAddress for IpSecInterfaces

When exposing the APIs, these were missed.
The outer structure is exposed, so this exposes
the addAddress and removeAddress methods.

Bug: 75234273
Test: compilation
Merged-In: I79911434f9baa660e4d8564cc59d80da4a710c42
Change-Id: I79911434f9baa660e4d8564cc59d80da4a710c42
(cherry picked from commit a83601a511c3f11470109d78d1a736acdb9c6bd8)
da4b0c65a5cbebf6c5e66b869b75dd3a6625cd2e 02-Mar-2018 Benedict Wong <benedictwong@google.com> Added implementation for VTI add/remove address

This change adds implementation details for add/remove addresses onto a

Bug: 73675031
Test: New tests added, passing on Walleye
Merged-In: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
(cherry picked from commit ecc9f7cc08804e3fa15fea04ae94ea1bc74edbfe)
16cfe45dec96154d37b36364f67cedce16ca2484 08-Feb-2018 Lucas Dupin <dupin@google.com> Screen off animation

SysUI can now control the screen off animation as long as
config_dozeAfterScreenOff is set to false.

The current implementation collapses the notification shade and moves
the clock whenever the use is on the lock screen, or will fade the
scrims and show the clock when the keyguard is occluded.

Display state change (on, doze, doze_suspended) is delayed to let the
animations occur at 60Hz.

Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeUiTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Test: atest tests/src/com/android/systemui/statusbar/phone/DozeScrimControllerTest.java
Test: atest tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/keyguard/WakefulnessLifecycleTest.java
Fixes: 73178121
Change-Id: Id5d964452f342d4e97bedf1084efa808604e602c
60b877fa8c8c823bcfdb228d847eb1f87f6d4521 20-Mar-2018 Andrii Kulian <akulian@google.com> Merge "Use transaction for local activity relaunch" into pi-dev
aa9db1f34fe8b4a2d143c1379ec6c0c304bbd40b 28-Feb-2018 Selim Cinek <cinek@google.com> Insetting heads up notifications

Heads up notifications are now corretly respecting insets.
instead of overlapping with any possible notches, we're
insetting heads up notifications and splitting the main
content from the header.

Fixes: 72748440
Test: runtest systemui
Change-Id: Ie53ea31fef4e468239c4346f9d1f192bcb26e11d
d7b359165968199e034bd46ca97526dbf719602d 16-Mar-2018 Hansong Zhang <hsz@google.com> Hearing Aid Profile: set and get activeDevice

Add setActiveDevice() for Hearing Aid Profile in SettingsLib

Bug: 69623109
Test: robolectric test and manual test
Change-Id: I70eafe030747053876e2ab8a125d5dd01c5e0eb9
c5c4a0e9481cdb7e40eddf31d53becb9ea82aca6 20-Mar-2018 Bo Zhu <bozhu@google.com> Move the trusted root CA certs for RecoverableKeyStore to our own folder

Bug: 74621071
Test: runtest frameworks-core -p android.security.keystore.recovery
Change-Id: I3668594b29f56832f2a1fe78b01f585c897bf952
982973934d8c4cca7f692e584ee4de53d2b94164 20-Mar-2018 Andrii Kulian <akulian@google.com> Merge "Don't set override display info for ActivityView" into pi-dev
1486849e8b8c5e26de847cdb343d166cd647d63c 20-Mar-2018 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Deprecate LENS_RADIAL_DISTORTION, add LENS_DISTORTION" into pi-dev
0b08926fcb0391f47a07073553dd06c71d43ea4f 20-Mar-2018 Alice Sheng <alicesheng@google.com> Merge "Revert "Revert "Add setting for enabling CPU frequency scaling.""" into pi-dev
fa23f8e30eed331f3cce779f41eb93a15682db4c 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[DO NOT MERGE] Eliminate duplicate layers in A11yService#getWindows()" into pi-dev
5a20a5ed2f67f8bc829a50a5ce03e56a50323831 06-Mar-2018 Beverly <beverlyt@google.com> Ability to hide/unhide suspended app notifications

Test: NotificationListenerVerifierActivity.java
Test: atest NotificationDataTest NotificationListenerServiceTest NotificationManagerServiceTest
Bug: 73965645
Change-Id: I49a02e9fd84dfaa1891437a5d8fc52109a43cded
1c7c2bdd0be30eb2dfebf1ebf4c354fe228b533f 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Log visual interruptions to usagestats." into pi-dev
3483bc7d648ad96916eb68203103dc9668dd0be7 20-Mar-2018 Seigo Nonaka <nona@google.com> Introduce new constructor for not copying NoCopySpan

To hold the original text in PrecomputedText, need to create
SpannableString, but copying NoCopySpan causes some side effect.
This CL introduces a way of copying SpannableString/SpannedString
with all spans other than NoCopySpan.

Bug: 72998298
Bug: 35638900
Test: atest CtsWidgetTestCases:EditTextTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text

Change-Id: I20dea2114ccaa54b16ff679c97682a5003f9a4c1
06ce5f6803c65bb69f2961ba4e917b57da45058b 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make SYSTEM_INTERACTION a SystemApi" into pi-dev
cb686a19e6be88e8e69f03b67687ed78d904e576 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Minor changes to the API to align the choice of password hashing algorithm" into pi-dev
002e0ef06e106432b2984eeb75045208e836ebd4 20-Mar-2018 Andrii Kulian <akulian@google.com> Merge "Don't throw exception for duplicate stop" into pi-dev
77d73605979a19e377c97df1c82a2dfd8e3a71cd 20-Mar-2018 Andrii Kulian <akulian@google.com> Use transaction for local activity relaunch

To know that onPostCreate callback should be executed we should use
TransactionExecutor for the entire transaction. It will fill
PendingActions object during the launch and the callback will be
triggered after onStart.
This CL changes local activity relaunch to use Lifecycler

Bug: 72029061
Bug: 64610483
Fixes: 73747058
Test: ActivityLifecycleTests
Change-Id: I7d3fa6339fa6fe2634d0d1635f76e4d6ba03beb2
18e3eb816887156f40def1c14db434ddde9ec245 10-Mar-2018 Philip P. Moltmann <moltmann@google.com> Add SoundTriggerDetectionService

The service is meant to replace the PendingIntent based API. Once all
users of the PendingIntent based API switched the PendingIntent based API
will be removed.

To have as little as possible impact on the whole SoundTrigger framework
the RemoteSoundTriggerDetectionService class implements the same
interface as the PendingIntent based class. Hence the exising code has
very little change. Further once the old code can be removed the amount
of changed (and added) code is limited.

The RemoteSoundTriggerDetectionService -> SoundTriggerDetectionService
is a vanilla as possible service implementation. The special behaviors
- The system holds a wakelock while service operations are in progress
and the service is bound as foreground. Hence the service can e.g.
listen to the microphone.
- Service operations have a certain amount of time they are allowed to
run. Once every operation is either finished or the the operation
exceeded the allotted time, the system calls onStopOperation for each
still pending operation. This is a similar model as for the commonly
used JobService.
Please note that if the time allowed for an operation is 15s and
op1 was run as 0si, and op1 was run at 5s, the service is allowed to run
until 20s. Hence _both_ onStopOperations will happen at 20s. This is
done for ease of implementation but should not give the service more
power than calling onStopOperation exactly 15s after each operation is
- If an operation is done before the allotted time is reached, the
service can declare the operation as finished manually by calling
onOperationFinished. This is a call back into the system, hence a
'client' binder is sent to the service. If the operation is finished
by calling this method onStopOperation will not be called.
- As the service instance might be killed and restored between
operations we add a opaque bundle 'params' to each operations. The users
of the API can use this to send data from the start command to the
operations. It can also just be set to null. The params are not meant to
store changing state in between operations. Such state needs to be
persisted using the regular methods (e.g. write it to disk)
- A service can be used for multiple recognition sessions. Each
recognition is uniquelity defined by its sound model UUID. Hence each
operation gets at least tree arguments: Operation ID, sound mode UUID, params
- As a small optimization the params are cached inside of the service

The time allowed for each operation is in a @SystemAPI global setting,
so the service can make sure it finishes the operations before they are
stopped. It might take some time to deliver the operations via the
binder, hence it is not recommended to try to use every last ms of
allotted time.

Test: atest SoundTriggerDetectionServiceTest (added in separate CL)
atest android.provider.SettingsBackupTest
Change-Id: I47f813b7a5138a6f24732197813a605d29f85a93
Fixes: 73829108
a5fd0294c76c1faa3479a2093ae3e5f0838791ad 06-Mar-2018 Philip P. Moltmann <moltmann@google.com> Expose SoundTriggerManager and SoundTrigger APIs

These APIs require a system permissions, hence SystemAPI.

As SoundTrigger is now partially SystemApi and partially internal API a
lot of @hide tags are needed to keep hiding the still internal classes,
fields and methods. As SoundTrigger is heavily used via reflection no
structural change to this class can be made.

The MANAGE_SOUND_TRIGGER permission should be visible to the apps as
the apps need to know which permission to request in their manifest.
If it wouldn't be exposed it would just be a magic string.

Test: built
Change-Id: Ic93d67639e2605c26c961acdd827c14cb0a68f47
Bug: 73829108, 71981721
106387f0b283beeb5318f05e2033f15798e274b3 06-Mar-2018 Jason Monk <jmonk@google.com> Some Slices API refinement

Removing overloads, fixing documentation, adding stringdefs, etc.

Test: update-api
Change-Id: Iae902092a29d44c3f4735ad2c3392bb35988684a
Fixes: 73124159
Bug: 73123366
Fixes: 73123451
Fixes: 73123651
Fixes: 73124123
6abde8b1287e4d25c89a85c40407eb26dd13d8a1 15-Mar-2018 Gustav Sennton <gsennton@google.com> Add API WebView.getWebViewLooper()

We want to rename WebView.getLooper() to contrast it better with the
unrelated method WebView.getHandler(). For now we just create a method
to replace WebView.getLooper(), so that we can remove references to
WebView.getLooper() before removing it.

Bug: 74831609
Test: make
Change-Id: I8e493a67aa078f9c8ceea6706dc940abacfdd6e6
039deb4390fee97d50c474202dfe5de0616f9772 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Moves the settings changed logging for statsd." into pi-dev
c863d506cfb0df24f8a5291a3ae33434e75f014d 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expose if running a11y service has crashed" into pi-dev
90df705a0ba361bfcb0d2ea86f24b6691f824509 20-Mar-2018 Sunny Goyal <sunnygoyal@google.com> Merge "Updating javadoc for updateAppWidgetProviderInfo API" into pi-dev
f0379de259d77659af0ba40362d870fe74358745 15-Mar-2018 Andrii Kulian <akulian@google.com> Don't set override display info for ActivityView

ActivityView content should never be letter- or pillar-boxed
and it doesn't have overscan areas, so we can skip setting
display override info for a virtual display that backs it.

Bug: 72220802
Test: Manually resize with ActivityView demo app
Change-Id: I211449eaea50ec5d3214d63e7eb93a1d2ed2c0fd
18e7fc1114b138e9212db2d034013e40fb2cb7ef 16-Mar-2018 Eugene Susla <eugenesusla@google.com> [DO NOT MERGE] Eliminate duplicate layers in A11yService#getWindows()

Fixes: 73904014
Test: using TestBack, ensure the attached bug is fixed
Change-Id: I097ca47563420d658cea083a3b6f8d5e7d02991c
(cherry picked from commit 8f0124190ac0386a9429724b5fdf8f491b8cad05)
9be845c5cd73a975b19182e720e15cce55810103 16-Mar-2018 Benedict Wong <benedictwong@google.com> Add support for auth-only transforms

Kernel limitations prevent auth-only SAs from being created. Explicitly
request a null encryption algorithm instead of omitting the algorithm
to comply with the kernel requirement for ESP.

Bug: 75049573
Test: CTS tests for auth-only, crypt-only transforms added for all
combinations of (UDP, TCP, IPv4, IPv6, UDP-encap) Also added unit
tests to ensure correct triggering of NULL_CRYPT usage.
Merged-In: Ia9a5cfee9c7786412846bc039f326420f6211c08
Change-Id: Ia9a5cfee9c7786412846bc039f326420f6211c08
(cherry picked from commit bf013a3820c69348e034c6340b28e95f3441ebe8)
7217dc9f769ccb6e4351011ea9887871c2a4ffb4 07-Mar-2018 Julia Reynolds <juliacr@google.com> Log visual interruptions to usagestats.

Test: runtest systemui-notification, cts
Bug: 74318867
Change-Id: I6233240c2a7940225cadde0258b5d7ba88b86aaf
853e53f6e8063362cfa5f6417a1c15cddf01601f 17-Mar-2018 Amith Yamasani <yamasani@google.com> API Review: Documentation improvement for standby buckets

Specify how to compare with bucket constants since new
bucket constants could be introduced later.

Fixes: 73790511
Test: builds

Change-Id: Ib99ec5fe208bc612869df8bfc69a26ee6be31fa5
33a412b52d49c15e2948f3392b7c619c4e3e308d 17-Mar-2018 Tej Singh <singhtejinder@google.com> ScheduledJobStateChanged: add stop reason

Adds stop reason to scheduled job state changed

Bug: b/71755130
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testScheduledJobState
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.JobSchedulerIncidentTest
Change-Id: Ic29a5e9160ac258140a52d31bc6210300949545d
6446ed4a0f551b855474b34d7e6677120af943be 20-Mar-2018 Chris Wren <cwren@android.com> Merge "support framework logging for slices" into pi-dev
e1671a5c744193d74d009de3c706d733b27a285e 20-Mar-2018 Anthony Stange <stange@google.com> Merge "DO NOT MERGE Add scan background mode to Settings.Global." into pi-dev
c6d6f55ec4850642bb80d42a4f7165ff07d2a0fe 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "NfcAdapter.EXTRA_SE_NAME -> NfcAdapter.EXTRA_SECURE_ELEMENT_NAME" into pi-dev
0b417b9b04dd728bf1e4dec553896992f6e9c785 20-Mar-2018 Sunny Goyal <sunnygoyal@google.com> Updating javadoc for updateAppWidgetProviderInfo API

Bug: 74838920
Test: N/A
Change-Id: I531676900fbf8d60ef7050c86a570112ff1ad476
bab773d23ff8dedcf5a258362c4c603da63dafe5 19-Mar-2018 Hongwei Wang <hwwang@google.com> Check if the given user is unlocked when unlock by token

Bug: 76010226
Test: None

Change-Id: I2ceea0f185c5e54a9c2a529a9cf8db78587c4072
8cf1ae492877182fe37aca4237f67fb0634047fb 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Auto zen rules reset for some upgrading users" into pi-dev
83ad4e53b63810b5a57ede50b24ac2a622ab2957 20-Mar-2018 Leon Scroggins <scroggo@google.com> Merge "Scale up in ImageDecoder based on API level" into pi-dev
9129aa25c1e9e20a652aa09d5742e0c4789cffc4 20-Mar-2018 Emilian Peev <epeev@google.com> Camera: Async camera manager calls should use executors

Methods in camera manager that receive and invoke user supplied
callbacks should also be able to accept executors and invoke them
instead of using user handlers.

Bug: 73953366
Test: Camera CTS
Change-Id: I2f22ada463d7debb90beba3e31579cdb4df42506
8290eaba47b99398fbe0bd59138f902bde558ecb 19-Mar-2018 Leon Scroggins III <scroggo@google.com> Scale up in ImageDecoder based on API level

Bug: 74061412
Bug: 73893665
Test: Manual, I5669a97c70d726826c5c00bc1413c2f97d95d88c

ImageDecoder typically does not scale a Bitmap up to handle density.
This saves memory, and we already handle the density by scaling at
draw time. But some apps rely on the size of the Bitmap without taking
density into account. For backwards compatibility, on apps that are
built for a pre-P version of Android, scale up in ImageDecoder.

Change-Id: I9991d1286e386b47fc57bcfbf0c6652beb1a53ef
a382a8e668445e51aa2f035aedccb91edd1503be 16-Mar-2018 Peter Visontay <pvisontay@google.com> Add missing "android:" prefix to some app op constants.

Bug: 75253734
Test: none
Change-Id: Ie91b4bee938b9c834c2cb3c831e3473fab0f534c
4e2f76c3efce2af7ac0ef6ef61e3b33af8a2f7a0 16-Mar-2018 Beverly <beverlyt@google.com> Auto zen rules reset for some upgrading users

Automatic zen rules will be set to the undeletable,
default rules for for fresh P devices and for upgrading users
who didn't have any zen automatic rules enabled on upgrade

Bug: 74381638
Test: atest ZenModeHelperTest
Change-Id: Icfa7dfe6c99cb9d67821df0034d5e9a3457b2ef4
c97870a91ab4eadb03dec6fbdebd01cb6663ae3d 14-Mar-2018 Anthony Stange <stange@google.com> DO NOT MERGE Add scan background mode to Settings.Global.

This enables us to mess with the different scan intervals and shift
clients to a different scan mode in the background based on what scan
interval values we choose for the different power modes.

Bug: 71765044
Test: None. Just adding a key.
Change-Id: Id48ebc521dd3fe8a68c9c4c0bdb1018ea5b3743e
837f1364f612781cf6d34a6ef55617692631b790 20-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Frameworks: Handle exceptions in SystemProperties callbacks" into pi-dev
e066a59436579f8d7961e97e4aef6e26e5e1c659 20-Mar-2018 Bo Zhu <bozhu@google.com> Minor changes to the API to align the choice of password hashing

The password hashing algorithm has existing implementation in AOSP.

Bug: 75024420
Test: None
Change-Id: If1b07dadf21837af1cb2835df3f12c234894f57e
fdffe0a8be838afb3b0a8cc18a71e35e9631bbef 20-Mar-2018 kopriva <kopriva@google.com> docs: fixing typo, bug 36909553
am: 4dddc63ee7

Change-Id: Ib943321651422b55b928b90617145a871a0d0460
92fc065cf6d5f3d114a9ddf894518e39218c418d 17-Mar-2018 Andreas Gampe <agampe@google.com> Frameworks: Handle exceptions in SystemProperties callbacks

When notifying callbacks, catch thrown exceptions.

(cherry picked from commit 7074e6fd4c6289e016666bb21e7eee2f78219141)

Bug: 73058952
Test: m
Test: atest SystemPropertiesTest
Merged-In: I1c61e11b833e8ddd30d80b9859b20a9fb3185a33
Change-Id: I1c61e11b833e8ddd30d80b9859b20a9fb3185a33
dbb0a49f00b33d5e8eeb9b6ce4b9f972f89250ae 20-Mar-2018 Sunny Goyal <sunnygoyal@google.com> Merge "Updating java doc for requestPinAppWidget" into pi-dev
829829ca2c1804147dd42b106e5d7f1efe99a1f9 20-Mar-2018 Andrii Kulian <akulian@google.com> Don't throw exception for duplicate stop

A double stop request is possible when display is being locked.
An activity may receive a "sleep" message followed by "stop",
both of which try to move it to stopped state.

An example when this happens: a keyguard is set up and the screen
is being locked. The keyguard will occlude the activity, which
causes a transition to paused state and, eventually, to stopped
state. A "sleep" message can be sent sometime before "stop" message
and will ignore that activity is in the process of becoming stopped.

Change-Id: I09e2c26004664b6e73ac5c2b6fe88bdf8271cf34
Fixes: 74967786
Test: FrameworksCoreTests:ActivityThreadTest
bd78991bc6a1319c97172a53fd1c0bddb3200332 17-Mar-2018 David Chen <dwchen@google.com> Moves the settings changed logging for statsd.

Previously, we wrote a log entry regardless of permission checks, so
the logging could be misleading. Now we only send the log to statsd
after verifying that this setting mutation is valid.

Test: Flashed onto marlin-eng and verified stats-log as expected.
Bug: 73493944
Change-Id: I2a8b052aa8c380ffc5d15caec089fffcdc5823f4
59a9488f507cf494092bcd9ce1cf2c1c88937ee4 20-Mar-2018 Alice Sheng <alicesheng@google.com> Revert "Revert "Add setting for enabling CPU frequency scaling.""

This reverts commit 6750352248bcce6668eabd1911d092b7fe31a1cd.

Reason for revert: Added SElinux policy to allow the service to be started. Verified by local testing on the latest pi-wear-dev.

Bug: 74018496
Bug: 75974893
Change-Id: I9bd8939f6292be9c160e19ebdf934023792059ba
7723aed494798afa0ac01998226eec8c6397fb78 19-Mar-2018 Alice Sheng <alicesheng@google.com> Merge "Revert "Add setting for enabling CPU frequency scaling."" into pi-dev
6750352248bcce6668eabd1911d092b7fe31a1cd 19-Mar-2018 Alice Sheng <alicesheng@google.com> Revert "Add setting for enabling CPU frequency scaling."

This reverts commit 2e8afd8736cba3352bcbf585461becb20a7c7600.

Reason for revert: SELinux Boot crash
Bug: 75974893

Change-Id: I4751530a1b460842130a495efe688aaf19b92638
f4f317798b05634bac9fe94e33b71806e21ff6b8 19-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Settings: Remove unused bg scan throttle settings" into pi-dev
46c84bf237f0e1e4a60fbe763d0b699ad253ca85 19-Mar-2018 Siyamed Sinir <siyamed@google.com> Merge "Fix rounding error related to autoSize" into pi-dev
46c0e91b74fbddf0031175ec855b11a12581fe11 19-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removing the settings-based IncidentReportArgs method." into pi-dev
83c4690f5504a5c0c8ff16f7669d56d08348e028 19-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera2: Use Set for physical camera IDs" into pi-dev
f679bda84369aa47049614087c7bc1913d04c4ec 19-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move trusted CA certs to core" into pi-dev
0f8f3f25cfa0d93745b0986e57b0c86747099054 19-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Frameworks: Fix Binder.joinThreadPool" into pi-dev
e9b60f2cd3d89a7dc46bbe26055fb30b9ef2945f 19-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add setupwizard personalisation state to Settings" into pi-dev
4dddc63ee7c09f5ef243591700502160c08dc337 19-Mar-2018 kopriva <kopriva@google.com> docs: fixing typo, bug 36909553

Test: make ds-docs

Bug: 36909553
Change-Id: I6e6842fe555690d97b954c370b777b25c6f5e54e
036a2409fced32087dcfe7044d8f01ddd06a94a6 19-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dispatching display list recreations also to transient views" into pi-dev
fa38f238b1f35195fcef8ec7a66f3151c7c9f660 19-Mar-2018 <