diff options
| author | 2019-05-01 21:33:34 +0000 | |
|---|---|---|
| committer | 2019-05-01 21:33:34 +0000 | |
| commit | 9276afa112a7e21d3d12a8e90e20feab151bc575 (patch) | |
| tree | 8545f8317c4d70122cd899edbb2bc6546a7a932f | |
| parent | 5e947edd12dbe9d6bac7f188d2e60bcbb51a7392 (diff) | |
| parent | 7694146d74f04e15eaa0349d20e0fcb41bae7647 (diff) | |
Merge "Fix crash in Permission Controller approving bug reports (incident reports were working fine)" into qt-dev
| -rw-r--r-- | core/java/android/os/IncidentManager.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/os/IncidentManager.java b/core/java/android/os/IncidentManager.java index 08afe31f05dd..1f61a3c47ff1 100644 --- a/core/java/android/os/IncidentManager.java +++ b/core/java/android/os/IncidentManager.java @@ -519,6 +519,13 @@ public class IncidentManager { android.Manifest.permission.PACKAGE_USAGE_STATS }) public @Nullable IncidentReport getIncidentReport(Uri uri) { + final String id = uri.getQueryParameter(URI_PARAM_REPORT_ID); + if (id == null) { + // If there's no report id, it's a bug report, so we can't return the incident + // report. + return null; + } + final String pkg = uri.getQueryParameter(URI_PARAM_CALLING_PACKAGE); if (pkg == null) { throw new RuntimeException("Invalid URI: No " @@ -531,13 +538,6 @@ public class IncidentManager { + URI_PARAM_RECEIVER_CLASS + " parameter. " + uri); } - final String id = uri.getQueryParameter(URI_PARAM_REPORT_ID); - if (cls == null) { - // If there's no report id, it's a bug report, so we can't return the incident - // report. - return null; - } - try { return getCompanionServiceLocked().getIncidentReport(pkg, cls, id); } catch (RemoteException ex) { |