14619ae065235f759789641f4622609491151e872Philip P. Moltmann/* 24619ae065235f759789641f4622609491151e872Philip P. Moltmann * Copyright (C) 2017 The Android Open Source Project 34619ae065235f759789641f4622609491151e872Philip P. Moltmann * 44619ae065235f759789641f4622609491151e872Philip P. Moltmann * Licensed under the Apache License, Version 2.0 (the "License"); 54619ae065235f759789641f4622609491151e872Philip P. Moltmann * you may not use this file except in compliance with the License. 64619ae065235f759789641f4622609491151e872Philip P. Moltmann * You may obtain a copy of the License at 74619ae065235f759789641f4622609491151e872Philip P. Moltmann * 84619ae065235f759789641f4622609491151e872Philip P. Moltmann * http://www.apache.org/licenses/LICENSE-2.0 94619ae065235f759789641f4622609491151e872Philip P. Moltmann * 104619ae065235f759789641f4622609491151e872Philip P. Moltmann * Unless required by applicable law or agreed to in writing, software 114619ae065235f759789641f4622609491151e872Philip P. Moltmann * distributed under the License is distributed on an "AS IS" BASIS, 124619ae065235f759789641f4622609491151e872Philip P. Moltmann * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134619ae065235f759789641f4622609491151e872Philip P. Moltmann * See the License for the specific language governing permissions and 144619ae065235f759789641f4622609491151e872Philip P. Moltmann * limitations under the License. 154619ae065235f759789641f4622609491151e872Philip P. Moltmann */ 164619ae065235f759789641f4622609491151e872Philip P. Moltmann 174619ae065235f759789641f4622609491151e872Philip P. Moltmannpackage com.android.settings.applications; 184619ae065235f759789641f4622609491151e872Philip P. Moltmann 194619ae065235f759789641f4622609491151e872Philip P. Moltmannimport android.view.autofill.AutofillManager; 204619ae065235f759789641f4622609491151e872Philip P. Moltmann 214619ae065235f759789641f4622609491151e872Philip P. Moltmannpublic class AutofillManagerWrapperImpl implements AutofillManagerWrapper { 224619ae065235f759789641f4622609491151e872Philip P. Moltmann private final AutofillManager mAfm; 234619ae065235f759789641f4622609491151e872Philip P. Moltmann 244619ae065235f759789641f4622609491151e872Philip P. Moltmann public AutofillManagerWrapperImpl(AutofillManager afm) { 254619ae065235f759789641f4622609491151e872Philip P. Moltmann mAfm = afm; 264619ae065235f759789641f4622609491151e872Philip P. Moltmann } 274619ae065235f759789641f4622609491151e872Philip P. Moltmann 284619ae065235f759789641f4622609491151e872Philip P. Moltmann @Override 294619ae065235f759789641f4622609491151e872Philip P. Moltmann public boolean hasAutofillFeature() { 304619ae065235f759789641f4622609491151e872Philip P. Moltmann if (mAfm == null) { 314619ae065235f759789641f4622609491151e872Philip P. Moltmann return false; 324619ae065235f759789641f4622609491151e872Philip P. Moltmann } 334619ae065235f759789641f4622609491151e872Philip P. Moltmann 344619ae065235f759789641f4622609491151e872Philip P. Moltmann return mAfm.hasAutofillFeature(); 354619ae065235f759789641f4622609491151e872Philip P. Moltmann } 364619ae065235f759789641f4622609491151e872Philip P. Moltmann 374619ae065235f759789641f4622609491151e872Philip P. Moltmann @Override 384619ae065235f759789641f4622609491151e872Philip P. Moltmann public boolean isAutofillSupported() { 394619ae065235f759789641f4622609491151e872Philip P. Moltmann if (mAfm == null) { 404619ae065235f759789641f4622609491151e872Philip P. Moltmann return false; 414619ae065235f759789641f4622609491151e872Philip P. Moltmann } 424619ae065235f759789641f4622609491151e872Philip P. Moltmann 434619ae065235f759789641f4622609491151e872Philip P. Moltmann return mAfm.isAutofillSupported(); 444619ae065235f759789641f4622609491151e872Philip P. Moltmann } 454619ae065235f759789641f4622609491151e872Philip P. Moltmann} 46