param[2] = "_DEVICE_PATH_";
param[3] = buf;
- return request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SYSTEM, POPUP_IFACE_SYSTEM,
- "PopupLaunchDouble", "ssss", param);
+ return request_to_launch_by_dbus_for_pairs(BUS_NAME, POPUP_PATH_SYSTEM, POPUP_IFACE_SYSTEM,
+ "PopupLaunch", sizeof(param)/sizeof(param[0]), param);
}
static int send_cooldown_popup_signal(void)
static void remove_otg_popup(const struct popup_ops *ops, char *path)
{
int len;
- char *popup_path;
+ char *popup_path = NULL;
if (ops == &storage_mounted_ops)
popup_path = added_path;
static int storage_mounted_launch(bundle *b, const struct popup_ops *ops)
{
- int ret;
- struct object_ops *obj;
char *path;
if (!ops)
return -1;
- ret = get_object_by_ops(ops, &obj);
- if (ret < 0) {
- _E("Failed to get object (%d)", ret);
- return -2;
- }
-
- path = (char *)bundle_get_val(obj->b, USB_MOUNT_PATH);
+ path = (char *)bundle_get_val(b, USB_MOUNT_PATH);
if (!path) {
_E("Failed to get mount path");
- return -3;
+ return -2;
}
_I("USB storage mount path (%s)", path);
static int unmount_storage_launch(bundle *b, const struct popup_ops *ops)
{
- int ret;
- struct object_ops *obj;
char *path;
if (!ops)
return -1;
- ret = get_object_by_ops(ops, &obj);
- _D("ops = %s obj = %s", ops, obj);
- if (ret < 0) {
- _E("Failed to get object (%d)", ret);
- return -2;
- }
-
- path = (char *)bundle_get_val(obj->b, USB_MOUNT_PATH);
+ path = (char *)bundle_get_val(b, USB_MOUNT_PATH);
if (!path) {
_E("Failed to get mount path");
- return -3;
+ return -2;
}
remove_otg_popup(&storage_mounted_ops, path);