Commit Graph

72794 Commits

Author SHA1 Message Date
TreeHugger Robot
9e419d3082 Merge "[Companion] Prevent NPE in CallbackProxy" into oc-dr1-dev 2017-07-12 18:11:34 +00:00
Lorenzo Colitti
5e7b01c823 Merge "Use RFC 7217 stable privacy addresses" into oc-dr1-dev 2017-07-12 07:57:49 +00:00
TreeHugger Robot
b822ad3e06 Merge "GATT: Expose opportunistic client API to Java" into oc-dr1-dev 2017-07-12 02:47:56 +00:00
TreeHugger Robot
a249de50d1 Merge "Move eSIM factory reset implementation to RecoverySystem" into oc-dr1-dev 2017-07-12 02:17:42 +00:00
Jack He
79bf7d755f GATT: Expose opportunistic client API to Java
* Allow Java based programs to create an opportunistic GATT client
* Such client does not hold a GATT connection. It automatically
  disconnects when no other GATT connections are active for the
  remote device.

Bug: 63347806
Test: make, run battery service
Change-Id: Ib9333817d7f17a1fa3ddacfa51c680890bac19ec
Merged-In: Ib9333817d7f17a1fa3ddacfa51c680890bac19ec
(cherry picked from commit 13f52c8118)
2017-07-12 00:35:54 +00:00
qingxi
e060ffd2ca Move eSIM factory reset implementation to RecoverySystem
This CL reverts the implementation of eSIM factory reset in
MasterClearReceiver and uses RecoverySystem#rebootWipeUserData to erase
eSIM data. Besides this, when the eSIM data isn't erased, we should call
EuiccManager#retainSubscriptionsForFactoryReset to let the fastboot know
that.

Bug: 62957212
Test: TreeHugger
Merged-In: I08ab9d53ec4fc73a65e8e7d0c39ac95b2d44d012
Change-Id: I08ab9d53ec4fc73a65e8e7d0c39ac95b2d44d012
2017-07-11 13:09:40 -07:00
Christine Franks
361b825c0d Support demo mode and demo users
Bug: 62712426
Test: run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageEphemeralUser
and
run cts -m CtsDevicePolicyManagerTestCases -t \
com.android.cts.devicepolicy.DeviceOwnerTest# \
testCreateAndManageEphemeralUserFailsWithoutSplitSystemUser
and
runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest \
frameworks-services
Change-Id: I77a71a994fe0f4f1f8c5df7c4ccf493aafa8fefe
2017-07-10 17:49:42 -07:00
Eugene Susla
3a74c7ac8e [Companion] Prevent NPE in CallbackProxy
Fixes: 63383044
Test: Ensure all fields of CompanionDeviceManager.CallbackProxy are
null-checked in onSuccess and onFailure
Change-Id: If95a46686f74d184bccfcb2d8c8195add4747a07
2017-07-10 22:17:49 +00:00
TreeHugger Robot
2c3c58d917 Merge "Add screensaver settings to backup list" into oc-dr1-dev 2017-07-10 20:17:56 +00:00
Jason Monk
df31effd5f Add screensaver settings to backup list
Test: manual
Change-Id: Icf47312e20b4ec44d02dc31ce575e89083a8be7d
Fixes: 35700553
2017-07-10 14:19:08 -04:00
Julia Reynolds
c65071d625 Merge "Limit the number of notis an app can enqueue" into oc-dr1-dev 2017-07-10 16:55:01 +00:00
Lucas Dupin
8b94ef697e Merge "Add theme style flag to WallpaperColors" into oc-dr1-dev 2017-07-10 16:49:33 +00:00
TreeHugger Robot
00d83ea50f Merge "Rate limit notification sounds/vibrations" into oc-dr1-dev 2017-07-10 15:57:32 +00:00
Bryce Lee
649053810f Merge "Add app bounds to Configuration#compareTo." into oc-dr1-dev 2017-07-10 14:21:37 +00:00
Julia Reynolds
6ad0aecf99 Limit the number of notis an app can enqueue
In addition to the number they can post. Also decrease
the number of posts per second to 5, but allow finished
progress notifications through.

Fixes: 63173849
Fixes: 63167456
Test: runtests systemui-notification & simultaneously
downloading 5 files.
Change-Id: I0c8ea35b3d9d38b000ea5fe383515e1d5a26bac7
2017-07-10 09:42:24 -04:00
Julia Reynolds
5f8e0b881e Rate limit notification sounds/vibrations
1 alert per second.

