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

Commit d1f3df43 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Work on issue #37815224: DeviceManagementService is incorrectly...

...starting services from jobs

Bring back the correct bg check restrictions on jobs, but also
bring back whitelisting of dmagent so it doesn't crash.

Test: booted and ran

Change-Id: I78892386bdcd4f39e0b1a6d33b224bdff958af37
parent f1a4b507
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -181,6 +181,9 @@
    <allow-in-power-save package="com.android.cellbroadcastreceiver" />
    <allow-in-power-save package="com.android.shell" />

    <!-- STOPSHIP(b/36856786): Revert this once it is fixed properly -->
    <allow-in-power-save package="com.google.android.apps.enterprise.dmagent" />

    <!-- These are the packages that are white-listed to be able to run as system user -->
    <system-user-whitelisted-app package="com.android.settings" />

+1 −2
Original line number Diff line number Diff line
@@ -184,8 +184,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
            scheduleOpTimeOutLocked();
            final Intent intent = new Intent().setComponent(job.getServiceComponent());
            boolean binding = mContext.bindServiceAsUser(intent, this,
                    Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
                            | Context.BIND_IMPORTANT_BACKGROUND,
                    Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND,
                    new UserHandle(job.getUserId()));
            if (!binding) {
                if (DEBUG) {