Commit Graph

72819 Commits

Author SHA1 Message Date
Benjamin Miller
2ecc198877 Merge "Docs: VPNs under Android O should promote to the foreground" into oc-dev
am: ca007e525b

Change-Id: If2a06d8e8e5fe2034e22c86dabf68bf7d3f79bb0
2017-07-17 14:23:25 +00:00
TreeHugger Robot
ca007e525b Merge "Docs: VPNs under Android O should promote to the foreground" into oc-dev 2017-07-17 14:11:55 +00:00
Peng Xu
7bef937503 Merge "Update Java doc of SensorManager.createDirectChannel" into oc-dev
am: 17e641dae5

Change-Id: I4391dafa9d153213e35ac58bceb8d2f4c958fde0
2017-07-14 23:07:11 +00:00
TreeHugger Robot
17e641dae5 Merge "Update Java doc of SensorManager.createDirectChannel" into oc-dev 2017-07-14 22:55:15 +00:00
Jeff Davidson
c0ce489df7 Merge "Temporarily disable eUICC factory reset handling." into oc-dr1-dev 2017-07-14 19:54:52 +00:00
Jason Monk
0b06d4e0ba Fix crash in monodroid apps
Don't getApplicationContext if we already have an application.

Test: launch a monodroid app
Change-Id: I0c1558463053de3db0f1cd4693088e7c639ce5fa
Fixes: 63666480
2017-07-14 13:23:58 -04:00
Jeff Davidson
7615d11dd4 Temporarily disable eUICC factory reset handling.
This seems to be causing users who elect not to wipe their eUICC on a
factory reset to end up on the eSIM slot after the reset instead of
the pSIM slot.

Bug: 63693573
Test: TreeHugger + factory reset local test
Change-Id: I414a16cde11e76ccc390e7a63a6803f5b402fe78
2017-07-14 10:21:32 -07:00
Benjamin Miller
28a3e85903 Docs: VPNs under Android O should promote to the foreground
Add note for VPN developers that VPN apps started in the background must transition to the foreground in Android O to avoid the system stopping them.

Staged at: go/dac-stage/reference/android/net/VpnService.html

Test: make ds-docs
Bug: 38023983
Change-Id: I33c7ca1717c332ffab495eb51c4c6b9c5c304cef
2017-07-14 17:22:47 +02:00
TreeHugger Robot
5a0958ed0b Merge "Fix system crash" into oc-dr1-dev 2017-07-14 13:40:44 +00:00
TreeHugger Robot
0c0fd0375c Merge "CameraManager: Handle camera service being disabled explicitly" into oc-dr1-dev 2017-07-14 05:41:34 +00:00
Lorenzo Colitti
3756636ad6 Merge changes Icc5aa605,If744f2e0,Ie1b5a5e4 into oc-dr1-dev
* changes:
  Add code to dump OffloadController state.
  Fetch tethering offload stats.
  Allow more than one source of tethering statistics.
2017-07-14 00:51:56 +00:00
Roozbeh Pournader
f3cda89def Make TextInputTimePickerView use localized input
Previously, TextInputTimePickerView used the default numeric IME, which
could result in cases where the digits displayed in the text fields were
native, but the IME showed ASCII digits resulting in a mix.

Now we use setImeHintLocales to hint that we need a localized IME.

Change-Id: Ic4041dcc65a31bd00741c6d96d8cbc5dac9d77c8
Fixes: 63650251
Test: Manual (tested under en-US and ar-BH locales)
2017-07-13 15:25:24 -07:00
Eino-Ville Talvala
19d96a197f CameraManager: Handle camera service being disabled explicitly
Previously, CameraManager handled a disabled camera service
implicitly, the same as it handles a temporarily-crashed camera
service.

However, the error reporting for the those cases isn't really the
same, so switch to being explicit - check for the disabled camera
service system property, and if it's set, short-circuit calls.

Test: Camera CTS continues to pass, Watch device with no camera
      service also now passes camera CTS.
Bug: 62269118

