Commit Graph

794 Commits

Author SHA1 Message Date
Tobias Thierer
c848d8968a Merge "Move most android.util.Mutable* classes to framework." am: cd06caf10e am: 4719440f3f am: 23c2a6578b
am: d6e61836ac

Change-Id: Ifec5c8457aa144a909dd694de15d66c550cd7fdc
2017-10-19 17:26:09 +00:00
Tobias Thierer
d6e61836ac Merge "Move most android.util.Mutable* classes to framework." am: cd06caf10e am: 4719440f3f
am: 23c2a6578b

Change-Id: I990ecf36ee6d2cd1d55c7cb1e652a8998ff84f35
2017-10-19 16:42:50 +00:00
Tobias Thierer
4719440f3f Merge "Move most android.util.Mutable* classes to framework."
am: cd06caf10e

Change-Id: I25fd01bd4bc8c582e6cb79a03de47847b46bcb83
2017-10-19 16:18:44 +00:00
Tobias Thierer
301bf35e2d resolve merge conflicts of 5c9e47d28b to oc-mr1-dev-plus-aosp
Test: This merge conflict was automatically resolved by meld.
      The automatic resolution of the same merge conflict by meld
      from cherrypicking this CL into internal-master has passed
      Treehugger (and was already submitted).
Exempt-From-Owner-Approval: Resolving merge conflicts with no deltas
Change-Id: I61f15aeb79c1ad26cc7c51be2af59ecb7b672a7b
2017-10-19 15:33:17 +00:00
Tobias Thierer
07efe116b1 Merge "Framework: Prefer android.system.Os over libcore.io.Libcore.os"
am: 5f04db96b3

Change-Id: If85216d03022708787a7218e494434453d5548e3
2017-10-19 14:25:12 +00:00
Joachim Sauer
208f0970d5 Merge "Framework: Prefer android.system.Os over libcore.io.Libcore.os" 2017-10-19 11:48:58 +00:00
Tobias Thierer
49818415eb Move most android.util.Mutable* classes to framework.
android.util is the only package shared between libcore and
framework, with only the Mutable* classes living in libcore.

This CL topic moves most of these classes to framework.
After this CL topic, only MutableInt and MutableLong remain
in libcore. This prevents future libcore dependencies on
android.util; it is a first step towards removing the package
overlap between libcore and framework.

Test: Treehugger
Bug: 67901714

Change-Id: Id466181cb0db747da17f38ddb0b99c3e522add16
2017-10-18 14:53:57 +01:00
Tobias Thierer
6217e37d30 Framework: Prefer android.system.Os over libcore.io.Libcore.os
This is a pure refactoring with no a behavior change other than
that these calls now go through android.system.Os, which immediately
delegates to Libcore.os.

This is a first step towards separating framework (via
android.system.Os) vs. libcore (via Libcore.os) clients of these
low level APIs. Separating these is a prerequisite towards moving
the API parts of android.system into framework, and moving the
rest into a different package in libcore.

Test: Treehugger
Bug: 67901714

Change-Id: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
Merged-In: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
2017-10-18 14:53:57 +01:00
Tobias Thierer
96aac9b375 Framework: Prefer android.system.Os over libcore.io.Libcore.os
This is a pure refactoring with no a behavior change other than
that these calls now go through android.system.Os, which immediately
delegates to Libcore.os.

This is a first step towards separating framework (via
android.system.Os) vs. libcore (via Libcore.os) clients of these
low level APIs. Separating these is a prerequisite towards moving
the API parts of android.system into framework, and moving the
rest into a different package in libcore.

Test: Treehugger
Bug: 67901714

Change-Id: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
2017-10-18 10:35:22 +01:00
Yao Chen
d54f9dd625 Revert "Revert "Start auto-generating the stats log API.""
Test: builds successfully

This reverts commit 9319453998.

Change-Id: I22bca4a32adf86040b9d72ad5b45999aba28f586
2017-10-17 10:42:44 -07:00
Joe Onorato
9319453998 Revert "Start auto-generating the stats log API."
This reverts commit b81d1a7b9a.

Change-Id: I189684d8913ffffca42d9514ac88ea5cc4a44f05
2017-10-16 22:41:28 +00:00
Joe Onorato
b81d1a7b9a Start auto-generating the stats log API.
Both native and java bindings.

TODOs:
- Finish WorkSources.
- Clean up the package names for the protos.
- Put the protos in a more suitable location.

Test: stats-log-api-gen-test
Change-Id: Idf4022225e2be05106dbcf7de8e97a3337fc63e2
2017-10-15 20:25:19 -07:00
Kweku Adams
b72032a438 Fixing typos in ProtoOutputStream doccomment.
Updating comments to reference non-deprecated methods.

