Commit Graph

1352 Commits

Author SHA1 Message Date
Neil Fuller
d046fb26f4 Merge "Track changes to CountryTimeZones API" am: 28b12c347c am: c30eabfadb am: f19b9eecde
am: b82115befc

Change-Id: I337c1c16966087cc89b9717e2cd4904d18c5e2bc
2019-09-11 04:47:53 -07:00
Neil Fuller
f19b9eecde Merge "Track changes to CountryTimeZones API" am: 28b12c347c
am: c30eabfadb

Change-Id: I185a81a7fe58337f6f6cc94f0d2a7d2fd56c0fa3
2019-09-11 04:25:49 -07:00
Neil Fuller
e5c466d3f5 Merge "Simplify APIs exposed for time zone lookups" am: 07dcc4bc0f
am: a7d5a3220a

Change-Id: I058dbe387bbebe61eb03507e64285fa27f0b7108
2019-09-10 04:17:20 -07:00
Neil Fuller
1fb1a378d1 Track changes to CountryTimeZones API
Track changes to CountryTimeZones.lookupByOffsetWithBias()
API: the method now takes an extra argument: dstOffsetMillis,
which is unused in this case.

This commit also improves the parameter names to be more descriptive.

Bug: 139091367
Test: treehugger
Change-Id: I2090965640bb389ea41bde460f380f9ea8a6b176
2019-09-10 11:57:48 +01:00
Neil Fuller
21316e0b65 Simplify APIs exposed for time zone lookups
The libcore.timezone APIs may form the basis for some
new SystemApis. Before starting that process the API
surface is being rationalized to establish the core
use cases.

Test: Treehugger
Bug: 139091367
Change-Id: I6c8b791524d16223c414612913b22f4d70c27d61
Merged-In: I6c8b791524d16223c414612913b22f4d70c27d61
(cherry picked from commit 400efa36ef)
2019-09-10 10:08:19 +01:00
TreeHugger Robot
2a6df07afa Merge "Address static cache access issues." 2019-08-21 20:15:41 +00:00
Kweku Adams
f6ea6733b0 Address static cache access issues.
ArrayMap and ArraySet are not thread safe, so callers are expected to
lock around their instances before calling any methods. However, if a
caller fails to lock, there can be races that end up corrupting the
cache pool (despite having the class level lock held). A corrupted pool
causes issues for other ArrayMap/Set instances, even if those instances
are properly used under locks. There's no way to guard against cache
pool corruption without making ArrayMap/Set fully thread-safe, changing
the pool structure, or appropriately locking around each ArrayMap/Set
instance.

For now, we make ArraySet throw ConcurrentModificationException on a best
effort basis to provide better awareness when an ArraySet is accessed
concurrently without any locks and try to detect when the cache is
corrupted.

Bug: 62282384
Bug: 73549921
Bug: 122969275
Bug: 139015193
Bug: 139401479
Test: atest CtsUtilTestCases:ArrayMapTest
Test: atest CtsUtilTestCases:ArraySetTest
Test: atest FrameworksCoreTests:ArrayMapTest
Test: atest FrameworksCoreTests:ArraySetTest
Change-Id: Icd76630b25afd9f3627239301ffa5c37da25ea18
2019-08-20 19:13:15 -07:00
Neil Fuller
f7a60ec323 Merge "Simplify APIs exposed for time zone lookups" 2019-08-20 11:01:57 +00:00
Neil Fuller
400efa36ef Simplify APIs exposed for time zone lookups
The libcore.timezone APIs may form the basis for some
new SystemApis. Before starting that process the API
surface is being rationalized to establish the core
use cases.

Test: Treehugger
Bug: 139091367
Change-Id: I6c8b791524d16223c414612913b22f4d70c27d61
2019-08-19 20:39:30 +01:00
Oscar Azucena
694d29e854 Added new dump method with indent for LocalLog.
Added new dump method with indent parameter to add extra string indent
to the dump output.

