Commit Graph

5044 Commits

Author SHA1 Message Date
TreeHugger Robot
6fa646ab95 Merge "Reduce pss collection amount, improve logging." 2018-01-29 16:52:08 +00:00
Narayan Kamath
add7bec836 Merge "WorkSource: Mark methods required by GMS as @SystemApi." 2018-01-29 13:27:05 +00:00
Ricardo Loo Foronda
7075daa278 Merge "Docs: Fixed broken link to Traceview docs" into oc-mr1-dev am: 16a77c54ef
am: 223ba4c536

Change-Id: I431ffb4177174cba7258a3a6ad30cfbab130f269
2018-01-29 04:18:38 +00:00
Ricardo Loo Foronda
223ba4c536 Merge "Docs: Fixed broken link to Traceview docs" into oc-mr1-dev
am: 16a77c54ef

Change-Id: Ifb88d7364a377092509bb9a93def65ccca7dcf41
2018-01-29 04:11:43 +00:00
Ruchi Kandoi
2b894394a5 Merge "Add UID and Service for Secure Element Application" am: b8b7589531
am: 8ee3204c58

Change-Id: I7c74f21e014fb7eb772e2d86cc278fd774ffb8c9
2018-01-27 01:59:46 +00:00
TreeHugger Robot
ce01bd906e Merge "Proto enums for DeviceIdleMode" 2018-01-27 01:18:20 +00:00
Ruchi Kandoi
6149b0fa49 Add UID and Service for Secure Element Application
Bug: 64994044
Test: Boot; Check Service loaded.
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
2018-01-27 00:45:49 +00:00
Dianne Hackborn
e17b445b6c Reduce pss collection amount, improve logging.
Tuned rates that we collect PSS, to reduce how much we do
that heavy operation.  Added a new way to determine
whether a process has changed to a state for the
"first" time -- now this is when it has gone to that
state for the first time since it was in a lower state.
This will reduce the amount of time we consider a
process to be first to only when it has previously
gone into a higher state than it had before.

Keep track of more fine-grained information about why we
collect a PSS sample (not just internal, but for a single
process, all processes because of a mem state change, all
processes because of a poll).

Started collecting RSS in various places, so we can start
looking at that w.r.t. PSS and see about transitioning to
it is a new primary metric.

Added logging for many of the places where the system
writes its configuration files, so we can more easily
see any bad behavior going on in those areas.

Added some currently disabled code to read smaps directly
instead of using fgets().  Probably won't help, but want
tot test.

Bug: 70859548
Test: atest CtsAppTestCases
Change-Id: I400dba0f3ae9c024df51c946cfa592561028b598
2018-01-26 15:15:04 -08:00
Steven Moreland
d4b40969d4 Merge changes from topic "hidl-system-api"
* changes:
  Add remaining missing HIDL SystemApi methods.
  HIDL: reportSyspropMethod -> enableInstrumentation
2018-01-26 23:09:15 +00:00
Ruchi Kandoi
dcf4c6dc26 Add UID and Service for Secure Element Application
Bug: 64994044
Test: Boot; Check Service loaded.
Merged-In: I2f48ff204acd29b1a9f6819910aba5f8f3762977
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
(cherry picked from commit dfaf4bdd1e7e12caf9bb69c8facc38e879861baf)
2018-01-26 11:11:52 -08:00
Ricardo Loo Foronda
ac750a8a60 Docs: Fixed broken link to Traceview docs
Status: Ready for review.
Note: This is a Javadoc only change.

Changes:
* Replaced "guide/developing/tools/traceview.html/ with
  "studio/profile/traceview.html"

Test: * Build with "make ds-docs -j16"
      * Staged content at go/dac-stage/reference/android/os/Debug.html
      * Ran linkchecker against staged content

Bug: 37640935
Change-Id: I0446c44a78ae7d1d9193e2fe08e059cdc90cac7a
2018-01-26 18:16:23 +00:00
Bookatz
8bdae8d682 Proto enums for DeviceIdleMode
Created an enums.proto that contains the device idle modes,
which is referenced by batterystats.

