Merge "Create People Space FeatureFlag" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
38735b0af6
@@ -33,4 +33,7 @@
|
||||
<bool name="flag_keyguard_layout">false</bool>
|
||||
|
||||
<bool name="flag_brightness_slider">false</bool>
|
||||
|
||||
<!-- People Tile flag -->
|
||||
<bool name="flag_conversations">false</bool>
|
||||
</resources>
|
||||
|
||||
@@ -127,7 +127,7 @@ public class SystemUIApplication extends Application implements
|
||||
}
|
||||
|
||||
// If SHOW_PEOPLE_SPACE is true, enable People Space widget provider.
|
||||
// TODO(b/170396074): Remove this when we don't need a widget anymore.
|
||||
// TODO(b/170396074): Migrate to new feature flag (go/silk-flags-howto)
|
||||
try {
|
||||
int showPeopleSpace = Settings.Global.getInt(context.getContentResolver(),
|
||||
Settings.Global.SHOW_PEOPLE_SPACE, 1);
|
||||
|
||||
@@ -66,4 +66,8 @@ public class FeatureFlags {
|
||||
public boolean useNewBrightnessSlider() {
|
||||
return mFlagReader.isEnabled(R.bool.flag_brightness_slider);
|
||||
}
|
||||
|
||||
public boolean isPeopleTileEnabled() {
|
||||
return mFlagReader.isEnabled(R.bool.flag_conversations);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import android.util.Log;
|
||||
import com.android.systemui.Dumpable;
|
||||
import com.android.systemui.dagger.SysUISingleton;
|
||||
import com.android.systemui.dump.DumpManager;
|
||||
import com.android.systemui.people.widget.PeopleSpaceWidgetManager;
|
||||
import com.android.systemui.statusbar.FeatureFlags;
|
||||
import com.android.systemui.statusbar.NotificationListener;
|
||||
import com.android.systemui.statusbar.notification.collection.NotifCollection;
|
||||
@@ -50,7 +49,6 @@ public class NotifPipelineInitializer implements Dumpable {
|
||||
private final ShadeListBuilder mListBuilder;
|
||||
private final NotifCoordinators mNotifPluggableCoordinators;
|
||||
private final NotifInflaterImpl mNotifInflater;
|
||||
private final PeopleSpaceWidgetManager mPeopleSpaceWidgetManager;
|
||||
private final DumpManager mDumpManager;
|
||||
private final ShadeViewManagerFactory mShadeViewManagerFactory;
|
||||
private final FeatureFlags mFeatureFlags;
|
||||
@@ -64,7 +62,6 @@ public class NotifPipelineInitializer implements Dumpable {
|
||||
ShadeListBuilder listBuilder,
|
||||
NotifCoordinators notifCoordinators,
|
||||
NotifInflaterImpl notifInflater,
|
||||
PeopleSpaceWidgetManager peopleSpaceWidgetManager,
|
||||
DumpManager dumpManager,
|
||||
ShadeViewManagerFactory shadeViewManagerFactory,
|
||||
FeatureFlags featureFlags) {
|
||||
@@ -75,7 +72,6 @@ public class NotifPipelineInitializer implements Dumpable {
|
||||
mNotifPluggableCoordinators = notifCoordinators;
|
||||
mDumpManager = dumpManager;
|
||||
mNotifInflater = notifInflater;
|
||||
mPeopleSpaceWidgetManager = peopleSpaceWidgetManager;
|
||||
mShadeViewManagerFactory = shadeViewManagerFactory;
|
||||
mFeatureFlags = featureFlags;
|
||||
}
|
||||
@@ -103,7 +99,6 @@ public class NotifPipelineInitializer implements Dumpable {
|
||||
mListBuilder.attach(mNotifCollection);
|
||||
mNotifCollection.attach(mGroupCoalescer);
|
||||
mGroupCoalescer.attach(notificationService);
|
||||
mPeopleSpaceWidgetManager.attach(notificationService);
|
||||
|
||||
Log.d(TAG, "Notif pipeline initialized");
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.android.systemui.statusbar.notification.init
|
||||
|
||||
import android.service.notification.StatusBarNotification
|
||||
import com.android.systemui.dagger.SysUISingleton
|
||||
import com.android.systemui.people.widget.PeopleSpaceWidgetManager
|
||||
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption
|
||||
import com.android.systemui.statusbar.FeatureFlags
|
||||
import com.android.systemui.statusbar.NotificationListener
|
||||
@@ -73,7 +74,8 @@ class NotificationsControllerImpl @Inject constructor(
|
||||
private val headsUpController: HeadsUpController,
|
||||
private val headsUpViewBinder: HeadsUpViewBinder,
|
||||
private val clickerBuilder: NotificationClicker.Builder,
|
||||
private val animatedImageNotificationManager: AnimatedImageNotificationManager
|
||||
private val animatedImageNotificationManager: AnimatedImageNotificationManager,
|
||||
private val peopleSpaceWidgetManager: PeopleSpaceWidgetManager
|
||||
) : NotificationsController {
|
||||
|
||||
override fun initialize(
|
||||
@@ -126,6 +128,10 @@ class NotificationsControllerImpl @Inject constructor(
|
||||
|
||||
entryManager.attach(notificationListener)
|
||||
}
|
||||
|
||||
if (featureFlags.isPeopleTileEnabled) {
|
||||
peopleSpaceWidgetManager.attach(notificationListener)
|
||||
}
|
||||
}
|
||||
|
||||
override fun dump(
|
||||
|
||||
Reference in New Issue
Block a user