Bug: 139097051
Test: build and ran app with/without indent.
Change-Id: Ie4973e75fd4c29505c8f8b5601da9236ebbf9943
2019-08-16 13:27:13 -07:00
Hans Boehm
ff31612e98 Merge "Move Half implementations to libcore to allow ART optimizations" am: 6bf381b5b1 am: eaad9ac3e2 am: 62a0694411 am: 0e3a540d18
am: 2cc8b8a8e9

Change-Id: If89cc2e62827e521fb501fc6f7e73e12f8da37ee
2019-08-15 15:54:50 -07:00
Hans Boehm
0e3a540d18 Merge "Move Half implementations to libcore to allow ART optimizations" am: 6bf381b5b1 am: eaad9ac3e2
am: 62a0694411

Change-Id: If244c0b7c851afe2f125014350ce1eb483b3afed
2019-08-15 15:01:03 -07:00
Hans Boehm
eaad9ac3e2 Merge "Move Half implementations to libcore to allow ART optimizations"
am: 6bf381b5b1

Change-Id: I14db6620050fe8f1bf592961a3472ed0dc6ef368
2019-08-15 14:22:03 -07:00
xueliang.zhong
e008d965ca Move Half implementations to libcore to allow ART optimizations
Move Half FP16 implementations to libcore, to allow ART compiler to
optimize these methods with intrinsic implementations.

For example, on ARM64 with ARMv8.2 FP16 half registers and instructions:
- Half toFloat/toHalf can be implemented with FCVT;
- Half floor/ceil/round can be implmented with FRINT(pna);
- Half max/min can be implmented with FMIN/FMAX.

Such fast Half FP16 intrinsics can help accelerate ColorLong ARGB
encoding/decoding in Android framework.

Change-Id: I6225ebf8aa825b0394ce8f13e12db317f5c6e3fd
2019-08-14 14:07:44 +00:00
Abhijeet Kaur
ba720eb16d Turn on feature flag to use bugreport API by default
Bug: 136548098
Test: build, flash, take bugreport from Settings uses API workflow by
default. Turning off the feature flag from Settings uses old bugreport
workflow

Change-Id: I6462fcd77e812420dfeb9d3e5a0a8646745606f2
2019-08-08 15:09:33 +01:00
Abhijeet Kaur
57fb463e01 Merge "Make USE_BUGREPORT_API more widely available." 2019-08-08 10:53:31 +00:00
Abhijeet Kaur
943c64b25f Make USE_BUGREPORT_API more widely available.
Previously this flag was in FeatureFlag for Settings, as only Settings
was using this flag. Now, we also need to use this feature flag while
migrating bugreports(from other callers such as Power buttons) to use the API.

In order to avoid flag duplication, adding it here, as Settings can
still access this feature flag.

Bug: 136548292
Test: Settings can still access this feature flag as before
Test: Builds and bugreports generated from Settings use the API flow
when the flag is turned on

Change-Id: Ia7409fc821e1438382e9b59c523ab72de519e861
2019-08-07 16:49:56 +01:00
Vinit Nayak
3e73749c13 Create general callback for changes to RecentTaskList
New callback called whenever a user visible task
is added or removed to the recents list. This results
in less work by updating only when recent task list
changes instead of listening for active task list
changes.

Test: atest RecentTasksTest

fixes: 111077107

Change-Id: I9acf13762d0c79bfde90b64fa5e0edaf882068cc
2019-07-26 12:10:47 -07:00
Quang Luong
3fbca101a8 Added feature flag for WifiTracker2
Feature flag intended to toggle between WifiTracker and the
WifiTracker2 refactor in WifiSettings.

