mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Remove unused class FailedUploadActivity and related resources
This commit is contained in:
parent
df8e9fa2c3
commit
0bca42bcd8
3 changed files with 31 additions and 114 deletions
|
@ -1,19 +0,0 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/failed_upload_message_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/background_color"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView android:id="@+id/faild_upload_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="100dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/failed_uploadactivity_close_button"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Dismiss" />
|
||||
|
||||
</LinearLayout>
|
|
@ -28,36 +28,6 @@ import java.util.Vector;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AuthenticatorActivity;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.db.DbHandler;
|
||||
import com.owncloud.android.notifications.NotificationBuilderWithProgressBar;
|
||||
import com.owncloud.android.notifications.NotificationDelayer;
|
||||
import com.owncloud.android.operations.CreateFolderOperation;
|
||||
import com.owncloud.android.lib.resources.files.RemoteFile;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.operations.UploadFileOperation;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
|
||||
import com.owncloud.android.lib.resources.files.FileUtils;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
|
||||
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
|
||||
import com.owncloud.android.lib.common.OwnCloudAccount;
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
|
||||
import com.owncloud.android.ui.activity.FailedUploadActivity;
|
||||
import com.owncloud.android.ui.activity.FileActivity;
|
||||
import com.owncloud.android.ui.activity.FileDisplayActivity;
|
||||
import com.owncloud.android.ui.activity.InstantUploadActivity;
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter;
|
||||
import com.owncloud.android.utils.Log_OC;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.accounts.AccountsException;
|
||||
|
@ -75,6 +45,35 @@ import android.os.Process;
|
|||
import android.support.v4.app.NotificationCompat;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.authentication.AuthenticatorActivity;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.db.DbHandler;
|
||||
import com.owncloud.android.lib.common.OwnCloudAccount;
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
|
||||
import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
|
||||
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
|
||||
import com.owncloud.android.lib.resources.files.FileUtils;
|
||||
import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
|
||||
import com.owncloud.android.lib.resources.files.RemoteFile;
|
||||
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
|
||||
import com.owncloud.android.notifications.NotificationBuilderWithProgressBar;
|
||||
import com.owncloud.android.notifications.NotificationDelayer;
|
||||
import com.owncloud.android.operations.CreateFolderOperation;
|
||||
import com.owncloud.android.operations.UploadFileOperation;
|
||||
import com.owncloud.android.operations.common.SyncOperation;
|
||||
import com.owncloud.android.ui.activity.FileActivity;
|
||||
import com.owncloud.android.ui.activity.FileDisplayActivity;
|
||||
import com.owncloud.android.ui.activity.InstantUploadActivity;
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter;
|
||||
import com.owncloud.android.utils.Log_OC;
|
||||
|
||||
|
||||
|
||||
public class FileUploader extends Service implements OnDatatransferProgressListener {
|
||||
|
@ -774,14 +773,8 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
|
|||
|
||||
// we add only for instant-uploads the InstantUploadActivity and the
|
||||
// db entry
|
||||
Intent detailUploadIntent = null;
|
||||
if (upload.isInstant() && InstantUploadActivity.IS_ENABLED) {
|
||||
detailUploadIntent = new Intent(this, InstantUploadActivity.class);
|
||||
detailUploadIntent.putExtra(FileUploader.KEY_ACCOUNT, upload.getAccount());
|
||||
} else {
|
||||
detailUploadIntent = new Intent(this, FailedUploadActivity.class);
|
||||
detailUploadIntent.putExtra(FailedUploadActivity.MESSAGE, content);
|
||||
}
|
||||
Intent detailUploadIntent = new Intent(this, InstantUploadActivity.class);
|
||||
detailUploadIntent.putExtra(FileUploader.KEY_ACCOUNT, upload.getAccount());
|
||||
resultBuilder
|
||||
.setContentIntent(PendingIntent.getActivity(
|
||||
this, (int) System.currentTimeMillis(), detailUploadIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/* ownCloud Android client application
|
||||
* Copyright (C) 2012-2013 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,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.owncloud.android.ui.activity;
|
||||
|
||||
import com.owncloud.android.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
/**
|
||||
* This Activity is used to display a detail message for failed uploads
|
||||
*
|
||||
* The entry-point for this activity is the 'Failed upload Notification"
|
||||
*
|
||||
* @author andomaex / Matthias Baumann
|
||||
*/
|
||||
public class FailedUploadActivity extends Activity {
|
||||
|
||||
public static final String MESSAGE = "message";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.failed_upload_message_view);
|
||||
String message = getIntent().getStringExtra(MESSAGE);
|
||||
TextView textView = (TextView) findViewById(R.id.faild_upload_message);
|
||||
textView.setText(message);
|
||||
Button closeBtn = (Button) findViewById(R.id.failed_uploadactivity_close_button);
|
||||
|
||||
closeBtn.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue