Commit Graph

5509 Commits

Author SHA1 Message Date
Treehugger Robot
81a705690b Merge "Make TimestampedValue Parcelable" 2019-10-14 18:33:43 +00:00
Xin Li
019d9d0bf7 Merge "DO NOT MERGE - Merge QP1A.191005.007 into master" 2019-10-11 02:56:40 +00:00
Neil Fuller
def77b5cd5 Make TimestampedValue Parcelable
Make TimestampedValue Parcelable for simplicity.

TimetampedValue objects are not generally parcelable, depending on the
type of the value held. Previously, TimestampedValue did not implement
Parcelable to avoid committing to a general contract. Developers
parceling TimestampedValue objects were expected to call
TimestampedValue.writeToParcel() / TimestampedValue.readFromParcel()
explicitly when they knew it was safe to do so. This also meant that
TimestampedValues couldn't be used directly via AIDL.

This change makes TimestampedValue parcelable because it's more
familiar / convenient. Attempts to marshall a TimestampedValue that
contains a non-parcelable value will still throw a RuntimeException.

Bug: 140712361
Test: atest android.util.TimestampedValueTest
Change-Id: I8ca9c72f0433b380ce720cd813f650e743b3ddae
2019-10-10 10:16:41 +01:00
Xin Li
8efb8c35f1 DO NOT MERGE - Merge QP1A.191005.007 into master
Bug: 142297020
Merged-In: Ifc7254ab3a5272b056cbc75233aa2dfa8219ea84
Change-Id: Ib4566cec52912a8daa86c317fd99d6d60ef1524f
2019-10-10 00:28:04 +00:00
Alex Light
7ae1299cdd Merge "Perform agent startup-attach before bind" 2019-10-09 21:25:48 +00:00
Alex Light
2d0691c7e1 Perform agent startup-attach before bind
We were performing agent startup-attach during bind but this was too
late for some agents, as it occurred after Context was created. Change
implementation to make this occur prior to bind.

Test: atest CtsJvmtiAttachingHostTestCases
Bug: 142010970
Change-Id: I5f75e8b3c508116762b7863d9b47251d0e808ea9
2019-10-08 11:09:53 -07:00
easoncylee
c90519732e Prune BugreportManagerTestCases out of general-tests.
These tests define test_suite as 'general-tests' only but not used in
Test Mapping Suite. Hence, we plan to prune them to reduce size/build
time of general-tests.zip. They are listed as below:
 - BugreportManagerTestCases

Bug: 139893779

Test: m general-tests
      atest BugreportManagerTestCases

Change-Id: I093772ee5ab35f6218f2b0c7e74192ae171e05bc
2019-10-01 17:08:18 +08:00
Varun Shah
57213b0ce5 Use language tags to store Configuration's locale list.
Instead of storing each Locale within a Configuration object's locale
list by its language, country, variant, and script to proto, store the
entire locale list by its language tags representation which accurately
describes each locale.

Bug: 140197723
Test: atest ConfigurationTest
Test: atest UsageStatsDatabaseTest
Test: manually with bad data
Merged-In: I53946ed4e31de0ffe9c84875c391a7dec6f5375a
Change-Id: Idaae690f79a5c680ad0059a52be62160d9dfb5e7
(cherry picked from commit 5e67462971)
2019-09-16 20:56:34 +00:00
Treehugger Robot
4efb0c510d Merge "Honor HDMI_CONTROL_ENABLED setting in AudioService" 2019-09-13 16:58:19 +00:00
Madhava Srinivasan
154e0193ce Honor HDMI_CONTROL_ENABLED setting in AudioService
This change updates how AudioService is updated of changes to Hdmi Cec
status (enable/disable) and availablity.

Bug: 138956107
Bug: 138373017
Test: Android TV STB: make; flashall;Volume -/+; HDMI control enable/disable.
Change-Id: Iaf83a45206be076858e13d113ba772ed5c59ef60
Merged-In: Iaf83a45206be076858e13d113ba772ed5c59ef60
2019-09-12 22:14:59 +00:00
qiwang
ae32f7e599 Don't clear the output array if it failed to open the proc status file
According to the original documentation, the functions in Process.java
should return -1 when the process doesn't exist,this should be detected
by Process.readProcLine() when it fails to open the /proc/<pid>/status
file. Unfortunately readProcLine() zeroes-out the output array before
attempting to open the file, so the expected return value -1 is changed
to be 0  when the process doesn't exist. It's inconsistent with the
interface description definition, so correct it.

