Commit Graph

5144 Commits

Author SHA1 Message Date
Lorenzo Colitti
28e229b85e Merge "Add DNS_TETHER to the list of UIDs in the framework." am: 0b8d55e633
am: c64dc7c632

Change-Id: Ie73be466fe9ace9a3ca8d8d7594ad41967186261
2018-03-05 12:23:35 +00:00
TreeHugger Robot
b0ebe11b74 Merge "Report total latency instead of average for jobs last run" 2018-03-03 00:14:22 +00:00
Kweku Adams
7a16084c25 Changing batterystats to use proto values.
This should help make sure the two stay in sync, and that the values
don't get rearranged.

Bug: 67013665
Test: N/A
Change-Id: I43f617b69d8c8107755c13dbfa8f071ef2c7c554
2018-03-02 02:07:11 +00:00
Amith Yamasani
0ca706bb9e Report total latency instead of average for jobs last run
Instead of computing the average on the device, upload the
total sum of the latencies. Server can divide by the event count
if it wants to get the average.

Also change the latency buckets to 1 hr, 2 hrs, 4 hrs, 8 hrs and
greater than 8 hrs.

Bug: 70297451
Test: launch an app
      dumpsys batterystats --checkin | grep jbd,
      Observe the dumped values for the app

Change-Id: Iecda808594fc960fb16fa0407e5875bbc47db43a
2018-03-01 17:32:53 -08:00
TreeHugger Robot
ad1fe51997 Merge "Pass forward listeners when using existing builder" 2018-03-01 23:51:26 +00:00
Lorenzo Colitti
f4b4f4d43b Add DNS_TETHER to the list of UIDs in the framework.
It has been reserved in android_filesystem_config.h since
aosp/245632 in 2016, but was never included in the list of UIDs
in Process.java.

Bug: 29881876
Test: builds, boots
Change-Id: I6d36d7d15634445d992a10087b5ba31b480f9f20
2018-03-01 21:06:11 +09:00
TreeHugger Robot
701194a72f Merge "lowRamDevice TVs can have multi-user" 2018-03-01 12:03:29 +00:00
Benjamin Franz
8b16046a53 Merge "Update javadoc for DISALLOW_SYSTEM_ERROR_DIALOGS" 2018-03-01 09:30:12 +00:00
TreeHugger Robot
19130fea91 Merge "More work on issue #73301635: Ability to extract device configuration" 2018-02-28 23:19:13 +00:00
Dianne Hackborn
337e01ac10 More work on issue #73301635: Ability to extract device configuration
Now include Gl extensions (thanks to whoever wrote the code
I copied!).

Tweak the protos a bit to include missing info and correct
some things.

Add some new test APIs that are needed for CTS.

Bug: 73301635
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerGetConfigTests
Change-Id: Ie3f8173d217468246e8b6c7f45b7cbfcb352d60f
2018-02-28 11:29:20 -08:00
Benjamin Franz
0c86fe1b16 Update javadoc for DISALLOW_SYSTEM_ERROR_DIALOGS
Bug: 73720585
Test: make docs
Change-Id: I5fca4a9cb254f91f7eac2abb002242b5553059fa
2018-02-28 14:48:52 +00:00
Kurt Nelson
7a8804ad68 Pass forward listeners when using existing builder
This is how VmPolicy behaves.

Bug: 62458446
Test: cts-tradefed run commandAndExit cts-dev --module CtsOsTestCases
--test android.os.cts.StrictModeTest

