Merge "Enable R8 for settings"

This commit is contained in:
TreeHugger Robot
2018-03-23 18:09:44 +00:00
committed by Android (Google) Code Review
3 changed files with 6 additions and 3 deletions

View File

@@ -11,9 +11,6 @@ include $(BUILD_STATIC_JAVA_LIBRARY)
# Build the Settings APK # Build the Settings APK
include $(CLEAR_VARS) include $(CLEAR_VARS)
# See b/74756073.
LOCAL_USE_R8 := false
LOCAL_PACKAGE_NAME := Settings LOCAL_PACKAGE_NAME := Settings
LOCAL_PRIVATE_PLATFORM_APIS := true LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform LOCAL_CERTIFICATE := platform

View File

@@ -1,6 +1,10 @@
# This is a configuration file for ProGuard. # This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html # http://proguard.sourceforge.net/index.html#manual/usage.html
# Some tests use thenThrow from Mockito which require information on
# checked exceptions.
-keepattributes Exceptions
# Keep all Fragments in this package, which are used by reflection. # Keep all Fragments in this package, which are used by reflection.
-keep public class com.android.settings.** extends android.app.Fragment -keep public class com.android.settings.** extends android.app.Fragment

View File

@@ -16,6 +16,7 @@
package com.android.settings.bluetooth; package com.android.settings.bluetooth;
import android.support.annotation.Keep;
import android.text.InputFilter; import android.text.InputFilter;
import android.text.Spanned; import android.text.Spanned;
@@ -40,6 +41,7 @@ import android.text.Spanned;
public class Utf8ByteLengthFilter implements InputFilter { public class Utf8ByteLengthFilter implements InputFilter {
private final int mMaxBytes; private final int mMaxBytes;
@Keep
Utf8ByteLengthFilter(int maxBytes) { Utf8ByteLengthFilter(int maxBytes) {
mMaxBytes = maxBytes; mMaxBytes = maxBytes;
} }