Commit Graph

1029 Commits

Author SHA1 Message Date
Felipe Leme
14ef461fc2 Reverted ContentCapture kill-switch mechanism.
Fixes: 121153631
Fixes: 121144410

Test: atest CtsContentCaptureServiceTestCases

Change-Id: Ic0e3fe6e93a8c2aff12eebcf9872f0082a361589
2019-02-08 10:45:50 -08:00
TreeHugger Robot
ed4a6acc86 Merge "Revert "Fix FDE"" 2019-02-05 06:32:13 +00:00
Marco Nelissen
ec7ed1c990 Remove support for updatable media components in apk
Bug: 123250010
Test: boot, play video
Change-Id: I95f8d28cdb4ce0bef04711ba0e9322fe8bfd79d9
2019-02-04 16:02:35 +00:00
Roshan Pius
c0bd945890 Revert "Fix FDE"
This reverts commit 54271901cd.

Wifi service is assumed to be always up by other parts of the Android
system. So, not starting wifi service will cause NPE crashes all over
the place.

Wifi service already goes into idle mode to handle this FDE transition,
so there is no need for it to be turned off.

Bug: 78663946
Test: Manually verified non-FDE to FDE transition on Taimen (Using
ag/6180881).

Change-Id: I2d4d38e978a671f4dcd671524a1b38f557510bf5
2019-02-01 11:07:13 -08:00
TreeHugger Robot
2c13539844 Merge "Revert "Minimum viable TimeZoneDetectorService"" 2019-02-01 12:57:32 +00:00
Howard Chen
0a94764738 Add the DynamicAndroid Service
Define the DynamicAndroid with AIDL.
  Add a java implementation.
  Start a service instance in the system server.
  Add a permission test.

Bug: 122015653
Test: Build & Test on a pixel phone with following command \
  ./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest

Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
2019-01-31 14:19:34 +08:00
TreeHugger Robot
52c0db9ccb Merge "[GPU Service] Implement GPU service." 2019-01-30 02:50:00 +00:00
Peiyong Lin
fd71c20c68 [GPU Service] Implement GPU service.
GPU Service is used to monitor all GPU and graphics driver related features.
This patch implements GPU service into System Server, and implements
functionality to extract the whitelist out of game driver package when the
package is upgraded or removed. This will move the whitelist processing off
critical path when app launches.

BUG: 123290424
Test: Build, flash and boot. Verify by upgrading game driver apk.
Change-Id: I563a138bfe0c4c1bb17ed28dab5d6a8df244021d
2019-01-29 13:41:44 -08:00
Joe Onorato
917955a4e6 Merge changes from topic "bug and incident report approval"
* changes:
  Add IncidentCompanionService
  Added a new "incidentReportApprover" permission protection flag.
2019-01-29 19:34:40 +00:00
Joe Onorato
e21ab7eab4 Add IncidentCompanionService
It is a helper in the system process that helps dumpstate and incidentd get
user confirmation to share reports

Bug: 123543706
Test: bit GooglePermissionControllerTest:*
Change-Id: Ia3fe4bd5257044ed89fe56ce683876fa03ba6c36
2019-01-29 09:59:28 -08:00
Neil Fuller
f4894d391b Revert "Minimum viable TimeZoneDetectorService"
Remove the stubbed TimeZoneDetectorService. Priorities
dictated that it not be worked on so it has never been
used.

This reverts commit 7fb88c3928.

Bug: 112827764
Bug: 78217059
Test: build / boot
Change-Id: I39ed2fc7f8de8d4b2c0d883cd264cc126579af27
2019-01-29 16:40:30 +00:00
Felipe Leme
70bcf38e2c Moved Content Capture settings to DeviceConfig.
To test, manually played with 'adb shell device_config'. Examples:

$ adb shell device_config list content_capture
$ adb shell device_config delete content_capture enable_contentcapture
$ adb shell stop && adb shell start
$ adb shell service check content_capture
Service content_capture: not found

$ adb shell device_config put content_capture enable_contentcapture always
$ adb shell stop && adb shell start
$ adb shell service check content_capture
Service content_capture: found

