blob: 8b6f95ca4e14fecdcfbada39f5247cfff5ccd98e [file] [log] [blame]
Kevin Chynaae4a152018-01-18 11:48:09 -08001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package com.android.systemui.fingerprint;
18
19import android.content.pm.PackageManager;
20import android.hardware.fingerprint.IFingerprintDialogReceiver;
21import android.os.Bundle;
22import android.util.Log;
23
24import com.android.systemui.SystemUI;
25import com.android.systemui.statusbar.CommandQueue;
26
27public class FingerprintDialogImpl extends SystemUI implements CommandQueue.Callbacks {
28 private static final String TAG = "FingerprintDialogImpl";
29 private static final boolean DEBUG = false;
30
31 @Override
32 public void start() {
33 if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
34 return;
35 }
36 getComponent(CommandQueue.class).addCallbacks(this);
37 }
38
39 @Override
40 public void showFingerprintDialog(Bundle bundle, IFingerprintDialogReceiver receiver) {
41 if (DEBUG) Log.d(TAG, "show fingerprint dialog");
42 }
43
44 @Override
45 public void onFingerprintAuthenticated() {
46 if (DEBUG) Log.d(TAG, "onFingerprintAuthenticated");
47 }
48
49 @Override
50 public void onFingerprintHelp(String message) {
51 if (DEBUG) Log.d(TAG, "onFingerprintHelp: " + message);
52 }
53
54 @Override
55 public void onFingerprintError(String error) {
56 if (DEBUG) Log.d(TAG, "onFingerprintError: " + error);
57 }
58
59 @Override
60 public void hideFingerprintDialog() {
61 if (DEBUG) Log.d(TAG, "hideFingerprintDialog");
62 }
63}