Commit Graph

807 Commits

Author SHA1 Message Date
Nick Felker
1bfe59d179 Start IoT System Service from SystemServer
For feature type "embedded", launch IoTSystemService from
System Server.

Test: Wrote a IotSystemService and ensured that the service is
successfully started on an iot device.

Bug: 67641069
Change-Id: I5aa0408f35fb4a5b0787cf9b20454720d8ae130f
Cherry-picked and refactored from oc-iot-dev branch
2017-10-14 00:07:33 +00:00
Vishnu Nair
e9852f5245 Register wm, am, cpuinfo, meminfo services with dumpsys priorities
Register services to be called as soon as a bug report is taken so relevant debug info can be captured.

dumpsys --priority CRITICAL times: adb shell dumpsys --priority CRITICAL | grep "was the duration"
0.005s was the duration of dumpsys SurfaceFlinger
0.002s was the duration of dumpsys cpuinfo
0.003s was the duration of dumpsys activity
0.025s was the duration of dumpsys window

Bug: 31774394

Test: adb shell setprop dumpstate.version "2.0-dev-priority-dumps" && \
                adb bugreport ~/tmp_new.zip
Test: adb shell dumpsys --priority CRITICAL
Test: adb shell dumpsys --priority HIGH
Test: adb shell dumpsys --priority NORMAL
Change-Id: Ic656a05dd9a838f0b13043b4387dae7b5c691f7e
2017-10-11 18:09:55 -07:00
Fyodor Kupolov
c56106a13e Crash if not all privileged permissions are whitelisted
Test: reboot device - no crashes
Test: Ran privapp_permissions.py for fugu/marlin/taimen
Bug: 64693550
Change-Id: I9522ccaa75858b9a3d153c95c529eff70cd13994
2017-10-09 14:27:47 -07:00
Etan Cohen
5b8273e465 Merge "[RTT2] Add API for testing whether feature exists on platform" 2017-10-03 20:14:31 +00:00
TreeHugger Robot
dffe6733b2 Merge "Improve handling of devices without a WebView." 2017-10-03 19:35:06 +00:00
TreeHugger Robot
48ffde7ed0 Merge "[RTT2] New (v2) Wi-Fi RTT framework" 2017-10-03 15:48:31 +00:00
Torne (Richard Coles)
ff937ac226 Improve handling of devices without a WebView.
Use the presence of FEATURE_WEBVIEW to determine whether a device is
intended to have a WebView implementation or not, instead of trying to
fall back to NullWebViewFactoryProvider after loading WebView fails.
This removes the need for nullwebview entirely, and eliminates a class
of possible bug where unexpected exceptions during loading cause the
fallback mechanism not to work reliably.

On devices which don't have the feature, don't start
WebViewUpdateService at all. Guard all the places which try to access
the service to return reasonable (empty/null) results when this is the
case, instead of throwing exceptions.

Change-Id: I839adaaf0abee28f4989e3fbc0c49c0732d0ec1c
Bug: 31849211
Fixes: 28529980
Test: on wear and non-wear, cts-tradefed run cts -m CtsWebkitTestCases
2017-10-03 10:40:20 -04:00
Etan Cohen
692e68e7a2 [RTT2] Add API for testing whether feature exists on platform
Add PackageManager API which allows apps to test whether the platform
officially supports the Wi-Fi RTT API.

Only start the RTT service if the device supports it.

Bug: 65014628
Test: integration tests pass
Change-Id: Ie88bd29ccd592e9a29ff24e8cc346afc360f03b0
2017-10-03 07:01:05 -07:00
Etan Cohen
17ba47254c [RTT2] New (v2) Wi-Fi RTT framework
Replace existing Wi-Fi RTT manager framework. Creating new framework
in parallel since there's code using the new framework - will be
switched over once new version ready.

New version is AIDL-based.

Bug: 65014552
Test: unit tests and integration tests
Change-Id: Id468c9b2a3c94eb30959f5ac5e4b1688fb8fc633
2017-10-03 07:01:01 -07:00
Michal Karpinski
bef5f4a64f Switch to use RefactoredBackupManagerService
Keeping the legacy BackupManagerService for now, but we'll remove
it in a few weeks if there's no issues noticed.
In case of any problems, this CL can be cleanly reverted as a fallback.

