OSDN Git Service

android-x86/frameworks-base.git
5 years agoActivityMetricsLogger: Fix cold launches treated incorrectly as invalid transitions
Vishnu Nair [Fri, 12 Apr 2019 20:51:40 +0000 (13:51 -0700)]
ActivityMetricsLogger: Fix cold launches treated incorrectly as invalid transitions

In some cases where the process is killed and the activity is launched, its start result will be
START_TASK_TO_FRONT if its TaskRecord already exists. In this case the launch should be treated
as a COLD launch since the process will be created.

Bug: 130401938
Test: atest ActivityMetricsLoggerTests
Change-Id: I2841fe198d189be692c38f94829604bd1e4aa3b5

5 years agoMerge "Address leftover comments on aosp/894233" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 13:39:29 +0000 (13:39 +0000)]
Merge "Address leftover comments on aosp/894233" into qt-dev

5 years agoMerge "Shell: Grant CACHE_CONTENT to Shell" into qt-dev
Narayan Kamath [Tue, 9 Apr 2019 13:34:30 +0000 (13:34 +0000)]
Merge "Shell: Grant CACHE_CONTENT to Shell" into qt-dev

5 years agoMerge "Fix TaskPositionerTests" into qt-dev
Charles Chen [Tue, 9 Apr 2019 12:23:12 +0000 (12:23 +0000)]
Merge "Fix TaskPositionerTests" into qt-dev

5 years agoAddress leftover comments on aosp/894233
Chalard Jean [Mon, 8 Apr 2019 11:28:44 +0000 (20:28 +0900)]
Address leftover comments on aosp/894233

Cherry-pick from commit 415f523f7ce4c7e33fa70ea003f265e5b53faa20,
with small conflict resolution.

Bug: 129510344
Test: m, boots, wifi connects, resolves DNS
Change-Id: Idf24f42a86bbfcc89e3ea8cf50d1b705d72ac613
Merged-In: Idf24f42a86bbfcc89e3ea8cf50d1b705d72ac613
Merged-In: Ia08104f839ef37139a8761e2e625bb10c94c275f

5 years agoMove the latest AIDL update to the bottom
Chalard Jean [Fri, 5 Apr 2019 07:38:21 +0000 (16:38 +0900)]
Move the latest AIDL update to the bottom

Test: m
Bug: 128803828
Change-Id: I3818eb8abb5a410663a6da633d5516cef4ecad8e
(cherry picked from commit 45ff048d40f1b0b9ff6ff1e1b19dafc4488c82a0)

5 years agoMerge "Move data stall definitions out from Setting" into qt-dev
Chiachang Wang [Tue, 9 Apr 2019 11:52:54 +0000 (11:52 +0000)]
Merge "Move data stall definitions out from Setting" into qt-dev

5 years agoMerge "Sharesheet: Rank the first N apps, then show the rest alphabetically." into...
TreeHugger Robot [Tue, 9 Apr 2019 11:10:00 +0000 (11:10 +0000)]
Merge "Sharesheet: Rank the first N apps, then show the rest alphabetically." into qt-dev

5 years agoMerge "Fix ConnectivityServiceTest fail." into qt-dev
Lorenzo Colitti [Tue, 9 Apr 2019 10:25:10 +0000 (10:25 +0000)]
Merge "Fix ConnectivityServiceTest fail." into qt-dev

5 years agoMerge "DynamicSystem string review followup" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 10:22:19 +0000 (10:22 +0000)]
Merge "DynamicSystem string review followup" into qt-dev

5 years agoMerge "Add a mechanism to pass the L2Key and group hint to IpClient" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 10:21:39 +0000 (10:21 +0000)]
Merge "Add a mechanism to pass the L2Key and group hint to IpClient" into qt-dev

5 years agoMerge "Fix NPE in ActivityRecord" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 09:16:02 +0000 (09:16 +0000)]
Merge "Fix NPE in ActivityRecord" into qt-dev

5 years agoMerge "Fix flaky UdpEncapsulationSocket test" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 09:15:02 +0000 (09:15 +0000)]
Merge "Fix flaky UdpEncapsulationSocket test" into qt-dev

5 years agoFix ConnectivityServiceTest fail.
paulhu [Thu, 4 Apr 2019 07:57:26 +0000 (00:57 -0700)]
Fix ConnectivityServiceTest fail.

NetdService#getInstance() will get null object in
WrappedConnectivityService constructor. Then pass this null
INetd object to PermissionMonitor will case NPE in
PermissionMonitor#sendPackagePermissionsToNetd()

Bug: 128024100
Test: atest FrameworksNetTests
Change-Id: Ia1c80f9600a19c4aaf3f3c1b497b355d96c49c8e
Merged-In: I7f185e731db91c30a9b0f14aefbdbb067942190e
Merged-In: Ic77ef73841266da487401ffd657ef63562b6fc1e
(cherry picked from commit 7d215078521ea03bbd692364e882d02ad065ced0)