Then ran CTS and FrameworkCoreTests below...

Test: atest CtsContentCaptureServiceTestCases \
      FrameworksCoreTests:android.provider.SettingsBackupTest#secureSettingsBackedUpOrBlacklisted
Test: m update-api

Bug: 121037717
Bug: 121153631

Change-Id: Ib93bf8181253228ccbdb3edbd84c5d0431c84eb4
2019-01-28 16:34:40 -08:00
Philip P. Moltmann
a0f377fbe8 Merge "Set assistant as a role" 2019-01-24 20:51:41 +00:00
Philip P. Moltmann
5d894505f7 Set assistant as a role
- Register a role observer in VoiceInteractionManagerService. Once the
role is changes map the new role setting onto the old settings.
- As the assistant role is now always set, there is no need to have code
in AssistUtil for the case the assistant setting is not set
- Remove old config option for the default assistant. The default
assistant is not configured via the roles config

Bug: 110557011
Test: - Set, unset and swtiched assistant via the settings UI
        - for voice interaction service
	- for assist activity
      - Booted from freshly wiped device and saw assitant to be set to
        default
Change-Id: I8596f49c6f6496e8b70cf3236aaa7d7557443a93
2019-01-23 13:05:32 -08:00
TreeHugger Robot
17e2907285 Merge "Code cleanup to conform to style guide / linter." 2019-01-23 19:04:15 +00:00
TreeHugger Robot
09d70fb609 Merge "Implement test harness mode" 2019-01-23 07:05:37 +00:00
Ryan Savitski
cfdc151d52 zygote children: propagate profileability to bionic for native heap profiling
go/heapprofd is a native heap profiler for android Q+. Its triggering is
implemented within /bionic/libc. App processes (i.e.  zygote children) are not
considered profileable by default on "user" builds. To opt-in into being
profileable, the app's manifest needs to have the Q+ go/profileable flag set
(or be marked as debuggable, which is its superset).

With this change, if the app is supposed to be profileable, post-fork runtime
init calls into bionic to mark itself as such, and possibly start "from
startup" profiling.

On userdebug, all zygote children are marked profileable via the same
mechanism. System server is also marked profileable on userdebug (and needs a
separate codepath, as it does not have an activity thread).

See go/heapprofd-java-trigger for details on why we're taking this approach.
Context on the profiler itself: go/heapprofd-design.

Test: flashed blueline-userdebug, confirmed that java profiling activates from startup and at runtime.
Test: flashed crosshatch-user, confirmed that no java profiling is enabled by default.
Bug: 120409382
Change-Id: Ia038871acfa6b9cae7b6a81f666aecce4b68a4fc
2019-01-23 00:08:15 +00:00
Chris Wailes
efce929711 Code cleanup to conform to style guide / linter.
This commit made the following changes to make the code conform to the
Frameworks style guide:
* Re-named variables
* Re-flowed code
* Organized includes

Topic: zygote-prefork
Test: make & flash & launch apps
Bug: 68253328
Change-Id: I9274b32f1f606f29f6eb3a1e5068ca18f607afe7
2019-01-22 16:07:31 -08:00
William Hester
a96d3d3ff4 Implement test harness mode
Test Harness Mode is a feature for device farms that want to wipe
their devices after each test run. It stores the ADB keys in the
persistent partition (used for Factory Reset Protection) then performs
a factory reset by broadcasting the MASTER_CLEAR intent.

Upon rebooting, the Setup Wizard is skipped, and a few settings are set:
  * Package Verifier is disabled
  * Stay Awake While Charging is enabled
  * OTA Updates are disabled
  * Auto-Sync for accounts is disabled

Other apps may configure themselves differently in Test Harness Mode by
checking ActivityManager.isRunningInUserTestHarness()

Bug: 80137798
Test: make && fastboot flashall -w
Test: adb shell cmd testharness enable
Change-Id: I91285c056666e36ad0caf778bffc140a0656fcfa
2019-01-22 13:32:20 -08:00
Alex Salo
b81472f7e2 Add skeleton implementation for Attention API
This service will let the system know whether the user is paying attention to
the device. This may be useful in certain scenarios - like keeping the screen
on, even when there has been no touch related user activity.

