Commit Graph

4999 Commits

Author SHA1 Message Date
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
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
Yifan Hong
a95523088b Merge "android.os.VintfObject: update for VNDK version format change." am: eac8c121fe am: d9b9d49a66
am: bb2d749981

Change-Id: I330d9cd4fe23b62a605bd95790046c2e0b1aebb0
2018-01-12 23:37:34 +00:00
Yifan Hong
bb2d749981 Merge "android.os.VintfObject: update for VNDK version format change." am: eac8c121fe
am: d9b9d49a66

Change-Id: I69512885ec3372e45f775bb7f6a8b828f8be490e
2018-01-12 23:22:02 +00:00
TreeHugger Robot
d4f6cecae3 Merge "Rename trySetQuietModeEnabled to requestQuietModeEnabled as per ... the feedback from API council" 2018-01-12 22:26:03 +00:00
Tony Mak
bece85dd0e Rename trySetQuietModeEnabled to requestQuietModeEnabled as per ...
the feedback from API council

trySetQuietModeEnabled will be kept for a while until next
Launcher prebuilt is dropped.

FIXES: 71818127

Test: Build

Change-Id: I3d4fd64862c7d924b8da630522a30a3899676b4b
2018-01-12 22:25:32 +00:00
Treehugger Robot
eac8c121fe Merge "android.os.VintfObject: update for VNDK version format change." 2018-01-12 22:12:39 +00:00
TreeHugger Robot
82c264e0f2 Merge "Battery saver: Expose location power save mode as system API" 2018-01-12 19:16:22 +00:00
Rubin Xu
cc391c2c13 Implement DISALLOW_SHARE_INTO_MANAGED_PROFILE
Add a user restriction to allow profile owners to enforce a stronger
isolation of managed profile by preventing users sharing data into
the profile. This is achieved by disabling a subset of built-in cross
profile intent filters added by ManagedProvisioning during profile
inflation.

Implementation wise, DevicePolicyManagerService listens for the restriction
change and notifies ManagedProvisioning to modify the built-in intent
filters. This is needed since ManagedProvisioning has ground truth of all
built-in intent filters and manages them. It also has the advantage that
ManagedProvisioning only needs to run when a policy change happens.

Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testDisallowSharingIntoProfileFromPersonal
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testDisallowSharingIntoProfileFromProfile
Bug: 63911046
Change-Id: Ia6d12a5086627d1280325cd19d6e3a0752dae633
2018-01-12 19:01:40 +00:00
zhouwenjie
46712bcb9e Update comments and bump batterystats version to 30.
Bug: 70808931
Bug: 31866283
Test: build Android
Change-Id: I8238c3135e79442ede97b87933dab85d8ff71134
2018-01-11 16:36:06 -08:00
Yifan Hong
8da8798ca3 android.os.VintfObject: update for VNDK version format change.
Test: CTS device info collect
Bug: 36400653

Change-Id: I7b22f82ddd9ddc3b0930b5c1564435c42be2a6fa
2018-01-11 15:05:19 -08:00
TreeHugger Robot
b1e9df9289 Merge "Add DISALLOW_CONFIG_BRIGHTNESS." 2018-01-11 18:32:34 +00:00
Erik Kline
3096bc6311 Merge changes I47ccfa99,I5db1de3e am: 08498c32f4 am: 03f3294103
am: 805104f40f

Change-Id: Ic774b944238d6df07511df8e467d66cefcd4fa81
2018-01-11 12:52:19 +00:00
Erik Kline
805104f40f Merge changes I47ccfa99,I5db1de3e am: 08498c32f4
am: 03f3294103

Change-Id: I311f6c299daf1c8d21731187d8e78e55c5767564
2018-01-11 12:43:38 +00:00
Erik Kline
1742fe1309 Extract DNS setting logic into DnsManager class
In future, managing DNS-over-TLS hostname lookup and netd programming
can be encapsulated here.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 64133961
Change-Id: I47ccfa99c30c780524c45c4af605e720ccba34a0
2018-01-11 18:16:50 +09:00