5 years agoShell: Grant CACHE_CONTENT to Shell
Narayan Kamath [Mon, 8 Apr 2019 16:32:33 +0000 (17:32 +0100)]
Shell: Grant CACHE_CONTENT to Shell

Required to test ContentResover#[get|put]Cache

Bug: 127711435
Test: atest CtsContentTestCases
Change-Id: I5eb72772a0a35897611dd6db95c68a2d2e971e9a

5 years agoMerge "Extend support for requestRouteToHostAddress for backward compatibility" into...
Lorenzo Colitti [Tue, 9 Apr 2019 08:46:12 +0000 (08:46 +0000)]
Merge "Extend support for requestRouteToHostAddress for backward compatibility" into qt-dev

5 years agoMerge "Don't leak captive portal broadcast receivers." into qt-dev
Lorenzo Colitti [Tue, 9 Apr 2019 08:39:22 +0000 (08:39 +0000)]
Merge "Don't leak captive portal broadcast receivers." into qt-dev

5 years agoMove data stall definitions out from Setting
Chiachang Wang [Mon, 8 Apr 2019 11:06:21 +0000 (19:06 +0800)]
Move data stall definitions out from Setting

From mainline perspective, we should use android flag api
instead of using Settings. Thus, move the definitions into
NetworkStack.

Bug:120013793
Test: atest NetworkStackTests SettingsBackupTest
Change-Id: I8e1fb5b47fff3bf624131ba1f5732daabd991e6d

5 years agoAdd a mechanism to pass the L2Key and group hint to IpClient
Chalard Jean [Fri, 15 Mar 2019 14:10:40 +0000 (23:10 +0900)]
Add a mechanism to pass the L2Key and group hint to IpClient

Test: IpClientTest
Bug: 128803828
Change-Id: I399b20ce29a385a74971b7a7248a48cb4d66deb6
(cherry picked from commit 3cab290648a0a0f6e5f6c64c2225b3661aabba2f)

5 years agoFix NPE in ActivityRecord
Charles Chen [Fri, 29 Mar 2019 07:18:45 +0000 (15:18 +0800)]
Fix NPE in ActivityRecord

This issue happened when we get null ActivityRecord.
Add a null check to prevent.

Also fix typo in ActivityStack.

Test: atest ActivityRecordTest
Fix: 129485624

Change-Id: I93b7dda1577b34f58fb5daed201404de4cfbad2e

5 years agoExtend support for requestRouteToHostAddress for backward compatibility
Anil Admal [Mon, 8 Apr 2019 19:36:02 +0000 (12:36 -0700)]
Extend support for requestRouteToHostAddress for backward compatibility

The gnss@2.0 HAL and the framework GNSS Location Provider code is
updated in Q to not call the deprecated requestRouteToHost() method.
However, devices upgrading to Q which are still using gnss@1.1 or
earlier HAL must continued to be supported.

Fixes: 121222025
Test: Tested with gnss@1.1 HAL and first API level P.  The
      ConnectivityService log message "This method exists only for
      app backwards compatibility and must not be called by system
      services" is not present for devices with first API level P.

Change-Id: I10199776ea413dc256dbf0771e6cb3eedb334495
Merged-In: Ifa60d8f2d60aba4c4e2894dc612c224d45e3992d
Merged-In: Ifa4ec98d5c942522dfd569664f169fa841d495ed
(cherry picked from commit 2eea7ac272431b6e02a0a281207b981b01daf393)

5 years agoFix flaky UdpEncapsulationSocket test
Lorenzo Colitti [Thu, 4 Apr 2019 16:18:29 +0000 (09:18 -0700)]
Fix flaky UdpEncapsulationSocket test

This commit reduces the flakiness of the
testOpenAndCloseUdpEncapsulationSocket by retrying up to three times.
Unfortunately, testing port-selected socket creation is racy against
other applications. This helps to handle the same race condition as done
in IpSecService#bindToRandomPort

Bug: 128024100
Test: 200x runs of testOpenAndCloseUdpEncapsulationSocket
Change-Id: I7e036ce821019dbac6c50899bd0894e89d2fe82a
Merged-In: Idf040a67e53d9b9ec6e6c647ce24f8ada501d355
Merged-In: Iad9aea4b42cd8b31a5a2659bb9cb54dd1c64e8b7
(cherry picked from commit 614ab3dd4e49e9b664f5065983fb9067148fef12)

5 years agoDisable InetDiagSocketTest in a better way.
Lorenzo Colitti [Mon, 8 Apr 2019 19:31:01 +0000 (12:31 -0700)]
Disable InetDiagSocketTest in a better way.

Test: treehugger
Bug: 124354087
Bug: 128024100
Change-Id: I3048625a2507e70402ce376e7208f58cdf5ddfba
Merged-In: I3d8cebec00dde7d0b61469f36887cd5afface043
Merged-In: I1fcb9ca292777fb017e9108a3e12cffba87e1985
(cherry picked from commit 2373c8a129feb562a7893722b9ffa0bf905a4472)

