projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #924 from owncloud/add_user_agent_support
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
activity
/
FileDisplayActivity.java
diff --git
a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
index
7b8af0f
..
e921d73
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
@@
-1,6
+1,10
@@
-/* ownCloud Android client application
+/**
+ * ownCloud Android client application
+ *
+ * @author Bartek Przybylski
+ * @author David A. Velasco
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2011 Bartek Przybylski
- * Copyright (C) 201
2-201
5 ownCloud Inc.
+ * 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,
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
@@
-19,13
+23,10
@@
package com.owncloud.android.ui.activity;
import java.io.File;
package com.owncloud.android.ui.activity;
import java.io.File;
-import java.io.IOException;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
-import android.accounts.OperationCanceledException;
-import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.Dialog;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.Dialog;
@@
-114,9
+115,6
@@
import com.owncloud.android.utils.UriUtils;
/**
* Displays, what files the user has available in his ownCloud.
/**
* Displays, what files the user has available in his ownCloud.
- *
- * @author Bartek Przybylski
- * @author David A. Velasco
*/
public class FileDisplayActivity extends HookActivity implements
*/
public class FileDisplayActivity extends HookActivity implements
@@
-1382,7
+1380,11
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
* TODO
*/
private void updateNavigationElementsInActionBar(OCFile chosenFile) {
* TODO
*/
private void updateNavigationElementsInActionBar(OCFile chosenFile) {
- ActionBar actionBar = getSupportActionBar();
+ ActionBar actionBar = getSupportActionBar();
+
+ // For adding content description tag to a title field in the action bar
+ int actionBarTitleId = getResources().getIdentifier("action_bar_title", "id", "android");
+
if (chosenFile == null || mDualPane) {
// only list of files - set for browsing through folders
OCFile currentDir = getCurrentDir();
if (chosenFile == null || mDualPane) {
// only list of files - set for browsing through folders
OCFile currentDir = getCurrentDir();
@@
-1391,6
+1393,7
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
actionBar.setDisplayShowTitleEnabled(!noRoot);
if (!noRoot) {
actionBar.setTitle(getString(R.string.default_display_name_for_root_folder));
actionBar.setDisplayShowTitleEnabled(!noRoot);
if (!noRoot) {
actionBar.setTitle(getString(R.string.default_display_name_for_root_folder));
+ getWindow().getDecorView().findViewById(actionBarTitleId).setContentDescription(getString(R.string.default_display_name_for_root_folder));
}
actionBar.setNavigationMode(!noRoot ? ActionBar.NAVIGATION_MODE_STANDARD : ActionBar.NAVIGATION_MODE_LIST);
actionBar.setListNavigationCallbacks(mDirectories, this); // assuming mDirectories is updated
}
actionBar.setNavigationMode(!noRoot ? ActionBar.NAVIGATION_MODE_STANDARD : ActionBar.NAVIGATION_MODE_LIST);
actionBar.setListNavigationCallbacks(mDirectories, this); // assuming mDirectories is updated
@@
-1400,6
+1403,7
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle(chosenFile.getFileName());
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle(chosenFile.getFileName());
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+ getWindow().getDecorView().findViewById(actionBarTitleId).setContentDescription(chosenFile.getFileName());
}
}
}
}
@@
-1757,7
+1761,8
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
if (file.isFolder()) {
return file;
} else if (getStorageManager() != null) {
if (file.isFolder()) {
return file;
} else if (getStorageManager() != null) {
- String parentPath = file.getRemotePath().substring(0, file.getRemotePath().lastIndexOf(file.getFileName()));
+ String parentPath = file.getRemotePath().substring(0,
+ file.getRemotePath().lastIndexOf(file.getFileName()));
return getStorageManager().getFileByPath(parentPath);
}
}
return getStorageManager().getFileByPath(parentPath);
}
}
@@
-1779,7
+1784,7
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
getAccount(),
getApplicationContext()
);
getAccount(),
getApplicationContext()
);
- synchFolderOp.execute(getAccount(), this, null, null);
+ synchFolderOp.execute(getAccount(),
MainApp.getAppContext(),
this, null, null);
setSupportProgressBarIndeterminateVisibility(true);
setSupportProgressBarIndeterminateVisibility(true);
@@
-1791,7
+1796,8
@@
OnSslUntrustedCertListener, OnEnforceableRefreshListener {
*/
public void showUntrustedCertDialog(RemoteOperationResult result) {
// Show a dialog with the certificate info
*/
public void showUntrustedCertDialog(RemoteOperationResult result) {
// Show a dialog with the certificate info
- SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstanceForFullSslError((CertificateCombinedException)result.getException());
+ SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstanceForFullSslError(
+ (CertificateCombinedException)result.getException());
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
dialog.show(ft, DIALOG_UNTRUSTED_CERT);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
dialog.show(ft, DIALOG_UNTRUSTED_CERT);