Commit Graph

1372 Commits

Author SHA1 Message Date
Philip P. Moltmann
badc09c7a5 Correctly parcel LongSparseArray<String>
Before we just cast Object[] to String[]. This crashes. Now we are
casting the individual objects->strings.

Test: Parceled LongSparseArray
Change-Id: I24883a1dad49c0682977da1aea2370eddb001173
2019-10-24 12:19:31 -07:00
TreeHugger Robot
08fddb89b5 Merge "Migration to bugreport API complete and stable" 2019-10-21 17:01:44 +00:00
Abhijeet Kaur
b1319ed6fe Migration to bugreport API complete and stable
Remove bugreport API feature flag as it is no longer used.

Test: Full/Interactive bugreport work as expected
Test: `adb bugreport` works as expected
Bug: 139415553
Bug: 133494536
Change-Id: I4d6c66a6b101d14336dca459a3aba8e02dbca675
2019-10-18 09:58:48 +01:00
Philip P. Moltmann
59076d8957 Add feature context
Currently only used by app-ops, but can be used by other modules too.

AppOps will collect app-ops based on feature. Only the most basic
parts of app-ops are supporting features yet. The rest will be added
later.

Test: atest CtsAppOpsTestCases
      atest RunSettingsLibRoboTests
      atest com.android.server.wm.ActivityStarterTests
      m -j doc-comment-check-docs
Bug: 136595429
Change-Id: Ia664f4ff1c1c2ceea721d76dc491ec50c237e9ce
2019-10-17 14:15:07 -07:00
Neil Fuller
2505d7580c Merge "Make TimestampedValue Parcelable" am: 81a705690b am: 209c74f8b6 am: 4055cdd965
am: bfe51f8b64

Change-Id: Ied15954c16a1661db7b0d379e1ca71fa7e2c5694
2019-10-14 12:03:18 -07:00
Neil Fuller
209c74f8b6 Merge "Make TimestampedValue Parcelable"
am: 81a705690b

Change-Id: I68edcf15ec9bef69a26267d9bf0c036e38ce93d4
2019-10-14 11:43:18 -07:00
Sudheer Shanka
c04092f108 Merge "Fix NetworkPolicyManager unit tests." 2019-10-14 18:41:25 +00:00
Treehugger Robot
81a705690b Merge "Make TimestampedValue Parcelable" 2019-10-14 18:33:43 +00:00
Sudheer Shanka
c0f85c1001 Fix NetworkPolicyManager unit tests.
Bug: 137859686
Test: atest core/tests/coretests/src/android/net/NetworkPolicyManagerTest.java
Test: atest services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Change-Id: I38a935c71bfb1f78739d508b400e43dc1b52bef5
2019-10-12 15:06:05 -07: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
TreeHugger Robot
7e30a95e66 Merge "Add feature to enable separate personal/work profile settings" 2019-10-09 09:49:07 +00:00
Valentin Iftime
67d9805fed resolve merge conflicts of 484e166df3 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Ia9db1400207d9196012362c480ede059e94184af
2019-10-08 22:21:44 +02:00
Muhammad Qureshi
0d24da19a9 Merge "First draft of StatsEvent.java" 2019-10-08 17:29:13 +00:00
Iavor-Valentin Iftime
99d866acff Merge "API to detect which network interfaces support wake-on-lan"
am: 311fc569f3

Change-Id: I6239ae68559290e31f8c9384e0f973cfea30a1c7
2019-10-08 08:23:23 -07:00
Valentin Iftime
c86ebbaebc API to detect which network interfaces support wake-on-lan
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)

Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b
2019-10-08 13:03:30 +02:00
Muhammad Qureshi
dc6747c6d7 First draft of StatsEvent.java
The actual APIs are subject to change once socket encoding is finalized
and StatsEvent needs to be marked as @SystemApi. This will be addressed
in a future CL.

Test: builds successfully
Bug: 141696033
Change-Id: I508fa3d2f84850438562d01c78155590819badca
2019-10-07 16:02:00 -07:00
Raff Tsai
f217b16925 Change owner
Test: build
Change-Id: I322944206da110da18765f593e6658a4383afdb7
2019-10-07 17:54:51 +08:00
Raff Tsai
7dfe9deccc Add feature to enable separate personal/work profile settings
Bug: 141601408
Test: build pass
Change-Id: I823d2c5067694c5bd49fac680529b597185d5b64
2019-10-07 10:01:05 +08:00
TreeHugger Robot
ad324a3d7e Merge "Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master" into stage-aosp-master 2019-09-11 20:31:32 +00:00
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
Xin Li
d57e959e71 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: I65906d82b14125c0893d5cde0cfebb73bf9e38ab
Merged-In: I1f2564837c33cd4c6c3db6aac3cbaf8c09707da9
2019-09-10 11:16:29 -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