5 years agoTemporarily disable InetDiagSocketTest.
Lorenzo Colitti [Thu, 4 Apr 2019 08:51:30 +0000 (01:51 -0700)]
Temporarily disable InetDiagSocketTest.

This test is too flaky to run in presubmits.

Bug: 124354087
Test: atest InetDiagSocketTest
Change-Id: I90bc52a6f5b92d634862e3464634dfdbd3cada6a
Merged-In: Ic580b9261e0d556ec10f92ddffd8f2766e25f424
Merged-In: Ide5ac3f5316c4671b17fb9486ac56fc5feaf7b08
(cherry picked from commit fdc03bab0be653e1f64e51adb6449f34d795ef6a)

5 years agoDynamicSystem string review followup
Po-Chien Hsueh [Mon, 1 Apr 2019 02:40:51 +0000 (10:40 +0800)]
DynamicSystem string review followup

Some changes to follow string review suggestions:
- Simplify some messages.
- Replace 'Reboot' with 'Restart'.
- Notification action button order: 'Restart' button on the right.

Bug: 129100345
Test: verified with test app
Change-Id: I1ee97b0adbf74add68d3561fc647dc4923ee7237

5 years agoDon't leak captive portal broadcast receivers.
Lorenzo Colitti [Tue, 9 Apr 2019 04:35:03 +0000 (21:35 -0700)]
Don't leak captive portal broadcast receivers.

Since aosp/937885, mLaunchCaptivePortalAppBroadcastReceiver is
nulled out, but not unregistered, when exiting MaybeNotifyState.
This causes the BroadcastReceiver to be leaked because it is no
longer unregistered when processing CMD_NETWORK_DISCONNECTED.

Fix this by unregistering the receiver in MaybeNotifyState#exit.
Also remove the unregister call in CMD_NETWORK_DISCONNECTED: it
is no longer necessary, because StateMachine, before quitting,
will call the exit method of the current state and all its
parent states.

Bug: 122164725
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I447b3cfd3821dda19482ed962dd59ec61fc5fc9b
Merged-In: I1db24fe05ada8b3a37a9a60aa568b6153bf51ad8
(cherry picked from commit 3a1c0ad3eee7830d808106649052dd7430e34f92)

5 years agoMerge "Fix InsetsSourceConsumer visibility" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 05:34:11 +0000 (05:34 +0000)]
Merge "Fix InsetsSourceConsumer visibility" into qt-dev

5 years agoMerge changes from topic "AlwaysExpandLocationQ" into qt-dev
Philip P. Moltmann [Tue, 9 Apr 2019 05:34:01 +0000 (05:34 +0000)]
Merge changes from topic "AlwaysExpandLocationQ" into qt-dev

* changes:
  Do not modify location perms on upgrade
  Only update permissions of one app

5 years agoMerge "Add common tests for FrameworksBaseTests and CTS" into qt-dev
Remi NGUYEN VAN [Tue, 9 Apr 2019 05:16:29 +0000 (05:16 +0000)]
Merge "Add common tests for FrameworksBaseTests and CTS" into qt-dev

5 years agoMerge "Respect the hardware buffer usage flags set by the consumer." into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 04:45:30 +0000 (04:45 +0000)]
Merge "Respect the hardware buffer usage flags set by the consumer." into qt-dev

5 years agoMerge "Remove custom lifecycle transitions for onNewIntent callback" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 04:35:20 +0000 (04:35 +0000)]
Merge "Remove custom lifecycle transitions for onNewIntent callback" into qt-dev

5 years agoMerge "Fixed IFillCallback to be oneway calls." into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 04:20:19 +0000 (04:20 +0000)]
Merge "Fixed IFillCallback to be oneway calls." into qt-dev

5 years agoMerge "Create ThemeOverlayController in SystemUI." into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 04:17:40 +0000 (04:17 +0000)]
Merge "Create ThemeOverlayController in SystemUI." into qt-dev

5 years agoMerge "Adds annotations in response to API feedback." into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 03:10:37 +0000 (03:10 +0000)]
Merge "Adds annotations in response to API feedback." into qt-dev

5 years agoMerge "Increase string limits" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 02:22:26 +0000 (02:22 +0000)]
Merge "Increase string limits" into qt-dev

5 years agoMerge "[SettingsLib] Display WPA2/WPA3-Personal for WPA2/WPA3 transition mode network...
TreeHugger Robot [Tue, 9 Apr 2019 02:17:06 +0000 (02:17 +0000)]
Merge "[SettingsLib] Display WPA2/WPA3-Personal for WPA2/WPA3 transition mode networks" into qt-dev

5 years agoMerge "Fixes crash due to assigning service before linking death recipient." into...
TreeHugger Robot [Tue, 9 Apr 2019 02:06:17 +0000 (02:06 +0000)]
Merge "Fixes crash due to assigning service before linking death recipient." into qt-dev