Test: try to use Process.getUidForPid(int pid) api to read a non-existent
process pid's uid, it will return -1 instead of 0.

Merged-In: Ic2ac7defea8b15dd65f907d04e168a1283a4f621
Change-Id: Ic2ac7defea8b15dd65f907d04e168a1283a4f621
Signed-off-by: qiwang <wangqi_a@xiaomi.com>
2019-09-06 14:14:33 -07:00
Xin Li
a770df1d2e DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I94fce9c5c0b35cbb88ee27fa4cd037927964d2cd
2019-08-24 05:22:23 +00:00
Xin Li
80860803a4 DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master
Bug: 134405016
Change-Id: I303c0268e8e454b0f0f460eb286812a50c9add88
2019-08-14 12:04:06 -07:00
Steven Moreland
42fb0c80fb Fix ParcelNullabilityTest.
Test: atest android.os.ParcelNullabilityTest
Fixes: 138999297
Change-Id: I0f5c09a1e8f7a2927409f228a566988d949f34c7
2019-08-08 11:15:35 -07:00
Dan Shi
6bbd7c4cc6 Merge "Fix dependency on APK used by test"
am: 85d2ac2e12

Change-Id: I1ae6bff68d4aa4890fee47b5943e4d3420c32ed2
2019-08-05 14:19:06 -07:00
Treehugger Robot
85d2ac2e12 Merge "Fix dependency on APK used by test" 2019-08-05 21:04:28 +00:00
Steven Moreland
1d28afeb64 ParcelTest: use different work source for updates
We can improve the test slightly by using a different value when we
update work sources.

Bug: N/A
Test: android.os.ParcelTest
Change-Id: I5f4905667842a63d31839d610c405333b915cae8
2019-07-31 09:14:01 -07:00
Steven Moreland
ccd131c0d5 Remove test assumption of interface token layout.
Since it is not API.

Bug: 138691255
Test: atest android.os.ParcelTest
Change-Id: I1c51344151bf3ae5b6424e75195782aec8064246
2019-07-31 09:13:23 -07:00
Kalesh Singh
8ad549cdf2 Merge "Get native wakelock stats from SystemSuspend if /sys/class/wakeup not available."
am: dec3796249

Change-Id: I994a051e37e53417ab8df6df13318adcf071945b
2019-07-30 11:36:12 -07:00
Kalesh Singh
eedacc3221 Get native wakelock stats from SystemSuspend if /sys/class/wakeup not available.
If /sys/class/wakeup is available, get both kernel and native wakelock
stats from SystemSuspend, else we get native wakelock stats from
SystemSuspend and fallback to /d/wakeup_sources for kernel wakelock
stats.

Bug: 128923994
Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Test: Compare dumpsys suspend_control against
      dumpsys batterystats --checkin | grep kwl
      to verify BatteryStats is getting wakelock stats
      from SystemSuspend.

Change-Id: I08e56c984b903285bb965dd853dae4a63fdeb824
2019-07-26 17:07:30 -07:00
Dan Shi
bcef6ae6bc Fix dependency on APK used by test
Use data attribute to include the APK used for the test.

Bug: 138416078
Test: atest
Change-Id: Iffeca6c5f487c6a164acb9c880a5b6405eff424d
2019-07-26 14:16:43 -07:00
Kalesh Singh
7c7c466e1b Merge "Get wakelock stats from SystemSuspend"
am: dff4801d6b

Change-Id: I96bda190d2935e3a21391e831d23f50526c8fc93
2019-07-25 00:21:12 -07:00
Treehugger Robot
dff4801d6b Merge "Get wakelock stats from SystemSuspend" 2019-07-25 07:02:25 +00:00
Kalesh Singh
f166d19ebe Get wakelock stats from SystemSuspend
Read wakelock stats from SystemSuspend if possible else fallback to
/d/wakeup_source, /proc/wakelocks.

