Commit Graph

993 Commits

Author SHA1 Message Date
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
Xin Li
75f75c18cc DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I7351a1832c4bd2fd86324183ab83e9088d716822
2018-12-10 12:30:19 -08:00
Christine Franks
17a9bc82b4 ColorDisplayService should always be started
Even if no color transforms are available, for requesting whether
color modes or configurations are available.

Bug: 111215474
Test: atest FrameworksServicesTest:ColorDisplayServiceTest

Change-Id: I10a4b3b1214920117312e752ba5ea0033ff70293
2018-12-10 10:21:25 -08:00
Anthony Stange
d2ca6c6dfe Merge "Revert "Schematize vold system properties"" am: 6ee45c6f14
am: 510c8c463f

Change-Id: If137d417a8f042e8cbde842578caaa3e54bb8c6d
2018-12-07 04:37:45 -08:00
Anthony Stange
6ee45c6f14 Merge "Revert "Schematize vold system properties"" 2018-12-07 12:04:56 +00:00
Anthony Stange
2473b08b07 Revert "Schematize vold system properties"
This reverts commit 7bc31dc162.

Reason for revert: Breaking aosp_master build.

Change-Id: I34a5e9889c17e3454a0a86deabcec3c192a3da52
2018-12-07 11:43:03 +00:00
Felipe Leme
132b1c6002 Merge "Yet another (major) refactoring on Content Capture and Augmented Autofill." 2018-12-07 04:18:44 +00:00
Kenny Root
b24545385b Merge "SystemServer: initialize ADB before USB" 2018-12-07 03:36:20 +00:00
Inseob Kim
1a7cad6b1a Merge "Schematize vold system properties" am: 095d0f640e
am: 73694f8faa

Change-Id: If420ffa861d9d85f2baca9224b96f2716965f4b5
2018-12-06 18:42:29 -08:00
Treehugger Robot
095d0f640e Merge "Schematize vold system properties" 2018-12-07 01:46:45 +00:00
Felipe Leme
749b889889 Yet another (major) refactoring on Content Capture and Augmented Autofill.
Bunch of changes:

- Split public SmartSuggestionsService info ContentCaptureService and
  AugmentedAutofillService
- Renamed 'intelligence' packages to either 'contentcapture' or
  'autofil.augmented'
- Renamed internal packages and classes.
- Changed permissions, resource names, etc...
- Moved Augmented Autofill logic from IntelligeceManagerService (R.I.P.) to
  Autofill.
- Optimized IPCs by passing a String instead of the InteractionSessionId
  (that also solves the view -> service dependency).

Test: atest CtsContentCaptureServiceTestCases \
            CtsAutoFillServiceTestCases \
            FrameworksCoreTests:SettingsBackupTest
Test: manual verification with Augmented Autofill Service

Bug: 119638877
Bug: 117944706

Change-Id: I787fc2a0dbd9ad53e4d5edb0d2a9242346e4652d
2018-12-06 16:56:39 -08:00
Yunfan Chen
f963216094 Merge "Use WindowProcessController configuration for process" 2018-12-05 21:12:18 +00:00
TreeHugger Robot
0492440cd9 Merge "Changed how the Smart Suggestions service is defined." 2018-12-05 16:15:50 +00:00
Mathew Inwood
9f7fcda6c4 Merge "New receiver for signed config." 2018-12-05 12:46:12 +00:00
Mathew Inwood
4e2ed6a90b New receiver for signed config.
A new receiver is added when the system server is created. It receives
broadcasts and pulls out the config & signature, but doesn't yet do
anything with it.

go/serverless-config-design
Test: Manual
Bug: 110509075

Change-Id: Ie369e198de5e830253b17e964afb67c76735909c
2018-12-05 11:00:26 +00:00
Yunfan Chen
c2ff6cf1c5 Use WindowProcessController configuration for process
This patch is to replace the process configuration map in
WindowManagerService with the map in ActivityTaskManagerService. To do
so, we pass the ActivityTaskManagerService instance to
WindowManaserService. Adjust test base accordingly.

Test: WmTests
Test: go/wm-smoke
Bug: 117877476
Bug: 113253755
Change-Id: Ica93c3ad402e1cab682466fd16a8226176f9bae8
2018-12-04 23:00:05 -08:00
Kenny Root
4673a1d1e4 SystemServer: initialize ADB before USB
USB depends on ADB to hold the state for ADB debugging enabled, so move it
to initialize before USB attempts to initialize. This removes a race
condition introduced by moving the source of truth for ADB debugging enabled
to the AdbService instead of UsbService.

