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

Commit 1cdd7dda authored by Chris Wren's avatar Chris Wren
Browse files

enable heads up notifications

Bug: 13208692
Change-Id: I3682ecb30c6997c578b76a578b79a8d13a6e6323
parent 10d82dfb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -186,4 +186,7 @@
    <!-- Default for Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1==on -->
    <integer name="def_lock_screen_show_notifications">1</integer>

    <!-- Default for Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED, 1==on -->
    <integer name="def_heads_up_enabled">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 = 99;
    private static final int DATABASE_VERSION = 100;

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

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

        // *** Remember to update DATABASE_VERSION above!

        if (upgradeVersion != currentVersion) {