Allow DND events rule to choose custom calendars
For the System DND Events rule, users can now select custom calendars they are contributors to that are synced to their device. Test: atest /extra/master/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ZenModeEventRuleSettingsTest.java Bug: 113368047 Change-Id: I1b81c528655b8f68867d881cee8125aa2b027eaa
This commit is contained in:
@@ -36,9 +36,6 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
|
||||
import com.android.settings.utils.ZenServiceListing;
|
||||
@@ -49,6 +46,9 @@ import java.util.Comparator;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
public class ZenRuleSelectionDialog extends InstrumentedDialogFragment {
|
||||
private static final String TAG = "ZenRuleSelectionDialog";
|
||||
private static final boolean DEBUG = ZenModeSettings.DEBUG;
|
||||
@@ -170,7 +170,8 @@ public class ZenRuleSelectionDialog extends InstrumentedDialogFragment {
|
||||
|
||||
private ZenRuleInfo defaultNewEvent() {
|
||||
final ZenModeConfig.EventInfo event = new ZenModeConfig.EventInfo();
|
||||
event.calendar = null; // any calendar
|
||||
event.calName = null; // any calendar
|
||||
event.calendarId = null;
|
||||
event.reply = ZenModeConfig.EventInfo.REPLY_ANY_EXCEPT_NO;
|
||||
final ZenRuleInfo rt = new ZenRuleInfo();
|
||||
rt.settingsAction = ZenModeEventRuleSettings.ACTION;
|
||||
|
||||
Reference in New Issue
Block a user