Change-Id: Iccab728bf21bad695f26891042dfe355506cdc5c
2018-02-27 16:45:27 -08:00
TreeHugger Robot
a65d4f8587 Merge "Add AOD to BatterySaverPolicy" 2018-02-28 00:41:32 +00:00
TreeHugger Robot
7e96e0a137 Merge "createAndManageUser should communicate reason of failure to caller" 2018-02-28 00:39:33 +00:00
Alex Chau
f4f9fb6d3d Merge "API Review: android.os.UserManager.DISALLOW_USER_SWITCH" 2018-02-28 00:16:41 +00:00
TreeHugger Robot
03b91d77c4 Merge "Alarm: wakes up statsd and notifies the subscribers." 2018-02-27 23:08:31 +00:00
Yangster-mac
932ececa16 Alarm: wakes up statsd and notifies the subscribers.
Test: manually tested it.
Change-Id: Id796a68976aeb1611183023ba4e9c6a8b8c44bb8
2018-02-27 13:30:48 -08:00
Lucas Dupin
92a62e5533 Add AOD to BatterySaverPolicy
Test: activate/deactivate battery saver, look at AOD
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
Fixes: 62797110
Change-Id: I9fc5f4fc5aa9cfd45e90e602251e4c2c863dfbcc
2018-02-27 09:05:09 -08:00
TreeHugger Robot
837d2076ad Merge changes I7ce670f5,I0bd2de38
* changes:
  Preload with RELRO sharing in the WebView zygote.
  Make WebViewLibraryLoader interface more flexible.
2018-02-27 16:11:02 +00:00
Alex Chau
89386bacc6 createAndManageUser should communicate reason of failure to caller
Bug: 71844474
Test: cts-tradefed run singleCommand cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LowStorage
Test: cts-tradefed run singleCommand cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_MaxUsers
Change-Id: I3c069ba86822178fa3f51f1d31cd4792883151cc
2018-02-27 09:12:45 +00:00
TreeHugger Robot
dcd6ae8bc8 Merge "Atom: TemperatureReported" 2018-02-27 07:00:45 +00:00
Tej Singh
4029831e36 Atom: TemperatureReported
Makes the temperature reported atom pulled, and adds CPU, GPU, and SKIN
temperatures. Pulls information from the thermal hal.

Test: CTS test on cl in this topic
Change-Id: I0a8e2d1135bdd77e1cc510f24ff5214ce9e14ead
2018-02-26 20:55:26 -08:00
Torne (Richard Coles)
f4f647e2e0 Preload with RELRO sharing in the WebView zygote.
Now that the WebView zygote is a child of the system zygote it has the
smae address space layout and can use the existing WebView native
library RELRO file.

Preload the native library using the RELRO file in the zygote, to share
this data with applications which are using WebView. This can save up to
1-2MB of dirty memory, replacing it with clean pages that are shared
with more processes and thus have a smaller impact on PSS.

Bug: 63749735
Test: CtsWebkitTests
Change-Id: I7ce670f5fcddae9e98631e21329840ef3ad52f9a
2018-02-26 16:23:09 -05:00
Yueming Wang
348bf6254f Revert "Block adb from changing certain settings value when corresponding user"
This reverts commit 4140f6c4e3.

Reason for revert: This CL is merged accidentally as it got merged together with another CL.  

Change-Id: I043a5872f370775a4261a1ca7ccb00489a588303
2018-02-24 12:52:18 +00:00
TreeHugger Robot
cc25afe000 Merge "Flip order of arguments" 2018-02-24 10:25:40 +00:00
TreeHugger Robot
284786b9f6 Merge "Fix sleep time in Cellular" 2018-02-24 02:37:38 +00:00
TreeHugger Robot
8ae9a37bbc Merge "Implement issue #73301635: Ability to extract device configuration" 2018-02-24 01:21:34 +00:00
Dianne Hackborn
bf5ba6bbcc Implement issue #73301635: Ability to extract device configuration
am get-config can now return its information as a protobuf,
so that we have a nice machine readable representation of the
configuration available.  This is available through the new
"--proto" option.

Also add a new "--device" option which will include additional
device configuration information in the output.

Defined the protos to contain all of this information.  Updated
Configuration to generate everything it should in the proto.

The output has been changed so that configuration history
will not be returned unless you specify the --days option.

Bug: 73301635
Test: Booted, ran, output

Change-Id: I074b92b45d6b1da1c1a499080db9e006d12b9fea
2018-02-23 15:30:04 -08:00
Kurt Nelson
72534b7e22 Flip order of arguments
Callbacks as the second parameter is more Kotlin friendly.