5 years agoMerge "Add new config config_supportsInsecureLockScreen." into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 01:35:07 +0000 (01:35 +0000)]
Merge "Add new config config_supportsInsecureLockScreen." into qt-dev

5 years agoDO NOT MERGE Add feature flag for PixelLiveWallpaper dogfood in Settings
Ching-Sung Li [Wed, 3 Apr 2019 07:45:35 +0000 (15:45 +0800)]
DO NOT MERGE Add feature flag for PixelLiveWallpaper dogfood in Settings

Add feature flag (settings_pixel_wallpaper_category_switch) in developer
option for PixelLiveWallpaper's dogfood user to turn downloadable Live
wallpaper's category on or off. Expected expiration on: 2019/07/31.

Bug: 128962566
Test: Manual check this feature flag in developer option
Change-Id: Ie9d9180605cf92cf5618999d5a76f4fd87875859

5 years agoMerge "Careful with screenshots containing secure layers!" into qt-dev
Rob Carr [Tue, 9 Apr 2019 00:45:22 +0000 (00:45 +0000)]
Merge "Careful with screenshots containing secure layers!" into qt-dev

5 years agoMerge "[SettingsLib] Fix WPA2 security type string" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 00:26:44 +0000 (00:26 +0000)]
Merge "[SettingsLib] Fix WPA2 security type string" into qt-dev

5 years agoMerge "Fix StatusBarWifiView applying the wrong wifi icon" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 00:19:24 +0000 (00:19 +0000)]
Merge "Fix StatusBarWifiView applying the wrong wifi icon" into qt-dev

5 years agoMerge "Document runtime exception being thrown on afs.getFillEvents()." into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 00:11:36 +0000 (00:11 +0000)]
Merge "Document runtime exception being thrown on afs.getFillEvents()." into qt-dev

5 years agoMerge "Remove Notification atom" into qt-dev
TreeHugger Robot [Tue, 9 Apr 2019 00:04:04 +0000 (00:04 +0000)]
Merge "Remove Notification atom" into qt-dev

5 years agoSharesheet: Rank the first N apps, then show the rest alphabetically.
Alison Cichowlas [Wed, 3 Apr 2019 21:43:22 +0000 (17:43 -0400)]
Sharesheet: Rank the first N apps, then show the rest alphabetically.

Bug: 126566208
Test: atest ChooserListControllerTest
Change-Id: I4277a28cc7ad8a1f08c9a08ec018726161e5d596
(cherry picked from commit 363ed278fb0e7b8b46dff785dded957bd0230791)

5 years agoAdds annotations in response to API feedback.
Andrew Sapperstein [Mon, 8 Apr 2019 23:45:26 +0000 (16:45 -0700)]
Adds annotations in response to API feedback.

Fixes: 126699535
Test: is annotation change
Change-Id: Iba61b36386db78e568a5dfc5720646904c75b989

5 years agoIncrease string limits
Ilya Matyukhin [Mon, 8 Apr 2019 23:53:33 +0000 (16:53 -0700)]
Increase string limits

Test: build
Fixes: 129897985
Fixes: 129900239
Fixes: 129899596
Fixes: 129899595
Fixes: 129900235
Change-Id: I426ac94b171d617733adc86db131f9e030ac6284

5 years agoMerge "Fix brightness icon in theme pack." into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 23:26:19 +0000 (23:26 +0000)]
Merge "Fix brightness icon in theme pack." into qt-dev

5 years agoMerge "Pass runMax = 1 to stop unnecessary itemization" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 23:18:59 +0000 (23:18 +0000)]
Merge "Pass runMax = 1 to stop unnecessary itemization" into qt-dev

5 years agoDocument runtime exception being thrown on afs.getFillEvents().
Adam He [Fri, 5 Apr 2019 23:37:23 +0000 (16:37 -0700)]
Document runtime exception being thrown on afs.getFillEvents().

Fixes: 128029710
Test: atest CtsAutoFillServiceTestCases
Change-Id: I65936671e5d12a5c6b597bd6f4c7c97cd66f0b95

5 years agoFix StatusBarWifiView applying the wrong wifi icon
Amin Shaikh [Mon, 8 Apr 2019 20:17:46 +0000 (16:17 -0400)]
Fix StatusBarWifiView applying the wrong wifi icon

This was introduced in ag/6935095.

Fixes: 130164218
Test: mp sysuig; toggle wifi on and off
Change-Id: I8b945d777bc6f410943494c98c83cd89766c1e4d

5 years agoRemove Notification atom
Howard Ro [Mon, 8 Apr 2019 01:43:34 +0000 (18:43 -0700)]
Remove Notification atom

There's no logging implmentation of Notification atom, therefore
removing it.

Bug: 130183311
Fix: 130183311
Test: make statsd
Change-Id: Ibd4b552fd4f81026401e394079526c5d1bf7bdae

5 years agoMerge "Fixing edge swipe region not updating on device rotation" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 22:28:08 +0000 (22:28 +0000)]
Merge "Fixing edge swipe region not updating on device rotation" into qt-dev

