* 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();
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.setDisplayShowTitleEnabled(true);
actionBar.setTitle(chosenFile.getFileName());
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+ getWindow().getDecorView().findViewById(actionBarTitleId).setContentDescription(chosenFile.getFileName());
}
}
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);
}
}
getAccount(),
getApplicationContext()
);
- synchFolderOp.execute(getAccount(), this, null, null);
+ synchFolderOp.execute(getAccount(), MainApp.getAppContext(), this, null, null);
setSupportProgressBarIndeterminateVisibility(true);
*/
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);