Note that, currently, batterystats is the origin of these
constants in the java code, and I have kept that as is.
Thus, batterystats references the enum.
Nevertheless, because the actual control of device idle
mode is DeviceIdleController.java, where these constants
will likely one day be moved, I have put the constants
in server/enums.proto (since DeviceIdleController is
in server, not os like BatteryStats).

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.HostAtomTests#testDeviceIdleModeStateChangedAtom
Change-Id: I6e66801ae8256aab423067f9a4b852a194564a8d
2018-01-26 17:26:20 +00:00
Narayan Kamath
dfcdcc9a2b WorkSource: Mark methods required by GMS as @SystemApi.
Bug: 71710975
Bug: 62390666
Test: make checkapi
Change-Id: Iec0714394dda40835ab3f2f444ca696850df9cdf
2018-01-26 17:00:10 +00:00
TreeHugger Robot
a5014f298c Merge "Remove @removed trySetQuietModeEnabled" 2018-01-26 16:14:04 +00:00
Tony Mak
7699a19d2b Remove @removed trySetQuietModeEnabled
Context:
Updated the API according to API council feedback. Marked it as
@Removed and keep it for a while for Launcher. But now Launcher
prebuilt is updated, we are safe to remove it.

Test: Build

BUG: 71818127

Change-Id: I33fec12addf7031bfbcd86bce9e636c31d0ea4d3
2018-01-26 16:13:44 +00:00
TreeHugger Robot
b0db811fe9 Merge "Statsd and frameworks reference proto enums" 2018-01-26 05:02:35 +00:00
TreeHugger Robot
9add1b8c1b Merge "Revert "Fix issue #72116995: Add permission guarding Service#startForeground"" 2018-01-26 04:05:31 +00:00
Steven Moreland
adcb896fd6 Add remaining missing HIDL SystemApi methods.
A couple methods of Java classes which became SystemApis
but were used are still @hide.

Bug: 72480743
Test: hidl_test_java
Change-Id: I0cb82384932ab1758fa7576b2125825c48a4a6c9
2018-01-26 02:03:13 +00:00
TreeHugger Robot
ce6b2d6bb9 Merge changes from topic "product_partition"
* changes:
  Read media files from /product/media/audio
  Support /product partition
2018-01-26 01:10:16 +00:00
TreeHugger Robot
0193e5651f Merge "Add setting to control vibration intensity." 2018-01-26 00:09:09 +00:00
Bookatz
1a1b0464cb Statsd and frameworks reference proto enums
For frameworks constants that don't have intrinsic meaning (i.e. their actual
value and order don't matter), so that it is unlikely that their values
will be changed:
This cl introduces proto enums representing some constants found in
the Android codebase, and connects the two.

By using the Proto enum as the source-of-truth, it means that Java and
proto can be kept in sync. Otherwise, when the Java frameworks code
changes, it silently breaks the protos from working properly, since the enums
are wrong. By having the Java code reference the proto enums, it ensures
that everything is in sync. The values of the constants are unchanged.
But future changes to these constants will need to be done in the proto
file, which the Java file merely references.

The protos are necessary for incidentd and statsd and, in the future,
possibly dumpsys. In this way, the logging mechanism is much less likely
to get broken when new constants are added, and we can be ensured that
the logging accurately reflects the underlying codebase.

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases
Change-Id: If79032c34b2799db1e3e70cb47b1312fd72092b9
2018-01-25 15:47:57 -08:00
Steven Moreland
36be191dfd HIDL: reportSyspropMethod -> enableInstrumentation
Renaming this method with a semantic meaning which
better explains its purpose without caring about
its implementation details.

Bug: 72480743
Test: hidl_test_java
Change-Id: I4b0577b3f61180ecfd66ae146973fa5cc2a3b244
2018-01-25 15:42:02 -08:00
Calin Juravle
2b6e24c7e5 Merge "[framework] Extend profile operations to take the profile name" 2018-01-25 18:58:09 +00:00
Dianne Hackborn
c2cbc0727a Revert "Fix issue #72116995: Add permission guarding Service#startForeground"
This reverts commit 994b5ad737.

Waiting for Chrome prebuilt.

