1# Copyright (C) 2015 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15# Keep enough data for stack traces 16-renamesourcefileattribute SourceFile 17-keepattributes SourceFile, 18 LineNumberTable, 19 RuntimeVisibleAnnotations, 20 RuntimeVisibleParameterAnnotations, 21 RuntimeVisibleTypeAnnotations, 22 AnnotationDefault 23 24# Keep classes and methods that have the guava @VisibleForTesting annotation 25# TODO(b/373579455): Evaluate if <init> needs to be kept. 26-keep @com.google.common.annotations.VisibleForTesting class * { 27 void <init>(); 28} 29-keepclassmembers class * { 30 @com.google.common.annotations.VisibleForTesting *; 31} 32-keep class com.android.messaging.* { *; } 33-keep class com.android.messaging.*.* { *; } 34-keep class com.android.messaging.*.*.* { *; } 35 36# Keep methods that have the @VisibleForAnimation annotation 37# TODO(b/373579455): Evaluate if <init> needs to be kept. 38-keep @interface com.android.messaging.annotation.VisibleForAnimation { 39 void <init>(); 40} 41-keepclassmembers class * { 42 @com.android.messaging.annotation.VisibleForAnimation *; 43} 44 45# TODO(b/373579455): Evaluate if <init> needs to be kept. 46-keep public class * extends android.app.Activity { 47 void <init>(); 48} 49# TODO(b/373579455): Evaluate if <init> needs to be kept. 50-keep public class * extends android.app.Application { 51 void <init>(); 52} 53# TODO(b/373579455): Evaluate if <init> needs to be kept. 54-keep public class * extends android.app.Service { 55 void <init>(); 56} 57# TODO(b/373579455): Evaluate if <init> needs to be kept. 58-keep public class * extends android.content.BroadcastReceiver { 59 void <init>(); 60} 61# TODO(b/373579455): Evaluate if <init> needs to be kept. 62-keep public class * extends android.content.ContentProvider { 63 void <init>(); 64} 65# TODO(b/373579455): Evaluate if <init> needs to be kept. 66-keep public class * extends android.app.backup.BackupAgentHelper { 67 void <init>(); 68} 69# TODO(b/373579455): Evaluate if <init> needs to be kept. 70-keep public class * extends android.preference.Preference { 71 void <init>(); 72} 73# TODO(b/373579455): Evaluate if <init> needs to be kept. 74-keep public class * extends androidx.fragment.app.Fragment { 75 void <init>(); 76} 77-keep public class com.android.vcard.* { *; } 78 79-keep class androidx.collection.* { *; } 80-keep class androidx.core.* { *; } 81-keep class androidx.core.*.* { *; } 82-keep class androidx.appcompat.* { *; } 83-keep class androidx.appcompat.*.* { *; } 84-keep class androidx.recyclerview.widget.* { *; } 85-keep class androidx.viewpager.widget.* { *; } 86 87# Keep rastermill classes that need to be accessed from native code (JNI) 88-keep class android.support.rastermill.** { *; } 89 90# Preserve the name of the getCaller method so it can find itself in the stack trace it generates 91-keepclassmembers public class com.android.messaging.util.DebugUtils { 92 public static java.lang.StackTraceElement getCaller(...); 93} 94 95# Keep the static fields of referenced inner classes of auto-generated R classes, in case we 96# access those fields by reflection (e.g. EmojiMarkup) 97-keepclassmembers class **.R$* { 98 public static <fields>; 99} 100