Bug: 73751206
Test: cts-tradefed run commandAndExit cts-dev --module CtsOsTestCases --test android.os.cts.StrictModeTest
Change-Id: Ib9c9469be1b81dc65e74c9e303f474c54a43b18b
2018-02-23 15:12:59 -08:00
TreeHugger Robot
aa360efee0 Merge changes from topic "wipedata"
* changes:
  Rename WipeDataWithReason API to wipeData.
  Block adb from changing certain settings value when corresponding user restriction is on.
2018-02-23 22:54:44 +00:00
TreeHugger Robot
3e946e9309 Merge "Add timestamp for events pulled by companision service." 2018-02-23 22:33:21 +00:00
TreeHugger Robot
1dcd645789 Merge "Use PooledLambda in print code" 2018-02-23 21:21:20 +00:00
Eugene Susla
9f35ca9964 Use PooledLambda in print code
This replaces the usage of handler message types with PooledLambda

Test: atest CtsPrintTestCases
Change-Id: I19b01278b67b5fe18d48a2e0bb8300bbe1413a63
2018-02-23 11:09:29 -08:00
Yangster-mac
c552b35316 Add timestamp for events pulled by companision service.
Test: statsd cts test
Change-Id: I2658dba747ff93a120c50b5294f696918588e9fe
2018-02-23 10:56:03 -08:00
Robin Lee
83c79317cc lowRamDevice TVs can have multi-user
Svelte phones in single-user mode don't pose any problems. TVs in many
regions need multi-user in order to support a restricted profile mode.

Adds a special case for devices with UI_MODE_TYPE_TELEVISION to be able
to enable multi-user (ie. max_users will not be ignored in low_ram cases
as it is on other form factors).

Bug: 71626497
Bug: 67965409
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
Change-Id: I6d18b9dca472b9d971d9e51a9d0f4be7403bc26a
2018-02-23 18:43:18 +01:00
yuemingw
4140f6c4e3 Block adb from changing certain settings value when corresponding user
restriction is on.

Check calling uid in isSettingRestrictedForUser(which is called by settingsprovider),
 and only allow system_uid when certain user restriction is on, so that user won't be
able to change these settings with adb:
Settings.Secure.LOCATION_MODE,
Settings.Secure.PROVIDERS_ALLOWED,
Settings.System.SCREEN_BRIGHTNESS,
Settings.System.SCREEN_BRIGHTNESS_MODE,
Settings.System.SCREEN_OFF_TIMEOUT,
Settings.Global.AUTO_TIME,
Settings.Global.AUTO_TIME_ZONE.
This check also prevents 3rd party apps from modifying system settings value
when corresponding user restriction is on.
In addition, any attempt to change AUTO_TIME will also go through the check
for dpm.getAutoTimeRequired().

Test: manually by running the adb command with restriction set and not set
Bug: 72549013
Bug: 72548203
Bug: 72548533
Bug: 72686466
Bug: 72687105
Bug: 72940551
Bug: 72940562


Change-Id: Idfe0f1758d57958b836207ab3d55b2a292e1ae0d
2018-02-23 16:04:45 +00:00
Alex Chau
71ada44b9f API Review: android.os.UserManager.DISALLOW_USER_SWITCH
- Mentions device owner can still force a user switch

Bug: 71866612
Test: None
Change-Id: I48f4ffd0d64b2623b8640f5bbaccdb42cdb30137
2018-02-22 13:49:28 +08:00
TreeHugger Robot
0f36903c3d Merge "Updating batterystats report version." 2018-02-21 20:32:27 +00:00
Kweku Adams
b78430e107 Updating batterystats report version.
http://ag/3607190 changed the value of DATA_CONNECTION_OTHER, which
breaks parsing, so we need to update the report version.

Deferred job metrics added in http://ag/3628360.

Bug: 67013665
Bug: 70297451
Test: N/A
Change-Id: I3361733b10fb55b75d4ce618d8a87ab8c92e5836
2018-02-20 18:12:46 -08:00
TreeHugger Robot
761b33299a Merge "Log deferred jobs metrics to batterystats" 2018-02-20 18:52:24 +00:00
TreeHugger Robot
6b10cbd0f2 Merge "Add tracing tags to vibrator" 2018-02-19 21:38:23 +00:00
Amith Yamasani
977e11f335 Log deferred jobs metrics to batterystats
Log the deferred jobs event count, number of deferred jobs,
time since last job execution and break those down into
different time-since buckets in case the average becomes
too noisy.

Bug: 70297451
Test: dumpsys batterystats --checkin

Change-Id: Iafad6137989246f203a623ce1511140d4eac35b0
2018-02-18 22:43:13 -08:00
Robert Sesek
c0276a54ec Merge "Add Zygote.startChildZygote() to fork a new process that itself is a zygote." am: 554cfd1f1d am: 5b9410c74b
am: 4523bf284a

Change-Id: Ib714e447f06323d38c98de683f5547e66749856e
2018-02-17 04:08:15 +00:00
Robert Sesek
4523bf284a Merge "Add Zygote.startChildZygote() to fork a new process that itself is a zygote." am: 554cfd1f1d
am: 5b9410c74b

Change-Id: I5e9d5c960b9f78cfa7ca7ab88e9d2075f97daca8
2018-02-17 03:51:28 +00:00
Treehugger Robot
554cfd1f1d Merge "Add Zygote.startChildZygote() to fork a new process that itself is a zygote." 2018-02-17 01:39:54 +00:00
Hans Boehm
81e7e3c908 Merge "Avoid BinderProxy duplicate native registration" 2018-02-17 01:28:49 +00:00
Siddharth Ray
ed754705b6 Fix sleep time in Cellular
Sleep time for cellular is based on information sent by the modem.

Sleep time added to ControllerActivityCounterImpl. This field applies
to Cellular, Wifi, BT. This change is for cellular only.

BUG:72177330

Test: Manual
Change-Id: Ia2b35204094edd3972abb43cc16889116ddedabc
2018-02-16 15:07:05 -08:00
Jeff Sharkey
5e4bebb891 Merge "Better handling of NTP-based clocks." 2018-02-16 22:13:01 +00:00
Jeff Sharkey
9911a28adb Better handling of NTP-based clocks.
Now that we have a nice Clock abstraction, we can use it to represent
a clock backed by an NTP fix.  (This makes testing logic much easier
to write.)

We now rely completely on NetworkTimeUpdateService to keep our NTP
fix up to date, instead of trying to refresh in the middle of
critical paths which could trigger random ANRs.

Add internal FallbackClock to make it easier to handle missing NTP
fixes.  Add internal SimpleClock to let implementers focus on single
millis() method.

Test: bit FrameworksNetTests:com.android.server.net.NetworkStatsServiceTest
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69714690, 72320957
Change-Id: Ic32cdcbe093d08b73b0e4b23d6910b23ea8e1968
Exempt-From-Owner-Approval: approved in previous PS
2018-02-16 22:11:35 +00:00
Robert Sesek
d0a190df8a Add Zygote.startChildZygote() to fork a new process that itself is a zygote.
This adds a new --start-child-zygote argument that instructs the main
zygote to create a new child process that will also be a zygote. The
system_server generates a random name in the abstract socket namespace
for it and the child-zygote to communicate over, and that is passed as
an argument to the new process.

A child-zygote bypasses the normal post-fork-child of the zygote process
in order to preserve itself as a zygote. This means not starting the
Binder threadpool nor launching into ActivityThread. Instead, a
child-zygote calls into its own main function. The main function runs a
ZygoteServer select loop, listening on the socket name specified by the
system_server when it was forked.

Unlike the system zygotes, a child-zygote can be killed without bringing
down the system. Killing a child-zygote will not terminate its child
processes, which will be reparented to init for reaping when they
eventually exit.

Bug: 63749735
Test: m (with multi-project commits landed)
Change-Id: I3e7ebbdba498f8fec1d84cdf927dc43a92be4b68
2018-02-16 14:17:41 -05:00