Bug: 128923994
Test: KernelWakelockReaderTest

Change-Id: I859092d53d7697a4940f9369480e203181f0c370
2019-07-23 09:40:31 -07:00
Mathew Inwood
3020e050d0 resolve merge conflicts of 9acd72c60b to stage-aosp-master
Bug: None
Test: TH
Merged-In: I2fcf25264c62acc801f9e62967072cd04e4641e7
Change-Id: I5bc6b8c20bda03b3760f13f747b1e2069bfd9ac1
2019-07-22 09:29:24 +00:00
Mathew Inwood
a1b39023d8 Compatibility API implementation for app processes.
Pass the set of disabled changes from the system server into the app in the
bindApplication() call. Use this to instantiate an implementation of
Compatibility.Callbacks() to implement the API.

Test: Manual.
Bug: 135010838
Merged-In: I2fcf25264c62acc801f9e62967072cd04e4641e7
Change-Id: I2fcf25264c62acc801f9e62967072cd04e4641e7
2019-07-18 11:09:29 +01:00
Andrew Lewis
806f4cb16b Redact ISOBMFF boxes with 'free'
Test: atest MediaStore_Video_MediaTest android.os.RedactingFileDescriptorTest
Bug: 135499138
Change-Id: Idaa8ad30300d5427f91bb2543be3152881018cf6
(cherry picked from commit 4ec5fda3d6)
2019-07-11 19:49:48 +00:00
Paul Duffin
5c3e9d65e3 Use JUnit TemporaryFolder instead of *IoUtils.createTemporaryDirectory()
Test: atest \
    FrameworksServicesTests:com.android.server.pm.PackageInstallerSessionTest
Bug: 117535564

Change-Id: Ia21ceb26c965dbdb6565a5a1a24142cf0cf51d7a
Merged-In: Ia21ceb26c965dbdb6565a5a1a24142cf0cf51d7a
(cherry picked from commit c655c5fc2e)
2019-07-09 11:52:23 +00:00
Paul Duffin
c655c5fc2e Use JUnit TemporaryFolder instead of *IoUtils.createTemporaryDirectory()
Test: atest \
    FrameworksServicesTests:com.android.server.pm.PackageInstallerSessionTest
Bug: 117535564

Change-Id: Ia21ceb26c965dbdb6565a5a1a24142cf0cf51d7a
2019-07-08 14:57:53 +01:00
Nikita Ioffe
0ad641f9f6 Merge "Rename ApexInfo.package{Name,Path} to module{Name,Path}" into stage-aosp-master
am: 6a36ad8b7e

Change-Id: Idabee06e646addd278b0f47224da9a6401a81036
2019-07-04 08:48:49 -07:00
Paul Duffin
67f7fdd099 Use JUnit TemporaryFolder instead of *IoUtils.createTemporaryDirectory()
Test: atest \
    FrameworksServicesTests:com.android.server.pm.PackageParserTest \
	FrameworksCoreTests:android.content.pm.dex.DexMetadataHelperTest
Bug: 117535564
Change-Id: Ida80e99c9dfe8dc1095bd975fe2991958d01e77d
Merged-In: Ia21ceb26c965dbdb6565a5a1a24142cf0cf51d7a
2019-07-04 15:50:52 +01:00
Louis Chang
d75d59e276 Merge "Avoid making post state to RESUMED for a PAUSING activity" into qt-dev
am: ae80cf399a

Change-Id: I555a5a142e9edb6b6242a831561754082b750b54
2019-07-03 16:40:13 -07:00
Nikita Ioffe
b4eee2a17d Rename ApexInfo.package{Name,Path} to module{Name,Path}
This should resolve the confusion between internal name of APEXes that
comes from apex_manifest.json and packageName that comes from
AndroidManifest.xml.

Follow-up CLs:
* Rename package to module for all apexservice binder APIs.
* Rename package to module in apexd codebase.

