Build shrinkedAndroid.jar from SDK 20 API

SDK 20 API contains all clases worth considering for multidex tracing
while the latest API contains extra classes and is also missing some.

Also explicitly keep roots in shrinkedAndroid.jar rules. Technically
this is not really needed because they are all kept as part of the
hierarchy of their subclasses (that were already kept), but better be
explicit about the intention.

Test: m shrinkedAndroid
Change-Id: Ifb5ecb8c2803384f52509010bc5f9c3cb5e1791a
diff --git a/dx/Android.mk b/dx/Android.mk
index d13e291..c0e10a1 100644
--- a/dx/Android.mk
+++ b/dx/Android.mk
@@ -61,7 +61,7 @@
 
 $(LOCAL_BUILT_MODULE): PRIVATE_PROGUARD_FLAGS:= \
   -include $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)
-$(LOCAL_BUILT_MODULE): $(call java-lib-files,android_stubs_current) \
+$(LOCAL_BUILT_MODULE): $(call java-lib-files,sdk_v20) \
                        $(addprefix $(LOCAL_PATH)/, shrinkedAndroid.proguard.flags)| $(PROGUARD)
 	@echo Proguard: $@
 	$(hide) $(PROGUARD) -injars "$<(**/*.class)" -outjars $@ $(PRIVATE_PROGUARD_FLAGS)
diff --git a/dx/shrinkedAndroid.proguard.flags b/dx/shrinkedAndroid.proguard.flags
index c22ec92..d248a4a 100644
--- a/dx/shrinkedAndroid.proguard.flags
+++ b/dx/shrinkedAndroid.proguard.flags
@@ -5,20 +5,36 @@
 -dontpreverify
 -keep public class * extends android.app.Instrumentation {
 }
+-keep public class android.app.Instrumentation {
+}
 -keep public class * extends android.app.Application {
 }
+-keep public class android.app.Application {
+}
 -keep public class * extends android.app.Activity {
 }
+-keep public class android.app.Activity {
+}
 -keep public class * extends android.app.Service {
 }
+-keep public class android.app.Service {
+}
 -keep public class * extends android.content.ContentProvider {
 }
+-keep public class android.content.ContentProvider {
+}
 -keep public class * extends android.content.BroadcastReceiver {
 }
+-keep public class android.content.BroadcastReceiver {
+}
 -keep public class * extends android.app.backup.BackupAgent {
 }
+-keep public class android.app.backup.BackupAgent {
+}
 -keep public class java.lang.annotation.Annotation {
 }
 -keep public class * extends android.test.InstrumentationTestCase {
 }
+-keep public class android.test.InstrumentationTestCase {
+}