Commit Graph

5114 Commits

Author SHA1 Message Date
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
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
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
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
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
Jeff Sharkey
a7d4901db0 Merge "Grant DCS storage access; better OBB errors." 2018-02-16 18:46:29 +00:00
Hans Boehm
03477cb9b7 Avoid BinderProxy duplicate native registration
In case of an OOME, we would recycle the nativeData we just allocated,
even if the BinderProxy.getInstance() call got far enough to register
the allocation for automatic freeing. This could cause a duplicate
deallocation.

This changes the code to be much more careful about handling native
deallocation correctly in the exception case.

Bug: 72707270

Test: Build and boot master.
Change-Id: I2cffdd1d59af95f089714893e819c2d02302a6d4
2018-02-16 10:22:12 -08:00
Calin Juravle
5a0b4c4c62 Merge changes from topic "cp_calin_framework_2017" am: b98102b4dc
am: b3da44d9a1

Change-Id: Ibd848f6803d63da46ae1461b469422c5a6431980
2018-02-15 21:30:27 +00:00
Jeff Sharkey
0095a82b14 Grant DCS storage access; better OBB errors.
DCS had been relying on the WRITE_MEDIA_STORAGE permission to access
OBBs on external storage, but that permission has been locked down,
and we need to use the real WRITE_EXTERNAL_STORAGE permission now.

Rework the OBB error reporting flow to bubble exact error codes up
from internals, so that we can return expected CTS error codes.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Bug: 73424392
Change-Id: Iecbc4132745d56ebf081868ad2f9c3efe1e3735f
2018-02-15 13:06:56 -07:00
TreeHugger Robot
e4adba745b Merge changes from topic "telus"
* changes:
  SUPL server for Telus
  New cellular network types
2018-02-15 18:04:59 +00:00
TreeHugger Robot
929a326a22 Merge "[EBS] Don't disable location when DISALLOW_CONFIG_LOCATION is set" 2018-02-15 03:39:30 +00:00
Makoto Onuki
acc50461bb [EBS] Don't disable location when DISALLOW_CONFIG_LOCATION is set
If *any* user has DISALLOW_CONFIG_LOCATION set, don't disable location
on battery saver.

Test: Manual test with TestDPC
Test:  atest $ANDROID_BUILD_TOP/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/BatterySaverLocationTest.java

Bug: 73004763
Change-Id: Iea7ddf94703463f0f8f2a92a8e76845b986350c3
2018-02-15 00:47:35 +00:00
Steven Moreland
461ce2aac1 Merge "HIDL: add APIs used by subclasses to SystemApi" 2018-02-14 23:12:28 +00:00
Calin Juravle
ea6c0ffb4a [framework] Extend profile operations to take the profile name
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.

(cherry picked from commit 6ae39fc2e5)

Test: manual (dexopt apps, merge profiles, clear profiles)
      gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496

Merged-In: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
2018-02-14 08:19:42 -08:00
Calin Juravle
369fbd2983 Implement ArtManager#snapshotProfile API
Complete the implementation of ArtManager#snapshotProfile. The snapshot is
performed by calling the installer and then return to the caller via the
specified callback.

(cherry picked from commit fd9f8ae973)

Bug: 30934496
Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases
Merged-In: I87131487846d91d79a56041445420376b61ca8e7
Change-Id: I87131487846d91d79a56041445420376b61ca8e7
2018-02-14 08:00:56 -08:00
Alexey Kuzmin
e59145a12b Add tracing tags to vibrator
Now all somewhat time-consuming methods of the VibratorService
are surrounded by traceBegin/traceEnd blocks.
The vibration itself is surrounded with asyncTrace block.

Test: Run "systrace vibrator" and see the time consumption report.
Bug: 73000045
Change-Id: Ie6347d179cf3e0dd13dc3daf76917f3fbb870d2b
2018-02-14 14:44:04 +00:00
Robert Sesek
1bb6046a06 Merge "Refactor ZygoteProcess to deal in LocalSocketAddress." am: 9fda81e274
am: 9b13db0938

Change-Id: Ic977e64157b6c140f4ac6c22643ca1b9375f855c
2018-02-14 05:43:52 +00:00
Siddharth Ray
c72081d762 New cellular network types
New cellular network types (cellular data registration states) are added.

When cellular network type is "IWLAN" and the phone is on, call is VoWifi.
The only exception is when the following conditions hold
- Verizon sim card
- 1x coverage only
- Wifi is connected
In this case calls go over cellular (cdma 1x).

BUG:67013665

Test: Manual
Change-Id: Id90445c899547bdac003a2cbbfa8cd78060750f2
2018-02-13 12:12:16 -08:00
Robert Sesek
5ac8abf9ca Refactor ZygoteProcess to deal in LocalSocketAddress.
Currently ZygoteProcess only uses String names in the RESERVED socket
namespace. This CL reworks the class to use LocalSocketAddress, so that
other socket namespaces can be used to communicate with zygotes.

