summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Briden <tom@decompile.me.uk>2013-09-06 13:53:16 +0100
committerTom Briden <tom@decompile.me.uk>2013-09-06 13:53:16 +0100
commit4280375392fecada0296c28812030c426ceb4ab5 (patch)
tree76e44f4958c5634179d2fab81f776919fd576336
parenta18446321f55e05a845263baadc62fed48305b2e (diff)
downloadandroid_frameworks_native-4280375392fecada0296c28812030c426ceb4ab5.tar.gz
android_frameworks_native-4280375392fecada0296c28812030c426ceb4ab5.tar.bz2
android_frameworks_native-4280375392fecada0296c28812030c426ceb4ab5.zip
surfaceflinger: don't handle EVENT_ORIENTATION when !HWC_DEVICE_API_VERSION_1_0
a184463 causes segfault on boot for the enrc2b (and probably others), this fixes it. Change-Id: Ic4a7a05b44c8cc44a0d25c56def4acdf5b0939df
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 497255ef9..23d0af305 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -644,7 +644,8 @@ void HWComposer::eventControl(int disp, int event, int enabled) {
break;
case EVENT_ORIENTATION:
// Orientation event
- err = mHwc->eventControl(mHwc, disp, event, enabled);
+ if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_0))
+ err = mHwc->eventControl(mHwc, disp, event, enabled);
break;
default:
ALOGW("eventControl got unexpected event %d (disp=%d en=%d)",