Commit Graph

84775 Commits

Author SHA1 Message Date
Tobias Thierer
c1d27f3bed Merge "Fix Base64OutputStream swallowing/throwing the wrong exception." 2018-07-23 23:20:45 +00:00
Jason Monk
36524c7dbc Merge "Fix slice auto grant permissions" 2018-07-23 21:09:28 +00:00
Jason Monk
fe4885e360 Fix slice auto grant permissions
Test: Use auto-grant permissions across processes
Bug: 110958430
Change-Id: I3100f0655dbeb4ff0cde6407684edaff45961e09
2018-07-23 15:26:04 -04:00
Tobias Thierer
97c4d13812 Fix Base64OutputStream swallowing/throwing the wrong exception.
Base64OutputStream.close() first write()s (possibly empty) data
and then close()s the underlying stream. Because of an inverted
condition, exceptions thrown by the underlying stream were handled
incorrectly:

 - if both the underlying write() and close()/flush() throw
   then it would throw the latter exception when it should
   have thrown the former, suppressing the latter.
 - if only the underlying close() throws then that exception
   was swallowed when it should have been closed.

This bug existed ever since this file was first added to
Android in commit 9df2ffd420
in Feb 2010 (before the concept of suppressed exceptions
existed/was supported). The buggy code was proposed in a
review comment on that CL, which was then accepted/integrated
into the CL.

This CL fixes the inverted condition and adds test coverage.
It also adds code to add the suppressed exception (if any).

Bug: 111697617
Test: Confirmed that Base64Test fails (as described above) before
  this CL but passes after this CL, when running these commands:
  make FrameworksCoreTests && \
  adb install -r ${ANDROID_PRODUCT_OUT}/data/app/FrameworksCoreTests/FrameworksCoreTests.apk && \
  adb shell am instrument -w -e class android.util.Base64Test \
    com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

  Specifically, before this CL, the following test failures occur:
  1.) junit.framework.AssertionFailedError
	at junit.framework.Assert.fail(Assert.java:48)
	at junit.framework.Assert.fail(Assert.java:56)
	at android.util.Base64Test.testOutputStream_ioExceptionDuringClose(Base64Test.java:546)
  2.) junit.framework.ComparisonFailure: expected:<[writ]e()> but was:<[clos]e()>
	at junit.framework.Assert.assertEquals(Assert.java:85)
	at junit.framework.Assert.assertEquals(Assert.java:91)
	at android.util.Base64Test.testOutputStream_ioExceptionDuringCloseAndWrite(Base64Test.java:574)

Change-Id: If7fd7c4615ca004638d7c5d8f1869e7eddb16f33
2018-07-23 17:30:59 +01:00
TreeHugger Robot
c51551d408 Merge "Removing supports for creating stack on display" 2018-07-23 00:36:13 +00:00
Josh Gao
ba5291868f Merge changes from topic "bionic_fdsan_java" am: bb352287c9 am: 1fad55e868 am: f28713990b
am: c671d623c4

Change-Id: I23613868a74b7b1dbd09a3325578c06b391780b5
2018-07-20 22:29:34 -07:00
Josh Gao
c671d623c4 Merge changes from topic "bionic_fdsan_java" am: bb352287c9 am: 1fad55e868
am: f28713990b

Change-Id: I2f55eca5d6d2301905f37200f083949972170e40
2018-07-20 21:49:00 -07:00
Josh Gao
f28713990b Merge changes from topic "bionic_fdsan_java" am: bb352287c9
am: 1fad55e868

Change-Id: Ib738528a64b2fa957c437df50104e6b636287986
2018-07-20 21:35:58 -07:00
Josh Gao
1fad55e868 Merge changes from topic "bionic_fdsan_java"
am: bb352287c9

Change-Id: Ib6c5ac9ffc7f9aa88749af1c0d66880a1c98a650
2018-07-20 21:14:33 -07:00
Treehugger Robot
bb352287c9 Merge changes from topic "bionic_fdsan_java"
* changes:
  ParcelFileDescriptor: support bionic's fd ownership tracking.
  Reenable fdsan in the zygote post-fork.
2018-07-21 02:06:06 +00:00
Kevin Chyn
d682d740f1 Merge changes from topic "face-settings"
* changes:
  Add hidden negative button constants
  Add secure setting for using face on keyguard
  Add face settings metrics
2018-07-21 01:26:02 +00:00
Josh Gao
5ada87388c ParcelFileDescriptor: support bionic's fd ownership tracking.
Also, delete a bunch of deprecated functions that are package-private,
and not called anywhere in the package.

Test: booted walleye
Change-Id: I728e63e7d6f9e1ba42644f93983cfcd6a2d2634c
2018-07-20 16:00:20 -07:00
Android Build Merger (Role)
0283fcc7e3 Merge "Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." am: 2dc5a42743 am: 597eb7f87e am: d05cdbcccd am: c9923e3e91" 2018-07-20 17:45:27 +00:00
Tobias Thierer
6cbe154c9d Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." am: 2dc5a42743 am: 597eb7f87e am: d05cdbcccd
am: c9923e3e91

