-/* ownCloud Android client application
- * Copyright (C) 2012-2014 ownCloud Inc.
+/**
+ * ownCloud Android client application
+ *
+ * @author David A. Velasco
+ * Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
import com.actionbarsherlock.app.SherlockDialogFragment;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.files.FileOperationsHelper;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.ui.activity.ComponentsGetter;
import com.owncloud.android.ui.activity.CopyToClipboardActivity;
import com.owncloud.android.ui.activity.FileActivity;
-import com.owncloud.android.utils.Log_OC;
/**
* Dialog showing a list activities able to resolve a given Intent,
* filtering out the activities matching give package names.
- *
- * @author David A. Velasco
*/
public class ShareLinkToDialog extends SherlockDialogFragment {
// Add the information of the chosen activity to the intent to send
ResolveInfo chosen = mAdapter.getItem(which);
ActivityInfo actInfo = chosen.activityInfo;
- ComponentName name=new ComponentName(actInfo.applicationInfo.packageName, actInfo.name);
+ ComponentName name=new ComponentName(
+ actInfo.applicationInfo.packageName,
+ actInfo.name);
mIntent.setComponent(name);
if (sendAction) {
} else {
// Create a new share resource
- FileOperationsHelper foh =
- new FileOperationsHelper((FileActivity)getSherlockActivity());
- foh.shareFileWithLinkToApp(mFile, mIntent);
+ ((ComponentsGetter)getSherlockActivity()).getFileOperationsHelper()
+ .shareFileWithLinkToApp(mFile, "", mIntent);
}
}
})