diff options
-rw-r--r-- | api/system-current.txt | 1 | ||||
-rw-r--r-- | core/java/android/os/ConfigUpdate.java | 7 | ||||
-rw-r--r-- | core/res/AndroidManifest.xml | 8 | ||||
-rw-r--r-- | services/core/java/com/android/server/updates/TzDataInstallReceiver.java | 58 |
4 files changed, 0 insertions, 74 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 53794b5f3a0d..86b68f6fdbc3 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -33728,7 +33728,6 @@ package android.os { field public static final java.lang.String ACTION_UPDATE_PINS = "android.intent.action.UPDATE_PINS"; field public static final java.lang.String ACTION_UPDATE_SMART_SELECTION = "android.intent.action.UPDATE_SMART_SELECTION"; field public static final java.lang.String ACTION_UPDATE_SMS_SHORT_CODES = "android.intent.action.UPDATE_SMS_SHORT_CODES"; - field public static final java.lang.String ACTION_UPDATE_TZDATA = "android.intent.action.UPDATE_TZDATA"; } public abstract class CountDownTimer { diff --git a/core/java/android/os/ConfigUpdate.java b/core/java/android/os/ConfigUpdate.java index 139687795430..94a44ec3729a 100644 --- a/core/java/android/os/ConfigUpdate.java +++ b/core/java/android/os/ConfigUpdate.java @@ -68,13 +68,6 @@ public final class ConfigUpdate { = "android.intent.action.UPDATE_CT_LOGS"; /** - * Update system wide timezone data. - * @hide - */ - @SystemApi - public static final String ACTION_UPDATE_TZDATA = "android.intent.action.UPDATE_TZDATA"; - - /** * Update language detection model file. * @hide */ diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 4a4de248b2a1..49de135d8ca5 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -3840,14 +3840,6 @@ </intent-filter> </receiver> - <receiver android:name="com.android.server.updates.TzDataInstallReceiver" - android:permission="android.permission.UPDATE_CONFIG"> - <intent-filter> - <action android:name="android.intent.action.UPDATE_TZDATA" /> - <data android:scheme="content" android:host="*" android:mimeType="*/*" /> - </intent-filter> - </receiver> - <receiver android:name="com.android.server.updates.CertificateTransparencyLogInstallReceiver" android:permission="android.permission.UPDATE_CONFIG"> <intent-filter> diff --git a/services/core/java/com/android/server/updates/TzDataInstallReceiver.java b/services/core/java/com/android/server/updates/TzDataInstallReceiver.java deleted file mode 100644 index cabce183a1a4..000000000000 --- a/services/core/java/com/android/server/updates/TzDataInstallReceiver.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source 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. - */ - -package com.android.server.updates; - -import com.android.timezone.distro.TimeZoneDistro; -import com.android.timezone.distro.installer.TimeZoneDistroInstaller; - -import android.util.Slog; - -import java.io.File; -import java.io.IOException; - -/** - * An install receiver responsible for installing timezone data updates. - */ -public class TzDataInstallReceiver extends ConfigUpdateInstallReceiver { - - private static final String TAG = "TZDataInstallReceiver"; - - private static final File SYSTEM_TZ_DATA_FILE = new File("/system/usr/share/zoneinfo/tzdata"); - private static final File TZ_DATA_DIR = new File("/data/misc/zoneinfo"); - private static final String UPDATE_DIR_NAME = TZ_DATA_DIR.getPath() + "/updates/"; - private static final String UPDATE_METADATA_DIR_NAME = "metadata/"; - private static final String UPDATE_VERSION_FILE_NAME = "version"; - private static final String UPDATE_CONTENT_FILE_NAME = "tzdata_distro.zip"; - - private final TimeZoneDistroInstaller installer; - - public TzDataInstallReceiver() { - super(UPDATE_DIR_NAME, UPDATE_CONTENT_FILE_NAME, UPDATE_METADATA_DIR_NAME, - UPDATE_VERSION_FILE_NAME); - installer = new TimeZoneDistroInstaller(TAG, SYSTEM_TZ_DATA_FILE, TZ_DATA_DIR); - } - - @Override - protected void install(byte[] content, int version) throws IOException { - TimeZoneDistro distro = new TimeZoneDistro(content); - boolean valid = installer.install(distro); - Slog.i(TAG, "Timezone data install valid for this device: " + valid); - // Even if !valid, we call super.install(). Only in the event of an exception should we - // not. If we didn't do this we could attempt to install repeatedly. - super.install(content, version); - } -} |