Change-Id: I249f6ab4b2cc94c9598a71249c1a746060ac283c
2018-07-20 10:44:41 -07:00
TreeHugger Robot
9efdf42f8d Merge changes I57ced3b6,Id988ed81,I219bd8f8,I449a775b,I86461203, ...
* changes:
  Add DetectTvSystemAudioModeSupportAction
  Add tests for HdmiAudioSystemClient
  Fix test failure at HdmiCecLocalDeviceAudioSystemTest.
  Fix test failure for SystemAudioInitiationActionFromAvrTest.
  Checking SYSTEM_AUDIO_CONTROL_ON_POWER_ON property when power on.
  Handle atom power off.
  Add SystemAudioInitiationActionFromAvr
  Handle atom wake up: bring System Audio Control on.
  Send audio status at most once per 500 ms
  Send <Report audio status> CEC commands when it's changed
2018-07-20 17:40:51 +00:00
Tobias Thierer
c9923e3e91 Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." am: 2dc5a42743 am: 597eb7f87e
am: d05cdbcccd

Change-Id: I04ccac84d682b1bfd789f0e9f28cdd1113e52c76
2018-07-20 10:31:29 -07:00
Tobias Thierer
d05cdbcccd Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." am: 2dc5a42743
am: 597eb7f87e

Change-Id: Ie91c49d41f0c5fef015180da208f1a626952d606
2018-07-20 10:19:46 -07:00
Tobias Thierer
597eb7f87e Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME."
am: 2dc5a42743

Change-Id: I5a61fe6e4b9507a754f8977225bc4dbbee88a4ff
2018-07-20 10:11:27 -07:00
Treehugger Robot
2dc5a42743 Merge "Use StrictJarManifest.ATTRIBUTE_NAME_NAME instead of Attributes.Name.NAME." 2018-07-20 15:50:59 +00:00
TreeHugger Robot
014a89593a Merge "Fix crash during cursor moving on BiDi text" 2018-07-20 02:56:26 +00:00
Kevin Chyn
91e7a3dcff Add hidden negative button constants
The support library was recently merged in frameworks/support, and exposes
the negative button action through an onError message (instead of an
OnClickListener). These change adds a placeholder in frameworks/base
so that the constants are kept in sync.

Fixes: 77969138

Test: builds
Change-Id: Ic1d142006c09e1d4b9149540554e4f068e666798
2018-07-19 18:01:11 -07:00
Shubang
ed6fb86391 Add tests for HdmiAudioSystemClient
Bug: 110430593
Test: atest android.hardware.hdmi
Change-Id: Id988ed8180b4728e96423d5d0ca38e017b01a97f
2018-07-19 17:09:25 -07:00
Shubang
2a9993e407 Send audio status at most once per 500 ms
It's recommanded by the spec

Bug: 80297383
Test: make; flashall; local tests
Change-Id: Icf534da48e122d64a8d553bb4e2335caad9eab3a
2018-07-19 17:09:25 -07:00
Shubang
c480a7108c Send <Report audio status> CEC commands when it's changed
According to HDMI CEC specification, an audio system
can report its audio status when System Audio Mode
is on, so that the TV can display the audio status
of external amplifier.

More details can be found in section CEC-13.15 of
HDMI Specification 1.4b

Bug: 80297383
Test: make; flashall; local tests
Change-Id: Id71b709a62add7bf5dccb418489e200350debb8e
2018-07-19 17:09:25 -07:00
Seigo Nonaka
960647d582 Fix crash during cursor moving on BiDi text
The crash was introduced by Ib66ef392c19c937718e7101f6d48fac3abe51ad0
The root cause of the crashing is requesting out-of-line access for the
horizontal width. This invalid access is silently ignored by
TextLine#measure() method but new implementation end up with out of
bounds access.

To makes behavior as old implementation, calling getHorizontal instead
of accessing measured result array.

Bug: 111580019
Test: Manually done
Change-Id: I5c5778718f6b397adbb1e4f2cf95e9f635f6e5c8
2018-07-19 16:22:02 -07:00
Chris Craik
59ff32c4c4 Remove Path codepath in BulletSpan
Test: none

Circles are historically actually easier to draw than Paths for HW
acceleration, though they're equivalent in Skia.

Change-Id: I1a7e2ca6439b6a09fdac784237065668db8cadc6
2018-07-19 14:58:39 -07:00
Jeff Sharkey
e849fffd96 Merge "Revert SQLiteQueryBuilder for now." 2018-07-19 20:12:20 +00:00
Kevin Chyn
aa580f4edc Add secure setting for using face on keyguard
Bug: 111321762

Test: builds
Change-Id: I5a2ec8d1d11be2085f2526c9b73a5206b668c8c8
2018-07-19 12:41:28 -07:00
TreeHugger Robot
5ecdab5763 Merge "Initial unit tests for AssistStructure" 2018-07-19 17:51:32 +00:00
Yin-Chia Yeh
4f32014493 Merge "Camera: hardware level related doc update" into pi-dev am: 3d3c6531e1
am: e6ddc0c252

