472 Commits

Author SHA1 Message Date
Steven Moreland
3d8166f885 Start service from libscheduleservicehidl.
Test: internal camera successfully sets priority.
Bug: 29251823
Change-Id: I3c3caeb3e2e169dee483da25cc8217e1aad14adf
2017-04-07 17:34:24 -07:00
Scott Randolph
93945f2c69 Use explicit .c_str() for hidl_string
hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class.  It now emulated
std::string in requiring a call to .c_str() to get the same behavior.

Bug:  36532780
Test:  Build the tree
Change-Id: I86f4b7ef9e20674299519bd421d833b5d858ac6a
2017-04-04 10:08:53 -07:00
Wyatt Riley
87206c4ed8 Merge "IGnssDebug.hal change field outputs for dump()" into oc-dev 2017-03-31 15:28:21 +00:00
Wyatt Riley
268c6e0485 IGnssDebug.hal change field outputs for dump()
Aligning the dump() string build to match the new
API fields in IGnssDebug.hal

Bug: 30955615
Test: Builds and non-implementation message reported on Pixel '16

Change-Id: I9e60c87e9c5a5ee2bc20e3f54eb878bd472515c1
2017-03-30 18:42:57 -07:00
Connor O'Brien
0ecd08bdd0 Recover cleanly from power HAL service crashes
Currently if the binderized power HAL service crashes, services that
call the HAL will crash as well. To fix this:
- Before calling power HAL functions, check that the handle to the
  power HAL service is still valid, and reload using getService() if
  necessary.
- When a call to a power HAL function fails, log the failure and mark
  the handle as invalid.

Bug: 35728909
Test: adb shell kill -9 $(adb shell pidof android.hardware.power@1.0-service)
Change-Id: Id2dd1a6507b9f5044d928483cdb6b736c701f8ba
Signed-off-by: Connor O'Brien <connoro@google.com>
(cherry picked from commit 578eb7fee3a28ff9ca309e741b5a647637896ba1)
2017-03-31 00:24:00 +00:00
Shubang
39f285d5a7 Sync the constants in HAL and framework
Test: Build and flash device

Bug: 36233336
Change-Id: Ie81862825b601bdafd7653564d7393686d54f531
2017-03-27 15:15:46 -07:00
Daichi Hirono
e56740dc08 Use a single thread to handle multiple AppFuse mounts.
Previously StorageManagerService launched a thread per AppFuse mount
point. The CL changes the behavior so that it just launches a single
thread to handle multiple AppFuse mounts.

Bug: 34903085
Test: CTS and manually testing
Change-Id: I2d9e7232834b0c8eff633b85110a3b38534171f7
2017-03-24 09:36:48 +09:00
TreeHugger Robot
2bcca1d624 Merge "BZZZZZZT! BZZZZZT! New Vibrator APIs" 2017-03-21 13:40:36 +00:00
Michael Wright
7121697a5e BZZZZZZT! BZZZZZT! New Vibrator APIs
Replace the existing Vibrator APIs with a new class to encapsulate the
haptic effect information, and add the ability to control the vibration
strength.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
      runtest systemui-notification
      Manual testing with $T/google_experimental/users/michaelwr/Vibrator

Bug: 30961353

Change-Id: Idbb9864a7b084c85e7b7de3257a0e6b40d9d91d6
2017-03-20 16:09:51 +00:00
Steven Moreland
8b44df35f1 Remove unused using statement.
Test: pass
Bug: 36099713
Change-Id: I07b90f9592fdd6b9c58ee52dc4f49f5e8b9f3459
2017-03-20 07:56:34 -07:00
Yifan Hong
26b421f8e0 Start android.frameworks.sensorservice@1.0 in system_server
Bug: 35219747
Test: marlin boots
Test: lshal -ipm | grep android.frameworks.sensorservice@1.0

Change-Id: I67dfb217d1b568e140cefce0bdba3f8f4dbe679c
2017-03-16 12:15:05 -07:00
Shubang Lu
3ff3dde601 Merge "TIF: add cable detection for TV inputs" 2017-03-15 17:29:11 +00:00
Shubang
71d5c76f19 TIF: add cable detection for TV inputs
Test: plug-in and unplug cable to TV and/or run VTS, or add fake
pass-through inputs (OTT devices).

Bug: 28715954
Change-Id: I4229a1a16a61218714e2cd620d1284f7ef8e5d7a
2017-03-13 10:28:09 -07:00
TreeHugger Robot
25e72b35e8 Merge "Fix bug in error checking in GnssLocationProvider" 2017-03-09 00:30:00 +00:00
Hridya Valsaraju
388e968a08 Fix bug in error checking in GnssLocationProvider
Needed to check if gnssNiIface was a nullptr
before calling setCallback on it.