Bug: 36662487
Test: runtest systemui-notification
Change-Id: I2046ae17b9e89ac0a83e182b91422fd242bc7557
2017-07-10 09:37:54 -04:00
Lucas Dupin
4bd24f36c5 Add theme style flag to WallpaperColors
Theme colors should always be the same in sysui and launcher.
We're now sharing a hint HINT_SUPPORTS_DARK_THEME, to make sure
we're never out of sync.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Fixes: 63140091
Change-Id: Ibd196f540d77269df377804b0f4d4d0d20820067
2017-07-07 14:36:45 -07:00
Julia Reynolds
e4101089bb Merge "Allow setup apps to colorize notifications." into oc-dr1-dev 2017-07-07 19:24:37 +00:00
Andrew Solovay
465810c895 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev
am: 1cdf4244f4

Change-Id: I1c25c17f1f73e4006e3b0fa9479d5b0563c6be98
2017-07-07 19:09:39 +00:00
Andrew Solovay
1cdf4244f4 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev 2017-07-07 19:02:48 +00:00
Julia Reynolds
d71c5a9426 Allow setup apps to colorize notifications.
Fixes: 63147379
Test: runtest systemui-notification, core tests
Change-Id: I2077a9fd563826d978d0dc01be89dd0bbc09eebf
2017-07-07 17:22:43 +00:00
Robert Carr
5482790a3f Merge "SurfaceView: Avoid initializing Surface from an invalid SurfaceControl." into oc-dev
am: 401b8907d0

Change-Id: Ib7a916fb484fb3a7924315169d162f4fdddd8a06
2017-07-07 03:22:50 +00:00
TreeHugger Robot
401b8907d0 Merge "SurfaceView: Avoid initializing Surface from an invalid SurfaceControl." into oc-dev 2017-07-07 03:10:12 +00:00
TreeHugger Robot
da075a9681 Merge "Fix Configuration#updateFrom() when assetsSeq doesn't change" into oc-dr1-dev 2017-07-07 01:38:01 +00:00
TreeHugger Robot
b1ab0ff21e Merge "Hide all color hints references" into oc-dr1-dev 2017-07-07 00:12:08 +00:00
Robert Carr
7c67b7d097 SurfaceView: Avoid initializing Surface from an invalid
SurfaceControl.

In a recent CL we introduced a call to Surface#createFrom, in order to
recreate the Surface object from the underlying SurfaceControl, as a
workaround to emulate when it was parcelled over binder in the past.
However this is causing BufferQueue abandoned errors when stopping and
resuming some applications. To understand them, we need to revisit the
SurfaceView destruction process when handling onStop.