Change-Id: I65a97f8c1b0f101999b2c04d4f1096b7f3aee858
2017-07-13 12:23:51 -07:00
Qingxi Li
b7febbb727 Merge "Fix the error that the broadcast receiver cannot be registered" into oc-dr1-dev 2017-07-13 19:02:24 +00:00
Bryce Lee
fa62d79a02 Merge "Do not use rotation as indicator to relaunch from config change." into oc-dr1-dev 2017-07-13 18:28:09 +00:00
Bryce Lee
a926dbf5d2 Merge "Allow max aspect ratio to be specified by meta-data tag." into oc-dr1-dev 2017-07-13 17:38:48 +00:00
Julia Reynolds
0f17000fb3 Fix system crash
Change-Id: I47d6d79682bfe907544f9282c26e350576618ce2
Fixes: 63474899
Test: runtest systemui-notification
2017-07-13 11:35:46 -04:00
Lorenzo Colitti
ef7b2a13ce Allow more than one source of tethering statistics.
Currently, netd is the only source of tethering statistics.
In order to support multiple sources, define a new
ITetheringStatsProvider interface that can be registered with
NetworkManagmentService. Convert the existing code into the
first ITetheringStatsProvider.

Bug: 29337859
Bug: 32163131
Test: builds, boots
Test: tethering stats continue to be collected
Change-Id: Ie1b5a5e47ae4bf5af922365b09fa241e834236e4
2017-07-13 23:34:25 +09:00
Adrian Roos
3fbd93056e Merge "AOD: Implement long press gesture to launch assist" into oc-dr1-dev 2017-07-13 12:01:52 +00:00
Andrii Kulian
3a1619d68e Position app with short aspect ratio opposite of nav bar
When an application doesn't support tall aspect ratio of the
screen where it's displayed, it should be positioned on the
opposite side from navigation bar. It's supposed to create
an effect of extended black nav bar.

Bug: 62893418
Test: go/wm-smoke
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarBottom
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarLeft
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarRight
Change-Id: I2cd3d236ee8d0cc263fee4c0a436d78c755eb9b7
2017-07-12 14:04:35 -07:00
qingxi
aee0ab9eb9 Fix the error that the broadcast receiver cannot be registered
Factory reset of eSIM failed due to the euiccWipeFinishReceiver cannot
be registered by the context directly. This CL changes the context to
application context to solve this problem.

Bug: 63610700
Test: E2E
Change-Id: I7e4c8b75b5b5b4203efd7302677ffa5cf00198b5
2017-07-12 13:15:51 -07:00
TreeHugger Robot
9e419d3082 Merge "[Companion] Prevent NPE in CallbackProxy" into oc-dr1-dev 2017-07-12 18:11:34 +00:00
Bryce Lee
22571db5a6 Allow max aspect ratio to be specified by meta-data tag.
This changelist identifies aspect ratios set via meta-data tags on
the activity or application and applies them to the proper scope.
Values specified via styled attribute take precedence, and values
specified by the activity take priority over values in at the
application level.

Fixes: 63386222
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsAppTestCases android.app.cts.AspectRatioTests
Test: go/wm-smoke
Change-Id: I0d8d6b2778e7fc12bb9feb85c651e5ec22927f5f
2017-07-12 10:16:50 -07:00
Adrian Roos
d0963a07d1 AOD: Implement long press gesture to launch assist
Bug: 37684244
Test: adb shell settings put secure doze_pulse_on_long_press 1; turn screen off, long press, verify assistant is launched
Change-Id: I87335d3c091bbb17022d79e599f46fb826039b7d
2017-07-12 15:25:50 +02: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
Bryce Lee
248fbb180d Do not use rotation as indicator to relaunch from config change.
Rotation is a hidden member inside configuration that should not
influence configuration related logic. This CL ensures that we do
not consider changes to the rotation as grounds for relaunching an
activity.

Change-Id: I9e6d4a1a75fd3ee3beb63f307433e9c3fcfd6dd4
Fixes: 63533208
Test: go/wm-smoke
Test:cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerConfigChangeTests
2017-07-10 16:33:52 -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