Merge "Rename DreamsSmartspaceController to DreamSmartspaceController." into tm-qpr-dev
This commit is contained in:
@@ -26,7 +26,7 @@ import com.android.systemui.CoreStartable;
|
|||||||
import com.android.systemui.dreams.complication.Complication;
|
import com.android.systemui.dreams.complication.Complication;
|
||||||
import com.android.systemui.dreams.complication.ComplicationLayoutParams;
|
import com.android.systemui.dreams.complication.ComplicationLayoutParams;
|
||||||
import com.android.systemui.dreams.complication.ComplicationViewModel;
|
import com.android.systemui.dreams.complication.ComplicationViewModel;
|
||||||
import com.android.systemui.dreams.smartspace.DreamsSmartspaceController;
|
import com.android.systemui.dreams.smartspace.DreamSmartspaceController;
|
||||||
import com.android.systemui.plugins.BcSmartspaceDataPlugin;
|
import com.android.systemui.plugins.BcSmartspaceDataPlugin;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -43,7 +43,7 @@ public class SmartSpaceComplication implements Complication {
|
|||||||
* SystemUI.
|
* SystemUI.
|
||||||
*/
|
*/
|
||||||
public static class Registrant extends CoreStartable {
|
public static class Registrant extends CoreStartable {
|
||||||
private final DreamsSmartspaceController mSmartSpaceController;
|
private final DreamSmartspaceController mSmartSpaceController;
|
||||||
private final DreamOverlayStateController mDreamOverlayStateController;
|
private final DreamOverlayStateController mDreamOverlayStateController;
|
||||||
private final SmartSpaceComplication mComplication;
|
private final SmartSpaceComplication mComplication;
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ public class SmartSpaceComplication implements Complication {
|
|||||||
public Registrant(Context context,
|
public Registrant(Context context,
|
||||||
DreamOverlayStateController dreamOverlayStateController,
|
DreamOverlayStateController dreamOverlayStateController,
|
||||||
SmartSpaceComplication smartSpaceComplication,
|
SmartSpaceComplication smartSpaceComplication,
|
||||||
DreamsSmartspaceController smartSpaceController) {
|
DreamSmartspaceController smartSpaceController) {
|
||||||
super(context);
|
super(context);
|
||||||
mDreamOverlayStateController = dreamOverlayStateController;
|
mDreamOverlayStateController = dreamOverlayStateController;
|
||||||
mComplication = smartSpaceComplication;
|
mComplication = smartSpaceComplication;
|
||||||
@@ -90,12 +90,12 @@ public class SmartSpaceComplication implements Complication {
|
|||||||
|
|
||||||
private static class SmartSpaceComplicationViewHolder implements ViewHolder {
|
private static class SmartSpaceComplicationViewHolder implements ViewHolder {
|
||||||
private static final int SMARTSPACE_COMPLICATION_WEIGHT = 10;
|
private static final int SMARTSPACE_COMPLICATION_WEIGHT = 10;
|
||||||
private final DreamsSmartspaceController mSmartSpaceController;
|
private final DreamSmartspaceController mSmartSpaceController;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
|
||||||
protected SmartSpaceComplicationViewHolder(
|
protected SmartSpaceComplicationViewHolder(
|
||||||
Context context,
|
Context context,
|
||||||
DreamsSmartspaceController smartSpaceController) {
|
DreamSmartspaceController smartSpaceController) {
|
||||||
mSmartSpaceController = smartSpaceController;
|
mSmartSpaceController = smartSpaceController;
|
||||||
mContext = context;
|
mContext = context;
|
||||||
}
|
}
|
||||||
@@ -120,12 +120,12 @@ public class SmartSpaceComplication implements Complication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final DreamsSmartspaceController mSmartSpaceController;
|
private final DreamSmartspaceController mSmartSpaceController;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public SmartSpaceComplication(Context context,
|
public SmartSpaceComplication(Context context,
|
||||||
DreamsSmartspaceController smartSpaceController) {
|
DreamSmartspaceController smartSpaceController) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mSmartSpaceController = smartSpaceController;
|
mSmartSpaceController = smartSpaceController;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import javax.inject.Named
|
|||||||
* Controller for managing the smartspace view on the dream
|
* Controller for managing the smartspace view on the dream
|
||||||
*/
|
*/
|
||||||
@SysUISingleton
|
@SysUISingleton
|
||||||
class DreamsSmartspaceController @Inject constructor(
|
class DreamSmartspaceController @Inject constructor(
|
||||||
private val context: Context,
|
private val context: Context,
|
||||||
private val smartspaceManager: SmartspaceManager,
|
private val smartspaceManager: SmartspaceManager,
|
||||||
private val execution: Execution,
|
private val execution: Execution,
|
||||||
@@ -58,7 +58,7 @@ class DreamsSmartspaceController @Inject constructor(
|
|||||||
@Named(DREAM_SMARTSPACE_DATA_PLUGIN) optionalPlugin: Optional<BcSmartspaceDataPlugin>
|
@Named(DREAM_SMARTSPACE_DATA_PLUGIN) optionalPlugin: Optional<BcSmartspaceDataPlugin>
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "DreamsSmartspaceCtrlr"
|
private const val TAG = "DreamSmartspaceCtrlr"
|
||||||
}
|
}
|
||||||
|
|
||||||
private var session: SmartspaceSession? = null
|
private var session: SmartspaceSession? = null
|
||||||
@@ -27,7 +27,7 @@ import android.testing.AndroidTestingRunner;
|
|||||||
import androidx.test.filters.SmallTest;
|
import androidx.test.filters.SmallTest;
|
||||||
|
|
||||||
import com.android.systemui.SysuiTestCase;
|
import com.android.systemui.SysuiTestCase;
|
||||||
import com.android.systemui.dreams.smartspace.DreamsSmartspaceController;
|
import com.android.systemui.dreams.smartspace.DreamSmartspaceController;
|
||||||
import com.android.systemui.plugins.BcSmartspaceDataPlugin;
|
import com.android.systemui.plugins.BcSmartspaceDataPlugin;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@@ -47,7 +47,7 @@ public class SmartSpaceComplicationTest extends SysuiTestCase {
|
|||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
private DreamsSmartspaceController mSmartspaceController;
|
private DreamSmartspaceController mSmartspaceController;
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
private DreamOverlayStateController mDreamOverlayStateController;
|
private DreamOverlayStateController mDreamOverlayStateController;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.test.filters.SmallTest
|
import androidx.test.filters.SmallTest
|
||||||
import com.android.systemui.SysuiTestCase
|
import com.android.systemui.SysuiTestCase
|
||||||
import com.android.systemui.dreams.smartspace.DreamsSmartspaceController
|
import com.android.systemui.dreams.smartspace.DreamSmartspaceController
|
||||||
import com.android.systemui.plugins.BcSmartspaceDataPlugin
|
import com.android.systemui.plugins.BcSmartspaceDataPlugin
|
||||||
import com.android.systemui.plugins.FalsingManager
|
import com.android.systemui.plugins.FalsingManager
|
||||||
import com.android.systemui.smartspace.dagger.SmartspaceViewComponent
|
import com.android.systemui.smartspace.dagger.SmartspaceViewComponent
|
||||||
@@ -97,7 +97,7 @@ class DreamSmartspaceControllerTest : SysuiTestCase() {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
fun testConnectOnListen() {
|
fun testConnectOnListen() {
|
||||||
val controller = DreamsSmartspaceController(context,
|
val controller = DreamSmartspaceController(context,
|
||||||
smartspaceManager, execution, uiExecutor, viewComponentFactory, precondition,
|
smartspaceManager, execution, uiExecutor, viewComponentFactory, precondition,
|
||||||
Optional.of(targetFilter), Optional.of(plugin))
|
Optional.of(targetFilter), Optional.of(plugin))
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ class DreamSmartspaceControllerTest : SysuiTestCase() {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
fun testConnectOnViewCreate() {
|
fun testConnectOnViewCreate() {
|
||||||
val controller = DreamsSmartspaceController(context,
|
val controller = DreamSmartspaceController(context,
|
||||||
smartspaceManager, execution, uiExecutor, viewComponentFactory, precondition,
|
smartspaceManager, execution, uiExecutor, viewComponentFactory, precondition,
|
||||||
Optional.of(targetFilter),
|
Optional.of(targetFilter),
|
||||||
Optional.of(plugin))
|
Optional.of(plugin))
|
||||||
|
|||||||
Reference in New Issue
Block a user