[Fingerprint] Add fingerprint text in setup flow

When running in Setup Wizard, the screen to choose screen lock will
have an additional footer, telling the user that they can configure
fingerprint in Settings after completing the setup flow.

Bug: 19690335
Change-Id: Ie6268fb8738e6bbac8751d12b05c82092fe6193b
This commit is contained in:
Maurice Lam
2015-04-01 14:20:16 -07:00
parent 83a803c117
commit 4e0fc628f0
3 changed files with 38 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.hardware.fingerprint.FingerprintManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -82,6 +83,13 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric
final View header = inflater.inflate(R.layout.setup_wizard_header, list, false);
list.addHeaderView(header, null, false);
}
final FingerprintManager fpm = (FingerprintManager)
getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
if (fpm != null && fpm.isHardwareDetected()) {
final View footer = inflater.inflate(
R.layout.setup_screen_lock_fingerprint_details, list, false);
list.addFooterView(footer, null, false);
}
return view;
}