ManualSecretTextWatcher.java revision 7e3fa36d69ffee874dd364b8e3d9aa3cab9a273b
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * Authors: Nathaniel McCallum <npmccallum@redhat.com>
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * Copyright (C) 2013 Nathaniel McCallum, Red Hat
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * Licensed under the Apache License, Version 2.0 (the "License");
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * you may not use this file except in compliance with the License.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * You may obtain a copy of the License at
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * Unless required by applicable law or agreed to in writing, software
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * distributed under the License is distributed on an "AS IS" BASIS,
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * See the License for the specific language governing permissions and
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * limitations under the License.
65e99be301d5a19db33f25841f671756e8dbb9b5ludovicppublic class ManualSecretTextWatcher extends ManualTextWatcher {
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift public ManualSecretTextWatcher(BaseDialogActivity bda) {
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift // Ensure that = is only permitted at the end
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift boolean haveData = false;
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift char c = s.charAt(i);
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift if (c != '=')
super.afterTextChanged(s);