Test: pretty much all we got in store
1) runtest -p com.android.server.backup frameworks-services
2) make gts -j40 && gts-tradefed run gts -m GtsBackupHostTestCases
3) make cts -j40 && cts-tradefed run cts -m CtsBackupTestCases
4) make pts -j40 && pts-tradefed run pts -m PtsBackupHostSideTestCases
5) manual: "adb shell bmgr backupnow --all" and then cloud restore,
   D2D scenarios (both as source and target)
Bug: 65823538
Change-Id: I701764995c4fe2611a4941aecb45315aa457658e
2017-09-28 14:10:56 +01:00
Nathan Harold
7bbe9c70f3 Re-Enable Starting of the IpSecService am: b72821747c am: f434a6d308 am: 686a8282bb
am: 458b8cd302

Change-Id: Ic492c58b8c9b56f870c99336e82fd8d05c9e8969
2017-09-26 22:48:25 +00:00
Nathan Harold
458b8cd302 Re-Enable Starting of the IpSecService am: b72821747c am: f434a6d308
am: 686a8282bb

Change-Id: Ia24348d585b2f1050dafd161eafcdadf0edd82c0
2017-09-26 22:37:44 +00:00
Nathan Harold
f434a6d308 Re-Enable Starting of the IpSecService
am: b72821747c

Change-Id: I1f64aa2fdf1cce6dea91427eda65c4b8ee6f6b02
2017-09-26 22:11:58 +00:00
Adam Bookatz
43b272e20c Merge changes I82fe220e,Iff324c73,I3bd73acd
* changes:
  indexed priority queue for AnomalyMonitor
  StatsCompanionService connection to Statsd
  Set up StatsCompanionService.java
2017-09-20 14:01:49 +00:00
Neil Fuller
8acdb8aa65 resolve merge conflicts of 83c367aa5b to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ia3dc2e0b10bbf5be9c7d8f98b03cf8030bbfff07
2017-09-20 13:43:28 +01:00
Neil Fuller
933845c480 Fix reliability triggering
Fix reliability triggering in the time zone update
feature. The reliability triggering is there to
resume an update check when things go wrong. For
example, if the device is turned off after a
time zone data app is updated but before the time
zone update process has finished pulling the data
out and installing it in /data. The reliability
trigger happens when the device is idle and will
complete the work.

The idle triggering currently doesn't work as it
was implemented incorrectly.

The code has been changed to use the
JobScheduler to trigger on idle and scheduling
has been made explicit.

Unit tests run with:

make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/marlin/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above
Test: Manual testing: adb shell am idle-maintenance, adb logcat/adb shell dumpsys timezone
Test: PTS: run pts -m PtsTimeZoneTestCases
Bug: 65657543
Change-Id: Ibb2c537955d09a5d538c50490dae94a518522f19
Merged-In: Ibb2c537955d09a5d538c50490dae94a518522f19
(cherry picked from commit cd1a109b87)
2017-09-19 16:12:57 +00:00
Neil Fuller
782a79f47a Fix reliability triggering
Fix reliability triggering in the time zone update
feature. The reliability triggering is there to
resume an update check when things go wrong. For
example, if the device is turned off after a
time zone data app is updated but before the time
zone update process has finished pulling the data
out and installing it in /data. The reliability
trigger happens when the device is idle and will
complete the work.

The idle triggering currently doesn't work as it
was implemented incorrectly.

The code has been changed to use the
JobScheduler to trigger on idle and scheduling
has been made explicit.

Unit tests run with:

make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/marlin/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above
Test: Manual testing: adb shell am idle-maintenance, adb logcat/adb shell dumpsys timezone
Test: PTS: run pts -m PtsTimeZoneTestCases
Bug: 65657543
Change-Id: Ibb2c537955d09a5d538c50490dae94a518522f19
Merged-In: Ibb2c537955d09a5d538c50490dae94a518522f19
(cherry picked from commit cd1a109b87)
2017-09-19 17:10:46 +01:00
TreeHugger Robot
2780e401c6 Merge "Fix reliability triggering" 2017-09-19 15:36:52 +00:00
Neil Fuller
cd1a109b87 Fix reliability triggering
Fix reliability triggering in the time zone update
feature. The reliability triggering is there to
resume an update check when things go wrong. For
example, if the device is turned off after a
time zone data app is updated but before the time
zone update process has finished pulling the data
out and installing it in /data. The reliability
trigger happens when the device is idle and will
complete the work.

