Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bd0f532 authored by Susi Kharraz-Post's avatar Susi Kharraz-Post
Browse files

Fix NPE for Open With ChooserActivity Logging Bug

Target is not populated for "Open With" processed by ChooserActivity.
Adding a null catch in the logger to return default intent.

Bug: 153335691
Test: manual testing and running ChooserActivityTests
Change-Id: Ib7477a9030d0244d33d74690c6aab8b03b88e1e3
parent e50fc87c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -191,6 +191,9 @@ public interface ChooserActivityLogger {
     * ChooserActivity.
     */
    default int typeFromIntentString(String intent) {
        if (intent == null) {
            return FrameworkStatsLog.SHARESHEET_STARTED__INTENT_TYPE__INTENT_DEFAULT;
        }
        switch (intent) {
            case Intent.ACTION_VIEW:
                return FrameworkStatsLog.SHARESHEET_STARTED__INTENT_TYPE__INTENT_ACTION_VIEW;