5 years agoCareful with screenshots containing secure layers!
Robert Carr [Tue, 2 Apr 2019 21:18:56 +0000 (14:18 -0700)]
Careful with screenshots containing secure layers!

For purposes of the screen rotation animation the system server is allowed
to capture secure (not protected) layers and trusted not to persist screenshots
which may contain secure layers. However when displaying the screen rotation animation,
the layer the screenshot is placed on will itself not be secure, so if we record
the animation the recording will contain persisted versions of the secure content. Make sure
we use the new API from SurfaceFlinger to set FLAG_SECURE if our screenshot contains secure
content.

Bug: 69703445
Test: Transaction_test#SetFlagsSecureEuidSystem
Change-Id: I1b016fb1ad56eccd712442a71cc134e5fa3b1ac6

5 years ago[SettingsLib] Display WPA2/WPA3-Personal for WPA2/WPA3 transition mode networks
Hai Shalom [Mon, 8 Apr 2019 22:08:19 +0000 (15:08 -0700)]
[SettingsLib] Display WPA2/WPA3-Personal for WPA2/WPA3 transition mode networks

Settings display WPA3-Personal in Network details dialog for WPA2/WPA3
networks in transition mode. Need to add simple logic to detect transition
mode networks and display type correctly. No need to make other changes
other than the UI as the underlying framework would still connect to WPA3
network only.

Bug: 130181491
Test: Connect to transtion mode network, verify WPA2/WPA3-Personal
Test: Connect to WPA3 only network, verify WPA3-Personal
Test: Connect to WPA2 only network, verify WPA2-Personal
Change-Id: I9812b2a421990ef067ed77e8595d7daf37a72c30

5 years agoFixes crash due to assigning service before linking death recipient.
Adam He [Mon, 8 Apr 2019 21:37:58 +0000 (14:37 -0700)]
Fixes crash due to assigning service before linking death recipient.

Fixes: 129686274
Test: atest CtsAutoFillServiceTestCases
Change-Id: I052ca9a13947f0ad25da70747e8db2be22af742b

5 years agoMerge "More description on logBinaryPushStateChanged" into qt-dev
Howard Ro [Mon, 8 Apr 2019 21:19:35 +0000 (21:19 +0000)]
Merge "More description on logBinaryPushStateChanged" into qt-dev

5 years ago[SettingsLib] Fix WPA2 security type string
Hai Shalom [Mon, 8 Apr 2019 21:07:42 +0000 (14:07 -0700)]
[SettingsLib] Fix WPA2 security type string

WPA2 security string was incorrect, set to WPA2-PSK instead of RSN-PSK.
This caused a lot of error logs, as well as inaccurate description of
the connected network in the Network details dialog.

Bug: 130147064
Test: adb logcat | grep SettingsLib.AccessPoint and verify no error logs
Test: Verify correct security detail in Network details dialog
Change-Id: Iea57985c73b26fc38061694a76fd51ab578ea692

5 years agoMerge "Allow merging of resources with the same overlayable" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 21:06:32 +0000 (21:06 +0000)]
Merge "Allow merging of resources with the same overlayable" into qt-dev

5 years agoDo not modify location perms on upgrade
Philip P. Moltmann [Mon, 8 Apr 2019 17:42:42 +0000 (10:42 -0700)]
Do not modify location perms on upgrade

(this code moved into permission controller)

Bug: 129340674
Test: Upgraded P->Q and saw new behavior
Change-Id: I61a11a7d709e2ae5afe4bfea43a70f1378465794

5 years agoOnly update permissions of one app
Philip P. Moltmann [Mon, 8 Apr 2019 20:22:44 +0000 (13:22 -0700)]
Only update permissions of one app

Calling updatePermissions might cause all packages to be updated.

Test: Upgraded P->Q, no more crash
Bug: 129340674
Change-Id: I968ee6493b12f13a61c1fdf0e1250c419260203b

5 years agoMerge "Add @hide API to get the phone account handle for a subId." into qt-dev
Tyler Gunn [Mon, 8 Apr 2019 20:44:05 +0000 (20:44 +0000)]
Merge "Add @hide API to get the phone account handle for a subId." into qt-dev

5 years agoFix InsetsSourceConsumer visibility
Tarandeep Singh [Wed, 3 Apr 2019 18:37:11 +0000 (11:37 -0700)]
Fix InsetsSourceConsumer visibility

It seems we mistakenly removed[1] leash visbility transaction from
InsetsSourceConsumer#setVisible() method causing tests to fail.

[1] I47b3d3b430fa38f80203276b9984df1f71008f6e

Change-Id: I370805a5a5bdceda4bd363c66376a8975c5ea669
Merged-In: I370805a5a5bdceda4bd363c66376a8975c5ea669
Fix: 128537917
Test: atest InsetsSourceConsumerTest
(cherry picked from commit 9602bd62bdd2db2a9c04f1bb9da0d97144e96c8d)

