Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6dfee89 authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "Don\'t save a rule without a name." into nyc-dev

am: 257355af

* commit '257355af':
  Don't save a rule without a name.

Change-Id: If2c2b8d4d97c14df6c68277fed639197535c8ba9
parents 3e385425 257355af
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settings.notification;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
@@ -51,6 +52,9 @@ public abstract class ZenRuleNameDialog {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        final String newName = trimmedText();
                        if (TextUtils.isEmpty(newName)) {
                            return;
                        }
                        if (!mIsNew && mOriginalRuleName != null
                                && mOriginalRuleName.equals(newName)) {
                            return;  // no change to an existing rule, just dismiss