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

Commit cc13e509 authored by Ethan Chen's avatar Ethan Chen
Browse files

quickboot: Disable quickboot by default

* We probably don't want to enable this by default on devices that have
  it because it is confusing to users attempting to shut down their
  phones.

Change-Id: I80eb946f93509cb3b32f6c790611597921b9c54a
parent 1eb067fb
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -2023,19 +2023,12 @@ public class DatabaseHelper extends SQLiteOpenHelper {
    }

    private void loadQuickBootSetting(SQLiteDatabase db) {
        boolean qbEnabled = true;
        final PackageManager pm = mContext.getPackageManager();
        try {
            pm.getPackageInfo("com.qapp.quickboot", PackageManager.GET_META_DATA);
        } catch (NameNotFoundException e) {
            qbEnabled = false;
        }
        db.beginTransaction();
        SQLiteStatement stmt = null;
        try {
            stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)"
                    + " VALUES(?,?);");
            loadSetting(stmt, Settings.Global.ENABLE_QUICKBOOT, qbEnabled ? 1 : 0);
            loadSetting(stmt, Settings.Global.ENABLE_QUICKBOOT, 0);
            db.setTransactionSuccessful();
        } finally {
            db.endTransaction();