Commit Graph

5012 Commits

Author SHA1 Message Date
Steven Moreland
cb15919569 Merge "Allow HIDL to be used in priv-apps." 2018-01-24 23:32:38 +00:00
TreeHugger Robot
8b4e2ddc41 Merge "Slider always represents absolute brightness" 2018-01-24 21:45:07 +00: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
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
Steven Moreland
e8e63aae6f Allow HIDL to be used in priv-apps.
Marking HIDL as SystemApi to allow vendor apps to talk to their own
native HIDL services. This includes implementing HIDL callback objects.

HIDL (HAL interface design language) is a language that is used to
facilitate vendor<->system communication which provides guarantees
of ABI stability. For system and vendor services alike, this can also
be used for internal communication.

Bug: 67725182
Test: boot device, hidl_test_java
Change-Id: I9d028cc43ce6f81ea619f01e18f1cd772e17cbfa
2018-01-22 18:48:54 -08:00
Sundong Ahn
5e05a9ae1c Add SystemApi in SystemProperties for vendor apks
The Apis in SystemProperties are needed for building ims.apk with
LOCAL_SDK_VERSION := system_current. So @SystemApi is added to
SystemProperties class and methods which are used by vendor apks (i.e.
ims.apk)

Bug: 67726847
Test: 1. build & boot on taimen
2. LOCAL_SDK_VERSION:=system_current in ims.apk && build ims.apk &&
check error count and android_system_stubs_current_intermediates.

Change-Id: I178f8d9b0b1f6bb1455ceec919805c4cc549cb32
2018-01-23 10:02:58 +09:00
Siddharth Ray
79a90c8317 Merge "Wifi: Add scanning, activity time and API" 2018-01-22 21:11:59 +00:00
Qingxi Li
f4577a5c5c Remove all the implementation for keep eSIM profile during FDR
When we show the option to users to allow them decide whether they want
to keep eSIM profiles during FDR, we remove erasing eSIM profiles from
CompleteBootService. So there is no need to call
EuiccManager#retainSubscriptionsForFactoryReset again. And when we don't
show this option to users, we will always erase eSIM profiles with
isWipeEuicc equals to true.

Bug: 67500470
Test: E2E
Change-Id: Ide4ee5fbfd4b2aadc78071f8ecb8e0424a37db44
2018-01-22 12:25:34 -08:00
Android Build Merger (Role)
0d7e3c63b5 Merge "Merge "Debug: Add attachJvmtiAgent with classloader" am: 940c0341f0 am: 878abd8e91 am: 03eb67c287" 2018-01-22 20:16:34 +00:00
Andreas Gampe
627da5b264 Merge "Debug: Add attachJvmtiAgent with classloader" am: 940c0341f0 am: 878abd8e91
am: 03eb67c287

Change-Id: Ib3b8b14907253b3438588fda8b5059f61b5594cf
2018-01-22 20:14:49 +00:00
TreeHugger Robot
c6f994207d Merge "Add pending system update info system APIs." 2018-01-22 20:12:43 +00:00
Andreas Gampe
03eb67c287 Merge "Debug: Add attachJvmtiAgent with classloader" am: 940c0341f0
am: 878abd8e91

Change-Id: I862a822ef7600030f7b435fe9b9368961cf4694b
2018-01-22 20:01:18 +00:00
Siddharth Ray
b50a684ba8 Wifi: Add scanning, activity time and API
Addition of Wifi Scanning time to Aggregate BatteryStats

Addition of Wifi Active time to BatteryStats (aggregate)

Addition of API to obtain Wifi battery stats for power drain diagnostics.

BUG:67213886

Test: Manual
Change-Id: I4f4c27ba839017d44feca685a4fae2f130d31765
2018-01-22 10:45:55 -08:00
Robert Sesek
bceb382572 Use the correct value for Process.WEBVIEW_ZYGOTE_UID.
When the libcutils constant was added there a merge conflict, which
caused the AID_WEBVIEW_ZYGOTE value to land with a different value than
the Java-side Process value. Nothing yet uses the Process constant, so
there were no ill effects.

Test: m
Change-Id: I8cc87bce1ddbdcdaf79d85c828d86837e96cce21
2018-01-22 12:29:21 -05:00
Ricky Wai
3b123af9f2 Add update network watchlist config ConfigUpdater intent action
Network watchlist config update intent needs to be in SystemAPI as
it will be used by ConfigUpdater to push watchlist config.

