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

Commit 8dd98da0 authored by Adnan Begovic's avatar Adnan Begovic Committed by Steve Kondik
Browse files

Settings: Map to new Secure Setting for Stats Collection.

Change-Id: I7de094ed9d0621f8744f8fb6236ae0085832d7ca
parent 2b6dd0c3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -82,8 +82,8 @@ public class Utilities {
     * @return Whether or not stats collection is enabled.
     */
    public static boolean isStatsCollectionEnabled(Context context) {
        return Settings.System.getInt(context.getContentResolver(),
                Settings.System.STATS_COLLECTION, 1) != 0;
        return Settings.Secure.getInt(context.getContentResolver(),
                Settings.Secure.STATS_COLLECTION, 1) != 0;
    }

    /**
@@ -93,7 +93,7 @@ public class Utilities {
     */
    public static void setStatsCollectionEnabled(Context context, boolean enabled) {
        int enable = (enabled) ? 1 : 0;
        Settings.System.putInt(context.getContentResolver(),
                Settings.System.STATS_COLLECTION, enable);
        Settings.Secure.putInt(context.getContentResolver(),
                Settings.Secure.STATS_COLLECTION, enable);
    }
}