Loading packages/SettingsProvider/res/values/lineage_defaults.xml 0 → 100644 +26 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /** * Copyright (c) 2016, The Linux Foundation. All rights reserved. * * Not a Contribution * * Copyright (c) 2017, The LineageOS Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <resources> <!-- Time format,default value is 24 : 24 format,other value is 12 format --> <string name="def_time_format" translatable="false"></string> </resources> packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -3056,6 +3056,15 @@ public class SettingsProvider extends ContentProvider { Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT, Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT, defaultComponent, null, true, SettingsState.SYSTEM_PACKAGE_NAME); defaultComponent, null, true, SettingsState.SYSTEM_PACKAGE_NAME); } } // Allow OEMs to set default time format. final SettingsState dateAndTimeSettings = getSystemSettingsLocked(userId); String defaultStringComponent; defaultStringComponent = getContext().getResources().getString( R.string.def_time_format); if (!TextUtils.isEmpty(defaultStringComponent)) { dateAndTimeSettings.insertSettingLocked(Settings.System.TIME_12_24, defaultStringComponent, null, true, SettingsState.SYSTEM_PACKAGE_NAME); } currentVersion = 122; currentVersion = 122; } } Loading Loading
packages/SettingsProvider/res/values/lineage_defaults.xml 0 → 100644 +26 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /** * Copyright (c) 2016, The Linux Foundation. All rights reserved. * * Not a Contribution * * Copyright (c) 2017, The LineageOS Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <resources> <!-- Time format,default value is 24 : 24 format,other value is 12 format --> <string name="def_time_format" translatable="false"></string> </resources>
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -3056,6 +3056,15 @@ public class SettingsProvider extends ContentProvider { Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT, Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT, defaultComponent, null, true, SettingsState.SYSTEM_PACKAGE_NAME); defaultComponent, null, true, SettingsState.SYSTEM_PACKAGE_NAME); } } // Allow OEMs to set default time format. final SettingsState dateAndTimeSettings = getSystemSettingsLocked(userId); String defaultStringComponent; defaultStringComponent = getContext().getResources().getString( R.string.def_time_format); if (!TextUtils.isEmpty(defaultStringComponent)) { dateAndTimeSettings.insertSettingLocked(Settings.System.TIME_12_24, defaultStringComponent, null, true, SettingsState.SYSTEM_PACKAGE_NAME); } currentVersion = 122; currentVersion = 122; } } Loading