Test: atest apexservice_test
Test: atest CtsStagedInstallHostTestCases
Bug: 132428457
Change-Id: If0bd3d368c7373ab0028211a8a4246a9821893af
Merged-In: If0bd3d368c7373ab0028211a8a4246a9821893af
(cherry picked from commit ec67395d7d)
2019-07-03 14:27:01 +01:00
TreeHugger Robot
ae80cf399a Merge "Avoid making post state to RESUMED for a PAUSING activity" into qt-dev 2019-07-03 06:20:07 +00:00
Louis Chang
ea203cdbdf Avoid making post state to RESUMED for a PAUSING activity
Make sure the client post execution lifecycle state to RESUMED
only if the activity was RESUMED while delivering new intent.

Bug: 135715788
Test: making skype calls
Test: atest ActivityThreadTest

Change-Id: I1e3054e1d1611aecf6ddf6d482abf2cb3ebdf9a4
2019-07-03 09:44:12 +08:00
Dmitry Dementyev
45e4f2e836 Merge "Revert "Do not load xml metadata for unchanged packages in RegisteredServicesCache"" into qt-dev
am: 660c234e9a

Change-Id: I466b3e4a3631614064be6aed38f1e74fde48544a
2019-07-02 12:29:39 -07:00
Dmitry Dementyev
40431ae1bc Revert "Do not load xml metadata for unchanged packages in RegisteredServicesCache"
This reverts commit 8094880025.

Reason for revert: changed services order
Test: manual
Bug: 136261465

Change-Id: I2f78f0dbbace212309b87f779efad020cf255196
2019-07-02 03:59:17 +00:00
Kalesh Singh
c26cc3d35a Merge "Route KernelWakelockReader's userspace native wakelock stats collection to SystemSuspend (ISuspendControl::getWakeLockStats())" am: a1cae83560
am: 05b194e058

Change-Id: If9203ea35fec2469561e623da907b8db922f34eb
2019-06-26 12:40:23 -07:00
Mihai Popa
243e2d8466 Merge "Fix Layout.primaryIsTrailingPreviousAllLineOffsets" into qt-dev
am: 65f73d6bb8

Change-Id: Ia360ab502ee4aad7e4371eadd73bd0ff8db607a7
2019-06-26 04:52:31 -07:00
Kalesh Singh
759af3274d Route KernelWakelockReader's userspace native wakelock stats
collection to SystemSuspend (ISuspendControl::getWakeLockStats())

Native wakelocks obatined via SystemSuspend when useSuspendCounter is
enabled, will not be reflected in the information available from
/d/wakeup_sources or proc/wakelocks. This information has been
made available via the ISuspendControl AIDL interface of SystemSuspend.
Kernelwakelock stats however are still being collected in the
/d/wakeup_sources.

Change-Id: I208d004aa0fabcf367016faae77ad51388cdf0ea
Bug: 135680393
Test: Observe SystemSuspend service wakelocks in dumpsys batterystats (for
instance, "PowerManager.SuspendLockout"):
`dumpsys batterystats --checkin | grep wl | grep PowerManager.SuspendLockout`
2019-06-25 16:31:38 -07:00
Mihai Popa
7ad499d007 Fix Layout.primaryIsTrailingPreviousAllLineOffsets
The CL fixes a crash in Layout.primaryIsTrailingPreviousAllLineOffsets.
The crash was happening when the method was called for a line beginning
with an empty bidi run. This could happen, for example, for empty text -
I was unable to find any other case. The CL improves the existing test
for the method with this case, which was previously crashing.

The CL also fixes a potential crash in getLineHorizontals. However, this
bug could never happen as in the current code path clamped is always
false (and kept as parameter for parity with getHorizontal).

Bug: 135444178
Test: atest FrameworksCoreTests:android.text.LayoutTest\#testPrimaryIsTrailingPrevious
Change-Id: I47157abe1d74675884734e3810628a566e40c1b4
2019-06-25 23:09:02 +00:00
Will Brockman
ed8ff33096 Merge "Log usage of addPerson() and setStyle() in notifications." into qt-dev
am: 029190c1bc

Change-Id: I02714867beca90617e32b189ae8846a1defbf4de
2019-06-18 10:52:04 -07:00
Neil Fuller
7bb9a1e67f Merge "Add a basic benchmark for android.text.format.Time" am: 9038c7231d
am: e25cc6b0e7

