Implement appcore_base_get_rotation_state API 27/122427/2
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 31 Mar 2017 09:09:11 +0000 (18:09 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 31 Mar 2017 09:13:30 +0000 (18:13 +0900)
Change-Id: I11bc8d51b91572e44087f70101c3ae66d56c8278
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/base/appcore_base.c

index 6f4a890..fb598e3 100644 (file)
@@ -1148,6 +1148,13 @@ EXPORT_API int appcore_base_raise_event(void *event, enum appcore_base_event typ
 
 EXPORT_API int appcore_base_get_rotation_state(enum appcore_base_rm *curr)
 {
+       if (curr == NULL)
+               return -1;
+
+       if (!__rotation.ref)
+               return -1;
+
+       *curr = __rotation.rm;
        return 0;
 }