The idle triggering currently doesn't work as it
was implemented incorrectly.

The code has been changed to use the
JobScheduler to trigger on idle and scheduling
has been made explicit.

Unit tests run with:

make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/marlin/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above
Test: Manual testing: adb shell am idle-maintenance, adb logcat/adb shell dumpsys timezone
Test: PTS: run pts -m PtsTimeZoneTestCases
Bug: 65657543
Change-Id: Ibb2c537955d09a5d538c50490dae94a518522f19
2017-09-19 13:31:12 +00:00
Jeff Sharkey
54402795b7 Destroy vold socket interface completely.
Long live Binder.

Test: yes
Bug: 13758960
Change-Id: I08e8c513b1dea217d64d06e9d8bec6171c8afdaf
2017-09-18 16:00:33 -06:00
Nathan Harold
b72821747c Re-Enable Starting of the IpSecService
This reverts commit 41004ff411.

Bug: 64800246
Test: compilation
Change-Id: I4f5e3cd23001b9d94b3f6dc9fcfe731a90650e6e
2017-09-12 19:25:09 -07:00
Bookatz
9472641287 Set up StatsCompanionService.java
Introduces StatsCompanionService.java and sets it up as a system service.

This service is a helper for statsd. It will be responsible for setting
and cancelling alarms related to polling stats and anomaly detection.

It currently does not have selinux permission, so must be started
manually (or with selinux temporarily disabled).

Test: disable enforcing selinux, then set and cancel alarms and make
sure they work.

Change-Id: I3bd73acdd998ee424696cce40965134c14220d8f
2017-09-12 14:56:54 -07:00
Dianne Hackborn
477c364819 Merge "Fix issue #65055576: VoiceInteractionManagerService sets..." into oc-mr1-dev am: 9d484f015f
am: 7bba649352

Change-Id: I8c97bc1d29dcff6c2a4cafe0ff649d725b1f2266
2017-08-31 18:31:24 +00:00
Dianne Hackborn
31cb01d5dd Fix issue #65055576: VoiceInteractionManagerService sets...
...VOICE_RECOGNITION_SERVICE that is needed for SearchSpeechServices

System setup was incorrectly completely runing off
VoiceInteractionManagerService if the associated feature is not set,
but the service needs to always be running, and instead rely on
the existing logic of reducing functionality if it should not be
running full voice interaction services.

Test: manually booted and ran
Bug: 65055576

Change-Id: I9a83216d45689440c71d657ba2721faf0662b0ff
2017-08-31 10:21:22 -07:00
Roger 1 Jönsson
db4eeb5e0f Merge "Create new trace object when logging from new thread" into oc-mr1-dev am: 071edf5b09
am: 1decec5937

Change-Id: Ie2cb8e2553937eb78f2644ff7f49defe73d147e5
2017-08-25 23:22:29 +00:00
Roger 1 Jönsson
341b2c172f Create new trace object when logging from new thread
Create new BootTimingsTraceLog object for logging when starting HIDL
services from different thread, in order to avoid exception.

Bug: 64111691
Test: Manual - device boots, metrics are logged to system/event log
Change-Id: I05834b7fe8078fbf772f9b29f0dd3aa4288f8f23
2017-08-25 13:22:53 -07:00
Fyodor Kupolov
0aef1c98c9 Merge "Log timings for shutdown stages" into oc-mr1-dev am: fe97799d5d
am: 34cac26ea4

Change-Id: Ifedc47b10e7542a0f28bbee1ac00490513cc0e5f
2017-08-14 21:25:01 +00:00
Fyodor Kupolov
6e3461b67c Log timings for shutdown stages
Renamed BootTimingsTraceLog to TimingsTraceLog. It is now used for
 boot and shutdown logging.

Added measurements for main stages of shutdown in the system server:
ShutdownTiming: SendShutdownBroadcast took to complete: 734ms
ShutdownTiming: ShutdownActivityManager took to complete: 203ms
ShutdownTiming: ShutdownPackageManager took to complete: 17ms
ShutdownTiming: ShutdownBt took to complete: 533ms
ShutdownTiming: ShutdownRadio took to complete: 534ms
ShutdownTiming: ShutdownNfc took to complete: 1536ms
ShutdownTiming: ShutdownRadios took to complete: 1538ms
ShutdownTiming: ShutdownStorageManager took to complete: 906ms
ShutdownTiming: SystemServerShutdown took to complete: 3918ms