New permission BIND_ATTENTION_SERVICE is added to ensure that only the system
can bind to the attention service.

Test: manually tested the lifecycle is as expected
Bug: 111939367
Change-Id: I2dab9c69f3d0c6efb0db572f797f517dc6efcc72
2019-01-16 21:21:51 -08:00
Eugene Susla
40335c1be9 Merge "Mirgate default SMS app handling to RoleManager" 2019-01-11 21:23:34 +00:00
Winson Chung
fb922e9bac Merge changes from topic "prediction_suggestion_services"
* changes:
  Initial commit of Content Suggestions (overview long press) Manager.
  Adding initial implementation of Prediction client/service API
2019-01-11 20:21:19 +00:00
TreeHugger Robot
cbdbc4d9c6 Merge "Add a privileged API for capturing and consuming bugreports" 2019-01-11 12:37:33 +00:00
Chalard Jean
fc758be231 Merge changes from topic "IPMS1" am: 3627deac88 am: 54d91e605c
am: 2304c7c508

Change-Id: I6908f68b1b9e7079384c4cc9f11c4e46cce694ce
2019-01-11 04:13:38 -08:00
Chalard Jean
2304c7c508 Merge changes from topic "IPMS1" am: 3627deac88
am: 54d91e605c

Change-Id: I2541996b9bfe338acabac858fdea0ad89d55df5b
2019-01-11 03:53:57 -08:00
Chalard Jean
8c141bdb8f [MS01] Add the IP memory store service.
Bug: 116512211
Test: Added initial tests
Change-Id: I9d9af4097e3e2d7afd9956b9cbfa29a9f9558ae0
2019-01-11 15:00:36 +09:00
TreeHugger Robot
94672acc5e Merge "Enable airplane mode when booting in safe mode" 2019-01-11 00:58:02 +00:00
Winson Chung
3fb0f258d3 Initial commit of Content Suggestions (overview long press) Manager.
Test: compile
Bug: 120865921
Change-Id: I9f8310112bedc883406f0f50a99041f542036fd9
2019-01-10 16:35:13 -08:00
Sunny Goyal
54e91344e2 Adding initial implementation of Prediction client/service API
Test: Build sample app, ensure that app prediction service gets client
      requests
Bug: 111701043
Change-Id: I33aceb2de31552b2d740dc333559d68728753e40
Signed-off-by: Winson Chung <winsonc@google.com>
2019-01-10 15:53:25 -08:00
Eugene Susla
4ab9511993 Mirgate default SMS app handling to RoleManager
This includes laying down some groundwork to make the remaining migrations
more straightforward

Bug: 110557011
Test: atest RoleManagerTest && atest SmsManagerTest
Change-Id: Ie96abd73751d10f521756c9dcdab2a5710ca2045
2019-01-10 10:41:10 -08:00
Nandana Dutt
d11850cd44 Add a privileged API for capturing and consuming bugreports
The API is mostly implemented; except for hooking up the listener
and handling an already running bugreport.

BugreportManager is the handle to the new API exposed to apps.

Generating bugreports requires root privileges. To limit the footprint
of the root access, the actual bugreport generation in Dumpstate binary,
is accessed as a oneshot service and dies after it finishes
running.

System server accesses Dumpstate via a binder interface since it does
not have root privileges.

Starting a oneshot service is done via setting a system property, which
needs to be done from system server. BugreportManagerService is the
new system server service that does this. BugreportManager calls into
BugreportManagerService via a binder interface, since the former is in
the app's process.

Both app to system server as well as system server to native service
calls are via implementations of IDumpstate binder interface.

Bug: 111441001
Test: builds. Flashed & verified it boots.
Test: wrote a test client (not included) and verified invoking
startBugreport works.

Change-Id: I4abeb753388c055c36ae0dd916af1ec8d40b7bf0
2019-01-10 17:33:58 +00:00
Igor Murashkin
4de1e16570 services: Add iorap forwarding service
Add a new service to system_server. It purely forwards
data from internal APIs to iorapd over binder, it is not a binder
service itself.

