From 0630e3d5a0e5232126bd3d5e3b30fc664038c0c7 Mon Sep 17 00:00:00 2001 From: Joachim Fritzsch Date: Tue, 9 Jul 2013 10:48:35 +0200 Subject: [PATCH] android: show rpc backup message in Projects tab only in advanced mode. --- .../boinc/adapter/ProjectsListAdapter.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java b/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java index 525a646298..c61aebd661 100644 --- a/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java +++ b/android/BOINC/src/edu/berkeley/boinc/adapter/ProjectsListAdapter.java @@ -124,15 +124,18 @@ public class ProjectsListAdapter extends ArrayAdapter { appendToStatus(sb, activity.getResources().getString(R.string.projects_status_trickleuppending)); } - Calendar minRPCTime = Calendar.getInstance(); - Calendar now = Calendar.getInstance(); - minRPCTime.setTimeInMillis((long)project.min_rpc_time*1000); - if (minRPCTime.compareTo(now) > 0) { - appendToStatus( - sb, - activity.getResources().getString(R.string.projects_status_backoff) + " " + - DateUtils.formatElapsedTime((minRPCTime.getTimeInMillis() - now.getTimeInMillis()) / 1000) - ); + // show rpc backoff only in advanced mode + if(Monitor.getAppPrefs().getShowAdvanced()) { + Calendar minRPCTime = Calendar.getInstance(); + Calendar now = Calendar.getInstance(); + minRPCTime.setTimeInMillis((long)project.min_rpc_time*1000); + if (minRPCTime.compareTo(now) > 0) { + appendToStatus( + sb, + activity.getResources().getString(R.string.projects_status_backoff) + " " + + DateUtils.formatElapsedTime((minRPCTime.getTimeInMillis() - now.getTimeInMillis()) / 1000) + ); + } } return sb.toString();