- int r;
- enum appcore_rm m;
-
- _retv_if(rot.callback == NULL, 0);
- _DBG("[APP %d] appcore_resume_rotation_cb is called", getpid());
+ if (rot.wm_rotate)
+ return rot.wm_rotate->resume_rotation_cb();
+ else {
+ bool r;
+ enum appcore_rm m;
+
+ _retv_if(rot.callback == NULL, 0);
+ _DBG("[APP %d] appcore_resume_rotation_cb is called", getpid());
+
+ if (rot.cb_set == 0) {
+ r = sensord_register_event(rot.handle,
+ AUTO_ROTATION_CHANGE_STATE_EVENT,
+ SENSOR_INTERVAL_NORMAL, 0, __changed_cb, rot.cbdata);
+ if (!r) {
+ _ERR("sensord_register_event failed");
+ return -1;
+ }
+ rot.cb_set = 1;
+ }