Removes UniversalSmartspace BroadcastReceiver.

Fixes: 148159743
Test: Verified manually
Change-Id: I1dbcdb795c6872053e3f71503c3e52eba019d7bd
This commit is contained in:
Andy Wickham
2020-06-08 23:06:35 +00:00
parent 726f96be0d
commit ea90fe3b4c
2 changed files with 0 additions and 31 deletions

View File

@@ -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();

View File

@@ -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