Merge "VPN: Convert current-context IPCs to user context" into mnc-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6c04af2..dc01c24 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -191,6 +191,8 @@
android:value="com.android.settings.wifi.WifiSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/wifi_settings" />
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
</activity>
<!-- Keep compatibility with old shortcuts. -->
@@ -217,6 +219,8 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
</activity>
<activity android:name=".wifi.WifiSetupActivity"
@@ -230,6 +234,8 @@
<action android:name="com.android.net.wifi.SETUP_WIFI_NETWORK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
</activity>
<activity android:name="Settings$AdvancedWifiSettingsActivity"
@@ -250,6 +256,8 @@
android:value="com.android.settings.wifi.AdvancedWifiSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/wifi_settings" />
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
</activity>
<activity android:name="Settings$SavedAccessPointsSettingsActivity"
@@ -269,6 +277,8 @@
android:value="com.android.settings.wifi.SavedAccessPointsSettings" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
android:resource="@id/wifi_settings" />
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
</activity>
<activity android:name=".wifi.WifiInfo"
@@ -322,6 +332,8 @@
<action android:name="android.net.conn.PROMPT_UNVALIDATED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
</activity>
<!-- Suspect activity alias: targetActivity is Settings itself, does not define a name. Remove? -->
diff --git a/res/layout/weak_biometric_fallback_header.xml b/res/layout/weak_biometric_fallback_header.xml
deleted file mode 100644
index 5f9c2a2..0000000
--- a/res/layout/weak_biometric_fallback_header.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="8dip"
- android:gravity="center"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/unlock_backup_info_summary"
-/>
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8868f6b..a4066c1 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -938,9 +938,6 @@
<!-- Title for security picker to choose the unlock method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
<string name="lock_settings_picker_title">Choose screen lock</string>
- <!-- Title for security picker when choosing a facelock's backup unlock method: Pattern/PIN [CHAR LIMIT=22] -->
- <string name="backup_lock_settings_picker_title">Choose backup lock</string>
-
<!-- Main Security lock settings --><skip />
<!-- Title for PreferenceScreen to launch picker for security method when there is none [CHAR LIMIT=22] -->
<string name="unlock_set_unlock_launch_picker_title">Screen lock</string>
@@ -954,9 +951,6 @@
<!-- Summary for PreferenceScreen to changeecurity method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
<string name="unlock_set_unlock_launch_picker_enable_summary">Choose a method to lock the screen</string>
- <!-- Info explaining the backup lock which is used for facelock -->
- <string name="unlock_backup_info_summary">When Face Unlock can\u2019t see you, how do you want to unlock?</string>
-
<!-- Title for preference that disables unlock security [CHAR LIMIT=22] -->
<string name="unlock_set_unlock_off_title">None</string>
<!-- Summary for preference that disables unlock security [CHAR LIMIT=45] -->
@@ -6104,51 +6098,36 @@
<string name="zen_event_rule_enabled_toast">Automatic rule set to turn on Do Not Disturb during specified events</string>
<!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule calendar option title -->
- <string name="zen_mode_event_rule_calendar">Calendar</string>
+ <string name="zen_mode_event_rule_calendar">During events for</string>
+
+ <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule summary fragment: During events for -->
+ <string name="zen_mode_event_rule_summary_calendar_template">During events for <xliff:g id="calendar" example="any calendar">%1$s</xliff:g></string>
<!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule summary fragment: any calendar -->
- <string name="zen_mode_event_rule_summary_any_calendar">Any calendar</string>
+ <string name="zen_mode_event_rule_summary_any_calendar">any calendar</string>
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule summary fragment: any reply -->
- <string name="zen_mode_event_rule_summary_any_reply">Any reply</string>
+ <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule summary fragment: Where reply is -->
+ <string name="zen_mode_event_rule_summary_reply_template">Where reply is <xliff:g id="reply" example="Yes, Maybe, or Not replied">%1$s</xliff:g></string>
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule summary fragment: any reply except no -->
- <string name="zen_mode_event_rule_summary_any_reply_except_no">Any reply except no</string>
-
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule summary fragment: replied yes -->
- <string name="zen_mode_event_rule_summary_replied_yes">Replied yes</string>
-
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule calendar option value for any calendar-->
- <string name="zen_mode_event_rule_calendar_any">Any</string>
-
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule attendance option title -->
- <string name="zen_mode_event_rule_attendance">Attendance</string>
-
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule attendance option value: required or optional -->
- <string name="zen_mode_event_rule_attendance_required_optional">Required or optional</string>
-
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule attendance option value: required -->
- <string name="zen_mode_event_rule_attendance_required">Required</string>
-
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule attendance option value: optional -->
- <string name="zen_mode_event_rule_attendance_optional">Optional</string>
+ <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule calendar option value for any calendar -->
+ <string name="zen_mode_event_rule_calendar_any">Any calendar</string>
<!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule reply option title -->
- <string name="zen_mode_event_rule_reply">Reply</string>
+ <string name="zen_mode_event_rule_reply">Where reply is</string>
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule reply option value: Any -->
- <string name="zen_mode_event_rule_reply_any">Any</string>
+ <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule reply option value: Yes, Maybe, or Not replied -->
+ <string name="zen_mode_event_rule_reply_any_except_no">Yes, Maybe, or Not replied</string>
- <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule reply option value: Any except no-->
- <string name="zen_mode_event_rule_reply_any_except_no">Any except no</string>
+ <!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule reply option value: Yes or Maybe -->
+ <string name="zen_mode_event_rule_reply_yes_or_maybe">Yes or Maybe</string>
<!-- [CHAR LIMIT=40] Zen mode settings: Event-based rule reply option value: Yes -->
<string name="zen_mode_event_rule_reply_yes">Yes</string>
- <!-- [CHAR LIMIT=40] Zen mode settings: Text to display if rule isn't found -->
+ <!-- [CHAR LIMIT=40] Zen mode settings: Text to display if rule isn't found -->
<string name="zen_mode_rule_not_found_text">Rule not found.</string>
- <!-- [CHAR LIMIT=40] Zen mode settings: Rule summary template (when enabled) -->
+ <!-- [CHAR LIMIT=40] Zen mode settings: Rule summary template (when enabled) -->
<string name="zen_mode_rule_summary_combination"><xliff:g id="description" example="Sun - Thu">%1$s</xliff:g> / <xliff:g id="mode" example="Alarms only">%2$s</xliff:g></string>
<!-- [CHAR LIMIT=40] Zen mode settings: Time-based rule days option title -->
diff --git a/res/xml/zen_mode_event_rule_settings.xml b/res/xml/zen_mode_event_rule_settings.xml
index acad96c..2519fc1 100644
--- a/res/xml/zen_mode_event_rule_settings.xml
+++ b/res/xml/zen_mode_event_rule_settings.xml
@@ -24,19 +24,13 @@
android:title="@string/zen_mode_rule_name"
android:persistent="false" />
- <!-- Calendar -->
+ <!-- During events for -->
<com.android.settings.DropDownPreference
android:key="calendar"
android:title="@string/zen_mode_event_rule_calendar"
android:persistent="false" />
- <!-- Attendance -->
- <com.android.settings.DropDownPreference
- android:key="attendance"
- android:title="@string/zen_mode_event_rule_attendance"
- android:persistent="false" />
-
- <!-- Reply -->
+ <!-- Where reply is -->
<com.android.settings.DropDownPreference
android:key="reply"
android:title="@string/zen_mode_event_rule_reply"
diff --git a/src/com/android/settings/notification/ZenModeAutomationSettings.java b/src/com/android/settings/notification/ZenModeAutomationSettings.java
index e33e32f..5b62844 100644
--- a/src/com/android/settings/notification/ZenModeAutomationSettings.java
+++ b/src/com/android/settings/notification/ZenModeAutomationSettings.java
@@ -21,6 +21,7 @@
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ServiceInfo;
+import android.content.res.Resources;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
@@ -181,7 +182,7 @@
private String computeRuleSummary(ZenRule rule) {
if (rule == null || !rule.enabled) return getString(R.string.switch_off_text);
- final String mode = ZenModeSettings.computeZenModeCaption(getResources(), rule.zenMode);
+ final String mode = computeZenModeCaption(getResources(), rule.zenMode);
String summary = getString(R.string.switch_on_text);
final ScheduleInfo schedule = ZenModeConfig.tryParseScheduleConditionId(rule.conditionId);
final EventInfo event = ZenModeConfig.tryParseEventConditionId(rule.conditionId);
@@ -202,11 +203,11 @@
}
private String computeEventRuleSummary(EventInfo event) {
- final String calendar = computeCalendarName(event);
- final String attendance = getString(computeAttendance(event));
- final String reply = getString(computeReply(event));
- return getString(R.string.zen_mode_rule_summary_combination,
- getString(R.string.zen_mode_rule_summary_combination, calendar, attendance), reply);
+ final String calendar = getString(R.string.zen_mode_event_rule_summary_calendar_template,
+ computeCalendarName(event));
+ final String reply = getString(R.string.zen_mode_event_rule_summary_reply_template,
+ getString(computeReply(event)));
+ return getString(R.string.zen_mode_rule_summary_combination, calendar, reply);
}
private String computeCalendarName(EventInfo event) {
@@ -222,25 +223,16 @@
return getString(R.string.zen_mode_event_rule_summary_any_calendar);
}
- private int computeAttendance(EventInfo event) {
- switch (event.attendance) {
- case EventInfo.ATTENDANCE_REQUIRED:
- return R.string.zen_mode_event_rule_attendance_required;
- case EventInfo.ATTENDANCE_OPTIONAL:
- return R.string.zen_mode_event_rule_attendance_optional;
- default:
- return R.string.zen_mode_event_rule_attendance_required_optional;
- }
- }
-
private int computeReply(EventInfo event) {
switch (event.reply) {
case EventInfo.REPLY_ANY_EXCEPT_NO:
- return R.string.zen_mode_event_rule_summary_any_reply_except_no;
+ return R.string.zen_mode_event_rule_reply_any_except_no;
case EventInfo.REPLY_YES:
- return R.string.zen_mode_event_rule_summary_replied_yes;
+ return R.string.zen_mode_event_rule_reply_yes;
+ case EventInfo.REPLY_YES_OR_MAYBE:
+ return R.string.zen_mode_event_rule_reply_yes_or_maybe;
default:
- return R.string.zen_mode_event_rule_summary_any_reply;
+ throw new IllegalArgumentException("Bad reply: " + event.reply);
}
}
@@ -298,6 +290,19 @@
return c;
}
+ private static String computeZenModeCaption(Resources res, int zenMode) {
+ switch (zenMode) {
+ case Global.ZEN_MODE_ALARMS:
+ return res.getString(R.string.zen_mode_option_alarms);
+ case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
+ return res.getString(R.string.zen_mode_option_important_interruptions);
+ case Global.ZEN_MODE_NO_INTERRUPTIONS:
+ return res.getString(R.string.zen_mode_option_no_interruptions);
+ default:
+ return null;
+ }
+ }
+
private final ServiceListing.Callback mServiceListingCallback = new ServiceListing.Callback() {
@Override
public void onServicesReloaded(List<ServiceInfo> services) {
diff --git a/src/com/android/settings/notification/ZenModeConditionSelection.java b/src/com/android/settings/notification/ZenModeConditionSelection.java
index 481bd88..248e35e 100644
--- a/src/com/android/settings/notification/ZenModeConditionSelection.java
+++ b/src/com/android/settings/notification/ZenModeConditionSelection.java
@@ -27,6 +27,7 @@
import android.service.notification.Condition;
import android.service.notification.IConditionListener;
import android.service.notification.ZenModeConfig;
+import android.text.TextUtils;
import android.util.Log;
import android.widget.CompoundButton;
import android.widget.RadioButton;
@@ -119,7 +120,7 @@
}
}
if (v != null) {
- v.setText(ZenModeSettings.computeConditionText(c));
+ v.setText(computeConditionText(c));
v.setEnabled(c.state == Condition.STATE_TRUE);
}
mConditions.add(c);
@@ -139,6 +140,12 @@
}
}
+ private static String computeConditionText(Condition c) {
+ return !TextUtils.isEmpty(c.line1) ? c.line1
+ : !TextUtils.isEmpty(c.summary) ? c.summary
+ : "";
+ }
+
private final IConditionListener mListener = new IConditionListener.Stub() {
@Override
public void onConditionsReceived(Condition[] conditions) {
diff --git a/src/com/android/settings/notification/ZenModeEventRuleSettings.java b/src/com/android/settings/notification/ZenModeEventRuleSettings.java
index 38581b6..29738b3 100644
--- a/src/com/android/settings/notification/ZenModeEventRuleSettings.java
+++ b/src/com/android/settings/notification/ZenModeEventRuleSettings.java
@@ -31,13 +31,11 @@
public class ZenModeEventRuleSettings extends ZenModeRuleSettingsBase {
private static final String KEY_CALENDAR = "calendar";
- private static final String KEY_ATTENDANCE = "attendance";
private static final String KEY_REPLY = "reply";
public static final String ACTION = Settings.ACTION_ZEN_MODE_EVENT_RULE_SETTINGS;
private DropDownPreference mCalendar;
- private DropDownPreference mAttendance;
private DropDownPreference mReply;
private EventInfo mEvent;
@@ -92,29 +90,11 @@
}
});
- mAttendance = (DropDownPreference) root.findPreference(KEY_ATTENDANCE);
- mAttendance.addItem(R.string.zen_mode_event_rule_attendance_required_optional,
- EventInfo.ATTENDANCE_REQUIRED_OR_OPTIONAL);
- mAttendance.addItem(R.string.zen_mode_event_rule_attendance_required,
- EventInfo.ATTENDANCE_REQUIRED);
- mAttendance.addItem(R.string.zen_mode_event_rule_attendance_optional,
- EventInfo.ATTENDANCE_OPTIONAL);
- mAttendance.setCallback(new DropDownPreference.Callback() {
- @Override
- public boolean onItemSelected(int pos, Object value) {
- final int attendance = (Integer) value;
- if (attendance == mEvent.attendance) return true;
- mEvent.attendance = attendance;
- updateRule(ZenModeConfig.toEventConditionId(mEvent));
- return true;
- }
- });
-
mReply = (DropDownPreference) root.findPreference(KEY_REPLY);
- mReply.addItem(R.string.zen_mode_event_rule_reply_any,
- EventInfo.REPLY_ANY);
mReply.addItem(R.string.zen_mode_event_rule_reply_any_except_no,
EventInfo.REPLY_ANY_EXCEPT_NO);
+ mReply.addItem(R.string.zen_mode_event_rule_reply_yes_or_maybe,
+ EventInfo.REPLY_YES_OR_MAYBE);
mReply.addItem(R.string.zen_mode_event_rule_reply_yes,
EventInfo.REPLY_YES);
mReply.setCallback(new DropDownPreference.Callback() {
@@ -135,7 +115,6 @@
@Override
protected void updateControlsInternal() {
mCalendar.setSelectedValue(mEvent.calendar);
- mAttendance.setSelectedValue(mEvent.attendance);
mReply.setSelectedValue(mEvent.reply);
}
diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java
index 34abf59..22a203c 100644
--- a/src/com/android/settings/notification/ZenModeSettings.java
+++ b/src/com/android/settings/notification/ZenModeSettings.java
@@ -16,44 +16,27 @@
package com.android.settings.notification;
-import android.app.AlertDialog;
import android.content.Context;
-import android.content.DialogInterface;
import android.content.res.Resources;
import android.os.Bundle;
-import android.os.UserHandle;
import android.preference.Preference;
import android.preference.PreferenceScreen;
-import android.provider.Settings.Global;
-import android.service.notification.Condition;
-import android.service.notification.ZenModeConfig;
-import android.text.TextUtils;
-import android.util.Log;
import android.util.SparseArray;
-import android.widget.ScrollView;
-import android.widget.Switch;
import com.android.internal.logging.MetricsLogger;
import com.android.settings.R;
-import com.android.settings.SettingsActivity;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
import com.android.settings.search.SearchIndexableRaw;
-import com.android.settings.widget.SwitchBar;
import java.util.ArrayList;
import java.util.List;
-public class ZenModeSettings extends ZenModeSettingsBase
- implements Indexable, SwitchBar.OnSwitchChangeListener {
+public class ZenModeSettings extends ZenModeSettingsBase implements Indexable {
private static final String KEY_PRIORITY_SETTINGS = "priority_settings";
private static final String KEY_AUTOMATION_SETTINGS = "automation_settings";
private Preference mPrioritySettings;
- private AlertDialog mDialog;
- private SwitchBar mSwitchBar;
- private boolean mShowing;
- private boolean mUpdatingControls;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -69,46 +52,9 @@
}
@Override
- public void onActivityCreated(Bundle savedInstanceState) {
- super.onActivityCreated(savedInstanceState);
-
- final SettingsActivity activity = (SettingsActivity) getActivity();
- mSwitchBar = activity.getSwitchBar();
- mSwitchBar.addOnSwitchChangeListener(this);
- mSwitchBar.show();
- }
-
- @Override
- public void onDestroyView() {
- super.onDestroyView();
- mSwitchBar.removeOnSwitchChangeListener(this);
- mSwitchBar.hide();
- }
-
- @Override
public void onResume() {
super.onResume();
updateControls();
- mShowing = true;
- }
-
- @Override
- public void onPause() {
- mShowing = false;
- super.onPause();
- }
-
- @Override
- public void onSwitchChanged(Switch switchView, boolean isChecked) {
- if (DEBUG) Log.d(TAG, "onSwitchChanged " + isChecked + " mShowing=" + mShowing
- + " mUpdatingControls=" + mUpdatingControls);
- if (!mShowing || mUpdatingControls) return; // not from the user
- if (isChecked) {
- setZenMode(Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS, null);
- showConditionSelection(Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
- } else {
- setZenMode(Global.ZEN_MODE_OFF, null);
- }
}
@Override
@@ -126,35 +72,7 @@
updateControls();
}
- public static String computeZenModeCaption(Resources res, int zenMode) {
- switch (zenMode) {
- case Global.ZEN_MODE_ALARMS:
- return res.getString(R.string.zen_mode_option_alarms);
- case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
- return res.getString(R.string.zen_mode_option_important_interruptions);
- case Global.ZEN_MODE_NO_INTERRUPTIONS:
- return res.getString(R.string.zen_mode_option_no_interruptions);
- default:
- return null;
- }
- }
-
- private String computeZenModeSummaryLine() {
- final String caption = computeZenModeCaption(getResources(), mZenMode);
- if (caption == null) return null; // zen mode off
- final String conditionText = ZenModeConfig.getConditionLine1(mContext, mConfig,
- UserHandle.myUserId());
- return getString(R.string.zen_mode_summary_combination, caption, conditionText);
- }
-
private void updateControls() {
- if (mSwitchBar != null) {
- final String summaryLine = computeZenModeSummaryLine();
- mUpdatingControls = true;
- mSwitchBar.setChecked(summaryLine != null);
- mUpdatingControls = false;
- mSwitchBar.setSummary(summaryLine);
- }
updatePrioritySettingsSummary();
}
@@ -176,52 +94,6 @@
return s;
}
- protected void showConditionSelection(final int zenMode) {
- if (mDialog != null) return;
-
- final ZenModeConditionSelection zenModeConditionSelection =
- new ZenModeConditionSelection(mContext, zenMode);
- DialogInterface.OnClickListener positiveListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- zenModeConditionSelection.confirmCondition();
- mDialog = null;
- }
- };
- ScrollView scrollView = new ScrollView(mContext);
- scrollView.addView(zenModeConditionSelection);
- mDialog = new AlertDialog.Builder(getActivity())
- .setTitle(computeZenModeCaption(getResources(), zenMode))
- .setView(scrollView)
- .setPositiveButton(R.string.okay, positiveListener)
- .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- cancelDialog();
- }
- })
- .setOnCancelListener(new DialogInterface.OnCancelListener() {
- @Override
- public void onCancel(DialogInterface dialog) {
- cancelDialog();
- }
- }).create();
- mDialog.show();
- }
-
- private void cancelDialog() {
- if (DEBUG) Log.d(TAG, "cancelDialog");
- // If not making a decision, reset zen to off.
- setZenMode(Global.ZEN_MODE_OFF, null);
- mDialog = null;
- }
-
- public static String computeConditionText(Condition c) {
- return !TextUtils.isEmpty(c.line1) ? c.line1
- : !TextUtils.isEmpty(c.summary) ? c.summary
- : "";
- }
-
private static SparseArray<String> allKeyTitles(Context context) {
final SparseArray<String> rt = new SparseArray<String>();
rt.put(R.string.zen_mode_priority_settings_title, KEY_PRIORITY_SETTINGS);
diff --git a/src/com/android/settings/notification/ZenRuleNameDialog.java b/src/com/android/settings/notification/ZenRuleNameDialog.java
index cd5c766..847007c 100644
--- a/src/com/android/settings/notification/ZenRuleNameDialog.java
+++ b/src/com/android/settings/notification/ZenRuleNameDialog.java
@@ -166,7 +166,6 @@
private static RuleInfo defaultNewEvent() {
final EventInfo event = new EventInfo();
event.calendar = 0; // any
- event.attendance = EventInfo.ATTENDANCE_REQUIRED_OR_OPTIONAL;
event.reply = EventInfo.REPLY_ANY_EXCEPT_NO;
final RuleInfo rt = new RuleInfo();
rt.settingsAction = ZenModeEventRuleSettings.ACTION;