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

Commit c48caec6 authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan Committed by Roman Birg
Browse files

Settings: fix FC viewing 'running' detail

Occurs when the app has no service running

Introduced in I2563379e7ce49a246761c040edcb797cf112efce

Change-Id: Ie97912c96aa72690dd5d4b9512dd546601a03251
(cherry picked from commit 7c8c8e7d)
parent 40f8ef96
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -315,9 +315,10 @@ public class RunningServiceDetails extends Fragment
            // check if error reporting is enabled in secure settings
            int enabled = Settings.Global.getInt(getActivity().getContentResolver(),
                    Settings.Global.SEND_ACTION_APP_ERROR, 0);
            boolean systemApp = (detail.mServiceItem.mServiceInfo.applicationInfo.flags
                    & ApplicationInfo.FLAG_SYSTEM) != 0;
            if (enabled != 0 && !systemApp && si != null) {
            // allow reporting if a service is present and the app is not a system app
            boolean canReport = (si != null) && (si.mServiceInfo.applicationInfo.flags
                    & ApplicationInfo.FLAG_SYSTEM) == 0;
            if (enabled != 0 && canReport) {
                detail.mInstaller = ApplicationErrorReport.getErrorReportReceiver(
                        getActivity(), si.mServiceInfo.packageName,
                        si.mServiceInfo.applicationInfo.flags);