summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2013-10-04 21:13:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-04 21:13:35 +0000
commit0ab7c883d51288f62ba605d5a797abd71ad68626 (patch)
treebec0c3e927ed12fb9fd908cc2040659015739696 /services
parent795b6e42c8d6953a44a3ea57c880aa5a2b890426 (diff)
parent0c9d61f0989e5a85674fbbc24cf06dd3de1fc326 (diff)
downloadframeworks_base-0ab7c883d51288f62ba605d5a797abd71ad68626.zip
frameworks_base-0ab7c883d51288f62ba605d5a797abd71ad68626.tar.gz
frameworks_base-0ab7c883d51288f62ba605d5a797abd71ad68626.tar.bz2
Merge "Add Consumer IR feature" into klp-dev
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!");
}
}