5 years agoFixed IFillCallback to be oneway calls.
Adam He [Mon, 8 Apr 2019 18:01:37 +0000 (11:01 -0700)]
Fixed IFillCallback to be oneway calls.

Fixes: 77587065
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ifab9bdcb142af4280580c412239c2c72b5f5fda6

5 years agoMerge "Make colorPrimary darker in Theme.DeviceDefault.Settings at night" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 20:32:28 +0000 (20:32 +0000)]
Merge "Make colorPrimary darker in Theme.DeviceDefault.Settings at night" into qt-dev

5 years agoRespect the hardware buffer usage flags set by the consumer.
Derek Sollenberger [Mon, 8 Apr 2019 19:45:20 +0000 (15:45 -0400)]
Respect the hardware buffer usage flags set by the consumer.

Test: CtsUiRenderingTestCases
Bug: 130121294
Change-Id: Ie77dee104fa8935978dfd6c0c506d2995f20cd79

5 years agoMerge "Allow themeing of icon in SuspendedAppActivity" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 20:17:28 +0000 (20:17 +0000)]
Merge "Allow themeing of icon in SuspendedAppActivity" into qt-dev

5 years agoAllow themeing of icon in SuspendedAppActivity
Bryan Mawhinney [Fri, 5 Apr 2019 16:25:47 +0000 (17:25 +0100)]
Allow themeing of icon in SuspendedAppActivity

By passing the current theme to getDrawable, we allow the suspending app
to provide, e.g., a vector drawable tinted according to the system theme
(note, *not* the suspending app theme).

Test: manual
Bug: 129995419
Change-Id: Id9d4e3292baa324856dd817fe9ac979c07339fb0

5 years agoMerge "Import translations. DO NOT MERGE" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 19:54:18 +0000 (19:54 +0000)]
Merge "Import translations. DO NOT MERGE" into qt-dev

5 years agoMerge "Visual changes to QS header" into qt-dev
Fabian Kozynski [Mon, 8 Apr 2019 19:49:11 +0000 (19:49 +0000)]
Merge "Visual changes to QS header" into qt-dev

5 years agoMerge "BubbleData [2/n]: adds Listener interface" into qt-dev
Mark Renouf [Mon, 8 Apr 2019 19:15:03 +0000 (19:15 +0000)]
Merge "BubbleData [2/n]: adds Listener interface" into qt-dev

5 years agoMerge "Defer broadcasting ACTION_DEFERRED_ACTIVITY_CHANGED until actual change" into...
Winson Chung [Mon, 8 Apr 2019 19:05:27 +0000 (19:05 +0000)]
Merge "Defer broadcasting ACTION_DEFERRED_ACTIVITY_CHANGED until actual change" into qt-dev

5 years agoMerge "UserRestrictionsUtil.isValidRestriction wtfs" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 19:03:25 +0000 (19:03 +0000)]
Merge "UserRestrictionsUtil.isValidRestriction wtfs" into qt-dev

5 years agoFixing edge swipe region not updating on device rotation
Sunny Goyal [Mon, 8 Apr 2019 18:56:07 +0000 (11:56 -0700)]
Fixing edge swipe region not updating on device rotation

Bug: 130028177
Test: Verified on device
Change-Id: If9a68efa84dd4de926115db80a9b68dcbe1e8720

5 years agoMerge "Import translations. DO NOT MERGE" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 18:37:50 +0000 (18:37 +0000)]
Merge "Import translations. DO NOT MERGE" into qt-dev

5 years agoMerge "Import translations. DO NOT MERGE" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 18:26:46 +0000 (18:26 +0000)]
Merge "Import translations. DO NOT MERGE" into qt-dev

5 years agoMerge "[AWARE] Add unit test - fix hashing bug" into qt-dev
Etan Cohen [Mon, 8 Apr 2019 18:21:58 +0000 (18:21 +0000)]
Merge "[AWARE] Add unit test - fix hashing bug" into qt-dev

5 years agoMerge changes I4e32a588,I202c5653 into qt-dev
Tobias Thierer [Mon, 8 Apr 2019 18:15:39 +0000 (18:15 +0000)]
Merge changes I4e32a588,I202c5653 into qt-dev

* changes:
  Make MediaHTTPConnection thread safe.
  Revert "MediaHTTPConnection: move connection states into an inner class"

5 years agoMake MediaHTTPConnection thread safe.
Tobias Thierer [Tue, 2 Apr 2019 19:14:20 +0000 (20:14 +0100)]
Make MediaHTTPConnection thread safe.

MediaHTTPConnection's public methods are called from multiple Binder
threads. Since both HttpURLConnection and access to the various
connection related fields is not thread safe, this CL guards most
methods by a single lock. This means that the methods can now block
when called, although this should be rare:

 - there are two processes that call these methods. One process
   only calls getSize(), and the other process calls methods
   from a single thread (ie. at not overlapping clock times).
 - should lock contention unexpectedly increase in future, then
   that would be bad (because Binder thread pool threads would
   be blocked/unavailable), but it would not be easy to detect.
   It would be easy to detect if we could stop getSize() being
   called at overlapping clock times, since we could then use
   ReentrantLock.tryLock() to assert that the lock is never contended
   outside of disconnect().

