Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82a6c5c5 authored by Dan Sandler's avatar Dan Sandler
Browse files

Default Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS=1.

Change-Id: I849d4def1dcf220c226349f1591a8ba00b603854
parent cc3f3385
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -183,4 +183,7 @@
    <!-- Default for Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE -->
    <integer name="def_wifi_scan_always_available">0</integer>

    <!-- Default for Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1==on -->
    <integer name="def_lock_screen_show_notifications">1</integer>

</resources>
+19 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
    // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
    // is properly propagated through your change.  Not doing so will result in a loss of user
    // settings.
    private static final int DATABASE_VERSION = 98;
    private static final int DATABASE_VERSION = 99;

    private Context mContext;
    private int mUserHandle;
@@ -1556,6 +1556,24 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            upgradeVersion = 98;
        }

        if (upgradeVersion == 98) {
            if (mUserHandle == UserHandle.USER_OWNER) {
                db.beginTransaction();
                SQLiteStatement stmt = null;
                try {
                    stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)"
                            + " VALUES(?,?);");
                    loadIntegerSetting(stmt, Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS,
                            R.integer.def_lock_screen_show_notifications);
                    db.setTransactionSuccessful();
                } finally {
                    db.endTransaction();
                    if (stmt != null) stmt.close();
                }
            }
            upgradeVersion = 99;
        }

        // *** Remember to update DATABASE_VERSION above!

        if (upgradeVersion != currentVersion) {