We also need to mark it as SystemAPI to pass cts:
intent.IntentTest#shouldNotFindUnexpectedIntents

Bug: 71635926
Bug: 63908748
Test: Able to compile
Change-Id: I3a236fa8b0bf97249b01a2ad20c5e56d18121bd4
2018-01-22 14:30:13 +00:00
Qingxi Li
3925860658 Merge "Change RecoverySystem#wipeEuiccData to public" 2018-01-20 06:20:02 +00:00
TreeHugger Robot
0116f7cbe4 Merge "No sensor access to idle UIDs - framework" 2018-01-20 01:37:29 +00:00
Yi Jin
d1238e7b50 Merge "Fix permissions problems of incidentd." 2018-01-19 23:27:32 +00:00
Siddharth Ray
f87fe48456 Merge "GPS Signal Quality added to BatteryStats" 2018-01-19 21:40:07 +00:00
Qingxi Li
c6097dbb56 Change RecoverySystem#wipeEuiccData to public
This function is used to wipe the eSIM profiles from eUICC card which
should not only be called from FDR and also from the network reset. This
CL changes it to hide public API.

Bug: 62961867
Test: TBC
Change-Id: I1d716763720e9a2c897b9e85f95bab562fe150e2
2018-01-19 12:23:53 -08:00
Mike Ma
3d422c37b7 Add cluster&active cost to cpu power
Add logic to read per UID cluster and active CPU time from the kernel in
BatteryStatsImpl, store them in BatteryStats.Uid, then use these data to
calculate CPU power more accurately in CpuPowerCalculator.

Change-Id: I06a84d2bba8b97445466b310f15092614ff3477f
Bug: 67752294
Test: PowerProfileTest
Test: KernelUidCpuActiveTimeReaderTest
Test: KernelUidCpuClusterTimeReaderTest
Test: BatteryStatsCpuTimesTest
2018-01-19 01:24:13 -08:00
Andreas Gampe
571b700fb6 Debug: Add attachJvmtiAgent with classloader
Add classloader support to android.os.Debug.attachJvmtiAgent. For
the original version without a given classloader, look up the
application's main classloader.

Bug: 65016018
Bug: 70901841
Test: m
Test: cts-tradefed run commandAndExit cts-dev
Change-Id: I649b6883e05dc2f75073fe1f978423f6a7b880df
2018-01-18 22:02:53 -08:00
Tao Bao
07342dc175 Add pending system update info system APIs.
This CL adds system APIs in android.os.SystemUpdateManager. The APIs allow
system updater apps (RECOVERY permission required) to publish the pending
system update information, and allow other apps to query the info
accordingly (requiring RECOVERY or READ_SYSTEM_UPDATE_INFO permission).

Design doc in go/pi-ota-platform-api.

Bug: 67437079
Test: Use test apps to call the new APIs to query and set the update info
      respectively.
Change-Id: Id54b4a48d02922d2abd906dd7e2ec80a656fc9b1
2018-01-18 14:41:41 -08:00
TreeHugger Robot
0b2941fb09 Merge "Promote DISALLOW_RUN_IN_BACKGROUND to SystemAPI" 2018-01-18 09:26:37 +00:00
Yi Jin
4bab3a191a Fix permissions problems of incidentd.
Test: manual
Change-Id: I4ee0d1f2349ee1a25a422cabf1b5b87c612710d2
2018-01-17 19:16:49 -08:00
TreeHugger Robot
c2393e12b7 Merge "Add video priority to Process.java" 2018-01-18 02:29:23 +00:00
Victor Hsieh
217682248b Merge "Reland: Move zygote's seccomp setup to post-fork" am: 7839672e22 am: 4249466562
am: dec688691d

Change-Id: Ibcf5eeef74b69112f568ebb1f146c2990ffed30a
2018-01-18 01:31:09 +00:00
Victor Hsieh
dec688691d Merge "Reland: Move zygote's seccomp setup to post-fork" am: 7839672e22
am: 4249466562

Change-Id: Idbf4d7add5e41d2d01f4a3c2ff6e8f1b1735faeb
2018-01-18 01:23:32 +00:00
Victor Hsieh
c8176efe2e Reland: Move zygote's seccomp setup to post-fork
Before this change, seccomp filter setup is as early as in zygote's main
function.  To make it possible to split app and system server's filter,
this postpone the setup to after fork.  It also starts to call app
specific and system server specific setup function.

