Snap for 8827792 from e287bbe82b to tm-qpr1-release
Change-Id: I65c2c7a2825ab20c97ec1968d562e39fb03963f9
This commit is contained in:
@@ -115,6 +115,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
|||||||
|
|
||||||
private FingerprintManager mFingerprintManager;
|
private FingerprintManager mFingerprintManager;
|
||||||
private boolean mCanAssumeUdfps;
|
private boolean mCanAssumeUdfps;
|
||||||
|
private boolean mCanAssumeSidefps;
|
||||||
@Nullable private ProgressBar mProgressBar;
|
@Nullable private ProgressBar mProgressBar;
|
||||||
private ObjectAnimator mProgressAnim;
|
private ObjectAnimator mProgressAnim;
|
||||||
private TextView mDescriptionText;
|
private TextView mDescriptionText;
|
||||||
@@ -156,7 +157,8 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
|||||||
mFingerprintManager = getSystemService(FingerprintManager.class);
|
mFingerprintManager = getSystemService(FingerprintManager.class);
|
||||||
final List<FingerprintSensorPropertiesInternal> props =
|
final List<FingerprintSensorPropertiesInternal> props =
|
||||||
mFingerprintManager.getSensorPropertiesInternal();
|
mFingerprintManager.getSensorPropertiesInternal();
|
||||||
mCanAssumeUdfps = props.size() == 1 && props.get(0).isAnyUdfpsType();
|
mCanAssumeUdfps = props != null && props.size() == 1 && props.get(0).isAnyUdfpsType();
|
||||||
|
mCanAssumeSidefps = props != null && props.size() == 1 && props.get(0).isAnySidefpsType();
|
||||||
|
|
||||||
mAccessibilityManager = getSystemService(AccessibilityManager.class);
|
mAccessibilityManager = getSystemService(AccessibilityManager.class);
|
||||||
mIsAccessibilityEnabled = mAccessibilityManager.isEnabled();
|
mIsAccessibilityEnabled = mAccessibilityManager.isEnabled();
|
||||||
@@ -567,7 +569,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showError(CharSequence error) {
|
private void showError(CharSequence error) {
|
||||||
if (mCanAssumeUdfps) {
|
if (mCanAssumeUdfps || mCanAssumeSidefps) {
|
||||||
setHeaderText(error);
|
setHeaderText(error);
|
||||||
// Show nothing for subtitle when getting an error message.
|
// Show nothing for subtitle when getting an error message.
|
||||||
setDescriptionText("");
|
setDescriptionText("");
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public class NetworkProviderWifiCallingGroup extends
|
|||||||
private Map<Integer, PhoneAccountHandle> mSimCallManagerList = new HashMap<>();
|
private Map<Integer, PhoneAccountHandle> mSimCallManagerList = new HashMap<>();
|
||||||
private Map<Integer, Preference> mWifiCallingForSubPreferences;
|
private Map<Integer, Preference> mWifiCallingForSubPreferences;
|
||||||
private List<SubscriptionInfo> mSubInfoListForWfc;
|
private List<SubscriptionInfo> mSubInfoListForWfc;
|
||||||
|
private SubscriptionsChangeListener mChangeListener;
|
||||||
|
|
||||||
public NetworkProviderWifiCallingGroup(Context context, Lifecycle lifecycle,
|
public NetworkProviderWifiCallingGroup(Context context, Lifecycle lifecycle,
|
||||||
String preferenceGroupKey) {
|
String preferenceGroupKey) {
|
||||||
@@ -87,26 +88,25 @@ public class NetworkProviderWifiCallingGroup extends
|
|||||||
mTelephonyCallback = new PhoneCallStateTelephonyCallback();
|
mTelephonyCallback = new PhoneCallStateTelephonyCallback();
|
||||||
}
|
}
|
||||||
lifecycle.addObserver(this);
|
lifecycle.addObserver(this);
|
||||||
|
mChangeListener = new SubscriptionsChangeListener(context, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setSubscriptionInfoList(Context context) {
|
private void setSubscriptionInfoList(Context context) {
|
||||||
mSubInfoListForWfc = new ArrayList<>(
|
mSubInfoListForWfc = new ArrayList<>(
|
||||||
SubscriptionUtil.getActiveSubscriptions(mSubscriptionManager));
|
SubscriptionUtil.getActiveSubscriptions(mSubscriptionManager));
|
||||||
if (mSubInfoListForWfc != null) {
|
mSubInfoListForWfc.removeIf(info -> {
|
||||||
mSubInfoListForWfc.removeIf(info -> {
|
final int subId = info.getSubscriptionId();
|
||||||
final int subId = info.getSubscriptionId();
|
setTelephonyManagerForSubscriptionId(context, subId);
|
||||||
setTelephonyManagerForSubscriptionId(context, subId);
|
setPhoneAccountHandleForSubscriptionId(context, subId);
|
||||||
setPhoneAccountHandleForSubscriptionId(context, subId);
|
boolean isExisted = mSubInfoListForWfc.contains(info);
|
||||||
boolean isExisted = mSubInfoListForWfc.contains(info);
|
boolean shouldShowWfcForSub = shouldShowWifiCallingForSub(subId);
|
||||||
boolean shouldShowWfcForSub = shouldShowWifiCallingForSub(subId);
|
if (!shouldShowWfcForSub && isExisted) {
|
||||||
if (!shouldShowWfcForSub && isExisted) {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
return false;
|
||||||
return false;
|
});
|
||||||
});
|
Log.d(TAG, "setSubscriptionInfoList: mSubInfoListForWfc size:"
|
||||||
} else {
|
+ mSubInfoListForWfc.size());
|
||||||
Log.d(TAG, "No active subscriptions");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setTelephonyManagerForSubscriptionId(Context context, int subId) {
|
private void setTelephonyManagerForSubscriptionId(Context context, int subId) {
|
||||||
@@ -137,12 +137,18 @@ public class NetworkProviderWifiCallingGroup extends
|
|||||||
|
|
||||||
@OnLifecycleEvent(Event.ON_RESUME)
|
@OnLifecycleEvent(Event.ON_RESUME)
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
|
if (mChangeListener != null) {
|
||||||
|
mChangeListener.start();
|
||||||
|
}
|
||||||
updateListener();
|
updateListener();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnLifecycleEvent(Event.ON_PAUSE)
|
@OnLifecycleEvent(Event.ON_PAUSE)
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
|
if (mChangeListener != null) {
|
||||||
|
mChangeListener.stop();
|
||||||
|
}
|
||||||
if ((mTelephonyCallback != null)) {
|
if ((mTelephonyCallback != null)) {
|
||||||
mTelephonyCallback.unregister();
|
mTelephonyCallback.unregister();
|
||||||
}
|
}
|
||||||
@@ -176,6 +182,7 @@ public class NetworkProviderWifiCallingGroup extends
|
|||||||
|
|
||||||
private void update() {
|
private void update() {
|
||||||
if (mPreferenceGroup == null) {
|
if (mPreferenceGroup == null) {
|
||||||
|
Log.d(TAG, "mPreferenceGroup == null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +262,11 @@ public class NetworkProviderWifiCallingGroup extends
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscriptionsChanged() {
|
public void onSubscriptionsChanged() {
|
||||||
|
Log.d(TAG, "onSubscriptionsChanged:");
|
||||||
setSubscriptionInfoList(mContext);
|
setSubscriptionInfoList(mContext);
|
||||||
|
if (mPreferenceGroup != null) {
|
||||||
|
mPreferenceGroup.setVisible(isAvailable());
|
||||||
|
}
|
||||||
updateListener();
|
updateListener();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@@ -322,6 +333,7 @@ public class NetworkProviderWifiCallingGroup extends
|
|||||||
CarrierConfigManager.KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL);
|
CarrierConfigManager.KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Log.d(TAG, "isWifiCallingAvailableForCarrier:" + isWifiCallingAvailableForCarrier);
|
||||||
return isWifiCallingAvailableForCarrier;
|
return isWifiCallingAvailableForCarrier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user