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

Commit 10cd9986 authored by Andy Wickham's avatar Andy Wickham Committed by Automerger Merge Worker
Browse files

Merge "Removes UniversalSmartspace BroadcastReceiver." into rvc-dev am: 8e11fb50

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11795363

Change-Id: Ief3fd777c38f623c41032a762d62781ce1f6e96b
parents 7f2d0cdd 8e11fb50
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -141,14 +141,6 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
        mLayoutTransition.setAnimateParentHierarchy(false);
    }

    // Temporary workaround to allow KeyguardStatusView to inflate a copy for Universal Smartspace.
    // Eventually the existing copy will be reparented instead, and we won't need this.
    public KeyguardSliceView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, Dependency.get(ActivityStarter.class),
                Dependency.get(ConfigurationController.class), Dependency.get(TunerService.class),
                context.getResources());
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
+0 −23
Original line number Diff line number Diff line
@@ -18,10 +18,7 @@ package com.android.keyguard;

import android.app.ActivityManager;
import android.app.IActivityManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Handler;
@@ -43,8 +40,6 @@ import androidx.core.graphics.ColorUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.shared.system.SurfaceViewRequestReceiver;
import com.android.systemui.shared.system.UniversalSmartspaceUtils;
import com.android.systemui.statusbar.policy.ConfigurationController;

import java.io.FileDescriptor;
@@ -127,21 +122,6 @@ public class KeyguardStatusView extends GridLayout implements
        }
    };

    private final BroadcastReceiver mUniversalSmartspaceBroadcastReceiver =
            new BroadcastReceiver() {
        private final SurfaceViewRequestReceiver mReceiver = new SurfaceViewRequestReceiver();

        @Override
        public void onReceive(Context context, Intent i) {
            // TODO(b/148159743): Restrict to Pixel Launcher.
            if (UniversalSmartspaceUtils.ACTION_REQUEST_SMARTSPACE_VIEW.equals(i.getAction())) {
                mReceiver.onReceive(context,
                        i.getBundleExtra(UniversalSmartspaceUtils.INTENT_BUNDLE_KEY),
                        inflate(mContext, R.layout.keyguard_status_area, null));
            }
        }
    };

    public KeyguardStatusView(Context context) {
        this(context, null, 0);
    }
@@ -336,8 +316,6 @@ public class KeyguardStatusView extends GridLayout implements
        super.onAttachedToWindow();
        Dependency.get(KeyguardUpdateMonitor.class).registerCallback(mInfoCallback);
        Dependency.get(ConfigurationController.class).addCallback(this);
        getContext().registerReceiver(mUniversalSmartspaceBroadcastReceiver,
                new IntentFilter(UniversalSmartspaceUtils.ACTION_REQUEST_SMARTSPACE_VIEW));
    }

    @Override
@@ -345,7 +323,6 @@ public class KeyguardStatusView extends GridLayout implements
        super.onDetachedFromWindow();
        Dependency.get(KeyguardUpdateMonitor.class).removeCallback(mInfoCallback);
        Dependency.get(ConfigurationController.class).removeCallback(this);
        getContext().unregisterReceiver(mUniversalSmartspaceBroadcastReceiver);
    }

    @Override