mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Add re-export SMS support and hard code Phase 0.
This commit is contained in:
committed by
Alex Hart
parent
fd1d2ec8fc
commit
7c60c32918
@@ -417,6 +417,20 @@ public abstract class MessageDatabase extends Database implements MmsSmsColumns,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the exported state and exported flag so messages can be re-exported.
|
||||
*/
|
||||
public void clearExportState() {
|
||||
ContentValues values = new ContentValues(2);
|
||||
values.putNull(EXPORT_STATE);
|
||||
values.put(EXPORTED, MessageExportStatus.UNEXPORTED.serialize());
|
||||
|
||||
SQLiteDatabaseExtensionsKt.update(getWritableDatabase(), getTableName())
|
||||
.values(values)
|
||||
.where(EXPORT_STATE + " IS NOT NULL OR " + EXPORTED + " != ?", MessageExportStatus.UNEXPORTED)
|
||||
.run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the exported status (not state) to the default for clearing errors.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user