Bug: 36052760
Test: make
Change-Id: I4d725bd30310353fb7d248f9bf247ac55f94c765
2017-03-08 10:57:06 -08:00
Ashutosh Joshi
41cbfd830a Merge "Pass on the Apps Query Response to clients." 2017-03-04 00:37:36 +00:00
Steven Moreland
b2df16ae1a Merge "LightService: recover if light hal fails." 2017-03-02 02:21:25 +00:00
Ashutosh Joshi
5c78ae3d1d Pass on the Apps Query Response to clients.
Keep the message interface for backwards compatibility.

Bug: 35170375
Test: Verify that clients receive the query apps response.
Change-Id: I689ce0086e2122068471b7df79107d38e53e8dcf
2017-03-01 15:15:23 -08:00
Steven Moreland
8dd89024ec LightService: recover if light hal fails.
- Also cleaned up implementation.

Fixes: 35728264
Test: killing android.hardware.light@2.0-service, lights still work
Change-Id: I608b85491f3b10864b8591e15537777068ded079
2017-03-01 22:09:25 +00:00
Hridya Valsaraju
f6423ba1ef Check hwbinder status before checking the returned result
Test: Able to get a location lock on Google Maps on Pixel.

Change-Id: I1e3689ba139bec7d21c12be91bd46fe008ff8278
2017-02-28 09:42:33 -08:00
Yifan Hong
04dbcae4c4 Merge "Vr HAL uses "default" service name" 2017-02-27 18:46:26 +00:00
TreeHugger Robot
a608207fc3 Merge "gnss HAL uses "default" service name" 2017-02-24 22:21:53 +00:00
Yifan Hong
4e66d1e40c Merge "context_hub HAL uses "default" service name" 2017-02-23 02:34:36 +00:00
TreeHugger Robot
2f837e7b2d Merge "tv_cec HAL uses "default" service name" 2017-02-22 03:49:19 +00:00
Chris Phoenix
9fcfcdc1f3 Vr HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934

Change-Id: I32806ac4ab6cf1b7c67eb61cfbc7e203c5b5b5a3
2017-02-22 01:28:30 +00:00
John Reck
df1742ed47 Overhaul GraphicsStatsService
* LRU cache of recently-used is dead, replaced
  disk storage
* ASHMEM size is read from native by the system service,
  no longer requires keeping a sizeof() in sync with a
  constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days

Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes

Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa
2017-02-21 09:49:10 -08:00
Wyatt Riley
cd52950a9e Merge "Common code for 4 jni Location conversions" 2017-02-17 14:40:29 +00:00
Chris Phoenix
7e6627eade tv_cec HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: I64e028573f3cf5959cbe251bf351ce4d238d50c5
2017-02-16 22:51:54 +00:00
Rubin Xu
3bf722a8d5 Add synthetic password to authentication flow
The user password is used to unlock a per-user synthetic password which
serves the purpose of what the user password previsouly achieves (protect
keystore, vold disk encryption, auth token generation).

Test: runtest frameworks-services -c com.android.server.SyntheticPasswordTests
Test: manual
    1. Start with fresh device, enable synthetic password with "adb shell cmd lock_settings sp 1"
        1.1 add device lock, reboot and verify (positive & negative); change device lock, reboot and verify.
        1.2 Inflate a work profile, reboot and verify device lock. check SID with "adb shell dumpsys lock_settings"
        1.3 Un-unify and add work challenge, reboot and verify work challenge and SID.
        1.4 Re-unify work challenge, reboot and verify.
        1.5 Clear device lock, reboot and verify lock and SID.

    2. Start with a fresh device, add a device lock and inflate a work profile.
        2.1 Enable synthetic password, note current SID
        2.2 Reboot and unlock device. Verify synthetic password is generated and SID remains.
        2.3 Clear device lock, reboot and verify (SID should be cleared)

    3. Start with a fresh device, inflate a work profile, add separate work challenge
        3.1 Enable synthetic password, not current SID
        3.2 Reboot and unlock device and profile. Verify synthetic password is generated.
        3.3 Clear device lock only, reboot and verify (work profile SID should remain)

    All steps tested on marlin (FBE) and bullhead (FDE)

Bug: 33126414
Change-Id: Idb9ebfc7bba2fe40670c5fee2189e873d9704540
2017-02-15 19:48:33 +00:00
Wyatt Riley
5d22983acf Common code for 4 jni Location conversions
Cleans up a TODO after GNSS location batching work

Bug: 35273058
Change-Id: Ibb9220269940377a7065b5df3e5672c2a49a50cf
Fixes: 35273058
Test: GnssLogger.apk, Maps & 3rd party app work as expected
2017-02-10 17:06:00 -08:00
Chris Phoenix
de69003f07 context_hub HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: Ic35ae203244b77d26833f058b76fb4d46ade716d
2017-02-08 16:03:45 -08:00
Wyatt Riley
e5d975cdff Merge "GNSS Batching - Default Implementation" 2017-02-08 02:08:06 +00:00
Wyatt Riley
cf879db366 GNSS Batching - Default Implementation
Connections from .hal layer, through to
Location Manager System APIs