Change-Id: I07bd6fd9e0a4703abe6dc65484300964c3990a51
2018-07-19 09:36:55 -07:00
Yin-Chia Yeh
e6ddc0c252 Merge "Camera: hardware level related doc update" into pi-dev
am: 3d3c6531e1

Change-Id: I0134219335f73ef0c9ff3d90f04127cf36e41ad9
2018-07-19 09:25:58 -07:00
TreeHugger Robot
3d3c6531e1 Merge "Camera: hardware level related doc update" into pi-dev 2018-07-19 16:12:17 +00:00
Jeff Sharkey
91be9263e3 Revert SQLiteQueryBuilder for now.
We've encountered subtle bugs in how apps are using this public
API, so revert it back to exactly what shipped in the last
release, and move functionality to new SQLiteStatementBuilder
class, since we already have several customers using it.

Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Bug: 111486645
Change-Id: Ief059e987f2421e19f6f57a94320c313946a26d7
2018-07-19 09:52:20 -06:00
Felipe Leme
ce47000f39 Initial unit tests for AssistStructure
Right now this test is focused in the parcelization of a big object, due to an
upcoming refactoring on the Autofill parcelization that does not use
ensureData() to load the structure (which in turn requires calls from
system server to the app).

Bug: 35708678

Test: atest app.assist.AssistStructureTest

Change-Id: I9e1c52b19cd1d82869fa8f48113cc7dd7b00a38c
2018-07-19 08:17:19 -07:00
TreeHugger Robot
f931eb8fd1 Merge "Support rotation on secondary displays (1/N)" 2018-07-19 14:09:57 +00:00
TreeHugger Robot
d618e1dbd9 Merge "Remove unused API on IWindowSession, prepare for multi-display." 2018-07-19 00:45:19 +00:00
TreeHugger Robot
8877e2ef53 Merge "Update OWNERS for database code" 2018-07-19 00:11:15 +00:00
Makoto Onuki
b247a686e2 Update OWNERS for database code
Test: N/A

Change-Id: If657f1ac87d9a9e77162816c7ac6abb719b834d4
2018-07-18 15:56:36 -07:00
Jorim Jaggi
edf3e1fa2e Merge "Move allocateBuffers to RT" into pi-dev am: 2f8a3a4bb8
am: c9756c9193

Change-Id: Ieed40312fe16a54c3e1974621b53e29b23ddcdbc
2018-07-18 15:19:39 -07:00
Jorim Jaggi
c9756c9193 Merge "Move allocateBuffers to RT" into pi-dev
am: 2f8a3a4bb8

Change-Id: I6c8f84406a40fa324a4486f71fccf01f6acfe60a
2018-07-18 15:06:29 -07:00
Jorim Jaggi
2f8a3a4bb8 Merge "Move allocateBuffers to RT" into pi-dev 2018-07-18 21:47:59 +00:00
TreeHugger Robot
cadaf5262e Merge changes I58789fdc,I74e03909,Id82f5e6d
* changes:
  Move queryTvSystemAudioModeSupport to HdmiCecLocalDeviceAudioSystem
  Add stub method for detecting System Audio Mode support
  Add HdmiAudioSystemClient
2018-07-18 20:59:26 +00:00
TreeHugger Robot
9246e1cb4e Merge "Fix migration of O DND visual effects settings" 2018-07-18 20:06:25 +00:00
Nick Chalko
f28c7b5602 Move queryTvSystemAudioModeSupport to HdmiCecLocalDeviceAudioSystem
Bug: 80297382
Test: m -j services.core framework
Change-Id: I58789fdcf5208ac334e0d696fa769527d61847cc
(cherry picked from commit ff23fbf2b33602dcccb9b1460275d2d748c6dd7e)
2018-07-18 11:50:23 -07:00
Nick Chalko
6d9da80f4d Add stub method for detecting System Audio Mode support
Bug: 80297382
Test: m -j; stub only
Change-Id: I74e03909e00f70806e05197d66a0eb30ea4e49c8
2018-07-18 11:50:16 -07:00
Shubang
67373192a9 Add HdmiAudioSystemClient
Bug: 109949458
Test: make;
Change-Id: Id82f5e6d5fd607ec0ffe11317341a02f7357354e
2018-07-18 11:50:16 -07:00
TreeHugger Robot
74821b569f Merge "Include textclassifier info in dumpsys" 2018-07-18 18:33:31 +00:00
Phil Weaver
0286e7c510 Merge "Fix a11y cache correctness bug" 2018-07-18 17:40:15 +00:00
Yifan Hong
d8fe7f5796 Merge "IBatteryPropertiesRegistrar: remove unused functions" into stage-aosp-master
am: b9fa97dff7

Change-Id: I55e25e25612cbb11cec025ba21b6577d635f1df9
2018-07-18 10:38:42 -07:00
Julia Reynolds
4501387821 Fix migration of O DND visual effects settings
In O the settings were in the 'allow' section, not the 'disallow'
section, so the conditional needs to be reversed.

Test: runtest systemui-notification, manual
Change-Id: Icfcb328ac1d44b83b11d185be40c4ec696ebfb25
Fixes: 111313535
2018-07-18 12:38:13 -04:00