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

Commit 8b8d4f86 authored by Neil Fuller's avatar Neil Fuller
Browse files

Remove Settings.System.DATE_FORMAT

Remove references to Settings.System.DATE_FORMAT and mark it as clearly
deprecated.

It was probably made obsolete some time before kitkat. There were still
some references in view code up to lollipop (removed in change
Ib77a8e7727d027cae39d5e6f431cac1d1ff8a121). During marshmallow / nougat
there were no references, then references were added in backup code in
oreo. This change is intended to make it more obvious that this setting
is obsolete.

Bug: 185884644
Test: build only
Change-Id: I12441541bc3ca0e012cee64d4c784a0ce8233715
parent 650a27bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35367,7 +35367,7 @@ package android.provider {
    field @Deprecated public static final String BLUETOOTH_ON = "bluetooth_on";
    field public static final android.net.Uri CONTENT_URI;
    field @Deprecated public static final String DATA_ROAMING = "data_roaming";
    field public static final String DATE_FORMAT = "date_format";
    field @Deprecated public static final String DATE_FORMAT = "date_format";
    field @Deprecated public static final String DEBUG_APP = "debug_app";
    field public static final android.net.Uri DEFAULT_ALARM_ALERT_URI;
    field public static final android.net.Uri DEFAULT_NOTIFICATION_URI;
+2 −4
Original line number Diff line number Diff line
@@ -4666,11 +4666,9 @@ public final class Settings {
        public static final String TIME_12_24 = "time_12_24";
        /**
         * Date format string
         *   mm/dd/yyyy
         *   dd/mm/yyyy
         *   yyyy/mm/dd
         * @deprecated No longer used. Use {@link #TIME_12_24} instead.
         */
        @Deprecated
        @Readable
        public static final String DATE_FORMAT = "date_format";
+2 −1
Original line number Diff line number Diff line
@@ -52,7 +52,8 @@ message SystemSettingsProto {
    }
    optional Bluetooth bluetooth = 4;

    optional SettingProto date_format = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
    reserved 5; // date_format is not used

    optional SettingProto display_color_mode = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];

    message DevOptions {
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ public class SystemSettings {
        Settings.System.AUTO_TIME,                  // moved to global
        Settings.System.AUTO_TIME_ZONE,             // moved to global
        Settings.System.TIME_12_24,
        Settings.System.DATE_FORMAT,
        Settings.System.DTMF_TONE_WHEN_DIALING,
        Settings.System.DTMF_TONE_TYPE_WHEN_DIALING,
        Settings.System.HEARING_AID,
+0 −13
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.text.TextUtils;
import org.json.JSONException;
import org.json.JSONObject;

import java.text.SimpleDateFormat;
import java.util.Locale;

/**
@@ -192,18 +191,6 @@ public class SettingsValidators {

    public static final Validator TILE_LIST_VALIDATOR = new TileListValidator();

    static final Validator DATE_FORMAT_VALIDATOR = value -> {
        try {
            if (value == null) {
                return true;
            }
            new SimpleDateFormat(value);
            return true;
        } catch (IllegalArgumentException | NullPointerException e) {
            return false;
        }
    };

    static final Validator COLON_SEPARATED_COMPONENT_LIST_VALIDATOR =
            new ComponentNameListValidator(":");

Loading