Because it's a requirement for disconnect() to quickly stop another
thread that is blocked in readAt(), disconnect() is the only method
that doesn't acquire the lock immediately; the mConnection field
is marked volatile so that disconnect() has a high chance of reading
that field and calling disconnect() on it without waiting for
another thread (there's a small risk that another thread might
acquire the lock and start a new connection while disconnect()
is waiting for the lock; in that case, after acquiring the lock,
disconnect() will also disconnect that new connection; this is
subject to potential change in future.

Initially, a ReentrantLock object was considered but for now this
CL instead uses the synchronized lock on "this" because:

 - it minimizes churn on the lines of code in this file because
   synchronized (this) { } can be expressed by introduction of
   the word "synchronized" on the method header, whereas
   mLock.lock(); try { ... } finally { mLock.unlock(); } would
   indent all the lines in-between and thus pollute git annotate.
 - some methods were already synchronized.
 - ReentrantLock.tryLock() is not used for now; most of the time,
   lock acquisition should be uncontended but the two cases of
   lock contention mentioned above exist, which makes it difficult
   to distinguish surprising from unsurprising lock contention.
   While this is the case, it seems better to keep the code
   simple and to just unconditionally block.

Bug: 114337214
Fixes: 114337214
Fixes: 119900000
Fixes: 129444137
Fixes: 128758794
Fixes: 63002045

Test: Checked manually that bug 114337214 no longer reproduces on
      Android API level 27 (Oreo MR1) after cherrypicking this CL.
Test: Ran the following on internal master with this CL:
      make cts && cts-tradefed run cts -m CtsMediaTestCases \
      -t android.media.cts.NativeDecoderTest#testAMediaDataSourceClose \
      --abi arm64-v8a
Test: Ran the following both on AOSP (158 tests) and internal master (178):
      atest CtsMediaTestCases:android.media.cts.{MediaPlayer{,2},Routing}Test

      All these tests pass except that on AOSP only, the following test
      fails both before and after my CL (appears unrelated):
      android.media.cts.RoutingTest#test_MediaPlayer_RoutingChangedCallback

(cherry picked from commit 8d9fccee62e2c73abe952f2a1de575c28bcd9410)

Change-Id: I4e32a58891c3ce60ddfa72d36060486d37906f8d
Merged-In: I4e32a58891c3ce60ddfa72d36060486d37906f8d

5 years agoRevert "MediaHTTPConnection: move connection states into an inner class"
Tobias Thierer [Fri, 22 Mar 2019 11:15:44 +0000 (11:15 +0000)]
Revert "MediaHTTPConnection: move connection states into an inner class"

This reverts commit 621e7968adf0253d5e22406f02ccc8bcc0eda5ec.

Many of the fields that were moved are annotated @UnsupportedAppUsage,
so the CL would have had undesirable app compat impact. Further,
because investigation has revealed that lock contention *is* possible,
we need to always acquire the lock anyway so there is no longer a
benefit in keeping all of the mutable state in a single field that
can be atomically set to null.

Bug: 114337214
Test: Treehugger

(cherry picked from commit dc9f4b4d5d28fc68b1b5e4e8500bf67d4b11621d)

Change-Id: I202c5653cb086d99228491e161a159bad640105a
Merged-In: I202c5653cb086d99228491e161a159bad640105a

5 years agoImport translations. DO NOT MERGE
Bill Yi [Mon, 8 Apr 2019 18:04:04 +0000 (11:04 -0700)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I34c278df0d44b78239551149fca2c9ba53131346

5 years agoMerge "Protect against null drawable" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 17:27:52 +0000 (17:27 +0000)]
Merge "Protect against null drawable" into qt-dev

5 years agoVisual changes to QS header
Fabian Kozynski [Thu, 4 Apr 2019 19:57:42 +0000 (15:57 -0400)]
Visual changes to QS header

Change TextAppearance in QS header.

Also, reduce size of QS tile background. Removed extra padding in the
bottom of QSIconViewImpl that was not needed.

Test: visual
Bug: 124466915
Change-Id: I0b8db6edad7f8527caff76f9419c42a8016a6bda

5 years agoMerge "Fix job persistence & re-inflation" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 17:17:12 +0000 (17:17 +0000)]
Merge "Fix job persistence & re-inflation" into qt-dev

5 years agoMerge "Adding documentation to getElapsedRealtimeUncertaintyNanos following api counc...
TreeHugger Robot [Mon, 8 Apr 2019 17:13:58 +0000 (17:13 +0000)]
Merge "Adding documentation to getElapsedRealtimeUncertaintyNanos following api council guidance." into qt-dev

