| From c31d457bbc90e1c0dc0a5e21f0591af959b4a92b Mon Sep 17 00:00:00 2001 |
| From: Pierre-Hugues Husson <phh@phh.me> |
| Date: Tue, 21 Aug 2018 22:24:02 +0200 |
| Subject: [PATCH 22/26] Don't wake IR HAL to the infinity and beyond |
| |
| --- |
| services/core/java/com/android/server/ConsumerIrService.java | 5 ----- |
| services/core/jni/com_android_server_ConsumerIrService.cpp | 2 +- |
| 2 files changed, 1 insertion(+), 6 deletions(-) |
| |
| diff --git a/services/core/java/com/android/server/ConsumerIrService.java b/services/core/java/com/android/server/ConsumerIrService.java |
| index c574a03c9a3..82ec033bc30 100644 |
| --- a/services/core/java/com/android/server/ConsumerIrService.java |
| +++ b/services/core/java/com/android/server/ConsumerIrService.java |
| @@ -46,11 +46,6 @@ public class ConsumerIrService extends IConsumerIrService.Stub { |
| mWakeLock.setReferenceCounted(true); |
| |
| mHasNativeHal = halOpen(); |
| - if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CONSUMER_IR)) { |
| - if (!mHasNativeHal) { |
| - throw new RuntimeException("FEATURE_CONSUMER_IR present, but no IR HAL loaded!"); |
| - } |
| - } |
| } |
| |
| @Override |
| diff --git a/services/core/jni/com_android_server_ConsumerIrService.cpp b/services/core/jni/com_android_server_ConsumerIrService.cpp |
| index 2ca348b3ae4..148fba9a688 100644 |
| --- a/services/core/jni/com_android_server_ConsumerIrService.cpp |
| +++ b/services/core/jni/com_android_server_ConsumerIrService.cpp |
| @@ -36,7 +36,7 @@ static sp<IConsumerIr> mHal; |
| |
| static jboolean halOpen(JNIEnv* /* env */, jobject /* obj */) { |
| // TODO(b/31632518) |
| - mHal = IConsumerIr::getService(); |
| + mHal = IConsumerIr::tryGetService(); |
| return mHal != nullptr; |
| } |
| |
| -- |
| 2.17.1 |
| |