Remove the Canonical Address Database

This was a holdover from Signal's origins as a pure SMS app.
It causes problems, depends on undefined device specific behavior,
and should no longer be necessary now that we have all the
information we need to E164 all numbers.

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-07-26 09:59:15 -07:00
parent e452862813
commit 737810475e
113 changed files with 2029 additions and 2130 deletions

View File

@@ -68,7 +68,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
public static final int CONTACTS_ACCOUNT_VERSION = 136;
public static final int MEDIA_DOWNLOAD_CONTROLS_VERSION = 151;
public static final int REDPHONE_SUPPORT_VERSION = 157;
// public static final int FINGERPRINTS_NON_BLOCKING_VESRION = 212;
public static final int NO_MORE_CANONICAL_DB_VERSION = 276;
private static final SortedSet<Integer> UPGRADE_VERSIONS = new TreeSet<Integer>() {{
add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION);
@@ -82,7 +82,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
add(MIGRATE_SESSION_PLAINTEXT);
add(MEDIA_DOWNLOAD_CONTROLS_VERSION);
add(REDPHONE_SUPPORT_VERSION);
// add(FINGERPRINTS_NON_BLOCKING_VESRION);
add(NO_MORE_CANONICAL_DB_VERSION);
}};
private MasterSecret masterSecret;
@@ -233,10 +233,6 @@ public class DatabaseUpgradeActivity extends BaseActivity {
.add(new DirectoryRefreshJob(getApplicationContext()));
}
// if (params[0] < FINGERPRINTS_NON_BLOCKING_VESRION) {
// TextSecurePreferences.setBlockingIdentityUpdates(getApplicationContext(), true);
// }
return null;
}
@@ -274,8 +270,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
ApplicationContext.getInstance(getApplicationContext())
.getJobManager()
.add(new PushDecryptJob(getApplicationContext(),
pushReader.getLong(pushReader.getColumnIndexOrThrow(PushDatabase.ID)),
pushReader.getString(pushReader.getColumnIndexOrThrow(PushDatabase.SOURCE))));
pushReader.getLong(pushReader.getColumnIndexOrThrow(PushDatabase.ID))));
}
} finally {
if (pushReader != null)