Commit Graph

381712 Commits

Author SHA1 Message Date
Shubang
bc2aab3e0f Reuse setSystemAudioMode() in terminateSystemAudioMode()
Bug: 80296770
Test: atest com.android.server.hdmi
Change-Id: I12244fd8bdd8b0a15f5abde498f9b6ae2831a03a
2018-07-23 18:43:40 -07:00
Shubang
2fd186ea71 Handle amplifier ends system audio control
Based on spec CEC 13.15.2

Bug: 80296770
Test: make;
Change-Id: I53ddc0a401e033807424010147b3bc3cd8c9c374
2018-07-23 17:25:24 -07:00
Shubang Lu
e386153b43 Merge "Add handleActiveSource() to update atom local active source." 2018-07-24 00:05:58 +00:00
Android Build Merger (Role)
17381fe907 Merge "Merge "Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master" into stage-dr1-aosp-master am: dc0144d0d7 am: 2225ae8c32" 2018-07-23 23:44:03 +00:00
Andreas Gampe
2952021e17 Frameworks: Annotate trivial @GuardedBy in services/core
Add @GuardedBy for simple functions that require locks and have a name in
one of the frameworks naming styles for locks ("^.*(Locked|LPw|LPr|L[a-zA-Z]|UL|AL|NL)$").

Changelist for statsd.

Derived by errorprone.

Bug: 73000847
Test: m
Change-Id: I02981b3f65102640609c8ca85c765250b0e2e3ad
2018-07-23 23:42:26 +00:00
Xin Li
9a38b6f75d Merge "Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master" into stage-dr1-aosp-master am: dc0144d0d7
am: 2225ae8c32

Change-Id: If9db67071cb8ae7087d8c0b4cb1c635ac6d0c221
2018-07-23 16:30:13 -07:00
TreeHugger Robot
89ee44a837 Merge "WifiManager: Remove unused param in getControllerActivityEnergyInfo" 2018-07-23 23:29:16 +00:00
John Reck
fbd7479ba5 Merge "More auto-dark stuff" 2018-07-23 23:28:40 +00:00
TreeHugger Robot
5ff9b23751 Merge "Fix SignatureTest failure" 2018-07-23 23:26:29 +00:00
Tobias Thierer
c1d27f3bed Merge "Fix Base64OutputStream swallowing/throwing the wrong exception." 2018-07-23 23:20:45 +00:00
TreeHugger Robot
22291f2888 Merge "Atoms for ProcStats duration and pss metrics" 2018-07-23 23:12:07 +00:00
Shubang
8ea6f0ba05 Fix SignatureTest failure
The root cause is issue 79432238
Before this is fixed, put the field on the light greylist to unblock CTS tests.

Change-Id: I084da8c70534f12e9badfd50a285836219046aa0
Fix: 110798342
Test: cts-tradefed run cts -m CtsCurrentApiSignatureTestCases
2018-07-23 21:59:13 +00:00
Chenjie Yu
bd1a28f45c Atoms for ProcStats duration and pss metrics
atom and logging for statsd to mimic procstats process duration metrics.

ActivityManagerSleepStateChanged
MemoryFactorStateChanged
ExcessiveCpuUsageReported
CachedKillReported
ProcessStateChanged
ProcessMemoryStatReported

Some of the enums will need to use frameworks proto. It is blocked by
other cls that are cleaning namespace, etc.

Bug: 110784286
Bug: 110538804
Bug: 110539297
Bug: 111561536
Bug: 111685402
Bug: 111128767

Test: cts test
Change-Id: I7502eb0bb36b90f43493b147a35bee48bad1b000
2018-07-23 14:22:45 -07:00
Xin Li
2225ae8c32 Merge "Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master" into stage-dr1-aosp-master
am: dc0144d0d7

Change-Id: I96c6033cfa15810b79185ecf9509482eba5f987a
2018-07-23 14:21:06 -07:00
Android Build Merger (Role)
28b2263652 Merge "[automerger skipped] Merge "Check for /dev/memcg/system/tasks before writing to it" am: 36ce625ccf -s ours am: df01c2cf19 -s ours am: 290712717f -s ours am: 8de09d8f2e -s ours" 2018-07-23 21:15:13 +00:00
Jeff Vander Stoep
b079316724 [automerger skipped] Merge "Check for /dev/memcg/system/tasks before writing to it" am: 36ce625ccf -s ours am: df01c2cf19 -s ours am: 290712717f -s ours
am: 8de09d8f2e  -s ours

