Skip to content

Commit

Permalink
Needed a warning in one more place
Browse files Browse the repository at this point in the history
  • Loading branch information
borrrden committed Feb 24, 2017
1 parent ecab15f commit c2ddc0c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Couchbase.Lite.Shared/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ private IDictionary<string, BlobStoreWriter> PendingAttachmentsByDigest
static Database()
{
var type = Type.GetType("Couchbase.Lite.Storage.SystemSQLite.SqliteCouchStore, Couchbase.Lite.Storage.SystemSQLite");

#if __ANDROID__
var osVersion = global::Android.OS.Build.VERSION.SdkInt;
if(global::Android.OS.Build.VERSION.SdkInt > global::Android.OS.BuildVersionCodes.M) {
Log.To.Database.W(Tag, $"SystemSQLite cannot be used on '{osVersion}' because of new Google restrictions " +
"in API 24+, if another storage engine is not registered this process will misbehave.");
}
#endif

if(type != null) {
RegisterStorageEngine(StorageEngineTypes.SQLite, type);
} else {
Expand Down

0 comments on commit c2ddc0c

Please sign in to comment.