Commit Graph

70302 Commits

Author SHA1 Message Date
TreeHugger Robot
c171f12e08 Merge "CameraManager: Handle camera service being disabled explicitly" into oc-wear-dev 2017-07-17 20:57:59 +00:00
Benjamin Miller
675c5c81c9 Merge "Docs: VPNs under Android O should promote to the foreground" into oc-dev
am: ca007e525b

Change-Id: Ibad60f4b739047b2b5b0bc806ceb3140bd4420db
2017-07-17 14:22:21 +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
TreeHugger Robot
c122011115 Merge "DO NOT MERGE ANYWHERE: Allow NetTransitionWakelock to be overridden via Settings" into oc-wear-dev 2017-07-15 02:29:52 +00:00
Peng Xu
d07b34774c Merge "Update Java doc of SensorManager.createDirectChannel" into oc-dev
am: 17e641dae5

Change-Id: Id4faafa2bce75fdae2ea37231ac12cd57845e81c
2017-07-14 23:07:12 +00:00
TreeHugger Robot
17e641dae5 Merge "Update Java doc of SensorManager.createDirectChannel" into oc-dev 2017-07-14 22:55:15 +00:00
Eino-Ville Talvala
da2c283712 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
(cherry picked from commit 19d96a197f)
2017-07-14 20:57:59 +00: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
Calvin On
95434b51af DO NOT MERGE ANYWHERE: Allow NetTransitionWakelock to be overridden via Settings
Bug: 30574433
Change-Id: If0d2a0b99266d60557623105728feace9ea16943
2017-07-13 00:27:45 +00:00
Andrew Solovay
6c106d5380 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev
am: 1cdf4244f4

Change-Id: I06ce65fb31a65750d7cc95f265295ac79db2587c
2017-07-07 19:08:53 +00:00
Andrew Solovay
1cdf4244f4 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev 2017-07-07 19:02:48 +00:00
Robert Carr
f2c71710a4 Merge "SurfaceView: Avoid initializing Surface from an invalid SurfaceControl." into oc-dev
am: 401b8907d0

Change-Id: Ib012babf144877df858973604c5838883ebe4af5
2017-07-07 03:22:47 +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
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
Peng Xu
19668c0b3a Update Java doc of SensorManager.createDirectChannel
Java doc was left out when addressing API reviewer comments.
This CL fix the discrepancy between the actual logic and java doc.

Bug: 36550285
Test: compiles
Change-Id: I6406892ecdcc5d02f11966fa3fb0b81ed8d3b285
2017-07-05 22:26:03 +00:00
Ricardo Loo
c90e01cd4f Merge "docs: Updated isAutofillSupported description." into oc-dev
am: a89dfb5439

Change-Id: I1c7820a5ce4846222c016020d959b541b12e63aa
2017-06-30 00:51:53 +00:00
Ricardo Loo
a89dfb5439 Merge "docs: Updated isAutofillSupported description." into oc-dev 2017-06-30 00:44:50 +00:00
Chet Haase
2705ebe957 Merge "Add docs for new padding/margin attributes." into oc-dev
am: 8cdbd6e184

