Commit Graph

4962 Commits

Author SHA1 Message Date
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
Dianne Hackborn
84c699a4b9 Merge "Swap "foreground service" and "bound foreground service" proc states." 2018-01-10 21:14:31 +00:00
Victor Hsieh
5e1a526cf4 Merge "Revert "Move zygote's seccomp setup to post-fork"" am: 54da93b981
am: 8fffe22ab1

Change-Id: Ic6b927ab28f75fb46f60dd77d5ae4ccf98c0b329
2018-01-10 19:57:17 +00:00
Treehugger Robot
54da93b981 Merge "Revert "Move zygote's seccomp setup to post-fork"" 2018-01-10 18:46:36 +00:00
Victor Hsieh
fe6a51fcb5 Revert "Move zygote's seccomp setup to post-fork"
This reverts commit 6a4a339832.

Reason for revert: caused some SELinux error

Bug: 71768585
Change-Id: I0ef270ec6fed1d5d96b4257ec1a2dd6a55a816ed
Merged-In: Ic1b81e146b52b68445ba634de39657f199107da3
2018-01-10 17:22:55 +00:00
yuemingw
c6ac29d34f Add DISALLOW_CONFIG_BRIGHTNESS.
Bug: 67675654
Test: cts test will be added in b/67675678.

Change-Id: Iaaeb1a19aed89cdbb139c33939923d0bb675d212
2018-01-10 17:00:35 +00:00
TreeHugger Robot
536bce1de8 Merge "WorkSource: Fix corner-case in equals method." 2018-01-10 13:01:38 +00:00
TreeHugger Robot
df449ee9c3 Merge "Revert "Move zygote's seccomp setup to post-fork"" 2018-01-10 02:31:08 +00:00
Victor Hsieh
551e5af0d4 Revert "Move zygote's seccomp setup to post-fork"
This reverts commit a188dbc050.

Reason for revert: selinux denials, see b/71768585

Change-Id: Ic1b81e146b52b68445ba634de39657f199107da3
2018-01-10 00:48:54 +00:00
Dianne Hackborn
10fc4fdd13 Swap "foreground service" and "bound foreground service" proc states.
It has become apparent that apps running foreground services is
a much more important (and less common) state than all the various
ways apps run in the foreground because of the system being bound
to them or whatever else.  So push this up about the bound foreground
service state, right after the explicit TOP state.  Then we can
keep these together as "the app is explicitly running in the
foreground for some reason", etc.

Bug: 70808931
Test: CtsAppTestCases
Change-Id: Icfc1905b8e3eb60ddf26118c61ec1ef095659436
2018-01-09 15:55:55 -08:00
TreeHugger Robot
6b7bf94740 Merge "incidentd: dumping jobscheduler to proto" 2018-01-09 23:15:19 +00:00
Victor Hsieh
dacb02bf5a Merge "Move zygote's seccomp setup to post-fork" am: 5d33c10a96
am: b629f9e12c

Change-Id: I7d4c6b22c70955a9f594b0e55149a203df56f6fc
2018-01-09 21:58:58 +00:00
Treehugger Robot
5d33c10a96 Merge "Move zygote's seccomp setup to post-fork" 2018-01-09 21:41:19 +00:00
TreeHugger Robot
d4fed0ae19 Merge "Add hidden APIs that return user start/unlock time." 2018-01-09 21:35:14 +00:00
Hans Boehm
57fe793d31 Merge "Only count uncleared ProxyMap refs when deciding to crash" am: 90027eb1c2 am: c9e7c10afb
am: f81791c141

Change-Id: Ide59ad63505d92503da64bb70691ff370a548746
2018-01-09 20:46:35 +00:00
Victor Hsieh
6a4a339832 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.

In terms of performance since this happens at fork, the measure shows
the overhead is negligible.  Assuming 130 instruction in the BPF, on
walleye, even when running on little core with fixed low frequency, each
setup took about 60.9us on average.  When it runs on big core with
higher frequency, it took about 39.3us.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Bug: 63944145