Bug: 70983952
Test: build, check Developer Settings > Feature Flags for new toggle
Change-Id: I06b1346df9ddbc0bce4d40902ed7752827e14ecf
2019-07-19 14:37:12 -07:00
Kweku Adams
6acbca3a9a Rename ProtoInputStream.isNextField to nextField.
ProtoInputStream.isNextField() skips over the current field to read the
next tag. This side effect means that calling isNextField prevents the
caller from reading the field it was just on. The "is" prefix makes it
easy to assume that the method has no side effects. Renaming to
nextField(long) with a parameter should help make it clear that the call
is as dangerous as calling nextField().

Fixes: 137294060
Test: atest android.app.usage.UsageStatsTest
Test: atest android.app.usage.cts.UsageStatsTest
Test: atest com.android.server.usage.UsageStatsDatabaseTest
Test: atest ProtoInputStreamTests
Change-Id: Ibfb8ef741f27a211f076dc0b715b64acbfc0696a
2019-07-12 17:10:39 -07:00
Felipe Leme
b769296531 Improved TimingsTraceLog performance by using arrays, instead of Deque of Pairs.
Test: manual verification
Test: atest FrameworksMockingCoreTests:android.util.TimingsTraceLogTest

Fixes: 135754571

Change-Id: I7a3571a422d09cd618f6610d3403a870af1ebafa
2019-06-25 15:34:02 -07:00
Felipe Leme
137e7812f0 Moar SystemServer boot timing improvements:
- Added (optional) constant to log duration of bottlenecks.
- Added TimingsTraceLog.getUnifinishedTraces()
- Added more traceBegin() / traceEnd() statements
- Uses Truth on TimingsTraceLogTest
- Logs total boot duration

Test: manual verification
Test: atest FrameworksCoreTests:android.util.TimingsTraceLogTest

Bug: 133242016
Bug: 132466534

Change-Id: Ib9bb38d357e0d87a9b7da3456c97029a8b0342a3
2019-06-18 18:59:58 -07:00
bj1211jeon
85966252ef DO NOT MERGE: Add DENSITY_450 am: b38f168397
am: 99d0705722

Change-Id: I7b9bd8d7e715c6c492ad559967b8d9dfee3e7220
2019-06-14 18:09:58 -07:00
bj1211jeon
99d0705722 DO NOT MERGE: Add DENSITY_450
am: b38f168397

Change-Id: I594b671e05c9ba364583d7774454207fb4d89580
2019-06-14 17:45:45 -07:00
bj1211jeon
b38f168397 DO NOT MERGE: Add DENSITY_450
Add 450dpi as a supported screen density.
This change follows up below change Id : Iac673eae2d82c27d96e279c076454af2f5933208

Originally 600dpi was added to support sw384 with WQHD resolution,
though it was lack of for the cases when resolution is FHD resolution. (In case of other resolutions, there already exist 300 and 200 for HD and WVGA resolutions).

Bug: 78283907
Test: run android.dpi.cts.ConfigurationTest#testScreenConfiguration and android.app.cts.ActivityManagerMemoryClassTest#testGetMemoryClass
(cherry picked from commit 13ca0450ede3eedf7d34bbd0b69525cb6ebc63f1)

Change-Id: Ide0baba183c7dea962610d16f18fecbd0dc62567
2019-06-14 15:41:13 -07:00
TreeHugger Robot
2a0fdd14c7 Merge "Add DENSITY_450" 2019-06-13 01:14:01 +00:00
Beverly
d310586c60 Merge "Merge "Add feature flag to enable skip direction mapping" into qt-r1-dev am: 79f7ac9922" into qt-r1-dev-plus-aosp
am: ffa1f390f7

Change-Id: Id81327f4a59febd57c982d7677f7fde9497a0ce6
2019-06-12 11:14:43 -07:00
Beverly
600211a639 Merge "Add feature flag to enable skip direction mapping" into qt-r1-dev
am: 79f7ac9922

Change-Id: I1f4561a0a1104fb64b763fc168f10430b449098f
2019-06-12 10:56:44 -07:00
bj1211jeon
ecd6e71aa6 Add DENSITY_450
Add 450dpi as a supported screen density.
This change follows up below change Id : Iac673eae2d82c27d96e279c076454af2f5933208