5 years agoMerge changes Ic4eb56fc,I7ba66213,I4b4dba44 into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 17:08:54 +0000 (17:08 +0000)]
Merge changes Ic4eb56fc,I7ba66213,I4b4dba44 into qt-dev

* changes:
  WifiScannerTest: More unit tests
  WifiScannerTest: Add unit tests
  WifiManagerTest: Add unit tests

5 years agoMerge "wifi proto change for some legacy API usage metrics" into qt-dev
Oscar Shu [Mon, 8 Apr 2019 17:07:11 +0000 (17:07 +0000)]
Merge "wifi proto change for some legacy API usage metrics" into qt-dev

5 years agoMake colorPrimary darker in Theme.DeviceDefault.Settings at night
Bryan Mawhinney [Mon, 8 Apr 2019 16:31:19 +0000 (17:31 +0100)]
Make colorPrimary darker in Theme.DeviceDefault.Settings at night

By default, this makes the the action bar black in order to match the
Settings app and conserve battery.

Change-Id: I01239c6269b436add12bd1822e742306c2e2eb57
Test: manual
Bug: 129995419

5 years agoMerge "ApplicationLoaders: hard failures & tests" into qt-dev
Steven Moreland [Mon, 8 Apr 2019 16:27:21 +0000 (16:27 +0000)]
Merge "ApplicationLoaders: hard failures & tests" into qt-dev

5 years agoBubbleData [2/n]: adds Listener interface
Mark Renouf [Fri, 5 Apr 2019 18:37:59 +0000 (14:37 -0400)]
BubbleData [2/n]: adds Listener interface

This change introduces an interface which BubbleData will use to
report changes to the state of bubbles on-screen. This will allow
BubbleData to implement and propagate ordering and grouping changes.

Bug: 123542488
Test: atest BubbleControllerTest
Change-Id: I35708c45e23fed4369605eecd986cdff96e23d34

5 years agoFix brightness icon in theme pack.
Amin Shaikh [Mon, 8 Apr 2019 15:38:56 +0000 (11:38 -0400)]
Fix brightness icon in theme pack.

Update all icon packs from latest mapping.

Fixes: 129694423
Test: make
Change-Id: I537f080b9ab6cdc02421fd37cac97cf937184e78

5 years agoMerge "Grant sound recorder microphone permissions" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 15:33:22 +0000 (15:33 +0000)]
Merge "Grant sound recorder microphone permissions" into qt-dev

5 years agoMerge "Sharesheet - Fix scroll behavior moving past bounds" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 15:27:12 +0000 (15:27 +0000)]
Merge "Sharesheet - Fix scroll behavior moving past bounds" into qt-dev

5 years agoMerge "Remove DELEGATION_PACKAGE_INSTALLATION" into qt-dev
TreeHugger Robot [Mon, 8 Apr 2019 15:10:59 +0000 (15:10 +0000)]
Merge "Remove DELEGATION_PACKAGE_INSTALLATION" into qt-dev

5 years agoMerge "Restricted permission mechanism - framework" into qt-dev
Svetoslav Ganov [Mon, 8 Apr 2019 14:54:03 +0000 (14:54 +0000)]
Merge "Restricted permission mechanism - framework" into qt-dev

5 years agoProtect against null drawable
Jorim Jaggi [Mon, 8 Apr 2019 12:51:42 +0000 (14:51 +0200)]
Protect against null drawable

Test: App with no background drawable doesn't crash
Fixes: 130015147
Change-Id: I28e3605aa84240979f9a04108be98d6e3006e470

5 years agoMerge "Use marquee in Global Actions menu. Fix centering on classic Global Actions...
Aaron Heuckroth [Mon, 8 Apr 2019 14:20:58 +0000 (14:20 +0000)]
Merge "Use marquee in Global Actions menu. Fix centering on classic Global Actions menu." into qt-dev

5 years agoMerge "Remove OPTED_OUT Secure Setting based on API Council feedback." into qt-dev
Anthony Tripaldi [Mon, 8 Apr 2019 14:15:46 +0000 (14:15 +0000)]
Merge "Remove OPTED_OUT Secure Setting based on API Council feedback." into qt-dev

5 years agoMerge "BubbleData [1/n]: remove unused parameter" into qt-dev
Mark Renouf [Mon, 8 Apr 2019 13:58:33 +0000 (13:58 +0000)]
Merge "BubbleData [1/n]: remove unused parameter" into qt-dev

5 years agoSharesheet - Fix scroll behavior moving past bounds
Matt Pietal [Mon, 8 Apr 2019 13:57:07 +0000 (09:57 -0400)]
Sharesheet - Fix scroll behavior moving past bounds

ResolverDrawerLayout is tracking fractions of pixels, but just drops
these fractions when offsetting the child views. When scrolling up and
down continuously, this can lead to the view scrolling past the window
bounds. Do not discard these fractions. Track the remainders and add
them in when the sum to >= 1px.

Bug: 129979914
Test: Manual scrolling test
Change-Id: I0e8ea04baca341c6b6e0573e086f3f2f8c2b39b5