Settings: Update to follow NotificationManager aidl change.
Depends on frameworks/base: I1d8269a4e6fe170ce776bf932dbbdfb29dd25dd7 Change-Id: I4015b60d84541a1f3d9e9c506ab8f44f1d18f71f
This commit is contained in:
committed by
Dan Sandler
parent
86370f5dfd
commit
a7f8addd09
@@ -54,14 +54,14 @@ public class ZenModeConditionSelection extends RadioGroup {
|
|||||||
b.setChecked(true);
|
b.setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private RadioButton newRadioButton(Object tag) {
|
private RadioButton newRadioButton(Condition condition) {
|
||||||
final RadioButton button = new RadioButton(mContext);
|
final RadioButton button = new RadioButton(mContext);
|
||||||
button.setTag(tag);
|
button.setTag(condition);
|
||||||
button.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
button.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
handleSubscribe((Uri)button.getTag());
|
handleSubscribe((Condition) button.getTag());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -95,7 +95,7 @@ public class ZenModeConditionSelection extends RadioGroup {
|
|||||||
RadioButton v = (RadioButton) findViewWithTag(c.id);
|
RadioButton v = (RadioButton) findViewWithTag(c.id);
|
||||||
if (c.state == Condition.STATE_TRUE || c.state == Condition.STATE_UNKNOWN) {
|
if (c.state == Condition.STATE_TRUE || c.state == Condition.STATE_UNKNOWN) {
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
v = newRadioButton(c.id);
|
v = newRadioButton(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (v != null) {
|
if (v != null) {
|
||||||
@@ -105,10 +105,10 @@ public class ZenModeConditionSelection extends RadioGroup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleSubscribe(Uri id) {
|
protected void handleSubscribe(Condition c) {
|
||||||
if (DEBUG) Log.d(TAG, "handleSubscribe " + id);
|
if (DEBUG) Log.d(TAG, "handleSubscribe " + c);
|
||||||
try {
|
try {
|
||||||
mNoMan.setZenModeCondition(id);
|
mNoMan.setZenModeCondition(c);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
// noop
|
// noop
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user