From af4cfc5c81be042d6ae3fbedbaba4af2dfe8a243 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Fri, 28 Jul 2017 14:31:57 +0100 Subject: [PATCH] Add a new constant to TimeZoneRulesDataContract This enables time zone data app code (provided by Google) to check the manifest (provided by the OEM) uses the right permission without referencing internal manifest permission Strings directly. Bug: 64139059 Test: Ran internal xTS tests Change-Id: I4b1a8608beff3b5218ecf5162cfe8e31027e2007 (cherry picked from commit 8e2a85752b9b45e3294c5e94a6a882329433054f) --- api/system-current.txt | 1 + core/java/android/provider/TimeZoneRulesDataContract.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index 41f63535ddd21..1d6673e591739 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -38650,6 +38650,7 @@ package android.provider { public final class TimeZoneRulesDataContract { field public static final java.lang.String AUTHORITY = "com.android.timezone"; + field public static final java.lang.String READER_PERMISSION = "android.permission.UPDATE_TIME_ZONE_RULES"; } public static final class TimeZoneRulesDataContract.Operation { diff --git a/core/java/android/provider/TimeZoneRulesDataContract.java b/core/java/android/provider/TimeZoneRulesDataContract.java index 33d25880226eb..7a5ae1d7af41a 100644 --- a/core/java/android/provider/TimeZoneRulesDataContract.java +++ b/core/java/android/provider/TimeZoneRulesDataContract.java @@ -40,6 +40,12 @@ public final class TimeZoneRulesDataContract { /** A content:// style uri to the authority for the time zone data content provider */ private static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY); + /** + * The permission that the reader of the ContentProvider must possess. + */ + public static final String READER_PERMISSION = + android.Manifest.permission.UPDATE_TIME_ZONE_RULES; + /** * Defines fields exposed through the {@link Operation#CONTENT_URI} for describing a time zone * distro operation.