Bug: 64569080
Test: shutdown/reboot and check logs
Change-Id: I636c045852cd1ed6be1c58af6608f70e95756389
2017-08-14 11:23:29 -07:00
Yi Jin
f32af48069 Fix parsing enum types in incident report tool as well as adding
some additional loggings

Test: manually flashed to device and test calling IncidentManager.java
functions
Change-Id: I69610414edde865b20ba632837f037fbe43f99db
2017-08-11 17:28:12 -07:00
Przemyslaw Szczepaniak
f96c4d6d76 Merge "Revert "Revert "Default 'persist.sys.timezone' property to GMT if not set on init.""" am: 82d2bd4e40 am: f9caecd124 am: be71148d49
am: eefdc2c6f8

Change-Id: I8aa40435f0ad3477fef8f3c4650cdd30642acc91
2017-08-03 11:04:32 +00:00
Przemyslaw Szczepaniak
eefdc2c6f8 Merge "Revert "Revert "Default 'persist.sys.timezone' property to GMT if not set on init.""" am: 82d2bd4e40 am: f9caecd124
am: be71148d49

Change-Id: Ibd4c390c610b20f2809b06045fa38e6231175599
2017-08-03 10:52:34 +00:00
Przemyslaw Szczepaniak
f9caecd124 Merge "Revert "Revert "Default 'persist.sys.timezone' property to GMT if not set on init."""
am: 82d2bd4e40

Change-Id: I8d1fe014fdc3cfd190c5ce95ec963fa8c038552c
2017-08-03 10:30:05 +00:00
Alison Cichowlas
a41c839d55 Merge "Move ShutdownThread calls to system ui thread." into oc-dr1-dev am: 39a556f1d8
am: b7ac4ca5a8

Change-Id: I320e50928e251d62fcbe852e13c8d87792aad81c
2017-08-01 18:33:41 +00:00
Alison Cichowlas
9e7e827d05 Merge "Move ShutdownThread calls to system ui thread." into oc-dr1-dev
am: 39a556f1d8

Change-Id: Idd341f7969c40184327428fc27b9f597dab57905
2017-08-01 18:18:49 +00:00
Alison Cichowlas
b7ac4ca5a8 Merge "Move ShutdownThread calls to system ui thread." into oc-dr1-dev
am: 39a556f1d8

Change-Id: I51580faadf97d828d5b2c4d7adba99cd7d36d4f2
2017-08-01 18:18:45 +00:00
Przemyslaw Szczepaniak
fbe00fa62b Revert "Revert "Default 'persist.sys.timezone' property to GMT if not set on init.""
This reverts commit 27c461ab3c.

I'm taking alternative approach, telephony code will treat "GMT" value as it would be unset. This is fine because GMT is a synthetic value that would never be set from other sources. 

Change-Id: I889a844bfd75b7730a5d967065d27de03ef3ce2f
Test: flashed device, tested manually 
Bug: 64056758
2017-08-01 11:48:03 +00:00
Neil Fuller
315def899f Merge "Fix tracing call for RulesManagerService startup" into oc-mr1-dev
am: ce24dd382d

Change-Id: Ifadd27aa8f05efc2244aef76fa18e6ee245b72e2
2017-08-01 09:19:12 +00:00
Alison Cichowlas
f0afd8c14e Move ShutdownThread calls to system ui thread.
Test: Manual
Fixes: 63680790

Change-Id: I6e431efb7594ba86311aac857dbf3970d48044ac
2017-07-31 16:13:54 -04:00
Neil Fuller
ab608e5dbc Fix tracing call for RulesManagerService startup
The tracing call was correct for aosp/master, but the tracing
code had been changed internally. The incorrect call meant it
wasn't actually tracking the points we're interested in and
it was reporting incorrectly (by ~1000 millis).