Test: none
Change-Id: I76194d7426e9a828eff629c6a680c064606babf0
2017-10-04 21:50:06 +00:00
Fan Zhang
141bd92987 Merge "Add helper method to override flag" 2017-10-04 20:11:44 +00:00
Fan Zhang
cfd02742e4 Add helper method to override flag
Bug: 36222960
Test: atest FrameworksCoreFeatureFlagTests
Change-Id: I45edc5171e66e4ac8e84cfc58a9fdf9bae2b136a
2017-10-03 14:51:11 -07:00
TreeHugger Robot
f725749478 Merge "incidentd: Adding RankingHelper data to NotificationManager proto output." 2017-10-03 21:43:50 +00:00
Kweku Adams
62b4224757 incidentd: Adding RankingHelper data to NotificationManager proto output.
BUG: 65750824
Test: flash on device and look at incident.proto output
Change-Id: I9323cc109d96715b2114aa405eda79ae4c109c14
2017-10-03 12:35:48 -07:00
Yi Jin
9680cfae05 Implement procstats dumpsys section
Bug: 65690183
Test: tested manually using incident-report tool
Change-Id: I0c34e411dba8faf9f311c78701ac8f6bec824277
2017-09-29 17:03:50 -07:00
TreeHugger Robot
078208d235 Merge "Check in new protos and constants. Test: Started statsd and verified it outputs data. Also ran statsd tests." 2017-09-29 04:46:12 +00:00
Stefan Lafon
cdb1a0ed95 Check in new protos and constants.
Test: Started statsd and verified it outputs data. Also ran statsd tests.

Change-Id: I2a438b2ddfcb1576e21acb6159bea607fed7caaa
2017-09-28 14:38:31 -07:00
Andreas Gampe
5f9ba1a2b6 Merge "Frameworks: Move Log holder to be preloaded"
am: 7dd3a7d5c0

Change-Id: Ief51fd7b8cdf14c22ded48fde7121d6cca8f243e
2017-09-28 21:21:33 +00:00
Andreas Gampe
604bae849d Frameworks: Move Log holder to be preloaded
To avoid issues with late initialization, let the holder be
initialized in the zygote.

(cherry picked from commit 61a3e8c23a)

Bug: 65927416
Test: m
Merged-In: I6f454df46d4c64d295e1f2510793d5087b74fb74
Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74
2017-09-28 08:54:10 -07:00
Andreas Gampe
6e7768a274 Merge "Frameworks: Move Log holder to be preloaded" into oc-mr1-dev am: 1a17bfa25c
am: fd31b789f9

Change-Id: Ie6e2671e6ecd53e24cf8a2438ce032ecb0af012b
2017-09-28 15:33:25 +00:00
Andreas Gampe
61a3e8c23a Frameworks: Move Log holder to be preloaded
To avoid issues with late initialization, let the holder be
initialized in the zygote.

Bug: 65927416
Test: m
Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74
2017-09-27 15:34:01 -07:00
Fyodor Kupolov
c5758a8851 Merge "Do not allow multi-threaded usage of TimingsTraceLog" 2017-09-11 19:36:44 +00:00
TreeHugger Robot
d74357d29c Merge "MagnificationGestureHandler refactoring and unit test" 2017-09-01 01:58:16 +00:00
Chenjie Yu
671b1b5b83 add StatsLog and its jni
Test: ran existing tests. Also confirmed with logcat.
Change-Id: I038bbdbd787b1d20e008eda7edf7053875795de2
2017-08-31 14:21:28 -07:00
Eugene Susla
4f8680bb77 MagnificationGestureHandler refactoring and unit test
This is aimed at making MagnificationGestureHandler easier to understand
and reason about

Test: provided unit test + manual magnification test
Change-Id: I958ef0bdd2e6f857a2fab24962b1a06480685732
2017-08-31 13:03:23 -07:00
Hyunyoung Song
b610daed53 Merge "Add shadow to adaptive icons to the shared sheet Test: manual Bug: 65015602" into oc-mr1-dev am: cc4f60fe4b
am: b93fe49a9e

Change-Id: I32a41b4f4b8c7bef3697fc72c6ba17ba84757737
2017-08-29 20:18:24 +00:00
Fyodor Kupolov
6042245636 Do not allow multi-threaded usage of TimingsTraceLog
Test: bit FrameworksCoreTests:android.util.TimingsTraceLogTest
Bug: 65058451
Change-Id: I3e594b67fa3e46a77fc3c509c4ca44457da2f57c
2017-08-28 17:16:55 -07:00
Fan Zhang
690986d370 Add FeatureFlagUtils
Bug: 36222960
Test: runtest --path core/tests/featureflagtests/src/android/util/FeatureFlagUtilsTest.java

Change-Id: I9759db14cac09fa93fe5c011eb9c93a587f39249
2017-08-28 13:19:11 -07:00
Hyunyoung Song
dadb9e1728 Add shadow to adaptive icons to the shared sheet
Test: manual
Bug: 65015602

