Bug 1316023 - Version 2 of fixes. Removed unreachable statements. r?sebastian
MozReview-Commit-ID: 5gQEJVmboOr
--- a/mobile/android/base/java/org/mozilla/gecko/DataReportingNotification.java
+++ b/mobile/android/base/java/org/mozilla/gecko/DataReportingNotification.java
@@ -56,21 +56,16 @@ public class DataReportingNotification {
} else {
// Silently update the version.
SharedPreferences.Editor editor = dataPrefs.edit();
editor.putInt(PREFS_POLICY_VERSION, DATA_REPORTING_VERSION);
editor.apply();
}
return;
}
-
- if (currentVersion >= DATA_REPORTING_VERSION) {
- // Do nothing, we're at a current (or future) version.
- return;
- }
}
/**
* Launch a notification of the data policy, and record notification time and version.
*/
public static void notifyDataPolicy(Context context, SharedPreferences sharedPrefs) {
boolean result = false;
try {
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/FormHistoryRepositorySession.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/FormHistoryRepositorySession.java
@@ -612,20 +612,16 @@ public class FormHistoryRepositorySessio
Logger.trace(LOG_TAG, "Remote is newer, and deleted. Purging local.");
deleteExistingRecord(existingRecord);
trackRecord(record);
delegate.onRecordStoreSucceeded(record.guid);
return;
}
Logger.trace(LOG_TAG, "Remote is older, local is not deleted. Ignoring.");
- if (!locallyModified) {
- Logger.warn(LOG_TAG, "Inconsistency: old remote record is deleted, but local record not modified!");
- // Ensure that this is tracked for upload.
- }
return;
}
// End deletion logic.
// Now we're processing a non-deleted incoming record.
if (existingRecord == null) {
Logger.trace(LOG_TAG, "Looking up match for record " + record.guid);
existingRecord = findExistingRecordByPayload(record);
@@ -667,20 +663,16 @@ public class FormHistoryRepositorySessio
Logger.trace(LOG_TAG, "Remote is newer, and not deleted. Storing.");
replaceExistingRecordWithRegularRecord(record, existingRecord);
trackRecord(record);
delegate.onRecordStoreSucceeded(record.guid);
return;
}
Logger.trace(LOG_TAG, "Remote is older, local is not deleted. Ignoring.");
- if (!locallyModified) {
- Logger.warn(LOG_TAG, "Inconsistency: old remote record is not deleted, but local record not modified!");
- }
- return;
} catch (Exception e) {
Logger.error(LOG_TAG, "Store failed for " + record.guid, e);
delegate.onRecordStoreFailed(e, record.guid);
return;
}
}
};
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/PasswordsRepositorySession.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/PasswordsRepositorySession.java
@@ -311,20 +311,17 @@ public class PasswordsRepositorySession
trace("Both local and remote records have been modified.");
if (remoteRecord.lastModified > existingRecord.lastModified) {
trace("Remote is newer, and deleted. Deleting local.");
storeRecordDeletion(remoteRecord);
return;
}
trace("Remote is older, local is not deleted. Ignoring.");
- if (!locallyModified) {
- Logger.warn(LOG_TAG, "Inconsistency: old remote record is deleted, but local record not modified!");
- // Ensure that this is tracked for upload.
- }
+
return;
}
// End deletion logic.
// Validate the incoming record.
if (!remoteRecord.isValid()) {
Logger.warn(LOG_TAG, "Incoming record is invalid. Reporting store failed.");
delegate.onRecordStoreFailed(new RuntimeException("Can't store invalid password record."), record.guid);