Change-Id: I26854156a2f0451622bd70d9dba93b9bee669298
2019-06-18 07:25:00 -07:00
Neil Fuller
8dcdc1dd43 Add a basic benchmark for android.text.format.Time
Add a benchmark to demonstrate performance tradeoffs between
alternatives for android.text.format.Time. This can be extended later
as needed for other Time usecases.

Executable with:
vogar --mode app_process --benchmark core/tests/benchmarks/src/android/text/format/AndroidTimeVsOthersBenchmark.java

Results from an aosp/master taimen:

    Experiment selection:
      Benchmark Methods:   [toMillis_androidIucUtil, toMillis_androidTime, toMillis_javaTime, toMillis_javaUtil]
      Instruments:   [runtime]
      User parameters:   {}
      Virtual machines:  [app_process]
      Selection type:    Full cartesian product
    This selection yields 4 experiments.
    Trial Report (1 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidIucUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=6341.29, 1st qu.=6341.29, median=6341.29, mean=6341.29, 3rd qu.=6341.29, max=6341.29
    Trial Report (2 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=12310.21, 1st qu.=12310.21, median=12310.21, mean=12310.21, 3rd qu.=12310.21, max=12310.21
    Trial Report (3 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=1029.36, 1st qu.=1029.36, median=1029.36, mean=1029.36, 3rd qu.=1029.36, max=1029.36
    Trial Report (4 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=10142.66, 1st qu.=10142.66, median=10142.66, mean=10142.66, 3rd qu.=10142.66, max=10142.66
    Collected 4 measurements from:
      1 instrument(s)
      1 virtual machine(s)
      4 benchmark(s)

Note: When not cycling the time zone ID the results are different, but
java.time still comes out ahead.

    Trial Report (1 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidIucUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=6583.57, 1st qu.=6583.57, median=6583.57, mean=6583.57, 3rd qu.=6583.57, max=6583.57
    Trial Report (2 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=4653.01, 1st qu.=4653.01, median=4653.01, mean=4653.01, 3rd qu.=4653.01, max=4653.01
    Trial Report (3 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=1095.20, 1st qu.=1095.20, median=1095.20, mean=1095.20, 3rd qu.=1095.20, max=1095.20
    Trial Report (4 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=2825.56, 1st qu.=2825.56, median=2825.56, mean=2825.56, 3rd qu.=2825.56, max=2825.56

Bug: 16550209
Test: see above
Change-Id: I8f1dffb083db00c2ea4cef40fd5cc2f4acab7a89
2019-06-17 19:04:37 +01:00
Varun Anand
2471441b2d Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459 am: f4c10e8bc2
am: 48f59a0fdf

Change-Id: I960e94b03b29282ae2b03f78a19ed2692bd88e05
2019-06-17 10:33:53 -07:00
Will Brockman
c22772c36a Log usage of addPerson() and setStyle() in notifications.
Added Tron logging to StatusBarNotification.getLogMaker() so it will
be present in most logs about the notification.

Change-Id: I720706d37c663f2018bdfe2153ad180970166c90
Test: atest android.service.notification.StatusBarNotificationTest
Bug: 135180518
2019-06-14 19:10:02 +00:00
Benedict Wong
a84d9fa572 Revert "Revert "Take all VPN underlying networks into account when migrating traffic for""
This reverts commit d8220c2050.

Reason for revert: Fix available for deadlocks.

Bug: 134244752
Change-Id: Ib65214598837289bd39dbf040b56ab7835f893ba
2019-06-13 15:36:27 -07:00
Yiwei Zhang
95cca4b36a Merge "Game Driver: Add settings global for prerelease driver opt in option" into qt-dev
am: ca354f308d

Change-Id: If7ecfd4d0f6e0c0289bb205bca7e370b57bdbcd4
2019-06-12 18:05:21 -07:00
TreeHugger Robot
ca354f308d Merge "Game Driver: Add settings global for prerelease driver opt in option" into qt-dev 2019-06-13 00:31:24 +00:00
Nate Myren
302d0d45d2 Merge "Added test coverage to Context.startActivityAsUser" into qt-dev
am: 471a664375

Change-Id: Ifbed2659b088b72bba4d9d80d87f0d4762d4bba8
2019-06-12 15:18:34 -07:00