Originally 600dpi was added to support sw384 with WQHD resolution,
though it was lack of for the cases when resolution is FHD resolution. (In case of other resolutions, there already exist 300 and 200 for HD and WVGA resolutions).

Bug: 78283907
Test: run android.dpi.cts.ConfigurationTest#testScreenConfiguration and android.app.cts.ActivityManagerMemoryClassTest#testGetMemoryClass
(cherry picked from commit 13ca0450ede3eedf7d34bbd0b69525cb6ebc63f1)
2019-06-11 07:30:31 -07:00
Beverly
4844d722a9 Add feature flag to enable skip direction mapping
When this feature if enabled, users can change the directionality
of the skip gesture

Test: manual
Bug: 132788434
Change-Id: I43fb58c3abeafc36424b1ce6ef4140428de84f4e
2019-06-10 11:52:16 -04:00
Neil Fuller
ca1e48d841 Merge "Delete ByteStringUtils: it is no longer used" am: a677e4d5a0 am: ee2ded047a am: d894c2498a
am: 7a635dcae9

Change-Id: I953179efa0caa8b1db5b56eb7b448f2a7f648b74
2019-06-06 06:18:24 -07:00
Neil Fuller
d894c2498a Merge "Delete ByteStringUtils: it is no longer used" am: a677e4d5a0
am: ee2ded047a

Change-Id: I0752abd2b5e739f8fde780a07a5e417daa058ba7
2019-06-06 06:09:37 -07:00
Neil Fuller
48481e6f93 Delete ByteStringUtils: it is no longer used
The class has odd null handling and refuses to
encode odd numbers of bytes.

Bug: 124232146
Test: build only
Change-Id: Iefca8a870a12df6dec77147957cf4c8084daa506
2019-06-04 08:13:40 +00:00
PO HUNG CHEN
e743aeb922 Merge "Fix StrictModeTest#testNonSdkApiUsage" into qt-dev
am: 4f179bb174

Change-Id: Ic8177c57829e8f28b881c3347b1a4b93084c7fe4
2019-05-28 19:16:26 -07:00
Abhijeet Kaur
2ae76e468b Merge "Migrate Shell app to use the new bugreport API." 2019-05-28 16:56:32 +00:00
Howard Chen
40abbb0fe9 Fix StrictModeTest#testNonSdkApiUsage
Test: atest android.os.cts.StrictModeTest#testNonSdkApiUsage
Bug: 131923046
Bug: 129892635

Merged-In: I6759339000eb239112c0c83ce1131f34164ee0cf
Change-Id: I6759339000eb239112c0c83ce1131f34164ee0cf
2019-05-28 16:25:20 +01:00
Abhijeet Kaur
767c8bb96a Migrate Shell app to use the new bugreport API.
Add new calls to bugreport API, all the while keeping the previous code
and logic untouched.

Added feature flag in Settings which if untouched, runs the old dumpstate workflow
by default. To test the new workflow turn on the feature flag from UI or
`adb shell setprop settings_call_bugreport_api true`.

Add permission TRIGGER_SHELL_BUGREPORT so that not all can send
broadcasts to trigger bugreports.

Create new receiver BugreportRequestedReceiver for the new broadcast intent that the shell app will
use.

Whitelist Shell app to use the bugreport API.

Bug: 123617758

Test: manually built and flash to device. Turn on the feature flag, generate bugreports and check
the onProgress and onFinish notifications.
Test: Turn off the feature flag test old workflow.

Change-Id: I1c7c258a48815a0386d7d4771301cd76f9cae3d0
2019-05-28 14:31:57 +01:00
Mathew Inwood
8b1ed3a51c Merge "Fix StrictModeTest#testNonSdkApiUsage" 2019-05-28 08:30:22 +00:00
Tej Singh
019e7e8dfd Merge "Statsd: Add watchdog rollback to experiment ids" into qt-dev am: 42fb4bb1e9 am: ea2bdcd36f
am: 2fe1e333d5