Currently forwards ActivityMetricsLaunchObserver APIs from
ActivityTaskManagerInternal.

Bug: 72170747
Change-Id: Ic4fa283df1c16660099030c74a0039ef24866819
2019-01-07 13:46:47 -08:00
Richard Uhler
e95d055c5c Move rollback manager implementation to RollbackManagerServiceImpl
So that RollbackManagerService extends SystemService as per convention
and RollbackManagerServiceImpl need not be made public.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I85d2fd27e4705637d5fb7342d9389ef12f869fc9
2019-01-02 10:35:57 +00:00
Richard Uhler
474dffd225 Merge "Add RollbackManagerService" 2018-12-31 18:43:21 +00:00
Richard Uhler
b29f145505 Add RollbackManagerService
This change adds RollbackManagerService as a new system service for
managing apk level rollbacks.

To work properly this requires additional selinux policy changes. Fails
gracefully in case of selinux denials, until we have a chance to sort
out the proper selinux policy.

Bug: 112431924
Bug: 116512606
Test: atest RollbackTest, with selinux enforcement off.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: Id72aae9c4d8da9aaab3922ec9233ba335bc0198f
2018-12-31 12:38:07 +00:00
Rene Mayrhofer
7d6c8e5ec9 Enable airplane mode when booting in safe mode
Make it possible to boot in airplane mode when it was not turned on
before shutdown/reboot, either for situations where this is required by
regulation or to work around problems in normal boot. When safe mode is
engaged (Vol-Down), disable in two stages:
1. Set Settings.Global.AIRPLANE_MODE_ON as early as possible for
   subsystems to react to it during their initialization.
2. Trigger the public ConnectiviyService API to enable airplane mode. This
   has to be done during later stages in initialization because it requires
   sending broadcasts, so some RF leakage may still happen before airplane
   mode is enabled (time window of a few seconds).

Bluetooth is not currently disabled and needs to be fixed by another
change. WiFi and NFC are turned off alongside cellular modems.

Test: manual
Bug: 120145930
Change-Id: I1d61990a9d6f7cd046d28b3e49ecf402dd485063
2018-12-27 23:33:29 +00:00
Remi NGUYEN VAN
46d40a2b83 Merge "Start NetworkStack on system server start" am: 394b0d1a04 am: d69c3d4193
am: 8d73c6ec16

Change-Id: I0c116a73bfb8ab82c798ebdf0ab587f00be031ed
2018-12-25 23:53:40 -08:00
Remi NGUYEN VAN
8d73c6ec16 Merge "Start NetworkStack on system server start" am: 394b0d1a04
am: d69c3d4193

Change-Id: I00ce231850d69e32f836d8f508e28a4dc741226f
2018-12-25 23:43:25 -08:00
Remi NGUYEN VAN
9ed654ffab Start NetworkStack on system server start
The network stack will host updatable network components that are being
moved from the system server.

Test: flashed, booted
Bug: b/112869080
Change-Id: I63f98405b69615e7077aed374b8f34a84fb1e4b2
2018-12-26 12:10:17 +09:00
Yohei Yukawa
6048d89453 Temporarily move MULTI_CLIENT_IME_ENABLED to frameworks.jar
This is a preparation to implement per-profile IME in
InputMethodManagerService (IMMS).

Multi-client IME is designed and implemented to be able to deal with
multiple profiles at the same time from its beginning [1].  This means
that when multi-client IME is enabled with system properties, it also
means that per-profile IME is enabled.

At the same time, the following classes need to change its behavior
whether per-profile IME is enabled or not.

 * android.provider.Setings
 * com.android.server.inputmethod.InputMethodManagerService
 * com.android.server.textservices.TextServicesManagerService
 * com.android.server.devicepolicy.DevicePolicyManagerService
 * com.android.server.devicepolicy.OverlayPackagesProvider

The problem is that android.provider.Setings lives in the
frameworks.jar.  Hence if we want to expose something like
PER_PROFILE_IME_ENABLED to android.provider.Setings, then such a flag
needs to live in frameworks.jar.

Note that this is expected to be a temporary change.  Once per-profile
IME becomes always enabled in IMMS, we can safely roll back this
change.

