commit | 90819feb5a868a69ab1d296994e9128f8e07ad80 | [log] [tgz] |
---|---|---|
author | Makoto Onuki <omakoto@google.com> | Thu Jan 20 08:58:08 2022 -0800 |
committer | Xin Li <delphij@google.com> | Wed Mar 02 18:17:51 2022 -0800 |
tree | 263606a08c688cd31d68d48dfff7c947466e573d | |
parent | 2dcb5a8188eafb8099e7ed284a528f7372c308a4 [diff] |
*ServiceStartNotAllowedException shouldn't have a "cause" Bug: 210890426 Test: Manual test with a test app, received this exception and made sure cause isn't set. Merged-in: I94ba39c775cf95074907db6814104289a577d496 (cherry picked from commit d4396b9a9d699b2b7c8029d024af912198207f68) (cherry picked from commit 34af3074f2e0bb1b42fcdd39e295411dba514be2) Merged-In: I94ba39c775cf95074907db6814104289a577d496 Change-Id: I94ba39c775cf95074907db6814104289a577d496
diff --git a/core/java/android/app/ServiceStartNotAllowedException.java b/core/java/android/app/ServiceStartNotAllowedException.java index 33285b2..b1f47ee 100644 --- a/core/java/android/app/ServiceStartNotAllowedException.java +++ b/core/java/android/app/ServiceStartNotAllowedException.java
@@ -40,4 +40,11 @@ return new BackgroundServiceStartNotAllowedException(message); } } + + @Override + public synchronized Throwable getCause() { + // "Cause" is often used for clustering exceptions, and developers don't want to have it + // for this exception. b/210890426 + return null; + } }