Merge "Sigh, someone is pushing 2MB through StopInfo." into nyc-dev

This commit is contained in:
Jeff Sharkey
2016-02-29 18:30:39 +00:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ import android.os.StrictMode;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.TransactionTooLargeException;
import android.os.UserHandle;
import android.provider.Settings;
import android.security.NetworkSecurityPolicy;
@@ -3677,6 +3678,12 @@ public final class ActivityThread {
ActivityManagerNative.getDefault().activityStopped(
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);
return;
}
throw ex.rethrowFromSystemServer();
}
}

View File

@@ -225,6 +225,10 @@ public final class LoadedApk {
return mApplicationInfo;
}
public int getTargetSdkVersion() {
return mApplicationInfo.targetSdkVersion;
}
public boolean isSecurityViolation() {
return mSecurityViolation;
}