Bug: 31974439
Test: builds, boots, ordinary GNSS & new GNSS batching
      basic functional checks on Marlin
Change-Id: If75118c27b5ed34cfc16c9f817b60a3be5485095
2017-02-07 14:55:21 -08:00
Ashutosh Joshi
d9b6cf1fe9 Merge "Make requested service for context hub service compliant." 2017-02-07 20:21:16 +00:00
TreeHugger Robot
7058e33856 Merge "thermal HAL uses "default" service name" 2017-02-06 21:06:39 +00:00
Chris Phoenix
51c3b50c56 thermal HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934

Change-Id: Id35c5eac388dada951b2f3708554a84337a500c9
2017-02-06 17:32:00 +00:00
Keun-young Park
9b73a5473a wait for sensor service before starting WMS
- Starting sensor service in separate thread led into occasional 1 sec
  blocking of WMS inside PhoneWindowManager to get sensor service.
- Change startSensorService into blocking call and call it from
  separate thread using SystemServerInitThreadPool.
- This does not improve best case boot-up time but fixes occasional 1 sec delay
  which is happening in 10 to 20% rate. So this is potential 100 to 200ms saving for many runs.

bug: 34846045
Test: multiple reboots.
Change-Id: Ia08fa3284aed5e576acaac6fbfd74b9db9f7d63c
2017-02-03 15:36:01 -08:00
Ashutosh Joshi
4c43591588 Make requested service for context hub service compliant.
Ensure that the requested service name for context hub service is
the same as the default service name.

Test: GTS "Hello World" test passes.
Change-Id: I772c7ae6858416e6aabaceeefff23a5255a4b513
2017-01-26 17:21:04 -08:00
Vladislav Kaznacheev
3787de16d2 Implement pointer capture API
When in pointer capture mode, mouse pointer disappears and
further mouse events are dispatched to the focused view
in the window which has requested capture.

The captured events have the source SOURCE_MOUSE_RELATIVE
belonging to SOURCE_CLASS_TRACKBALL. They are
dispatched through dispatchCapturedPointerEvent /
onCapturedPointerEvent. There is also a new listener.

Pointer capture mode may only be granted to a currently
focused window, and will be canceled upon a window focus change.

Test: cts-tradefed ... --test android.view.cts.PointerCaptureTest
Bug: 30897034
Change-Id: I6e5934aa415ac2b6dda1cee173d0f23e5021af84
2017-01-25 13:13:45 -08:00
TreeHugger Robot
3ca3107a82 Merge "power HAL uses "default" service name" 2017-01-25 05:41:59 +00:00
Chris Phoenix
e9d42decca light HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: Id22d27d7e401de426b1a236067c1b4c7f6c99a3e
2017-01-23 23:56:38 +00:00
Chris Phoenix
f9133783ae gnss HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: Ie6d52854ef3cf0695e3c57292683183bab008f2d
2017-01-23 23:24:53 +00:00
Chris Phoenix
717d36e051 power HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds; verify HAL still works

Bug: 33844934
Change-Id: I2f296bc40e36082d8889d2796cf839cb41a21fc3
2017-01-23 13:18:39 -08:00
Chris Phoenix
bc21539a76 Merge "vibrator HAL uses "default" service name" 2017-01-21 02:51:35 +00:00
Chris Phoenix
c310a90495 vibrator HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds; verify HAL still works

Bug: 33844934

Change-Id: I7ad730bc5b52b9bd3c63410f6f926cbc08d0b73c
2017-01-21 02:34:16 +00:00
Chris Phoenix
8df9f81c49 Merge "TvInput HAL uses "default" service name" 2017-01-20 23:17:19 +00:00
Polina Bondarenko
8d5bb11126 Added NAN temperature value handling to HardwarePropertiesManager.
Consider NAN temperature value as undefined temperature.

Bug: 34107726
Test: cts

Change-Id: I933fe3a1c1eb88960cee2eb32cbc56a88d9da9e4
2017-01-19 17:48:29 +01:00
TreeHugger Robot
a85963aba9 Merge "Unhide public methods for API Council review. Test: Existing unit tests still pass. Change-Id: I49b81f99e4e8d8300fbc6b3d74f336d4f291d171" 2017-01-19 13:50:26 +00:00
gomo
127ba323d9 Unhide public methods for API Council review.
Test: Existing unit tests still pass.
Change-Id: I49b81f99e4e8d8300fbc6b3d74f336d4f291d171
2017-01-18 19:48:28 -08:00
Chris Phoenix
3526a10c43 TvInput HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds; verify HAL still works

In support of b/33844934

Change-Id: Iaf379982c1e8e03b46a1fddf5f047c70cd3e6938
2017-01-18 18:48:06 -08:00