Suppress StopInfo exception based on target API.
Bug: 27429026
Change-Id: Ibf0b058b1f921c20fbc3c72045467883a8934f67
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 0d8069e..744fff8 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -3690,8 +3690,8 @@
activity.token, state, persistentState, description);
} catch (RemoteException ex) {
if (ex instanceof TransactionTooLargeException
- && "com.google.android.gms".equals(activity.packageInfo.getPackageName())) {
- Log.d(TAG, "STAHP SENDING SO MUCH DATA KTHX: " + ex);
+ && activity.packageInfo.getTargetSdkVersion() < Build.VERSION_CODES.N) {
+ Log.e(TAG, "App tried sending too much data in instance state", ex);
return;
}