use of android.os.CancellationSignal in project android_frameworks_base by AOSPA.
the class PrinterDiscoverySession method requestCustomPrinterIcon.
/**
* Request the custom icon for a printer.
*
* @param printerId The printer to icon belongs to.
* @see android.print.PrinterInfo.Builder#setHasCustomPrinterIcon()
*/
void requestCustomPrinterIcon(@NonNull PrinterId printerId) {
if (!mIsDestroyed && mObserver != null) {
CustomPrinterIconCallback callback = new CustomPrinterIconCallback(printerId, mObserver);
onRequestCustomPrinterIcon(printerId, new CancellationSignal(), callback);
}
}
use of android.os.CancellationSignal in project AmazeFileManager by TeamAmaze.
the class FingerprintHandler method authenticate.
@RequiresApi(api = Build.VERSION_CODES.M)
public void authenticate(FingerprintManager manager, FingerprintManager.CryptoObject cryptoObject) {
CancellationSignal cancellationSignal = new CancellationSignal();
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {
return;
}
manager.authenticate(cryptoObject, cancellationSignal, 0, this, null);
}
use of android.os.CancellationSignal in project android_packages_apps_Settings by omnirom.
the class FingerprintUiHelper method startListening.
public void startListening() {
if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected() && mFingerprintManager.getEnrolledFingerprints(mUserId).size() > 0) {
mCancellationSignal = new CancellationSignal();
mFingerprintManager.setActiveUser(mUserId);
mFingerprintManager.authenticate(null, mCancellationSignal, 0, /* flags */
this, null, mUserId);
setFingerprintIconVisibility(true);
mIcon.setImageResource(R.drawable.ic_fingerprint);
}
}
use of android.os.CancellationSignal in project android_packages_apps_Settings by SudaMod.
the class FingerprintEnrollSidecar method startEnrollment.
private void startEnrollment() {
mHandler.removeCallbacks(mTimeoutRunnable);
mEnrollmentSteps = -1;
mEnrollmentCancel = new CancellationSignal();
if (mUserId != UserHandle.USER_NULL) {
mFingerprintManager.setActiveUser(mUserId);
}
mFingerprintManager.enroll(mToken, mEnrollmentCancel, 0, /* flags */
mUserId, mEnrollmentCallback);
mEnrolling = true;
}
use of android.os.CancellationSignal in project android_packages_apps_Settings by SudaMod.
the class FingerprintUiHelper method startListening.
public void startListening() {
if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected() && mFingerprintManager.getEnrolledFingerprints(mUserId).size() > 0) {
mCancellationSignal = new CancellationSignal();
mFingerprintManager.setActiveUser(mUserId);
mFingerprintManager.authenticate(null, mCancellationSignal, 0, /* flags */
this, null, mUserId);
setFingerprintIconVisibility(true);
mIcon.setImageResource(R.drawable.ic_fingerprint);
}
}
Aggregations