delete unused patches

This commit is contained in:
Moyster 2016-10-24 12:54:19 +02:00
parent 328a3092b6
commit 6807162e21
2 changed files with 0 additions and 404 deletions

View File

@ -1,366 +0,0 @@
commit ffa414aa4983229d7423c6b57e73c5c299513b72
Author: Jan Engelmohr <jan.engelmohr@mailbox.tu-dresden.de>
Date: Mon Mar 28 16:21:53 2016 +0200
first silead fingerprint patch
Change-Id: Ice6b8be45223d1e0e5f4f02cb1e5aadc9b32252c
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index ddd21e6..3d5b720 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -289,4 +289,14 @@ public class KeyguardManager {
}
}
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:09:00 +0800
+ * fingerprint add by sileadinc
+ */
+ public void dismissKeyguard() {
+ try {
+ mWM.dismissKeyguard();
+ } catch (RemoteException ex) {
+ }
+ }
+// End of Vanzo:hanshengpeng
}
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 4042abc..68199cc 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -1,4 +1,9 @@
/*
+* Copyright (C) 2014 MediaTek Inc.
+* Modification based on code covered by the mentioned copyright
+* and/or permission notice(s).
+*/
+/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -1959,4 +1964,13 @@ public class LockPatternUtils {
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0);
}
+
+ /**
+ * @internal
+ * M: reset Lockout attempt Dead line, to reset it as 0
+ * The deadline value has to be reset after each time system rebooted
+ */
+ public void resetLockoutAttemptDeadline() {
+ setLong(LOCKOUT_ATTEMPT_DEADLINE, 0L);
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
index 28f3a9d..5483ada 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -1,4 +1,9 @@
/*
+* Copyright (C) 2014 MediaTek Inc.
+* Modification based on code covered by the mentioned copyright
+* and/or permission notice(s).
+*/
+/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,6 +36,10 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.FrameLayout;
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:09:48 +0800
+ */
+import android.os.Handler;
+// End of Vanzo:hanshengpeng
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
@@ -355,6 +364,28 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
}
}
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:09:54 +0800
+ * fingerprint add by sileadinc
+ */
+ public void showAutoDismissDialog(String message, int timeout) {
+ final AlertDialog dialog = new AlertDialog.Builder(mContext)
+ .setMessage(message).create();
+ if (!(mContext instanceof Activity)) {
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+ }
+ dialog.show();
+ Handler handler = new Handler();
+ handler.postDelayed(new Runnable() {
+ @Override
+ public void run () {
+ Log.d(TAG, "before dialog dismiss ");
+ dialog.dismiss();
+ }
+ },timeout);
+ }
+// End of Vanzo:hanshengpeng
+
+
private void showAlmostAtAccountLoginDialog() {
final int timeoutInSeconds = (int) LockPatternUtils.FAILED_ATTEMPT_TIMEOUT_MS / 1000;
final int count = LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 264e4b4..a8ef034 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -1,4 +1,9 @@
/*
+* Copyright (C) 2014 MediaTek Inc.
+* Modification based on code covered by the mentioned copyright
+* and/or permission notice(s).
+*/
+/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -123,6 +128,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
private static final int MSG_SIM_SUBSCRIPTION_INFO_CHANGED = 326;
private static final int MSG_SERVICE_STATE_CHANGED = 327;
private static final int MSG_FINGERPRINT_STATE_CHANGED = 328;
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:03:15 +0800
+ * fingerprint add by sileadinc
+ */
+ private static final int MSG_FINGER_UNMATCH = 330;
+ public final static String FINGER_PRINT_UNMATCH_ACTION = "com.silead.fp.lockscreen.action.UNMATCH";
+ private KeyguardFingerPrintCallback mFPCallback;
+// End of Vanzo:hanshengpeng
private static KeyguardUpdateMonitor sInstance;
@@ -244,6 +256,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
case MSG_SIM_SUBSCRIPTION_INFO_CHANGED:
handleSimSubscriptionInfoChanged();
break;
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:04:15 +0800
+ * fingerprint add by sileadinc
+ */
+ case MSG_FINGER_UNMATCH:
+ handleFingerUnmatch((String) msg.obj);
+ break;
+// End of Vanzo:hanshengpeng
}
}
};
@@ -441,6 +460,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
}
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:11:30 +0800
+ * fingerprint add by sileadinc
+ */
+ private void handleFingerUnmatch(String msg) {
+ Log.d(TAG, "handleFingerUnmatch msg: " + msg+":"+mFPCallback);
+ if (mFPCallback != null) {
+ mFPCallback.onFingerPrintUnmatch(msg);
+ }
+ }
+// End of Vanzo:hanshengpeng
public boolean isFaceUnlockRunning(int userId) {
return mUserFaceUnlockRunning.get(userId);
}
@@ -545,6 +574,17 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
Message msg = mHandler.obtainMessage(MSG_SERVICE_STATE_CHANGED, subId, 0, state);
msg.sendToTarget();
}
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:11:48 +0800
+ * fingerprint add by sileadinc
+ */
+ else if (FINGER_PRINT_UNMATCH_ACTION.equals(action)) {
+ final String msg_shown = intent.getStringExtra("msg_shown");
+ final int timeout = intent.getIntExtra("msg_timeout", 2000);
+ if (DEBUG) Log.d(TAG, "received FINGER_PRINT_UNMATCH_ACTION with msg = "
+ + msg_shown);
+ mHandler.sendMessage(mHandler.obtainMessage(MSG_FINGER_UNMATCH, msg_shown));
+ }
+// End of Vanzo:hanshengpeng
}
};
@@ -797,6 +837,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
bootCompleteFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
context.registerReceiver(mBroadcastReceiver, bootCompleteFilter);
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:12:04 +0800
+ * fingerprint add by sileadinc
+ */
+ // if (com.android.featureoption.FeatureOption.VANZO_FEATURE_ADD_SILEADINC_FP) {
+ context.registerReceiver(mBroadcastReceiver, new IntentFilter(FINGER_PRINT_UNMATCH_ACTION));
+ // }
+// End of Vanzo:hanshengpeng
final IntentFilter allUserFilter = new IntentFilter();
allUserFilter.addAction(Intent.ACTION_USER_INFO_CHANGED);
allUserFilter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED);
@@ -832,6 +879,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
trustManager.registerTrustListener(this);
mLockPatternUtils = new LockPatternUtils(mContext);
+ //visi0nary
+ FingerprintManager fpm;
+ fpm = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
+ fpm.startListening(mFingerprintManagerReceiver);
}
private boolean isDeviceProvisionedInSettingsDb() {
@@ -1232,6 +1283,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
sendUpdates(callback);
}
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:12:26 +0800
+ * fingerprint add by sileadinc
+ */
+ public void registerFingerPrintCallback(KeyguardFingerPrintCallback callback) {
+ if (DEBUG) Log.v(TAG, "registerFingerPrintCallback for " + callback);
+ mFPCallback = callback;
+ }
+// End of Vanzo:hanshengpeng
private void sendUpdates(KeyguardUpdateMonitorCallback callback) {
// Notify listener of the current state
callback.onRefreshBatteryInfo(mBatteryStatus);
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
index a89a446..46cf9b4 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
@@ -1,4 +1,9 @@
/*
+* Copyright (C) 2014 MediaTek Inc.
+* Modification based on code covered by the mentioned copyright
+* and/or permission notice(s).
+*/
+/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -149,6 +154,13 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa
return false;
}
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:13:38 +0800
+ * fingerprint add by sileadinc
+ */
+ public void showAutoDismissDialog(String msg, int timeout) {
+ mSecurityContainer.showAutoDismissDialog(msg,timeout);
+ }
+// End of Vanzo:hanshengpeng
protected void announceCurrentSecurityMethod() {
mSecurityContainer.announceCurrentSecurityMethod();
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 352bfba..d920208 100755
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1,4 +1,9 @@
/*
+* Copyright (C) 2014 MediaTek Inc.
+* Modification based on code covered by the mentioned copyright
+* and/or permission notice(s).
+*/
+/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -92,6 +97,7 @@ import java.util.List;
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
+import com.android.keyguard.KeyguardFingerPrintCallback;
/**
* Mediates requests related to the keyguard. This includes queries about the
@@ -376,6 +382,20 @@ public class KeyguardViewMediator extends SystemUI {
private final ArrayList<IKeyguardStateCallback> mKeyguardStateCallbacks = new ArrayList<>();
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:05:26 +0800
+ * fingerprint add by sileadinc
+ */
+ private KeyguardFingerPrintCallback mFingerPrintCallback =
+ new KeyguardFingerPrintCallback() {
+ @Override
+ public void onFingerPrintUnmatch(String msg) {
+ Log.d(TAG, "onFingerPrintUnmatch msg = "+msg);
+ mStatusBarKeyguardViewManager.showAutoDismissDialog(msg, 2000);
+ }
+ };
+// End of Vanzo:hanshengpeng
+
+
private boolean mCryptKeeperEnabled = true;
KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() {
@@ -918,6 +938,15 @@ public class KeyguardViewMediator extends SystemUI {
if (DEBUG) Log.d(TAG, "onSystemReady");
mSystemReady = true;
mUpdateMonitor.registerCallback(mUpdateCallback);
+ mLockPatternUtils.resetLockoutAttemptDeadline();
+ //mPowerOffAlarmManager.onSystemReady();
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:14:32 +0800
+ * fingerprint add by sileadinc
+ */
+ //if (FeatureOption.VANZO_FEATURE_ADD_SILEADINC_FP) {
+ mUpdateMonitor.registerFingerPrintCallback(mFingerPrintCallback);
+ //}
+// End of Vanzo:hanshengpeng
// Suppress biometric unlock right after boot until things have settled if it is the
// selected security method, otherwise unsuppress it. It must be unsuppressed if it is
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index ffe6862..278256e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -1,4 +1,9 @@
/*
+* Copyright (C) 2014 MediaTek Inc.
+* Modification based on code covered by the mentioned copyright
+* and/or permission notice(s).
+*/
+/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -261,4 +266,11 @@ public class KeyguardBouncer {
ensureView();
return mKeyguardView.interceptMediaKey(event);
}
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:15:38 +0800
+ * fingerprint add by sileadinc
+ */
+ public void showAutoDismissDialog(String msg, int timeout) {
+ mKeyguardView.showAutoDismissDialog(msg,timeout);
+ }
+// End of Vanzo:hanshengpeng
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index afdf8b2..17f20a9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -1,4 +1,9 @@
/*
+* Copyright (C) 2014 MediaTek Inc.
+* Modification based on code covered by the mentioned copyright
+* and/or permission notice(s).
+*/
+/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -493,4 +498,12 @@ public class StatusBarKeyguardViewManager {
public boolean isKeyguardShowingMedia() {
return mPhoneStatusBar.isKeyguardShowingMedia();
}
+
+/* Vanzo:hanshengpeng on: Thu, 21 May 2015 17:05:53 +0800
+ * fingerprint add by sileadinc
+ */
+ public void showAutoDismissDialog(String msg, int timeout) {
+ mBouncer.showAutoDismissDialog(msg,timeout);
+ }
+// End of Vanzo:hanshengpeng
}

View File

@ -1,38 +0,0 @@
commit 7087ac5dfe4196fa3b51a9e534a43854e382cc02
Author: Jan Engelmohr <jan.engelmohr@mailbox.tu-dresden.de>
Date: Sun Apr 3 21:22:13 2016 +0200
added missing fingerprint callback class
Change-Id: Ibfc1ab6608042f485de96a07fe4898b7af93774f
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardFingerPrintCallback.java b/packages/Keyguard/src/com/android/keyguard/KeyguardFingerPrintCallback.java
new file mode 100644
index 0000000..36cfdf1
--- /dev/null
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardFingerPrintCallback.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.keyguard;
+
+/**
+ * Callback for general information relevant to lock screen.
+ */
+public class KeyguardFingerPrintCallback {
+ public void onFingerPrintUnmatch(String msg) { }
+}