Change-Id: I748735b478405098beac1e200d911c13ea60e380
Merged-In: I748735b478405098beac1e200d911c13ea60e380
2018-01-09 20:16:01 +00:00
Kweku Adams
85f2fbcb1f incidentd: dumping jobscheduler to proto
Bug: 65750819
Test: flash device and check incident.proto output
Also test: $ cts-tradefed run cts-dev --module CtsIncidentHostTestCases --test com.android.server.cts.JobSchedulerIncidentTest
Change-Id: I4abc01ca893edcbaf4d2254e4f807e06f5cb91f8
2018-01-09 12:05:39 -08:00
Makoto Onuki
73dded28af Add hidden APIs that return user start/unlock time.
Bug: 69456806
Test: Manual test with "watch dumpsys-user"
Change-Id: I68ed4ef53c707ed7c8cb8be4165052f942ea8ccd
2018-01-09 11:57:55 -08:00
TreeHugger Robot
df86ddb3f9 Merge "Move zygote's seccomp setup to post-fork" 2018-01-09 19:43:10 +00:00
Hans Boehm
f81791c141 Merge "Only count uncleared ProxyMap refs when deciding to crash" am: 90027eb1c2
am: c9e7c10afb

Change-Id: I70169c5eeb5dbdaa751ea7b9369feb3663d79952
2018-01-09 19:38:55 +00:00
Narayan Kamath
eb27946173 WorkSource: Fix corner-case in equals method.
We should treat WorkSource objects that have a null mChains List
as being equal to one that has an empty non-null mChains List.

This bug was uncovered by the tests added to WifiController in
commit 0068bf953ad25e in frameworks/opt/net/wifi.

Bug: 62390666
Test: WorkSourceTest
Change-Id: Icd1f86aa5178a7beb436621362cfe771a3440398
2018-01-09 16:58:45 +00:00
TreeHugger Robot
7ede382ce3 Merge "WorkSource: Fix WorkSource#remove for chained worksources." 2018-01-09 08:46:22 +00:00
Jeff Sharkey
d658207876 Merge "Wire up reserved blocks presence for tests." 2018-01-09 05:40:53 +00:00
Hans Boehm
d2fb7df2c1 Only count uncleared ProxyMap refs when deciding to crash
Add a method to compute the size of a ProxyMap without cleared
references. Use it in the crash decision. Report both counts, as
well as the count after a forced GC before actually crashing.

Rename the histogram generating function after a small refactoring
to make that easier.

When we crash, we now generate a message like the following
(generated here with reduced thresholds):

01-03 01:40:52.273  4793  4947 E JavaBinder: java.lang.AssertionError:
Binder ProxyMap has too many entries: 277 (total), 275 (uncleared),
257 (after GC). BinderProxy leak?

after the histogram. Unfortunately, the intervening GC may take some
time, and other intervening messages may sneak into the log between
them.

Experiments so far suggest that none of this greatly affects the
decision when to die. But this eliminates uncertainty as to whether
there was really a problem.

Bug: 71353150

Test: Tested with reduced thresholds, and then booted AOSP.
Change-Id: I53f24bae23eedcdb78a1c32296c65692b7bb2c42
2018-01-08 14:30:42 -08:00
Steven Moreland
09d9ac5819 Merge "Generic Mutable class for HIDL code." am: 0f05ce94c3 am: a4ac12c3ac
am: 98fa8b7eb0

Change-Id: I0062c37e0fe119ee31b8c72396e2be706a6469a5
2018-01-08 20:44:51 +00:00
Victor Hsieh
a188dbc050 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.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Bug: 63944145

Change-Id: I748735b478405098beac1e200d911c13ea60e380
2018-01-08 12:43:00 -08:00
Steven Moreland
98fa8b7eb0 Merge "Generic Mutable class for HIDL code." am: 0f05ce94c3
am: a4ac12c3ac