Change-Id: I405037efc0af8e5bd0094f02036824d32d4ae1a3
2019-05-24 17:13:36 -07:00
Howard Chen
a7e62a828e Fix StrictModeTest#testNonSdkApiUsage
Test: atest android.os.cts.StrictModeTest#testNonSdkApiUsage
Bug: 131923046
Bug: 129892635

Change-Id: I6759339000eb239112c0c83ce1131f34164ee0cf
2019-05-24 23:19:35 +08:00
Tej Singh
ea2bdcd36f Merge "Statsd: Add watchdog rollback to experiment ids" into qt-dev
am: 42fb4bb1e9

Change-Id: Ia47f663b1dcbab9c4f9f8ce2b49cde6545d46ba1
2019-05-23 12:47:46 -07:00
TreeHugger Robot
42fb4bb1e9 Merge "Statsd: Add watchdog rollback to experiment ids" into qt-dev 2019-05-23 19:25:43 +00:00
Josh Gao
c488ccb834 Merge "MemoryIntArray: dup in writeToParcel." into qt-dev am: 6429b70cf6 am: 34ec95fb76
am: 69c187b0bd

Change-Id: Icb0ab63aa1fa09bdf2f36f8c7dc99199a829e487
2019-05-21 03:29:34 -07:00
Josh Gao
34ec95fb76 Merge "MemoryIntArray: dup in writeToParcel." into qt-dev
am: 6429b70cf6

Change-Id: Ia5ed094e4f2c5579617037dc0140c34c412f09cc
2019-05-20 16:27:54 -07:00
Tej Singh
73f8e9b086 Statsd: Add watchdog rollback to experiment ids
Stores experiment ids to disk for watchdog rollback initiate/success
events as discussed.

Test: gts in topic
Bug: 131768455
Change-Id: I32768fe5c5c21c43811e25d8f87faae0c8d82c1f
2019-05-20 22:52:40 +00:00
Josh Gao
536cf5e016 MemoryIntArray: dup in writeToParcel.
Previously, if a MemoryIntArray is written to a parcel from multiple
threads, we'll create multiple ParcelFileDescriptors that own the same
file descriptor, which fdsan doesn't like. Instead of adopting and then
detaching, use ParcelFileDescriptor::fromFd which dups behind the scenes.

Bug: http://b/132720476
Test: treehugger
Change-Id: Iad4930cc2d8c59a9348fedb0889d24cb566afa62
2019-05-15 14:05:26 -07:00
Aran Ink
3ff2f70f39 Remove GlobalActionsDialog values from FeatureFlagUtils.
am: f4744c686f

Change-Id: Idce0f146dcf5540803bc9f1b079742958088ba55
2019-05-14 07:43:53 -07:00
Aran Ink
f4744c686f Remove GlobalActionsDialog values from FeatureFlagUtils.
Merged-in: I5ca5e760d9a987c75a93c43783ad2b38728d48fc
Test: Automated tests pass. Manual testing shows GAD still works.
Fixes: 123397865
Fixes: 127644235

Change-Id: I0a8e285c96eea566ed1b19fa05e4143324f5937b
2019-05-14 14:31:07 +00:00
Eugene Susla
959d9c4bd3 Merge "Revert "MemoryIntArray: track the owned file descriptor in a PFD."" into qt-dev am: 1198fc4e71
am: 97fb2a69bf

Change-Id: I1129063e86c6299fcc646fb96466ffa356f66e62
2019-05-13 16:15:01 -07:00
Eugene Susla
97fb2a69bf Merge "Revert "MemoryIntArray: track the owned file descriptor in a PFD."" into qt-dev
am: 1198fc4e71

Change-Id: Ifb91c1e8bb2c72e607bce0f733b0c95c5b5fdce6
2019-05-13 15:59:27 -07:00