Change-Id: Idb8127dd00a1ca194244d7e804bf5adfdb69b9a2
2018-07-23 14:13:59 -07:00
Olivier Gaillard
2717c714a7 Merge "Binder calls stats - random sampling." 2018-07-23 21:11:49 +00:00
TreeHugger Robot
2ecec595a6 Merge "Break scan commit out of scanPackage* methods" 2018-07-23 21:10:35 +00:00
Jason Monk
36524c7dbc Merge "Fix slice auto grant permissions" 2018-07-23 21:09:28 +00:00
TreeHugger Robot
9db0d1b8cc Merge "Shuffle FD ownership? \noideadog" 2018-07-23 21:02:15 +00:00
Android Build Merger (Role)
0256ebef77 Merge "Merge "Avoid onServiceDisconnected() for unbind Service" am: a37c252248 am: c38e0f19c1 am: 2a126b05a2 am: 4775d87ca7" 2018-07-23 21:01:35 +00:00
Gopal Krishna Shukla
11e9d9d1ba Merge "Avoid onServiceDisconnected() for unbind Service" am: a37c252248 am: c38e0f19c1 am: 2a126b05a2
am: 4775d87ca7

Change-Id: Ibdff3b0f1f0f5a631161ca11794e8e1fbc2f2d59
2018-07-23 14:00:31 -07:00
Jeff Vander Stoep
8de09d8f2e [automerger skipped] Merge "Check for /dev/memcg/system/tasks before writing to it" am: 36ce625ccf -s ours am: df01c2cf19 -s ours
am: 290712717f  -s ours

Change-Id: I09aaa848786ce8ad86b877c5f4f36f5a64c6ed65
2018-07-23 13:59:24 -07:00
Shuo Qian
242bf1177f Merge "Call Redirection Surface in Telecom out going call flow" 2018-07-23 20:57:41 +00:00
Xin Li
dc0144d0d7 Merge "Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master" into stage-dr1-aosp-master 2018-07-23 20:53:48 +00:00
Jeff Vander Stoep
290712717f [automerger skipped] Merge "Check for /dev/memcg/system/tasks before writing to it" am: 36ce625ccf -s ours
am: df01c2cf19  -s ours

Change-Id: I86e73d2e05ba61e24d7ef2a4efcf0e2147a8723f
2018-07-23 13:49:57 -07:00
Felipe Leme
a384cf613f Merge "Finish autofill session when service dies." 2018-07-23 20:49:14 +00:00
Jeff Vander Stoep
df01c2cf19 [automerger skipped] Merge "Check for /dev/memcg/system/tasks before writing to it"
am: 36ce625ccf  -s ours

Change-Id: I8112055d639675f0a2fd61e91e04793d480ad880
2018-07-23 13:39:03 -07:00
Brad Ebinger
98d767052a Merge "Quick style fixup of ISmsImplBase" am: 6a5c1492d2 am: a36d57b722 am: 8873784d07
am: bc595fcfb1

Change-Id: I77d9b5f458de39741d84e7ec0582397d0159c458
2018-07-23 13:31:53 -07:00
Patrick
347bc559cf Break scan commit out of scanPackage* methods
In preparation to have atomic install scan and commit results as
separate steps, we're modifying all scanPackage* and usages of them to
deal directly with a scan result and check for success before committing
the result(s).

Bug: 109941548
Change-Id: Ic155dfa0b0e3f84f77387378d60847a617b562af
2018-07-23 20:06:09 +00:00
Jeff Sharkey
a651b78337 Shuffle FD ownership? \noideadog
Test: manual
Bug: 111746860
Change-Id: I1d88bcf81efe71d622bcf3056a6d7c1a4c793383
2018-07-23 13:55:36 -06:00
Gopal Krishna Shukla
4775d87ca7 Merge "Avoid onServiceDisconnected() for unbind Service" am: a37c252248 am: c38e0f19c1
am: 2a126b05a2

Change-Id: I07e998923f88b3dd6b3c53ed74b0ed7deb14c08c
2018-07-23 12:34:53 -07: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
Gopal Krishna Shukla
2a126b05a2 Merge "Avoid onServiceDisconnected() for unbind Service" am: a37c252248
am: c38e0f19c1

Change-Id: I7d4f4929057490948ebbcb956eb3e2ba4aca6e3a
2018-07-23 12:21:51 -07:00
Treehugger Robot
36ce625ccf Merge "Check for /dev/memcg/system/tasks before writing to it" 2018-07-23 19:21:19 +00:00
Brad Ebinger
bc595fcfb1 Merge "Quick style fixup of ISmsImplBase" am: 6a5c1492d2 am: a36d57b722
am: 8873784d07

