summaryrefslogtreecommitdiffstats
path: root/tests/ActivityTests
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-05-19 16:04:04 -0700
committerDianne Hackborn <hackbod@google.com>2015-05-21 18:19:50 -0700
commite5c42621095a12e7d22ca5ab871dacd28c9bff41 (patch)
tree2ba8e545b5c97ede4be9532d08e0cd03cd24e0b5 /tests/ActivityTests
parent8b20cdb27bc5b4c433c4fc650203be9a25842bbd (diff)
downloadframeworks_base-e5c42621095a12e7d22ca5ab871dacd28c9bff41.zip
frameworks_base-e5c42621095a12e7d22ca5ab871dacd28c9bff41.tar.gz
frameworks_base-e5c42621095a12e7d22ca5ab871dacd28c9bff41.tar.bz2
Improve reporting to apps of transaction too large failures.
If the app tried to do various things with too much data -- starting an activity, starting a service, sending a broadcast -- this would fairly silently fail with little indication of what was going on. Fix this in two ways: - Now when the native code generates a TransactionTooLargeException, it may include an additional message in it telling you how much data was in the parcel being sent, to help you understand why this happening. - In all the framework code paths where we call to the system and may fail, convert these failures into a a runtime exception and rethrow them back to the app so that it will clearly get the above message. Change-Id: I745159b97d3edb6fca86aa09cbc40c1f15a7d128
Diffstat (limited to 'tests/ActivityTests')
-rw-r--r--tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
index fc66d6d..ddcfd9e 100644
--- a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
+++ b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
@@ -427,6 +427,15 @@ public class ActivityTestMain extends Activity {
return true;
}
});
+ menu.add("Transaction fail").setOnMenuItemClickListener(
+ new MenuItem.OnMenuItemClickListener() {
+ @Override public boolean onMenuItemClick(MenuItem item) {
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.putExtra("gulp", new int[1024*1024]);
+ startActivity(intent);
+ return true;
+ }
+ });
return true;
}