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

Commit fec88460 authored by jackqdyulei's avatar jackqdyulei
Browse files

Add column uid to database

In database upgrade, reconstruct the database since
it is still empty.

Bug: 74022362
Test: Build
Change-Id: I8d7f7280a7438f371f7e3a2ed1116ba82517d6a6
parent ef975b0a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public class AnomalyDatabaseHelper extends SQLiteOpenHelper {
    private static final String TAG = "BatteryDatabaseHelper";

    private static final String DATABASE_NAME = "battery_settings.db";
    private static final int DATABASE_VERSION = 2;
    private static final int DATABASE_VERSION = 3;

    @Retention(RetentionPolicy.SOURCE)
    @IntDef({State.NEW,
@@ -55,6 +55,10 @@ public class AnomalyDatabaseHelper extends SQLiteOpenHelper {
         * The package name of the anomaly app
         */
        String PACKAGE_NAME = "package_name";
        /**
         * The uid of the anomaly app
         */
        String UID = "uid";
        /**
         * The type of the anomaly app
         * @see Anomaly.AnomalyType
@@ -74,6 +78,8 @@ public class AnomalyDatabaseHelper extends SQLiteOpenHelper {
    private static final String CREATE_ANOMALY_TABLE =
            "CREATE TABLE " + Tables.TABLE_ANOMALY +
                    "(" +
                    AnomalyColumns.UID +
                    " INTEGER, " +
                    AnomalyColumns.PACKAGE_NAME +
                    " TEXT, " +
                    AnomalyColumns.ANOMALY_TYPE +