Bug: 119765805
Test: boot emulator several times
Change-Id: Ib1f5ae0ceab5abe64e2d14b9e2b3a55c9919ad2f
2018-12-05 12:20:02 +09:00
Felipe Leme
658c8e423f Changed how the Smart Suggestions service is defined.
Initially it was defined as secure Settings, but the proper way is to let the
OEMs set it by overlaying a framework resources, which an option to temporarily
override that setting using a Shell cmd (so it can be changed on CTS tests).

This CL also changes how the service can be explicitly enabled / disabled at
the time the system starts, so it can be disabled by a server-push in case of
emergencies (and also manually enable by developers when running the CTS tests
on AOSP builds).

Bug: 119776618
Bug: 111276913
Bug: 117779333

Test: adb shell settings put global \
   smart_suggestions_service_explicitly_enabled true && \
   sleep 10s && \ adb shell stop && adb shell start \
   atest CtsContentCaptureServiceTestCases
Test: atest FrameworksCoreTests:SettingsBackupTest
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break
Test: m -j SettingsProvider

Change-Id: Ibd1bba0c0d534b4b6344516d8ff893142785a57a
2018-12-04 17:46:49 -08:00
Inseob Kim
7bc31dc162 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: I8e04f643197b6c8a60cc38c6979e41c5de3469f5
2018-12-05 00:04:24 +00:00
TreeHugger Robot
6220baa36e Merge "Schematize vold system properties" 2018-12-05 00:00:42 +00:00
Neil Fuller
269be44f8f Merge "Add a service for reporting runtime debug info" am: 08cbafefdc am: 20547cf20d
am: b5354b7ca9

Change-Id: I2395418164f3dbcb04bc18647c6cccf7a025c1b4
2018-12-04 00:56:36 -08:00
Neil Fuller
b5354b7ca9 Merge "Add a service for reporting runtime debug info" am: 08cbafefdc
am: 20547cf20d

Change-Id: I29e7fe0355c7461ca6b939c669b9e4f3d471c4b6
2018-12-04 00:36:09 -08:00
Neil Fuller
ab0b81e921 Add a service for reporting runtime debug info
Add a service for reporting runtime debug info via dumpsys.

With expected OEM customization / module versions in play
it makes sense to have runtime and associated "core library"
information in bug reports. The dumpsys information can also
be used from from host-side tests.

Bug: 119026403
Bug: 118242715
Test: adb shell dumpsys runtimeinfo
Change-Id: I62637a1c8bfd65d5de9b3e47b8700ead4bc314f2
2018-12-03 15:41:50 +00:00
Annie Meng
8c0d41ac2d Merge "[Multi-user] Rename GlobalBackupManagerService -> BackupManagerService" 2018-11-29 13:36:57 +00:00
Annie Meng
384230f9e0 [Multi-user] Rename GlobalBackupManagerService -> BackupManagerService
Restore original naming since UserBackupManagerService is now merged.

Just find and replace, no functionality changes in this CL.

Bug: 118520567
Test: 1) atest RunFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) adb shell bmgr flows
Change-Id: Ia37997cec93fac9ebb5102edfff9000c9cff4eb1
2018-11-28 12:30:21 +00:00
Annie Meng
178828f259 Merge "[Multi-user] Extract BackupManagerService to UserBackupManagerService" 2018-11-28 10:37:18 +00:00
Annie Meng
813716b199 [Multi-user] Extract BackupManagerService to UserBackupManagerService
BMS is split into GlobalBMS and UserBMS.
UserBMS:
- Core backup/restore implementations and bookkeeping.
- Will be per user in a future CL (only one instance in this CL to limit
scope of changes).

GlobalBMS:
- System service definition, interaction with Trampoline, user-aware
operations.
- Will be renamed back to BMS in a future CL (so BMS history can follow
UserBMS in this CL).

*** Reviewers, please pay attention to the patchset breakdown to better
understand what is a rename/move vs. new changes ***

* Base -> Patchset 2: BMS splits into GlobalBMS and UserBMS (MOVE ONLY)

Patchset 1: Rename BMS -> UserBMS
Patchset 2: Move parts of UserBMS to GlobalBMS
No new functionality, only moving existing code.

* Patchset 2 -> Patchset 3: New functionality for GlobalBMS

- Switch references from BMS to GlobalBMS in Trampoline.java.
- Change the definition of the system service in SystemServer.java to
GlobalBMS.
- Instantiate one instance of UserBMS in GlobalBMS constructor.
- Add all IBackupManager methods, which for now just directly calls the
corresponding method in UserBMS.

* Patchset 3 -> Patchset 4: Migrate usages of BMS in code (RENAME ONLY)

Find and replace, no new functionality.

* Patchset 4 -> Patchset 5: Migrate usages of BMS in tests (RENAME ONLY)

Find and replace, no new functionality.

* Patchset 5 -> Patchset 6: New tests for GlobalBMS

Add tests for all the new IBackupManager methods added (just tests
straight redirection for now).

* Overall: View Patchset 2 -> [Latest Patchset] for new code.