Bug: 64141572
Test: boot device / adb logcat
Change-Id: If11354d1d73cf90973ed4f43e885ae28ca1346ea
(cherry picked from commit a87cd5daa0)
2017-07-31 15:20:16 +01:00
Neil Fuller
1afb2417d7 Merge "Alter condition for starting RulesManagerService" am: a338679173 am: 3e928af733 am: 4c1ade06b3
am: a63d879f4c

Change-Id: I84949a5f869d25fd61a5a79b4f0a772582829da5
2017-07-27 13:55:17 +00:00
Neil Fuller
a63d879f4c Merge "Alter condition for starting RulesManagerService" am: a338679173 am: 3e928af733
am: 4c1ade06b3

Change-Id: I5e42752fcf6e1bee87db8c78daaa5d6364a15ee5
2017-07-27 13:49:21 +00:00
Neil Fuller
3e928af733 Merge "Alter condition for starting RulesManagerService"
am: a338679173

Change-Id: I442dd6a30f022f92fb3fd8a0a5cca58d4ec77208
2017-07-27 13:35:23 +00:00
Przemyslaw Szczepaniak
29b8db4340 Merge "Revert "Default 'persist.sys.timezone' property to GMT if not set on init."" am: 9b9e823096 am: 7dc29d076f am: 18eb3b4ff1
am: 2b923c07a7

Change-Id: I7c1abcb43f062a4055b2f65a19b32d18fe5211cb
2017-07-27 13:29:44 +00:00
Treehugger Robot
a338679173 Merge "Alter condition for starting RulesManagerService" 2017-07-27 13:25:49 +00:00
Przemyslaw Szczepaniak
2b923c07a7 Merge "Revert "Default 'persist.sys.timezone' property to GMT if not set on init."" am: 9b9e823096 am: 7dc29d076f
am: 18eb3b4ff1

Change-Id: Id90d02a05413812df90a3691f1f4b8a99e74669b
2017-07-27 13:24:07 +00:00
Przemyslaw Szczepaniak
7dc29d076f Merge "Revert "Default 'persist.sys.timezone' property to GMT if not set on init.""
am: 9b9e823096

Change-Id: I54b658a7911d604af79916f92c8406472e3c9ccb
2017-07-27 13:11:44 +00:00
Neil Fuller
3e9ee482f4 Alter condition for starting RulesManagerService
Modify the condition used for starting RulesManagerService:
use mOnlyCore rather than disableNonCoreServices. mOnlyCore is
important for the secure lock screen and when mOnlyCore is true
the RulesManagerService cannot perform trust checks. Therefore,
disable the RulesManagerService when mOnlyCore == true.

disableNonCoreServices is apparently not used.

Bug: 64057583
Test: Boot device with time zone updates enabled and with a lock
      pattern set.

Change-Id: Idd7cb6e11b1a91dfe7394f6c98f8fa3e0eec9dce
(cherry picked from commit 4fbaee8f49)
2017-07-27 12:07:43 +00:00
Przemyslaw Szczepaniak
27c461ab3c Revert "Default 'persist.sys.timezone' property to GMT if not set on init."
Telephony code depends on persist.sys.timezone not being set as a signal 
to deduce a timezone from sim card information.

This reverts commit 20e020536e.

Bug: 64056758
Change-Id: I8db204bcffbdb960124b1ae0e02d53b27dd310a4
2017-07-27 10:37:55 +00:00
Neil Fuller
e0af2bb2bf Alter condition for starting RulesManagerService
Modify the condition used for starting RulesManagerService:
use mOnlyCore rather than disableNonCoreServices. mOnlyCore is
important for the secure lock screen and when mOnlyCore is true
the RulesManagerService cannot perform trust checks. Therefore,
disable the RulesManagerService when mOnlyCore == true.

disableNonCoreServices is apparently not used.

Bug: 64057583
Test: Boot device with time zone updates enabled and with a lock
pattern set.
Merged-In: Idd7cb6e11b1a91dfe7394f6c98f8fa3e0eec9dce
Change-Id: Idd7cb6e11b1a91dfe7394f6c98f8fa3e0eec9dce
2017-07-26 12:15:48 +01:00
Christine Franks
379c317ab8 Merge "DO NOT MERGE - Remove RetailDemoModeService" into oc-dr1-dev
am: 484115b77d

Change-Id: Id9f50aeab430db43e9f18bcdfd80b6dcac2c43a7
2017-07-21 19:00:31 +00:00