Change-Id: I01de79edc0a13817680106b1ef46e3212487b62f
2017-08-28 12:22:42 -07:00
Svetoslav Ganov
cdd685c075 Use all certs for computing package signing sha256
In several places we compute the sha256 of the app's signing certificate
(instant cookie storage, backup account permission grants, static shared
lib matching). It is possible that an app is singed with multiple certs
which unfortunately can appear in a random order. We were using only the
first certificate to compute the hash which may be problematic for apps
signed with multiple certs which are later reordered. If an app update's
certs are reordered for cookie storage the app would not be able to
access the cookie, for account grants the app would not get the grant,
and for shared libs the app would fail to install due to a missing lib.

Test: all cookie CTS tests pass
      all static shared lib CTS tests pass
      added test that cookie data not lost on sha256 computation change
      added test that lib install works when specifying
      multiple certs

bug:64270295

Change-Id: Ib6b55f25da735ff5c2762faf6e9b5888e749041d
2017-08-23 11:47:27 -07:00
Siyamed Sinir
06e9629f00 Fix email auto link when there are two chars in local part
Email auto linking used to accept either a single char or more than 2
chars in the local part. Updated the regular expression to accept 1 or
more chars.

Test: added test to cts.LinkifyTest
Test: bit -t CtsTextTestCases:android.text.util.cts.LinkifyTest
Test: bit -t FrameworksCoreTests:android.util.PatternsTest
Test: bit -t FrameworksCoreTests:android.text.util.LinkifyTest
Test: bit -t CtsWidgetTestCases:android.widget.cts.TextViewTest

Bug: 64467661
Change-Id: I4e28a344ff1bc50da353b9490eaaec99a751bffb
(cherry picked from commit e17c5b478e)
2017-08-17 17:29:55 +00:00
Fyodor Kupolov
6e3461b67c Log timings for shutdown stages
Renamed BootTimingsTraceLog to TimingsTraceLog. It is now used for
 boot and shutdown logging.

Added measurements for main stages of shutdown in the system server:
ShutdownTiming: SendShutdownBroadcast took to complete: 734ms
ShutdownTiming: ShutdownActivityManager took to complete: 203ms
ShutdownTiming: ShutdownPackageManager took to complete: 17ms
ShutdownTiming: ShutdownBt took to complete: 533ms
ShutdownTiming: ShutdownRadio took to complete: 534ms
ShutdownTiming: ShutdownNfc took to complete: 1536ms
ShutdownTiming: ShutdownRadios took to complete: 1538ms
ShutdownTiming: ShutdownStorageManager took to complete: 906ms
ShutdownTiming: SystemServerShutdown took to complete: 3918ms

Bug: 64569080
Test: shutdown/reboot and check logs
Change-Id: I636c045852cd1ed6be1c58af6608f70e95756389
2017-08-14 11:23:29 -07:00
Christopher Tate
616541d701 Persisted jobs versus incorrect boot-time RTC
Devices routinely boot in a state where the RTC is wildly incorrect
in the past (2009, 1999, or even at Unix epoch zero).  When we have
persistent jobs to be scheduled at boot, this presents a problem: when
should those jobs run, given that our idea of "now" is incorrect?

The previous implementation fell back to rescheduling these jobs
"from scratch" in this situation, as though they were newly-introduced,
but this turns out to have some emergent pathologies when the jobs
were intended to become runnable after long initial delays: the
rescheduling behavior could wind up starving jobs out entirely,
never running them regardless of how much real uptime the device
had, given the "wrong" pattern of reboots.

We now preserve the original nominal schedule, but recognize when we
have booted in a pathological situation, and correct the schedule for
these jobs when the system clock becomes sensible.

Bug 63817592
Test: JobScheduler test suite plus manual bogus-boot-time repro

Change-Id: Ia36fc5298b68db74e4e07e973b68e68e66206b43
2017-07-31 16:26:01 -07:00
Jeff Sharkey
84c6684bba Merge "Expose SubscriptionPlan API." into oc-mr1-dev 2017-07-21 17:14:30 +00:00
Amith Yamasani
fc923bbcce Merge "Handle an edge case that can reset settings provider data" into oc-dr1-dev
am: 6b4f0bb6fe

Change-Id: I9c71705f57c65fc99da831f9ee382168f131937e
2017-07-21 05:14:33 +00:00
Jeff Sharkey
17bebd2fd7 Expose SubscriptionPlan API.
Clean up SubscriptionPlan, add docs, and expose as public API.

Deprecate older constants in CarrierConfigManager, and point users
towards new API.  (The goal of CarrierConfigManager is to express
key/value pairs that are identical for all users on a particular
carrier, not to configure details that vary between users.)