The filter setup is done in Zygote's ForkAndSpecializeCommon.  This is
because adding a seccomp filter must be done when either the caller has
CAP_SYS_ADMIN or after the PR_SET_NO_NEW_PRIVS bit is set.  Given that
setting PR_SET_NO_NEW_PRIVS breaks SELinux domain transition
(b/71859146), this must be done after Zygote forks but before
CAP_SYS_ADMIN is droppped.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Test: no selinux denial flood in dmesg with selinux enforced
Test: debuggerd -b `pidof com.android.phone`  # logcat shows tombstoned
      received crash request
Bug: 63944145
Bug: 71859146

Change-Id: I8215c8530d3d0de504a270488f8e29635805e8b0
2018-01-17 09:30:44 -08:00
Svet Ganov
8bd1395881 No sensor access to idle UIDs - framework
Idle UIDs are ones that were in the background for long enough time.
Currently such apps can access sensor data even though they have no
user perceptible components running. This affects the user's privacy
since an app in the background can use sensor data to infer location,
activity, habbits, etc.

The goal is to restrict sensor access for all apps in the ecosystem
regardless of target SDK which means the solution should be backwards
compatible. At the high level the sesnor service observes UID state
changes and applies policy like this:

Continuous sensors: for sensros in this reporting mode when the UID
goes in the background we will stop dispatching events. Once the UID
goes active we will start reporting the events. While this is an
app visible behavior change we would rather do that vs delivering
fake events.

Flush events: there is no change in behavior based on the UID state.
Hence, idle apps can request a flush and would get the completion
callback. From an app perspective flushing works at any point.

Trigger events: for sensors in this reporting mode when the UID
goes in the background we will not report any trigger events. From
an app perspective the sensor just did not pick up any events.

On-change events: for sensors in this reporting mode when the UID
goes in the background we will not report any change events. From
an app perspective the sensor just did not pick up any events.

Wake locks: since UIDs in idle state cannot acquire wakelocks we
will not be grabbing a wakelock on behalf of apps in that state.

Test: Added - SensorTest#testSanitizedContinuousEventsUidIdle
      Added - SensorTest#testBatchAndFlushUidIdle
      Pass - cts-tradefed run cts-dev -m CtsSensorTestCases

bug:63938985

Change-Id: Iee73dc034f5fe7fbea789a3b60db4290757c5052
2018-01-16 21:43:35 -08:00
TreeHugger Robot
fc12cc51d3 Merge "Add DISALLOW_CONFIG_SCREEN_TIMEOUT." 2018-01-17 00:22:08 +00:00
Felipe Leme
12e15cc6ed Created hidden constants and metrics for ScopedAccessProvider.
Test: echo 'Not yet!'
Bug: 63720392

Change-Id: I811cde225fdcf5271fda9b357da742e408de0627
2018-01-16 09:28:44 -08:00
Siddharth Ray
78ccaf5d28 GPS Signal Quality added to BatteryStats
- GPS Signal Quality (Top four average CN0) added to Batterystats
(Aggregate + Historian)

- Added API to obtain Gps battery stats for power drain diagnostics.

BUG:38354997

Test: Manual
(https://docs.google.com/document/d/1X6g7HBZ80GA3KuqEYyQtD0WQRUnXN8nbCpf0G1HvzqY/edit?usp=sharing)

Change-Id: Ic23bfa758977bf0677f368f617b0c28196d2d0c1
2018-01-15 17:24:07 -08:00
yuemingw
5cda3aefd9 Add DISALLOW_CONFIG_SCREEN_TIMEOUT.
Bug: 67675734
Test: cts test will be added in b/67675743.

Change-Id: I75df384acdfe4cb9c259f68ff78214c4fad6410c
2018-01-15 12:48:58 +00:00
yuemingw
a178144906 Add DISALLOW_AMBIENT_DISPLAY.
Bug: 67675787
Test: cts will be added in b/67675794

Change-Id: Ic859783e05e54ea88d98db517891d41353ad033d
2018-01-15 11:33:18 +00:00
TreeHugger Robot
82548f4bc3 Merge "Implement DISALLOW_SHARE_INTO_MANAGED_PROFILE" 2018-01-13 16:40:41 +00:00