+ __rotation.initialized = true;
+}
+
+static void __charger_status_changed_cb(keynode_t *keynode, void *user_data)
+{
+ if (TIZEN_FEATURE_CHARGER_STATUS) {
+ __rotation.charger_status = vconf_keynode_get_int(keynode);
+ if (__rotation.charger_status) {
+ if (__rotation.ref)
+ __init_rotation();
+ } else {
+ if (__rotation.ref)
+ __fini_rotation();
+ }
+ _DBG("charger status(%d)", __rotation.charger_status);
+ }
+}
+
+static void __unregister_rotation_changed_event(void)
+{
+ if (!__rotation.ref)
+ return;
+
+ __rotation.ref--;
+ if (__rotation.ref > 1)
+ return;
+
+ __fini_rotation();
+ if (TIZEN_FEATURE_CHARGER_STATUS) {
+ vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
+ __charger_status_changed_cb);
+ }
+
+ __rotation.ref = 0;
+}
+
+static void __register_rotation_changed_event(void)
+{
+ if (__rotation.ref) {
+ __rotation.ref++;
+ return;
+ }
+
+ if (TIZEN_FEATURE_CHARGER_STATUS) {
+ vconf_get_int(VCONFKEY_SYSMAN_CHARGER_STATUS,
+ &__rotation.charger_status);
+ vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
+ __charger_status_changed_cb, NULL);
+ if (__rotation.charger_status)
+ __init_rotation();
+ } else {
+ __init_rotation();
+ }
+