Test: NA
Bug: 72116995
Change-Id: Ifcfea94ddefda27267640283038c9d0f933ea1d8
2018-01-25 10:43:28 -08:00
TreeHugger Robot
3bcddc94ac Merge "Chained attribution for GnssLocationProvider." 2018-01-25 17:14:11 +00:00
Narayan Kamath
8d82825c75 Support logging chained WorkSources from JobScheduler.
Controller by a feature flag, which this change also introduces.

Bug: 62390666
Bug: 70892390
Test: manual, via JobSchedulerTestApp
Test: CtsJobSchedulerTestCases

Change-Id: Ic7dfb7861f7987a1b6eeb4cf3851193e9ad7da84
2018-01-25 09:41:04 +00:00
TreeHugger Robot
73a331f524 Merge "Statsd broadcast subscriber" 2018-01-25 06:23:36 +00:00
Jaekyun Seok
1713d9e97a Support /product partition
This CL will support the followings.
- installing a RRO package for framework from /product/overlay
- installing apps from /product/app
- installing priv-apps from /product/priv-app
- installing permissions from
  /product/etc/[default-permissions|permissions|sysconfig]

Bug: 64195575
Test: `mm` under frameworks/base/tests/[libs|privapp]-permissions
adb sync && adb reboot
adb shell cmd package list libraries
  => confirmed com.android.test.libs.product library
adb shell cmd package dump \
  com.android.framework.permission.privapp.tests.product
  => confirmed that the package is a priv-app

And I moved vendor/overlay/framework-res__auto_generated_rro.apk into
system/product/overlay/ on sailfish, and I confirmed that the RRO was
installed properly.

Change-Id: I16175933cebd9ec665d190cc5d564b5414a91827
2018-01-25 12:44:45 +09:00
Michael Wright
35a0c676ee Add setting to control vibration intensity.
This patch adds two distinct vibration control settings: one for
notifications and ringtones, and one for haptic feedback. Since we don't
always have the exact intent of a given vibration, VibratorService will
do its best to classify each VibrationEffect into one of these two
categories and then scale the vibration accordingly based on the
intensity setting.

Bug: 64185329
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
Change-Id: If16237f4782281aaab33e4a0f55c29f1a30ac493
2018-01-24 23:39:57 +00:00
Steven Moreland
cb15919569 Merge "Allow HIDL to be used in priv-apps." 2018-01-24 23:32:38 +00:00
Calin Juravle
6ae39fc2e5 [framework] Extend profile operations to take the profile name
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.

