Merge "Make time zone data app code unbundleable" into oc-mr1-dev
am: 27412bf7d7

Change-Id: I53cfd121b037fd4fb9bc7ff04f543d1a5ae4d244
diff --git a/Android.mk b/Android.mk
index 36401e6..9597e0d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -22,7 +22,8 @@
 LOCAL_MODULE_TAGS := optional
 LOCAL_SRC_FILES := $(call all-java-files-under, src/main)
 LOCAL_PROGUARD_FLAG_FILES := $(LOCAL_PATH)/proguard.cfg
-LOCAL_STATIC_JAVA_LIBRARIES := time_zone_distro
+LOCAL_STATIC_JAVA_LIBRARIES := time_zone_distro android-support-annotations
+LOCAL_SDK_VERSION := system_current
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/src/main/com/android/timezone/data/TimeZoneRulesDataProvider.java b/src/main/com/android/timezone/data/TimeZoneRulesDataProvider.java
index ac5fc5f..b97a985 100644
--- a/src/main/com/android/timezone/data/TimeZoneRulesDataProvider.java
+++ b/src/main/com/android/timezone/data/TimeZoneRulesDataProvider.java
@@ -20,8 +20,6 @@
 import com.android.timezone.distro.DistroVersion;
 import com.android.timezone.distro.TimeZoneDistro;
 
-import android.annotation.NonNull;
-import android.annotation.Nullable;
 import android.content.ContentProvider;
 import android.content.ContentValues;
 import android.content.Context;
@@ -35,6 +33,8 @@
 import android.os.ParcelFileDescriptor;
 import android.provider.TimeZoneRulesDataContract;
 import android.provider.TimeZoneRulesDataContract.Operation;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -111,10 +111,10 @@
             // Use readPermission only to implement permissions.
             throw new SecurityException("Use android:readPermission only");
         }
-        if (!android.Manifest.permission.UPDATE_TIME_ZONE_RULES.equals(info.readPermission)) {
+        if (!TimeZoneRulesDataContract.READER_PERMISSION.equals(info.readPermission)) {
             // Writing is not supported.
             throw new SecurityException("android:readPermission must be set to \""
-                    + android.Manifest.permission.UPDATE_TIME_ZONE_RULES
+                    + TimeZoneRulesDataContract.READER_PERMISSION
                     + "\" is: " + info.readPermission);
         }