private void writeWriterAndValue(String writer, String value, String var) {
// Update the temporary Set set.
- if (writer.equals("App1"))
- tempSetSet.add(new NameValuePair(1, value, var, manual));
- else if (writer.equals("App2"))
- tempSetSet.add(new NameValuePair(2, value, var, manual));
+ NameValuePair temp = new NameValuePair(1, value, var, manual);
+ if (writer.equals("App2"))
+ temp = new NameValuePair(2, value, var, manual);
+
+ if (tempSetSet.contains(temp))
+ tempSetSet.remove(temp);
+ tempSetSet.add(temp);
// Set isSet to true
isSet = true;
}