skin: removed unused rotation code & fixed error case
authorJinhyung Choi <jinhyung2.choi@samsung.com>
Mon, 30 Jun 2014 06:25:14 +0000 (15:25 +0900)
committerJinhyung Choi <jinhyung2.choi@samsung.com>
Mon, 30 Jun 2014 06:25:14 +0000 (15:25 +0900)
Change-Id: I9a7917d6b10512edbd66550895a0dbfff15e18f4
Signed-off-by: Jinhyung Choi <jinhyung2.choi@samsung.com>
tizen/src/skin/maruskin_operation.c

index 50d985140030fc42ff0a95c5283587d9176ee16f..ace9f84d798f7983e583ec8c9acbbaad7836484d 100644 (file)
@@ -318,34 +318,36 @@ void do_rotation_event(int rotation_type)
 {
     INFO("do_rotation_event rotation_type : %d\n", rotation_type);
 #if 1
-       char *rotation;
+    char *rotation = NULL;
 
-       static char rot_0 [] = {'2','3','6','2',',','-','1','4','0',',','-','8','4','7','0',',','9','9','9','9','6','1',',','4', 0};
-       static char rot_90 [] = {'-','9','9','4',',','-','4','2','0','8',',','-','7','0','3','2','1','1',',','9','1','8','2','7','9',',','4', 0};
-       static char rot_180 [] = {'1','6','2','2',',','5','6','5','8',',','9','9','9','9','4','5',',','8','6','2','6',',','4', 0};
-       static char rot_270 [] = {'1','4','1','6','8',',','1','6','0','4','6',',','7','0','9','8','6','0',',','7','0','4','0','1','6',',','4', 0};
+    static char rot_0 [] = {'2','3','6','2',',','-','1','4','0',',','-','8','4','7','0',',','9','9','9','9','6','1',',','4', 0};
+    static char rot_90 [] = {'-','9','9','4',',','-','4','2','0','8',',','-','7','0','3','2','1','1',',','9','1','8','2','7','9',',','4', 0};
+    static char rot_180 [] = {'1','6','2','2',',','5','6','5','8',',','9','9','9','9','4','5',',','8','6','2','6',',','4', 0};
+    static char rot_270 [] = {'1','4','1','6','8',',','1','6','0','4','6',',','7','0','9','8','6','0',',','7','0','4','0','1','6',',','4', 0};
 
     switch (rotation_type) {
         case ROTATION_PORTRAIT:
-                       rotation = rot_0;
+            rotation = rot_0;
             break;
         case ROTATION_LANDSCAPE:
-                       rotation = rot_90;
+            rotation = rot_90;
             break;
         case ROTATION_REVERSE_PORTRAIT:
-                       rotation = rot_180;
+            rotation = rot_180;
             break;
         case ROTATION_REVERSE_LANDSCAPE:
-                       rotation = rot_270;
+            rotation = rot_270;
             break;
         default:
-            return;
+            ERR("Unknown rotation type: %d \n", rotation_type);
+            break;
     }
 
-       set_sensor_rotation_vector(rotation, strlen(rotation));
+    if (rotation != NULL) {
+        set_sensor_rotation_vector(rotation, strlen(rotation));
+    }
 #endif
 
-#if 1
     int x = 0, y = 0, z = 0;
 
     switch (rotation_type) {
@@ -374,29 +376,6 @@ void do_rotation_event(int rotation_type)
     }
 
     req_set_sensor_accel(x, y, z);
-#else
-    char send_buf[32] = { 0 };
-
-    switch ( rotation_type ) {
-        case ROTATION_PORTRAIT:
-            sprintf( send_buf, "1\n3\n0\n9.80665\n0\n" );
-            break;
-        case ROTATION_LANDSCAPE:
-            sprintf( send_buf, "1\n3\n9.80665\n0\n0\n" );
-            break;
-        case ROTATION_REVERSE_PORTRAIT:
-            sprintf( send_buf, "1\n3\n0\n-9.80665\n0\n" );
-            break;
-        case ROTATION_REVERSE_LANDSCAPE:
-            sprintf(send_buf, "1\n3\n-9.80665\n0\n0\n");
-            break;
-
-        default:
-            break;
-    }
-
-    send_to_emuld( "sensor\n\n\n\n", 10, send_buf, 32 );
-#endif
 }
 
 void save_screenshot(DisplaySurface *surface)