Change-Id: I134ccd19e7bb412b726079b2489dbac730e105cd
2017-06-30 00:32:25 +00:00
TreeHugger Robot
8cdbd6e184 Merge "Add docs for new padding/margin attributes." into oc-dev 2017-06-30 00:21:28 +00:00
Andrew Solovay
4d2089c58a docs: Described why ProgressDialog is now deprecated.
Per feedback from DevRel, devs should avoid ProgressDialog because
using a modal dialog to show progress is a bad user experience.
Updating the ProgressDialog javadocs to say this; there's a separate
CL (http://cr/160568896) to make a similar note in the Dialogs API
guide.

Doc is staged to:

http://go/dac-stage/reference/android/app/ProgressDialog.html

Test: make ds-docs
Bug: 37565313
Change-Id: I189732fdda4532f248861e3f3d077f743f6387de
2017-06-29 14:01:43 -07:00
Scott Main
d0fbb4e363 Merge "add links to Log class summary for methods and logcat doc" into oc-dev
am: ea6fea4d5d

Change-Id: I07674d48f82a2072831b57527d3d7d3797f67ff0
2017-06-29 16:19:23 +00:00
Scott Main
ea6fea4d5d Merge "add links to Log class summary for methods and logcat doc" into oc-dev 2017-06-29 16:12:47 +00:00
Chet Haase
353d397d17 Add docs for new padding/margin attributes.
The attributes for View, paddingHorizontal and paddingVertical,
were added in the O release and are documented in R.attr. But they
should also be referenced in View itself, alongside the other
padding parameters.

Similarly, the new layout_MarginHorizontal and
layout_marginVertical should be referenced in
ViewGroup.MarginLayoutParams.

Bug: 63128350  Add docs about new padding/margin params
Test: built docs, checked the result
Change-Id: I3021df5ea83c469811b4a6ec6ecd3ab2966ec384
2017-06-29 07:54:19 -07:00
Robert Carr
dae172184b Merge "Disable requestVisibleBehind." into oc-dev
am: e33c33e38a

Change-Id: Ib9b7c9bf52fb6f4b77964c42c2b28f192c2ffb15
2017-06-29 00:26:18 +00:00
TreeHugger Robot
e33c33e38a Merge "Disable requestVisibleBehind." into oc-dev 2017-06-29 00:17:19 +00:00
Scott Main
450a5bb81c add links to Log class summary for methods and logcat doc
bug: 29123084

Change-Id: Ida1351ca3647faa133905c5ff85df716bffd3203
2017-06-28 23:02:02 +00:00
Ricardo Loo
33d226c953 docs: Updated isAutofillSupported description.
The description for `AutofillManager.isAutofillSupported` doesn't make
clear that either the device or the user can make autofill unsupported.

Bug: 62604325
Test: Ran 'make ds-docs -j16' and staged content to
go/dac-stage/reference/android/view/autofill/AutofillManager.html#isAutofillSupported()

Change-Id: I298b9f535e23dc3cb54fabed36642523753c13a5
2017-06-27 14:17:33 -07:00
Robert Carr
8661c5e519 Disable requestVisibleBehind.
As there is no caller for the SystemAPI convertToTranslucent, there is no situation
where requestVisibleBehind will actually result in the activity becoming
visible behind. However we have bugs in the requestVisibleBehind code-path,
so rather than fix them...it seems better to just prevent ourselves from
running in to them. Full deletion of the code-path is scheduled for post-O
branches.

Change-Id: I6e7c79e036986564d2d443a603e63c341de23057
Fixes: 62512584
Test: Repro from bug. go/wm-smoke.
2017-06-27 13:46:14 -07:00
Bryce Lee
337ccdc2a5 Merge "Add aborted start result." into oc-dev
am: 8796c20dae

Change-Id: Ie79b7a1cb2d5ec31673ca2c136622fd9733df1d3
2017-06-27 04:20:39 +00:00
Bryce Lee
8796c20dae Merge "Add aborted start result." into oc-dev 2017-06-27 04:14:26 +00:00
Makoto Onuki
ae84eec0bb Merge "Fix activity icon badging for non-bitmap icons" into oc-dev
am: 9f607f4c0b

Change-Id: Idd94f2e79bc1cad94995a88e647823870dcb0cee
2017-06-26 23:31:58 +00:00
Bryce Lee
f9d4954f30 Add aborted start result.
Previously, we were returning START_SUCCESS when ActivityStarter
aborted launching the activity. This hides this activity and makes it
harder to debug.

This CL adds a new start result type to capture this internally.

Bug: 38121026
Test: manual
Test: go/wm-smoke
Change-Id: I97699b22b1eff476724c48db0c29daa0566ad280
2017-06-26 16:27:32 -07:00
Makoto Onuki
8f2a478d9d Fix activity icon badging for non-bitmap icons
Bug 62930145
Test: Manual test with development/samples/ShortcutDemo/launcher/

Change-Id: I8d0eed2e1f93a3b04a6a078c25cefbfc47c528a4
2017-06-23 13:10:41 -07:00
Seigo Nonaka
fcc20be8e8 Merge "Stop loading other package's font by default." into oc-dev
am: 824d75e0e1

Change-Id: Iec86839e2646bc6bf8ff45d0267d8aff82ae3452
2017-06-23 04:23:28 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
Felipe Leme
be128e1e51 Improved documentation for AutofillService package:
am: 2ef19c1d73

Change-Id: Ieaf980369f4097c77da02e382fb74290c3a9947b
2017-06-23 00:36:17 +00:00
Felipe Leme
2ef19c1d73 Improved documentation for AutofillService package:
- Moved (and expanded) overall documentation from FillResponse to
  AutofillService.
- Improved SaveInfo documentation.
- Improved FillRequest documentation.
- Improved Dataset documentation.

Bug: 37567048
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML

Change-Id: I157893deac06a5ed5e1cb7fd082da485f227b9ee
2017-06-22 15:25:31 -07:00
Rob Carr
7fa529488d Merge "ListPopupWindow: Wrap new bounds checking in targetSdk check." into oc-dev
am: 82b41e460c

Change-Id: Idbb623e64dbaf079d603c3fbb93e60e8325209fe
2017-06-22 22:25:29 +00:00
Rob Carr
82b41e460c Merge "ListPopupWindow: Wrap new bounds checking in targetSdk check." into oc-dev 2017-06-22 22:08:10 +00:00
Robert Carr
c1fdd2aa32 ListPopupWindow: Wrap new bounds checking in targetSdk check.
While a negative height is pretty silly, crashing apps on
the new version of android makes them sad.

Test: Existing CTS passes.
Bug: 62434804
Change-Id: I5fc3fc50fb6ccfa9e96f38ded4fb8e338f263f09
2017-06-22 11:54:45 -07:00
Amith Yamasani
e47f331465 Merge "Clarify startScan API on how to get results" into oc-dev
am: 78f3a0f722

Change-Id: Ib77e6be122c2fd1da086528b13ec5c0e90103ef1
2017-06-22 01:20:32 +00:00
TreeHugger Robot
78f3a0f722 Merge "Clarify startScan API on how to get results" into oc-dev 2017-06-22 01:14:18 +00:00
Michael Kwan
10efdc0abf Add isSmallBatteryDevice flag to ActivityManager.
Bug: 37351903
Change-Id: I6fed08c35474b10987388070eafb7b16e6944638
(cherry picked from commit 15eb998e65)
2017-06-22 00:12:23 +00:00
Amith Yamasani
9622137f3f Clarify startScan API on how to get results
Make it clear in BluetoothLeScanner on how to get results
when starting a scan for a PendingIntent.

Bug: 38365430
Test: make offline-sdk-docs
Change-Id: I0bf88d751c89a8a478db985713357e153ac08595
2017-06-21 14:06:44 -07:00
shreerag
86eaa4b921 Removing @TestApi from inputdevice enable/disable to fix build
Change-Id: I4f4602aeb6eb5280b70d56645122bb9fc1fab69c
2017-06-21 13:13:36 -07:00
TreeHugger Robot
3db1627131 Merge "Adding feature: input device disable/enable." into oc-wear-dev 2017-06-21 19:13:10 +00:00
shreerag
04ef4dcac2 Adding feature: input device disable/enable.
This functionality will only be available for signed system applications.
A disable call will cause a file descriptor to the input device
driver to be closed, which in turn may cause the input device
to switch into a low-power mode.
An enable call will reopen the input device.

Bug: 30143923
Test: developed a custom apk with signature permission that
calls disable/enable on touchscreen device. Verified that
touchscreen stops working when disable is called and starts
working again when enable is called. Verified that the file
handle to the driver is closed and reopened. Verified that
the notification onInputDeviceChanged is received in the app.
CTS test - android.view.cts.InputDeviceEnabledTest

Change-Id: Ia352deb548b73559f821afd586893393d39a0696
2017-06-21 12:11:56 -07:00
TreeHugger Robot
4f7fd183eb Merge changes from topics 'bug_62802026_take_2', 'bug_62802026' into oc-dev
* changes:
  Don't add FillEventHistory events to the wrong session.
  Fixed how FillEventHistory is reset and clarified javadoc.
2017-06-21 03:45:50 +00:00
TreeHugger Robot
0f98ddaa01 Merge "Small doc fix." into oc-dev 2017-06-21 01:59:02 +00:00
Rob Carr
70f1565b55 Merge "SurfaceView: Fix positioning issue when toggling visibility." into oc-dev 2017-06-21 01:47:58 +00:00