*/
#include "ode-app.h"
+#include "ode-password.h"
#include <ode/external-encryption.h>
#include <ode/internal-encryption.h>
extern char *encrypt_header_text[];
static int sdcard_option_selected = 0;
static int device_full_encryption_state = 0;
+popup_data_s popup_data; /* for temporary */
#define sdcard_option_num 2
+
static void _confirm_next_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
{
int ret = 0;
switch (ad->view_type) {
case ENCRYPT_DEVICE:
dlog_print(DLOG_DEBUG, LOG_TAG, "encrypt device confirm");
- ret = ode_internal_encryption_encrypt("tizen", 0);
- if (ret != 0) {
- dlog_print(DLOG_DEBUG, LOG_TAG, "internal encryption failed");
- }
- ui_app_exit();
+ if (device_full_encryption_state == 0)
+ ad->device_info.device_option = 0;
+ else
+ ad->device_info.device_option = 1;
+ popup_data.parent = ad->base;
+ popup_data.popup = NULL;
+ popup_data.mode = INTERNAL_ENCRYPT_PASSWORD;
+ popup_data.callback_data = ad;
+ create_confirm_password_popup(&popup_data);
break;
case DECRYPT_DEVICE:
dlog_print(DLOG_DEBUG, LOG_TAG, "decrypt device confirm");
- ret = ode_internal_encryption_decrypt("tizen");
- if (ret != 0) {
- dlog_print(DLOG_DEBUG, LOG_TAG, "internal decryption failed");
- }
- ui_app_exit();
+ popup_data.parent = ad->base;
+ popup_data.popup = NULL;
+ popup_data.mode = INTERNAL_DECRYPT_PASSWORD;
+ create_confirm_password_popup(&popup_data);
break;
case ENCRYPT_SD_CARD:
dlog_print(DLOG_DEBUG, LOG_TAG, "encrypt sd card confrim");
- create_base_window();
- create_progress_view("Encrypting", "External");
ret = ode_external_encryption_encrypt(ad->entry_data, 0);
if (ret != 0) {
dlog_print(DLOG_DEBUG, LOG_TAG, "external encryption failed");
}
+ create_base_window();
+ create_progress_view("Encrypting", "External");
break;
case DECRYPT_SD_CARD:
dlog_print(DLOG_DEBUG, LOG_TAG, "decrypt sd card confrim");
- create_base_window();
- create_progress_view("Decrypting", "External");
- ret = ode_external_encryption_decrypt(ad->entry_data);
- if (ret != 0) {
- dlog_print(DLOG_DEBUG, LOG_TAG, "external decryption failed");
- }
+ popup_data.parent = ad->base;
+ popup_data.popup = NULL;
+ popup_data.mode = EXTERNAL_DECRYPT_PASSWORD;
+ create_confirm_password_popup(&popup_data);
break;
}
}