Loading core/java/android/os/Bundle.java +13 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,19 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { } } /** * Return the size of {@link #mParcelledData} in bytes if available, otherwise {@code 0}. * * @hide */ public int getSize() { if (mParcelledData != null) { return mParcelledData.dataSize(); } else { return 0; } } /** * Reports whether the bundle contains any parcelled file descriptors. */ Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +16 −0 Original line number Diff line number Diff line Loading @@ -1461,6 +1461,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mService.getGlobalConfiguration(), r.getMergedOverrideConfiguration()); r.setLastReportedConfiguration(mergedConfiguration); logIfTransactionTooLarge(r.intent, r.icicle); app.thread.scheduleLaunchActivity(new Intent(r.intent), r.appToken, System.identityHashCode(r), r.info, // TODO: Have this take the merged configuration instead of separate global and Loading Loading @@ -1546,6 +1547,21 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D return true; } private void logIfTransactionTooLarge(Intent intent, Bundle icicle) { int extrasSize = 0; if (intent != null) { final Bundle extras = intent.getExtras(); if (extras != null) { extrasSize = extras.getSize(); } } int icicleSize = (icicle == null ? 0 : icicle.getSize()); if (extrasSize + icicleSize > 200000) { Slog.e(TAG, "Transaction too large, intent: " + intent + ", extras size: " + extrasSize + ", icicle size: " + icicleSize); } } void startSpecificActivityLocked(ActivityRecord r, boolean andResume, boolean checkConfig) { // Is this activity's application already running? Loading Loading
core/java/android/os/Bundle.java +13 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,19 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable { } } /** * Return the size of {@link #mParcelledData} in bytes if available, otherwise {@code 0}. * * @hide */ public int getSize() { if (mParcelledData != null) { return mParcelledData.dataSize(); } else { return 0; } } /** * Reports whether the bundle contains any parcelled file descriptors. */ Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +16 −0 Original line number Diff line number Diff line Loading @@ -1461,6 +1461,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mService.getGlobalConfiguration(), r.getMergedOverrideConfiguration()); r.setLastReportedConfiguration(mergedConfiguration); logIfTransactionTooLarge(r.intent, r.icicle); app.thread.scheduleLaunchActivity(new Intent(r.intent), r.appToken, System.identityHashCode(r), r.info, // TODO: Have this take the merged configuration instead of separate global and Loading Loading @@ -1546,6 +1547,21 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D return true; } private void logIfTransactionTooLarge(Intent intent, Bundle icicle) { int extrasSize = 0; if (intent != null) { final Bundle extras = intent.getExtras(); if (extras != null) { extrasSize = extras.getSize(); } } int icicleSize = (icicle == null ? 0 : icicle.getSize()); if (extrasSize + icicleSize > 200000) { Slog.e(TAG, "Transaction too large, intent: " + intent + ", extras size: " + extrasSize + ", icicle size: " + icicleSize); } } void startSpecificActivityLocked(ActivityRecord r, boolean andResume, boolean checkConfig) { // Is this activity's application already running? Loading