Note also that static initializer of InputMethodSystemProperty is
expected to be evaluated only once as long as
InputMethodSystemProperty is loaded before Zygote.

 [1]: I41dfe854557b178d8af740bc2869c936fc88608b
      bae5bea23c

Bug: 120709962
Test: prebuilts/checkstyle/checkstyle.py -f \
        frameworks/base/core/java/android/view/inputmethod/InputMethodSystemProperty.java
Test: Manually verified as follows:
  1. make -j MultiClientInputMethod
  2. adb install -r $OUT/system/priv-app/MultiClientInputMethod/MultiClientInputMethod.apk
  3. adb root
  4. adb shell setprop persist.debug.multi_client_ime \
       com.example.android.multiclientinputmethod/.MultiClientInputMethod
  5. adb reboot
  6. Make sure that multi-client IME is enabled
Change-Id: Iad8aba7edb1e60ccc1ce5192a11e01b6aa8d00a0
2018-12-25 09:57:31 -08:00
Felipe Leme
6bb8a96683 Inline some Settings constants so they don't break the SettingsBackupTest.
Test: echo 'In TreeHugger we trust!'
Bug: 121153631

Change-Id: I7a1180a3446ba6a5aabb76fbe87113bf0e3096c6
2018-12-19 21:04:28 -08:00
Felipe Leme
d264c7284b Fixed how ContentCapture is kill-switched.
We provide a way for OEMs to kill-switch Content Capture, but it currently
does not work in the first boot (which uses default settings).

This CL changes the mechanism:

- If the property is not set, it assumes it's disabled (before it was only
  disabled when explicitly set to "false").
- To always enable it, it must be set to "always" (before it was "true").
- To check for the overlaid resource, it must be set to "default" (before it
  had to be unset).

Test: manual verification

Fixes: 121144410
Bug: 121153631

Change-Id: Ie669e43d9dce947a7bb31bc3b1768774f724675f
2018-12-19 14:20:29 -08:00
Chad Brubaker
90f391fe87 Prototype Spaceship mode qstile
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.

Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
2018-12-14 20:46:04 +00:00
Inseob Kim
ccc7473fb5 Schematize vold system properties
am: 0a91222c83

Change-Id: I3462d493bf88d7a435573659af9d8fa2062723b0
2018-12-13 16:14:18 -08:00
Inseob Kim
0a91222c83 Schematize vold system properties
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: m -j
Change-Id: I8e04f643197b6c8a60cc38c6979e41c5de3469f5
Merged-In: Iedfd3c1dda665006ea5410ee787c3ca447ac7db1
(cherry picked from commit c1246e6c36)
2018-12-13 15:35:34 -08:00
Alan Stokes
be9ec976c5 Separate job service for dynamic code logging.
Decouple logging of dynamic code loading from background DEX
optimisation/reconciliation (BackgroundDexOptService).

Add DynamicCodeLoggingService to run DCL logging daily while idle and
charging.

Update DexLoggerIntegrationTests to use the new job, and to verify
that we now handle unknown class loaders.

Bug: 111336847
Test: atest -p services/core/java/com/android/server/pm/dex
Change-Id: Id688a7eef5976120be12606e726830ce32451a1e
2018-12-13 10:30:02 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Treehugger Robot
9dfd13e7ea Merge "Revert "Revert "Schematize vold system properties""" 2018-12-11 11:04:01 +00:00
Inseob Kim
5b1cc27cee Revert "Revert "Schematize vold system properties""
This reverts commit 2473b08b07.

Reason for revert: Fixed build breakage
sysprop_cpp and sysprop_java directly have been linking against
libprotobuf-cpp-full and do not set proto.type field, which could
cause ASAN error due to linking against both libproto version of full
and lite.

Change-Id: I96eb47444d7b6f6b5fef092efc1514fcdd6f33b6
Merged-In: I8e04f643197b6c8a60cc38c6979e41c5de3469f5
2018-12-11 00:23:07 +00:00
Christine Franks
6230c94e4c Merge "ColorDisplayService should always be started" 2018-12-10 21:01:25 +00:00