TODO: Modify art-profile with rename

Bug: 118520567
Test: 1) atest RunFrameworksServicesRoboTests
2) atest $(find
frameworks/base/services/tests/servicestests/src/com/android/server/backup
-name '*Test.java')
3) atest GtsBackupHostTestCases
4) atest CtsBackupTestCases
5) atest CtsBackupHostTestCases
6) atest DeviceOwnerTest
7) 'Backup Now' in Settings
8) Cloud and d2d restore in SUW; deferred restore
9) All 'adb shell bmgr' flows
10) adb backup; adb restore
Change-Id: Ib5a5837375fe950bc7d33a5e31cca16b605541f9
2018-11-27 14:23:30 +00:00
TreeHugger Robot
50f27c4a60 Merge changes from topic "revert-to-single-threaded-oms-init"
* changes:
  Decouple the display manager from the overlay manager
  Revert: "Init of OverlayManagerService on a parallel thread"
2018-11-26 16:30:24 +00:00
Felipe Leme
29397ce998 Temporarily disabled IntelligenceService.
It's not properly ignoring events when the service is not set, which is causing
issues on some apps.

Fixes: 119659731
Test: manual verification

Change-Id: Ie271b8fcfde0bc2a5d6bf7c73b88bd6c48d50fdb
2018-11-16 18:13:30 -08:00
Mårten Kongstad
250cb2b97d Decouple the display manager from the overlay manager
The display manager relies on resources that may or may not have been
modified via runtime resource overlay. Because the overlay manager is
initialized in parallel with the display manager, the two need to
synchronize their work so the display manager knows when it can rely on
its resources.

An upcoming change will hold off on threading the system until after the
initialization of the overlay manager. This means all overlays should be
setup before other services start, which in turn means no additional
synchronization is required. As a first step towards this, remove the
synchronization between the display manager and the overlay manager.

Also remove unused variable LogicalDisplay#PROP_MASKING_INSET_TOP.

Bug: 80150169
Test: builds, boots
Change-Id: I844de9e09eb1464ae112e1b480d21cf662a026e0
2018-11-15 16:00:57 -08:00
Felipe Leme
cb9172a0db Merge "Allow Intelligence Service app to obtain Clipboard permission." 2018-11-15 01:59:24 +00:00
TreeHugger Robot
c1d607e90d Merge "Add ColorDisplayManager" 2018-11-15 00:40:26 +00:00
Felipe Leme
927fbf0f27 Allow Intelligence Service app to obtain Clipboard permission.
Test: manual verification

Bug: 111276913
Fixes: 119440304

Change-Id: I8dc97e4517367eaf8736741ce04040efaeb84355
2018-11-14 14:32:46 -08:00
Eugene Susla
f84f1fd2d9 Merge "Add RoleManagerService as a boot phase" 2018-11-13 20:02:27 +00:00
Yohei Yukawa
bae5bea23c Introduce multi-client IME for special form factors
An advanced multi-display support is requested for certain Android
form-factors so that user(s) can type text on each display at the same
time without losing software keyboard focus in other displays. This is
not possible in existing Android IMEs that are built on top of
InputMethodService class, because the assumption that a single IME
client can be focused at the same time was made before Android IME
APIs were introduced in Android 1.5 and many public APIs in
InputMethodService have already relied heavily on that
assumption. Updating InputMethodService class to support multi-client
scenario is, however, quite challenging because:

 1. doing so would introduce an unacceptable amount of complexity into
    InputMethodService, which is already hard to maintain,

 2. IME developers still need to update their implementation to be
    able to support parallel requests from multiple focused IME
    client, which may require non-trivial redesign in their side
    (e.g. input decoder, typing history database, ...), and

 3. actual use cases for multi IME clients are expected to be evolved
    rapidly hence the new protocol is not yet stable and not yet ready
    to be exposed as public APIs.

This is why a new type of IME needs to be designed and developed
specifically for such special multi-display environments, rather than
reusing existing InputMethodService public class.

Note that there must be no behavior change unless multi-client IME is
explicitly enabled with 'adb shell setprop', which requires root
permission.

See multi-client-ime.md for details.

Fix: 114662040
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. Try multiple text input scenario
Change-Id: I41dfe854557b178d8af740bc2869c936fc88608b
2018-11-12 15:20:20 -08:00
Eugene Susla
6d492272b2 Add RoleManagerService as a boot phase
For now it just reads the xml config file on boot

Test: adb logcat | grep -n20 Role # during boot
Change-Id: Iad907fe9bf52f5ed15066484aec60b3a9f51568a
2018-11-12 22:18:27 +00:00
TreeHugger Robot
2112895bb4 Merge "SystemServer: Support deviceSpecificAudioService for ARC" 2018-11-12 02:11:41 +00:00