return path;
}
+static void _gl_save_state_in_ini_file(char *data)
+{
+ char *path_gallery = app_get_shared_data_path();
+ if (!path_gallery) {
+ gl_dbg("shared data path is null");
+ return;
+ }
+ gl_dbg("shared data path is : %s", path_gallery);
+ char launch_state[1024] = {0};
+ snprintf(launch_state, 1024, "%s%s", path_gallery, "state.ini");
+ free(path_gallery);
+
+ FILE *fp = fopen(launch_state, "w");
+
+ if (fp == NULL) {
+ gl_dbg("Failed to open ini file. : %s", launch_state);
+ return ;
+ }
+ fprintf(fp, "state=%s", data);
+ if (fp) {
+ fclose(fp);
+ }
+
+}
+
void _gl_set_launch_state_preference(void *data)
{
int ret;
if (gl_get_view_mode(data) == GL_VIEW_TIMELINE) {
+ _gl_save_state_in_ini_file("Time");
ret = preference_set_boolean(GL_LAUNCH_STATE, true);
} else {
+ _gl_save_state_in_ini_file("Album");
ret = preference_set_boolean(GL_LAUNCH_STATE, false);
}
if (ret != PREFERENCE_ERROR_NONE) {
<icon>org.tizen.gallery.png</icon>
</ui-application>
<privileges>
- <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
- <privilege>http://tizen.org/privilege/externalstorage</privilege>
- <privilege>http://tizen.org/privilege/content.write</privilege>
- <privilege>http://tizen.org/privilege/mediastorage</privilege>
- </privileges>
+ <privilege>http://tizen.org/privilege/mediastorage</privilege>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ <privilege>http://tizen.org/privilege/externalstorage</privilege>
+ <privilege>http://tizen.org/privilege/content.write</privilege>
+ <privilege>http://tizen.org/privilege/appdir.shareddata</privilege>
+ </privileges>
</manifest>