Since a CarrierService may itself not have access to the plan
details, allow them to "delegate" the capability to configure plans
to another package name.

Factor out new RecurrenceRule class which is used by both
NetworkPolicy and SubscriptionPlan internally.  Polish it to support
arbitrary periods, and continue to test it through NPMST.

Bug: 63391323
Test: bit FrameworksCoreTests:android.util.RecurrenceRuleTest
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I93fae4a43e58e9e4c32f8bf345a257dcd607f088
2017-07-20 14:55:57 -06:00
Amith Yamasani
74bf71b23c Handle an edge case that can reset settings provider data
If the AtomicFile does the rename and fails when writing the
original, make sure we can at least use the backup on reboot.

Bug: 63753300
Test: Stop shell, move settings_global.xml to backup, start shell.
Change-Id: I2049b48af05161bb2c68717a71c1700a95150a6c
2017-07-20 13:50:23 -07:00
TreeHugger Robot
b3f68233d9 Merge "Stop tracking user specific uid cpu time on user stop" 2017-07-06 00:42:09 +00:00
Suprabh Shukla
e6e723d588 Stop tracking user specific uid cpu time on user stop
Telling kernel module uid_cputime to stop accounting time for uids
belonging to a stopped user. Upon user remove, removing uid states for
those uids.

Test: adb shell am instrument -e class \
com.android.internal.os.BatteryStatsUserLifecycleTests -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

adb shell am instrument -e class android.util.SparseLongArrayTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 62390461
Change-Id: Ibe07778465e3d2c13679e4d88d32f7b92fa959d9
2017-07-05 15:39:42 -07:00
Bryce Lee
a89a8cdef9 Merge "Always send configuration to client from resize and relayout." into oc-dr1-dev am: 392ac74f37
am: 4c201983cf

Change-Id: Ie0a49f094952dbd717dc1a71de4aafd267e9c214
2017-06-30 16:42:10 +00:00
Bryce Lee
f858b5788e Always send configuration to client from resize and relayout.
Previously, the server side would omit reporting new configurations
during resize and relayout if the current configuration matched the
last reported. However, if the last reported came through a resize,
the client side handling would be enqueued as a Handler message. This
leads to the possibility of the client getting a new window frame but
not a new configuration where this is synchronously handled, such as
ViewRootImpl::performTraversals.

To address this issue, we now always send the current configuration
from the server to the client. The client then identifies changes
against its own record of last reported configuration and updates as
appropriate.

This changelist also adds a call to force window relayout during
updateConfiguration, as it's possible this is called after
performTraversals is called or resize is handled, leading to a stale
window frame.

Bug: 24671393
Test: go/wm-smoke
Test: Open Camera while rotating phone to landscape. Added
      temporary logs to detect inconsistencies between measurements
      and reported rotation on draw.

Change-Id: I0d5143dfe80400f6a43ce710750f9fc9d4b93f74
2017-06-30 06:42:50 -07:00
Scott Main
87c751f3b2 Merge "Merge "add links to Log class summary for methods and logcat doc" into oc-dev am: ea6fea4d5d am: afeb63d823" into oc-dr1-dev-plus-aosp
am: ef5b81dd69

Change-Id: I3c489f89e2838ee7770f21d7e82ad4678be7f1e4
2017-06-29 16:36:27 +00:00
Scott Main
ecc03fbc9e Merge "add links to Log class summary for methods and logcat doc" into oc-dev am: ea6fea4d5d
am: afeb63d823

Change-Id: If161555970f40d9db0e15c20768a7ddb46527302
2017-06-29 16:27:24 +00:00
Scott Main
afeb63d823 Merge "add links to Log class summary for methods and logcat doc" into oc-dev
am: ea6fea4d5d

Change-Id: I205254f618a3a405aab6f783f5d7de99c9a3a907
2017-06-29 16:19:25 +00:00
Scott Main
41fc46aaa9 Merge "add links to Log class summary for methods and logcat doc" into oc-dev
am: ea6fea4d5d

Change-Id: I322405e6712ef9affb57d86e43b852e19cdc7f88
2017-06-29 16:19:20 +00:00
Scott Main
450a5bb81c add links to Log class summary for methods and logcat doc
bug: 29123084

Change-Id: Ida1351ca3647faa133905c5ff85df716bffd3203
2017-06-28 23:02:02 +00:00
Jeff Sharkey
5ab0243330 Only require that system UIDs tag their sockets.
Apps with a normal UID are typically isolated enough to not require
socket tagging; we're mostly interested in tracking down internal
UIDs that have lots of code sharing the same UID.

Also fix up everyone doing manual string checks of Build.TYPE, since
we now have first-class fields for those.

Bug: 38126076
Test: builds, boots
Change-Id: I3a40348196bd8459289f2b9355d9783a07f1e7dd
2017-06-27 11:11:06 -06:00