First mWindowStopped will be set to true (SurfaceView#windowStopped),
and we should then enter updateSurface. Our requested visibility will
now be false and so we emit the Surface destroyed callbacks. Notice in
the finally block in mUpdateSurface, we will release mSurface, but we
will NOT null mSurfaceControl. Inline documentation explains why.

In the case that the activity is not actually being destroyed, it's
possible that we may not get a dispatchDetachedFromWindow. This means
that we will not null mSurfaceControl. Now if the activity is
un-stopped and we re-enter updateSurface we encounter a problem
state. "creating" will be set to false since mSurfaceControl != null,
however mSurfaceControl will not point to a valid surface.

Prior to the introduction of the #createFrom call, this unwanted state
didn't cause any problems. Because mSurface was released back in the
finally block as we were stopping we now fall out of the
mSurface.isValid() block in updateSurface. As we reach the finally
block again, we would now set mSurfaceControl=null since the app was
no longer stopped. Later when we reach updateSurface again (which
tends to happen quite often) it will now be null and we will correctly
set creating=true, create a valid SurfaceControl, and move along
happily. However following, the introduction of this
Surface#createFrom call we will now reinitialize the Surface from an
invalid underlying SurfaceControl. This means we will enter the
mSurface.isValid block, but will proceed to emit an invalid Surface to
the client in the callbacks.

We avoid this state by making creating=true even if
SurfaceControl=non-null when the calculated visibility changes from
invisible to visible.

Bug: 63251745
Test: Manual of app from bug and apps from previous related bugs. go/wm-smoke. Additional manual testing of many SV apps.
Change-Id: Icc32a34cac239d65267da705cc23feb23e1ceb67
2017-07-06 15:53:04 -07:00
TreeHugger Robot
5cb8f220a8 Merge changes from topic 'nci-2.0-part2' into oc-dr1-dev
* changes:
  NCI2.0 update LF_T3T_PARAMETERS of 18 byte.
  AID suffix registration.
2017-07-06 22:39:48 +00:00
Daniel Nishi
a48cf1e619 Merge "Add a Setting for whether or not we have been disabled by policy." into oc-dr1-dev 2017-07-06 21:58:41 +00:00
Adam Lesinski
4eb4129c29 Fix Configuration#updateFrom() when assetsSeq doesn't change
Compare the value of assetsSeq when updating Configuration from
a delta.

Bug: 63352177
Test: manual
Change-Id: I9e1205cd64c4a1e0192b7049c82d36d53fb4af36
(cherry picked from commit 2123c415bf)
2017-07-06 21:56:46 +00:00
Anthony Chen
25c84b3321 Merge "Fix bug where RemoteViews addView is backwards." into oc-dr1-dev 2017-07-06 21:14:47 +00:00
Daniel Nishi
fa1143658b Add a Setting for whether or not we have been disabled by policy.
Bug: 62106274, 35698183
Test: StorageManager robotests
Merged-In: I1788d6143362130df88950c6843fa78b67182d5e
(cherry picked from commit da7332c070)
2017-07-06 20:00:25 +00:00
Love Khanna
ca26b128ea NCI2.0 update LF_T3T_PARAMETERS of 18 byte.
As per NCI2.0 LF_T3T_PMM is a part of LF_T3T_IDENTIFIER.
Since it is required for each LF_T3T_IDENTIFIER entry,
It can be taken from application.

Test: Compiles.

Change-Id: Icc168592c292d869a4c331dd28fe43b4d75c9a41
(cherry picked from commit e7ecebae11)
2017-07-06 11:57:42 -07:00
Love Khanna
68f719e196 AID suffix registration.
Test: compiles.

Change-Id: I0ab02599814722055d77eef29e734bfd45e8d1ee
(cherry picked from commit e910e8bf86)
2017-07-06 11:57:20 -07:00
TreeHugger Robot
92b6b7090c Merge "AOD: Skip window animations while dozing" into oc-dr1-dev 2017-07-06 17:53:24 +00:00
Adrian Roos
e94c15ca96 AOD: Skip window animations while dozing
Fixes: 37245619
Test: go/wm-smoke; Go to home, turn off phone, observe that during the transition to AOD the navigation bar hide animation does not play.
Change-Id: I9a2fce4295900648a680e8e7e8fee0fbb447dd3d
2017-07-06 17:13:07 +02:00
Bryce Lee
c5fe0eedb6 Add app bounds to Configuration#compareTo.
This CL takes app bounds into consideration when comparing two
Configurations with compareTo.

Change-Id: I9894f312429626975a2651b837cae8d80548c271
Fixes: 63160229
Test: go/wm-smoke
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests#testConfigurationCompareTo
2017-07-06 08:03:28 -07:00
TreeHugger Robot
84e0f453d1 Merge "Zygote: Fix race condition on package preloads." into oc-dr1-dev 2017-07-06 11:30:03 +00:00
TreeHugger Robot
20a240fc5d Merge "Hide VIRTUAL_KEY_RELEASE constant." into oc-dr1-dev 2017-07-05 22:37:32 +00:00
Anthony Chen
ea202f6646 Fix bug where RemoteViews addView is backwards.
The index on where to add a child view was not being saved when writing
to a Parcel. This causes the index to default to 0 and resulted in views
always being added as the first view.

Now, persist this value to the Parcel and restore it.

Test: booted up on Nexus 6P, created notification with RemoteView, added
two views and verified views added in correct order.
Bug: 63177271

Change-Id: I94384e348b8a5168efe0601f382cdd2db6791fdb
2017-07-05 21:12:41 +00:00
Narayan Kamath
bae484ad8e Zygote: Fix race condition on package preloads.
Before this change, ZygoteProcess.preloadPackageForAbi returned
as soon as the command was written to the zygote socket and not
after the preload completed. This meant that there was a small
window of time before the server side of the socket polled its FDs
where a second command could be written to the zygote socket. This
would lead to only one of the commands being processed and the
other being dropped. The client side of that socket would then wait
forever for a response and bring down the system once the watchdog
timeout was hit.

Example failure case :
--------------
system_server:send command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(preloadPackage)  // the fork command is dropped.

Example of normal operation :
------------------
system_server:send command(preloadPackage)
zygote:poll & process command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(fork)

This change makes preloadPackageForAbi synchronous, which ensures
that each POLLIN event corresponds to precisely one command.

Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com

(cherry-picked from commit 24a3306c32)

Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a
2017-07-05 17:53:20 +00:00
TreeHugger Robot
b2b73e4956 Merge changes from topic 'revert-update-conscrypt' into oc-dr1-dev
* changes:
  Revert "Track updates to Conscrypt". DO NOT MERGE ANYWHERE.
  Revert "Delete obsolete and unused KeyStoreTests". DO NOT MERGE ANYWHERE.
2017-07-03 15:07:20 +00:00
TreeHugger Robot
bda6275cf6 Merge "No smart text assist for unprovisioned device." into oc-dr1-dev 2017-06-30 22:31:14 +00:00
TreeHugger Robot
3024de2536 Merge changes from topic 'HideMultiUser' into oc-dr1-dev
* changes:
  Don't show multi-user in QS unless it has been activated before
  QS: Move auto-add state to settings provider
2017-06-30 19:35:05 +00:00
Siarhei Vishniakou
ff1121a735 Hide VIRTUAL_KEY_RELEASE constant.
The constant will become visible once
the corresponding feature is supported.

Bug: 62433331
Test: make
Change-Id: I310338033dd861e9fd0cc1492a8e34fb53ce0415
2017-06-30 11:02:02 -07:00
Bryce Lee
392ac74f37 Merge "Always send configuration to client from resize and relayout." into oc-dr1-dev 2017-06-30 16:17:34 +00:00
Bryce Lee
2050dc66e2 Merge "Add rotation to configuration." into oc-dr1-dev 2017-06-30 16:17:34 +00:00
Jason Monk
cb5296a6f0 QS: Move auto-add state to settings provider
And back it up.

Test: runtest systemui
Change-Id: I880909ce63ab32a5c11f31f449c1aa10221085d3
Fixes: 62667758
2017-06-30 11:36:40 -04:00
Bryce Lee
f858b5788e Always send configuration to client from resize and relayout.
Previously, the server side would omit reporting new configurations
during resize and relayout if the current configuration matched the
last reported. However, if the last reported came through a resize,
the client side handling would be enqueued as a Handler message. This
leads to the possibility of the client getting a new window frame but
not a new configuration where this is synchronously handled, such as
ViewRootImpl::performTraversals.

To address this issue, we now always send the current configuration
from the server to the client. The client then identifies changes
against its own record of last reported configuration and updates as
appropriate.

This changelist also adds a call to force window relayout during
updateConfiguration, as it's possible this is called after
performTraversals is called or resize is handled, leading to a stale
window frame.

Bug: 24671393
Test: go/wm-smoke
Test: Open Camera while rotating phone to landscape. Added
      temporary logs to detect inconsistencies between measurements
      and reported rotation on draw.

Change-Id: I0d5143dfe80400f6a43ce710750f9fc9d4b93f74
2017-06-30 06:42:50 -07:00
Jack He
266499d9d8 Support battery level reporting via Apple VSC (1/2)
* Add related constants to BluetoothHeadset

Bug: 35874078
Test: make, test with supporting headsets
Change-Id: I9f49ea28efdf6de0e751a377d879fe13a47655d5
Merged-In: I9f49ea28efdf6de0e751a377d879fe13a47655d5
(cherry picked from commit 679d0bc8f9)
2017-06-30 10:41:18 +00:00
Jack He
fff37da08d Support battery level reporting via Plantronics XEVENT (1/2)
* Add related constants to BluetoothHeadset

Bug: 35874078
Test: make, test with supporting headsets
Change-Id: Ied089a065bf9caa0d03f681950fefa2ea990bb3e
Merged-In: Ied089a065bf9caa0d03f681950fefa2ea990bb3e
(cherry picked from commit 0fcbba25b7)
2017-06-30 08:39:44 +00:00