From: David A. Velasco Date: Wed, 25 Mar 2015 09:57:04 +0000 (+0100) Subject: Merge pull request #924 from owncloud/add_user_agent_support X-Git-Tag: oc-android-1.7.1_signed^2~8 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/6bef4abf744cb03d50dd4ecff121c20a1e267aab?hp=-c Merge pull request #924 from owncloud/add_user_agent_support Updated after adding custom user agent support to library --- 6bef4abf744cb03d50dd4ecff121c20a1e267aab diff --combined src/com/owncloud/android/ui/activity/FileDisplayActivity.java index 5efe4232,73a41986..e921d73c --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@@ -1380,11 -1380,7 +1380,11 @@@ OnSslUntrustedCertListener, OnEnforceab * 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(); @@@ -1393,7 -1389,6 +1393,7 @@@ 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 @@@ -1403,7 -1398,6 +1403,7 @@@ actionBar.setDisplayShowTitleEnabled(true); actionBar.setTitle(chosenFile.getFileName()); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); + getWindow().getDecorView().findViewById(actionBarTitleId).setContentDescription(chosenFile.getFileName()); } } @@@ -1761,7 -1755,8 +1761,8 @@@ 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); } } @@@ -1783,7 -1778,7 +1784,7 @@@ getAccount(), getApplicationContext() ); - synchFolderOp.execute(getAccount(), this, null, null); + synchFolderOp.execute(getAccount(), MainApp.getAppContext(), this, null, null); setSupportProgressBarIndeterminateVisibility(true); @@@ -1795,7 -1790,8 +1796,8 @@@ */ 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);