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

Commit 9e83cbbc authored by Chris Tate's avatar Chris Tate
Browse files

Revert "Enable background restrictions"

This reverts commit 21f77806.

Change-Id: I65586f9739da84fb32b51b0ea166b8288c41d1b3
parent 0e39a438
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -5439,7 +5439,6 @@ package android.app {
    method public boolean removeAutomaticZenRule(java.lang.String);
    method public final void setInterruptionFilter(int);
    method public void setNotificationPolicy(android.app.NotificationManager.Policy);
    method public android.content.ComponentName startServiceInForeground(android.content.Intent, int, android.app.Notification);
    method public boolean updateAutomaticZenRule(java.lang.String, android.app.AutomaticZenRule);
    field public static final java.lang.String ACTION_INTERRUPTION_FILTER_CHANGED = "android.app.action.INTERRUPTION_FILTER_CHANGED";
    field public static final java.lang.String ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED = "android.app.action.NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED";
@@ -38983,7 +38982,6 @@ package android.test.mock {
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public android.content.ComponentName startService(android.content.Intent);
    method public android.content.ComponentName startServiceInForeground(android.content.Intent, int, android.app.Notification);
    method public boolean stopService(android.content.Intent);
    method public void unbindService(android.content.ServiceConnection);
    method public void unregisterReceiver(android.content.BroadcastReceiver);
+0 −2
Original line number Diff line number Diff line
@@ -5624,7 +5624,6 @@ package android.app {
    method public boolean removeAutomaticZenRule(java.lang.String);
    method public final void setInterruptionFilter(int);
    method public void setNotificationPolicy(android.app.NotificationManager.Policy);
    method public android.content.ComponentName startServiceInForeground(android.content.Intent, int, android.app.Notification);
    method public boolean updateAutomaticZenRule(java.lang.String, android.app.AutomaticZenRule);
    field public static final java.lang.String ACTION_INTERRUPTION_FILTER_CHANGED = "android.app.action.INTERRUPTION_FILTER_CHANGED";
    field public static final java.lang.String ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED = "android.app.action.NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED";
@@ -42231,7 +42230,6 @@ package android.test.mock {
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public android.content.ComponentName startService(android.content.Intent);
    method public android.content.ComponentName startServiceInForeground(android.content.Intent, int, android.app.Notification);
    method public boolean stopService(android.content.Intent);
    method public void unbindService(android.content.ServiceConnection);
    method public void unregisterReceiver(android.content.BroadcastReceiver);
+0 −2
Original line number Diff line number Diff line
@@ -5450,7 +5450,6 @@ package android.app {
    method public boolean removeAutomaticZenRule(java.lang.String);
    method public final void setInterruptionFilter(int);
    method public void setNotificationPolicy(android.app.NotificationManager.Policy);
    method public android.content.ComponentName startServiceInForeground(android.content.Intent, int, android.app.Notification);
    method public boolean updateAutomaticZenRule(java.lang.String, android.app.AutomaticZenRule);
    field public static final java.lang.String ACTION_INTERRUPTION_FILTER_CHANGED = "android.app.action.INTERRUPTION_FILTER_CHANGED";
    field public static final java.lang.String ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED = "android.app.action.NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED";
@@ -39103,7 +39102,6 @@ package android.test.mock {
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
    method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
    method public android.content.ComponentName startService(android.content.Intent);
    method public android.content.ComponentName startServiceInForeground(android.content.Intent, int, android.app.Notification);
    method public boolean stopService(android.content.Intent);
    method public void unbindService(android.content.ServiceConnection);
    method public void unregisterReceiver(android.content.BroadcastReceiver);
+4 −19
Original line number Diff line number Diff line
@@ -1385,14 +1385,7 @@ class ContextImpl extends Context {
    @Override
    public ComponentName startService(Intent service) {
        warnIfCallingFromSystemProcess();
        return startServiceCommon(service, -1, null, mUser);
    }

    @Override
    public ComponentName startServiceInForeground(Intent service,
            int id, Notification notification) {
        warnIfCallingFromSystemProcess();
        return startServiceCommon(service, id, notification, mUser);
        return startServiceCommon(service, mUser);
    }

    @Override
@@ -1403,24 +1396,16 @@ class ContextImpl extends Context {

    @Override
    public ComponentName startServiceAsUser(Intent service, UserHandle user) {
        return startServiceCommon(service, -1, null, user);
        return startServiceCommon(service, user);
    }

    @Override
    public ComponentName startServiceInForegroundAsUser(Intent service,
            int id, Notification notification, UserHandle user) {
        return startServiceCommon(service, id, notification, user);
    }

    private ComponentName startServiceCommon(Intent service, int id, Notification notification,
            UserHandle user) {
    private ComponentName startServiceCommon(Intent service, UserHandle user) {
        try {
            validateServiceIntent(service);
            service.prepareToLeaveProcess(this);
            ComponentName cn = ActivityManager.getService().startService(
                mMainThread.getApplicationThread(), service, service.resolveTypeIfNeeded(
                            getContentResolver()), id, notification, getOpPackageName(),
                            user.getIdentifier());
                            getContentResolver()), getOpPackageName(), user.getIdentifier());
            if (cn != null) {
                if (cn.getPackageName().equals("!")) {
                    throw new SecurityException(
+1 −2
Original line number Diff line number Diff line
@@ -128,8 +128,7 @@ interface IActivityManager {
    void finishSubActivity(in IBinder token, in String resultWho, int requestCode);
    PendingIntent getRunningServiceControlPanel(in ComponentName service);
    ComponentName startService(in IApplicationThread caller, in Intent service,
            in String resolvedType, int id, in Notification notification,
            in String callingPackage, int userId);
            in String resolvedType, in String callingPackage, int userId);
    int stopService(in IApplicationThread caller, in Intent service,
            in String resolvedType, int userId);
    int bindService(in IApplicationThread caller, in IBinder token, in Intent service,
Loading