Bug: 63749735
Test: m (no functional change)
Merged-In: I4146f684bfcd78b16500829d02ff54590a8b48f5
Change-Id: I0113a7189530c2e57c48058df542057e855bae42
2018-02-13 14:23:30 -05:00
TreeHugger Robot
8dddeb98f5 Merge "Revert "Fix issue #72116995: Add permission guarding Service#startForeground"" 2018-02-12 19:47:35 +00:00
Tao Bao
cbc4d36dcc Merge "Expose an update_engine API that verifies the given payload metadata." 2018-02-12 18:36:47 +00:00
Ian Pedowitz
0b4add68db Revert "Fix issue #72116995: Add permission guarding Service#startForeground"
This reverts commit a9da85fde4.

Reason for revert: b/73224471

Bug: 73224471
Bug: 72116995
Change-Id: I1485305f40d47fdb138cb1e484c329cf20892a6b
2018-02-12 16:12:33 +00:00
TreeHugger Robot
df19e5a5c4 Merge "Refactor ZygoteProcess to deal in LocalSocketAddress." 2018-02-09 19:44:55 +00:00
Tao Bao
d27be3444f Expose an update_engine API that verifies the given payload metadata.
android.os.UpdateEngine.verifyPayloadMetadata() allows a system updater
to verify a payload can be safely applied, by using its payload metadata
(usually a few hundred KiB only or even less). This would be useful in
improving update UX, since the updater can be smarter to avoid
installing an update that would fail to apply, or to fall back from an
incremental to full payload.

Bug: 65283633
Test: Build and flash walleye on device. Trigger a call to this API.
Change-Id: I82546f6b2a8f27cfd956cc1677556e7221cce5fd
2018-02-09 11:12:56 -08:00
TreeHugger Robot
4f07fa4e74 Merge "Add support for vibrator HAL 1.2 effects." 2018-02-09 16:36:13 +00:00
TreeHugger Robot
27b3cad257 Merge "Fix issue #72116995: Add permission guarding Service#startForeground" 2018-02-09 07:31:46 +00:00
Yifan Hong
1c9e8b2bfa Merge "VintfObject: add getTargetFcmVersion" am: 5a748e5ee2 am: b901a37a85
am: 600ee19e3d

Change-Id: I93fcdab5d1dd81392f20a947f2c7bbe91ddaa525
2018-02-09 00:56:05 +00:00
Yifan Hong
600ee19e3d Merge "VintfObject: add getTargetFcmVersion" am: 5a748e5ee2
am: b901a37a85

Change-Id: Ide89fa9bc6c3dfb0bbeff6a3a8afdee4c31504e2
2018-02-09 00:44:01 +00:00
TreeHugger Robot
efd14bf5a5 Merge "Wireless charging on aod and lockscreen" 2018-02-08 23:46:15 +00:00
Michael Wright
f268bf573f Add support for vibrator HAL 1.2 effects.
Test: atest android.os.VibrationEffectTest
Bug: 64184692
Bug: 64185677
Change-Id: I0b3f9caa04b3e7bdadba5c44188120ac14943f82
2018-02-08 21:24:02 +00:00
Treehugger Robot
5a748e5ee2 Merge "VintfObject: add getTargetFcmVersion" 2018-02-08 20:12:02 +00:00
Robert Sesek
335e9c56a2 Refactor ZygoteProcess to deal in LocalSocketAddress.
Currently ZygoteProcess only uses String names in the RESERVED socket
namespace. This CL reworks the class to use LocalSocketAddress, so that
other socket namespaces can be used to communicate with zygotes.

Bug: 63749735
Test: m (no functional change)
Change-Id: I4146f684bfcd78b16500829d02ff54590a8b48f5
2018-02-08 14:55:33 -05:00
TreeHugger Robot
9ea3c99a95 Merge "Statsd notifies listener with pendingintent." 2018-02-08 18:50:00 +00:00
Beverly
ac32c9acc3 Wireless charging on aod and lockscreen
- wireless charging animation plays on aod + lockscreen
- timing changes on animation based on design spec
- charging feedback only given if phone is not just booted

Test: manual
Bug: 67598445
Change-Id: I009ff6016141bcdfe9f0392bb9a1c220ea88dfe5
2018-02-08 09:38:59 -05:00
David Chen
661f791a25 Statsd notifies listener with pendingintent.
Previously, statsd would inform interested listeners that it's time
to collect data via a protected broadcast. However, the preferred
solution is to pass a PendingIntent via a separate setter. Whenever
statsd wants the listener to call getData, StatsCompanionService
will trigger the pending intent.

Test: Tested in marlin-eng that functionality works as expected with
dogfood app.
Bug: 72562867
Change-Id: Ibcfcd5072a1a78947f8a7cbcd0bc429b54351da3
2018-02-07 16:16:23 -08:00