Commit Graph

4950 Commits

Author SHA1 Message Date
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
Jake Wharton
820e3dd74a Add overload to postDelayed which accepts a token.
This adds overload parity with postAtTime.

Test: none
Bug: 71546743
Change-Id: I50936c7ffd5e8512dc865863fe8d4c9fb228a8a9
2018-01-03 16:31:02 -05:00
Sudheer Shanka
bfea298303 Merge "Dump per-process state cpu times to batterystats proto." 2018-01-03 19:06:51 +00:00
Ahmed ElArabawy
f88571ffa1 Proper calculation for overall WiFi MC statistics
In current implementations the WiFi MC statistcs are calculating by
aggregating the per uid statistics accross all UIDs. This does not
result in the correct values in case of time overlapping acquisitions of
MC wakelocks by same or different UIDs
This commit creates a separate Timer instance that tracks the actual
time spent with MC Enabled.

Bug: 69854369
Test: Manual Test

Change-Id: I78533f48300bc9faccc374d684698dae647bde5d
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2018-01-03 09:06:42 -08:00
Sudheer Shanka
6d658d7d41 Dump per-process state cpu times to batterystats proto.
Bug: 66953194
Test: Compared dump of 'batterystats --checkin' and 'batterystats --proto' in text.
Change-Id: Ic70fe18fbb88cefa1e4299fde85121d0e80248fa
2018-01-02 19:31:01 -08:00
hj.seo
bef82eda3a Merge "Modify getting of primary storage size" am: 1c876b73b3 am: f8adea8255
am: 35d0ac5e07

Change-Id: I9ba0f6ac701174a1d6cdfdbc5008d40715295546
2018-01-03 01:37:21 +00:00
hj.seo
35d0ac5e07 Merge "Modify getting of primary storage size" am: 1c876b73b3
am: f8adea8255

Change-Id: I291fef4af5af22160952be48415463619d300ff2
2018-01-03 01:29:57 +00:00
Treehugger Robot
1c876b73b3 Merge "Modify getting of primary storage size" 2018-01-03 01:10:49 +00:00
TreeHugger Robot
abf7b71fe8 Merge "WorkSource: Update serialization to worksource.proto." 2018-01-02 11:57:24 +00:00
Narayan Kamath
e9353d38bd Merge "WorkSource: Fix getAttributionUid." 2017-12-29 12:54:34 +00:00
Andreas Gampe
267f0f16cd Merge "Binder: Log a histogram of binder proxies to logcat on death" am: 4b7abe301c am: 3c57709e70
am: 906d0c9375

Change-Id: I30960a4d831f420911b287145646be569423fdd0
2017-12-27 20:34:19 +00:00
Andreas Gampe
906d0c9375 Merge "Binder: Log a histogram of binder proxies to logcat on death" am: 4b7abe301c
am: 3c57709e70

Change-Id: I322ced9619f9982182c5b739007988fda89c6f30
2017-12-27 20:24:50 +00:00