Test: manual (dexopt apps, merge profiles, clear profiles)
      gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496

Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
2018-01-24 14:56:38 -08:00
TreeHugger Robot
8b4e2ddc41 Merge "Slider always represents absolute brightness" 2018-01-24 21:45:07 +00:00
Bookatz
c697797d43 Statsd broadcast subscriber
Allows a uid that uploads a statsd config to additionally
register a BroadcastSubscriber with statsd. If statsd
detects an anomaly (according to the config's Alert),
statsd can inform a BroadcastSubscriber provided in the config.
The config uses a subscriberId (just an int) to identify the
BroadcastSubscriber. It then uses StatsManager.setBroadcastSubscriber
to associate that subscriberId with a given PendingIntent.
Then, when the anomaly is detected, statsd sends a broadcast
using that PendingIntent, alerting whoever was specified by
the config/setBroadcastSubscriber.

Bug: 70356901
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
Change-Id: I4d9ea9a6c8a85e61fadfd99c1513c55abbadd5e9
2018-01-24 13:08:19 -08:00
TreeHugger Robot
1149a4df69 Merge "Fingerprint data is now stored in one of two ways depending on the" 2018-01-24 20:24:22 +00:00
Dianne Hackborn
994b5ad737 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: If5a79e7ed5ab9e0edc77410315eb4d2df8ac850b
2018-01-24 17:58:24 +00:00
Michael Wright
d846023804 Slider always represents absolute brightness
Currently the slider represents a gamma adjustment to the brightness
curve when auto brightness is enabled and the absolute screen brightness
when it's not. This is a fairly confusing behavior to most people, so
this consolidates them to a single behavior: the slider always
represents the current brightness and auto-brightness will automatically
adjust it.

This also moves a bunch of the brightness methods from PowerManager over
to DisplayManager, since it's really the DisplayPowerController that's
responsible for determining and setting the display brightness.

Test: atest com.android.server.display.BrightnessMappingStrategyTest
Bug: 69406898
Change-Id: I73b5982809a94cd50d563426a72d7965e923c994
2018-01-24 15:55:05 +00:00
Narayan Kamath
32684ddf3c Chained attribution for GnssLocationProvider.
The change is slightly more involved than similar changes in this area
because GnssLocationProvider doesn't treat WorkSources as opaque, it
tries to compute diffs between them (using the only call to
WorkSource.setReturningDiffs in the platform). It also uses WorkSources
tags to make calls to AppOps.

Some of this can be improved generally, but this change is narrower in
scope and only tries to improve battery related attribution.

Test: BatteryStatsTests
Bug: 62390666

Change-Id: Ie28bc91d74d3a0c3b6aaef6ba7c59fc58633efb1
2018-01-24 09:06:08 +00:00
TreeHugger Robot
449e7d62a5 Merge "Implement activity --proto --processes" 2018-01-24 07:21:35 +00:00
TreeHugger Robot
a937c5b7ed Merge "Fix wrong use if "!UserHandle.isApp()"" 2018-01-24 05:47:30 +00:00
TreeHugger Robot
ab15a68507 Merge "Fix magnification button toggle off" 2018-01-24 03:37:47 +00:00
Yi Jin
148d7f4291 Implement activity --proto --processes
Bug: 66729158
Test: out/host/linux-x86/bin/incident_report -w amprocesses
Change-Id: Iae043203bca954bfc4aadad0460cc56621e9ba05
2018-01-23 16:49:58 -08:00
Andreas Huber
7fe2053a55 Fingerprint data is now stored in one of two ways depending on the
shipping API version:

For devices shipped before Android P nothing changes, data
is stored under /data/system/users/<user-id>/fpdata/...

Devices shipped from now on will instead store
fingerprint data under /data/vendor_de/<user-id>/fpdata.

Support for /data/vendor_de and /data/vendor_ce has been added to vold.

Bug: 36997597
Change-Id: Ib500ede221db6a3cb18595162c412c52dce5c931
Test: manually
2018-01-23 15:51:04 -08:00
Makoto Onuki
9cc471ce76 Fix wrong use if "!UserHandle.isApp()"
Turned out !UserHandle.isApp() doesn't mean "is system" because of isolated UIDs.

Bug: 72174012
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Change-Id: Ibf6175d550ecc74677877c74db2473bf3f30132d
2018-01-23 15:47:29 -08:00
Eugene Susla
8f07ee15cb Fix magnification button toggle off
Fixes: b/69307379
Test: Ensure attached bug no longer reproduces.
Ensure magnification using a11y button otherwise works as expected
Change-Id: Ie4e966eb8cfcc9d3f37ae7252b951381ef1fb7c7
2018-01-23 15:03:09 -08:00
Robert Sesek
fb9663a170 Merge "Use the correct value for Process.WEBVIEW_ZYGOTE_UID." am: 572f65fb58 am: cb7119385e
am: 000552a64d

Change-Id: If279fa06502f3bd39542504352c07a4e15b078dd
2018-01-23 22:00:08 +00:00
Robert Sesek
000552a64d Merge "Use the correct value for Process.WEBVIEW_ZYGOTE_UID." am: 572f65fb58
am: cb7119385e

Change-Id: Iaf7a31629d06d87400796899f659926e5186ac41
2018-01-23 21:52:04 +00:00
Treehugger Robot
572f65fb58 Merge "Use the correct value for Process.WEBVIEW_ZYGOTE_UID." 2018-01-23 18:14:00 +00:00
Ricky Wai
cee2094d75 Merge "Add update network watchlist config ConfigUpdater intent action" 2018-01-23 14:27:29 +00:00
TreeHugger Robot
03e7ec201b Merge "Add SystemApi in SystemProperties for vendor apks" 2018-01-23 04:14:01 +00:00
TreeHugger Robot
eb6ae9e43e Merge "Remove all the implementation for keep eSIM profile during FDR" 2018-01-23 03:41:43 +00:00