summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2013-10-04 14:21:20 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-04 14:21:20 -0700
commit1ac74b74fffd2897046b895eff3e9c6636955a33 (patch)
treee59bd49dfee177a14178c519bbb395f35d6b9df9 /services
parentf16e56c83429e042d2b7376a4f01f3f2f139a0c3 (diff)
parent849ef427b804c3d308e2d74eebd64e19144ef976 (diff)
downloadframeworks_base-1ac74b74fffd2897046b895eff3e9c6636955a33.zip
frameworks_base-1ac74b74fffd2897046b895eff3e9c6636955a33.tar.gz
frameworks_base-1ac74b74fffd2897046b895eff3e9c6636955a33.tar.bz2
am 849ef427: am 2bbf0bfc: am 0ab7c883: Merge "Add Consumer IR feature" into klp-dev
* commit '849ef427b804c3d308e2d74eebd64e19144ef976': Add Consumer IR feature
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/ConsumerIrService.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/java/com/android/server/ConsumerIrService.java b/services/java/com/android/server/ConsumerIrService.java
index 07f2a41..783dff1 100644
--- a/services/java/com/android/server/ConsumerIrService.java
+++ b/services/java/com/android/server/ConsumerIrService.java
@@ -39,6 +39,7 @@ import android.provider.Settings.SettingNotFoundException;
import android.util.Slog;
import android.view.InputDevice;
+import java.lang.RuntimeException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.ListIterator;
@@ -65,8 +66,12 @@ public class ConsumerIrService extends IConsumerIrService.Stub {
mWakeLock.setReferenceCounted(true);
mHal = halOpen();
- if (mHal == 0) {
- Slog.w(TAG, "No IR HAL loaded");
+ if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CONSUMER_IR)) {
+ if (mHal == 0) {
+ throw new RuntimeException("FEATURE_CONSUMER_IR present, but no IR HAL loaded!");
+ }
+ } else if (mHal != 0) {
+ throw new RuntimeException("IR HAL present, but FEATURE_CONSUMER_IR is not set!");
}
}