From ea90fe3b4c6991c0742604ff1442f0b1000b5e3c Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Mon, 8 Jun 2020 23:06:35 +0000 Subject: [PATCH] Removes UniversalSmartspace BroadcastReceiver. Fixes: 148159743 Test: Verified manually Change-Id: I1dbcdb795c6872053e3f71503c3e52eba019d7bd --- .../android/keyguard/KeyguardSliceView.java | 8 ------- .../android/keyguard/KeyguardStatusView.java | 23 ------------------- 2 files changed, 31 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java index 9d8c54501c026..f639c880c97ae 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java @@ -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(); diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java index a181ce4b000a2..5a1c9976f0214 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java @@ -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