Change-Id: I1914e805b15064b40b963840eddf87a0bbd41169
2018-01-08 20:25:30 +00:00
Jeff Sharkey
55fe0d0686 Wire up reserved blocks presence for tests.
This is how we tell CTS if the device has reserved blocks set aside
for system critical services.

Test: builds, boots
Bug: 62024591
Change-Id: Ib970554235b49346f9e9df7d3d1646beb168cd92
2018-01-08 10:41:50 -07:00
Narayan Kamath
ee07f627c9 WorkSource: Fix WorkSource#remove for chained worksources.
- It doesn't make sense to clear the list of WorkChains if we're
  remove is called with a WorkSource that has no chains.
- The early return for mNum <= 0 is faulty because it incorrectly
  returns early for WorkSources that have workChains but no flat
  UIDs.

Test: WorkSourceTest
Bug: 62390666
Change-Id: I4c0e69bdd7c114b41329aa329d1c1d08a8cb9b59
2018-01-08 12:43:29 +00:00
Jeff Sharkey
9f2dc0527e Add DataUnit to clarify SI-vs-IEC units.
Mirrors the design of TimeUnit and ChronoUnit which many developers
are already familiar with, making it easy to pick up and use.

Yes, this is an enum.

Bug: 70915728
Test: bit FrameworksCoreTests:android.util.DataUnitTest
Change-Id: Id0cfdac5c81ed89c3c9ece23c964acba4a4f8471
2018-01-07 19:06:01 -07:00
Steven Moreland
4bfa2ebb89 Generic Mutable class for HIDL code.
In general, using Mutable inside of structures
or as API arguments is a code smell. However, it
is the most syntactically clean way of fetching
something out of a lambda or inner class.

Using this, one can do:
Mutable<Result> res = new Mutable<>();
hidlObject.foo((...) -> {
    res.value = ...;
});

There is an alternative:
Result a[] = new Result[1];
hidlObject.foo((...) -> {
    a[0] = ...;
});

However, this alternative syntax is relatively messy.

Bug: N/A
Test: boot, use w/ wifi
Change-Id: Ibff13c653cc17bd25ddbb0534ba21ef485bff7aa
2018-01-05 19:13:06 +00:00
Jeff Sharkey
8eb783b21e FBE devices now fully support adoptable storage.
We've finished all the underlying work to support adoptable storage
on FBE devices, so remove the code that was disabling it by default.

Introduce feature flag to make it easier to detect devices that
support adoptable storage.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 29923055, 25861755, 33252673, 37289651
Change-Id: I3630d690c9e66c7e41e316a4263ea2eb1e752ad3
2018-01-04 18:50:14 -07:00
Tony Mak
d390ae9c7e Adjust permission checking of ensureCanModifyQuietMode
Two changes:
1. Verify caller package matches with calling UID before checking
   is it default launcher.

2. If IntentSender is specified, only caller with MANAGED_USERS
   can call through it.

Test: run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.QuietModeHostsideTest

Bug: 70212757

Change-Id: Iac118d988eb05097a56f343552c0b8845cf96749
2018-01-04 13:11:50 +00:00
TreeHugger Robot
48989c2744 Merge "1/ Change all "name" to id in statsD. 2/ Handle Subscription for alert. 3/ Support no_report_metric" 2018-01-03 23:36:21 +00:00
Yangster-mac
94e197cceb 1/ Change all "name" to id in statsD.
2/ Handle Subscription for alert.
3/ Support no_report_metric

Bug: 69522276
Test: all statsd unit tests passed.
Change-Id: I851b235f2d149b8602b0cad632d5bf541962f40a
2018-01-03 15:34:00 -08:00
Jake Wharton
d5909bd26e Merge "Add overload to postDelayed which accepts a token." 2018-01-03 21:32:49 +00:00