Change-Id: Ib8fec2073dbd8d85248f2debb36740ba0783904c
2018-07-23 12:16:34 -07:00
Gopal Krishna Shukla
c38e0f19c1 Merge "Avoid onServiceDisconnected() for unbind Service"
am: a37c252248

Change-Id: I825afa6ce1a341f37687fb453a1eeda1ad19ae86
2018-07-23 12:10:57 -07:00
Calin Juravle
aa0dce2d4f Merge "Annotate the compilation reason with dex metadata information" 2018-07-23 19:08:28 +00:00
Mathew Inwood
ec9ecd41f2 Merge "Add new "class2greylist" tool." am: 7f0aa734a3 am: 812291cc46 am: 6119634dba
am: 7ca4fcec4a

Change-Id: I357b05418c4a699ed2100bb45c88043d7c3f1d74
2018-07-23 12:07:13 -07:00
Brad Ebinger
8873784d07 Merge "Quick style fixup of ISmsImplBase" am: 6a5c1492d2
am: a36d57b722

Change-Id: I5af8df77455e01d90e3d358afc2d9f39269572ab
2018-07-23 12:04:14 -07:00
Felipe Leme
5e2b156aaf Finish autofill session when service dies.
Fixes: 37565347
Test: manual verification (cannot use CTS because test and service runs in the
      same process)

Change-Id: I04e2d4a3587b9b9cf72a06c46291fb3ba6bbc91e
2018-07-23 11:54:06 -07:00
Brad Ebinger
a36d57b722 Merge "Quick style fixup of ISmsImplBase"
am: 6a5c1492d2

Change-Id: Idf5c1cbcc4d7ef22a99289bf8aebeedfb301e53a
2018-07-23 10:59:25 -07:00
Treehugger Robot
a37c252248 Merge "Avoid onServiceDisconnected() for unbind Service" 2018-07-23 17:27:13 +00:00
Mathew Inwood
7ca4fcec4a Merge "Add new "class2greylist" tool." am: 7f0aa734a3 am: 812291cc46
am: 6119634dba

Change-Id: Ib7df082dcf104549f0a2b0dbb830a912b1313a17
2018-07-23 10:24:14 -07:00
Mathew Inwood
6119634dba Merge "Add new "class2greylist" tool." am: 7f0aa734a3
am: 812291cc46

Change-Id: Id5ee125e8a87c2d0a4fe938d01ebd53554323168
2018-07-23 10:16:10 -07:00
Andreas Gampe
a71bee878e Frameworks: Annotate trivial @GuardedBy in services/core
Add @GuardedBy for simple functions that require locks and have a name in
one of the frameworks naming styles for locks ("^.*(Locked|LPw|LPr|L[a-zA-Z]|UL|AL|NL)$").

Changelist for permission manager.

Derived by errorprone.

Bug: 73000847
Test: m
Change-Id: I54bb3a18cbe88d24028d9a90600cd6102598b358
2018-07-23 10:12:17 -07:00
Mathew Inwood
812291cc46 Merge "Add new "class2greylist" tool."
am: 7f0aa734a3

Change-Id: I7d53d60ea3537530a9e21e2de2f53eb764f7d0b5
2018-07-23 10:08:47 -07:00
Brad Ebinger
6a5c1492d2 Merge "Quick style fixup of ISmsImplBase" 2018-07-23 16:41:51 +00:00
Olivier Gaillard
2c13c6f37b Binder calls stats - random sampling.
Change the sampling method to be random. The previous mechanism recorded
one call for each key (uid/API name) and every X calls for each key:
- This is biased and will make it to interpret the data from
westworld.  It was especially unfair for apps using many different APIs
since the first call to each API was always recorded.
- It uses more memory since we will keep track of all the long tail

Simplify/unify the way we keep track of sampled calls.

Do not estimate the CPU usage of non-recorded calls
    long samplesCount = cs.callCount / mPeriodicSamplingInterval + 1;
    duration = cs.cpuTimeMicros / samplesCount;
It biases the results, let's use an example with 3 calls: 1ms, 3ms, 5ms
with an sampling interval of 2. With the previous algorithm we would get an
average per call of (1+1+3+2+5)/5=2.4ms. With the new one (1+3+5)/3=3ms.

Test: unit tests
Change-Id: I1dd7eb3c6c631b86a53485bccbfa397882cccc92
2018-07-23 17:39:22 +01: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