Radio 对应相关的Log:
<GET_SIM_STATUS APPSTATE_PIN MSimIccCardProxy: ACTION_SIM_STATE_CHANGED rease PIN
Logcat对应的Log:
KeyguardUpdateMonitor:ACTION_SIM_STATE_CHANGED
KeyguardUpdateMonitor:handleSimStateChange:intentValue=PIN_REQUI
MSimLockPatternKeyguardView:createUnlockScreenFor(SimPin);
MSimLockPatternKeyguardView:Display SimUnlockScreen for sub:
1、流程:
MSimIccCardProxy.java
发送广播 broadcastStickyIntent(,)(reason=PIN 参数)
接受广播的类:
KeyguardUpdateMonitor.java
TelephonyIntents.ACTION_SIM_STATE_CHANGED
SimArgs.fromIntent(intent)
obtainMessage:MSG_SIM_STATE_CHANGED //334 Line
handleSimStateChange((SimArgs) msg.obj); //211 Line
onSimStateChanged(state, subscription);
KeyguardViewMediator.java
onSimStateChanged( , );
!isShowing()
doKeyguardLocked( )
resetStateLocked( )
2、PIN是否在Settings中选中的流程:
IccLockSettings.java
getIccLockEnabled()
IccCardProxy.java
getIccLockEnabled()
mUiccApplication.getIccLockEnabled()
getPin1State()
mPin1State
return true/false
3、查PIN的状态:GET_SIM_STATUS这个状态查询sim卡PIN的状态
<GET_SIM_STATUS IccCardStatus { { APPTYPE_USIM, APPSTATE_PIN, pin|=PINSTATE_ENABLED_NOT_ }}
PIN的次数,在SimUnlockScreen.java类中:
checkPin() atteptsRemaining = ITelephony.stub.asInterface(ServiceManager.
checkService("phone")).getIccPin1RetryCount();
mHeaderText.setText(displayMessage);
查PIN的剩余次数:+EPINC:2,3,10,10
对应的结构体: +EPINC:<Pin1>, <Pin2>, <Puk1>, <Puk2> 返回可用的次数
PIN次数相关知识:
static final int PIN_RESULT_SUCCESS = 0;
Phone.java static final int PIN_PASSWORD_INCORRECT = 1;
static final int PIN_GENERAL_FAILURE = 2;
4、PIN PUK输入错误查询:
卡一 卡二:AT+CPIN=" "
PUK码:发送指令:command=AT+EPIN1=" "
5、PIN设置可用不可用的流程
在Setting包中的
IccLockSettings.java
tryChangeIccLockState()
UiccCardLockEnabled
setIccLockEnabled( , , )
RIL.java
setFacilityLockForApp( , , , , , )
lockString = (lockState) ? "1":"0";
rr.mp.writeString(lockString);
通过这个lockString来设置到ril层,以后上层framework层查状态,相应的ril层返回相应的状态
6、关闭分行模式:GET_SIM_STATUS查状态时,sub0返回10个参数
sub0 <GET_SIM_STATUS IccCardState{CARDSTATE_PRESENT, PINSTATE_UNKNOWN,num_apps1,
gsm_id=0{APPTYPE_USIM, APPSTATE_PIN,pin1=PINSTATE_ENABLED_NOT_VERIFIED
cmda_id=01, ism_id=-1}[sub0]
sub1 <GET_SIM_STATUS IccCardState{CARDSTATE_PRESENT, PINSTATE_UNKNOWN,num_apps=1,
gsm_id=0{APPTYPE_SIM, APPSTATE_PIN}, cdma_id=8, ism_id=-1}[sub1]
mtk的猫,sub1 返回8个参数
锁定SIM卡是否勾选上:
PIN选中状态,报状态:APPSTATE_READY, pin1=PINSTATE_ENABLED_VERIEIED
PIN去掉选中的状态:报状态:APPSTATE_READY, pin1=PINSTATE_DISABLED
1、飞行模式对应的类在framework层,路径如下:
framework/base/policy/src/com/android/internal/policy/impl/GlobalAction.java
有个方法changeAirplaneModeSystemSetting(boolean on) 会根据这个on为true/false写值
Settings.System.putInt(mContext.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, on ? 1:0);
然后发送广播:
Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
intent.putExtra("state", on);
mContext.sendBroadcast(intent);
2、飞行模式置灰不置灰的流程分析:
PhoneWindowManager.java
mGlobalActions.showDialog(KeyguardShowing, isDeviceProvisioned());
GlobalActions.java
showDialog( , );
mAirplaneModeOn.updateState(mAirplaneState)
mAdapter.notifyDataSetChanged();
PhoneStateListener mPhoneStateListener = new PhoneStateListener {
mAirplaneModeOn.updateState(mAirplaneState);
mAdapter.notifyDataSetChanged();
}
点击后变为不可用
可用状态是由PhoneStateListener监听而改变的是否可用;
onClick()
mAdapter.getItem(which).onPress();
changeStateFromPress(nowon);
? State.TurningOn : State.TurningOff;
分享到:
相关推荐
PIN 码专用输入控件,支持更改 PinView 中每一个 EditText 的输入前、输入后、正在输入的 background 支持设置任意长度的 PIN 码长度 支持设置可输入的 PIN 码格式,目前支持文本、数字、可以自己自主设置,支持设置...
Altium Designer封装库,Type-C 16pin,准确的来说是12Pin的集成封装库,是那种两边的VBUS和GND二合一的那种,自己画的没有3D,测试过可用。
Pin Setttings > Pin your Settings to home screen for convenience. Requirement What you need when building: Android Studio 2.3 / IntellijIDEA 2017.2 Kotlin 1.1.4 Gradle 3.x This application supports ...
用于处理错误PIN码的示例动画
pin-edittext An extension of EditText with pin style Usage Include PinCodeEditText in your layout XML android:maxLength: The total pin (Required to make PinEditText limit its length) ...
North-American-Charging-Standard-AC-DC-Pin-Sharing-Appendix.pdf
pin-3.0-76991-gcc-android
react-native-pincode 可自定义的PIN码组件,用于本地响应使用: 将图钉存储在Keychain / Keystore中使用FaceID / TouchID对用户进行身份验证动画使用材质图标安装npm install --save @haskkor/react-native-pincode...
to-263 5pin封装
lightpdf-setup-pin.exe
通过强制使用锁屏PIN解锁Android手机(或设备)。 将您的Kali Nethunter手机变成适用于Android设备的蛮力PIN破解器! (无root,无adb):mobile_phone:Android-PIN-Bruteforce通过强制锁定屏幕PIN解锁Android手机...
An Android library which can be used for implementing PIN lock mechanism in Android applications. Usage First, add PinLock dependency to your build.gradle. PinLock is available in both Maven and ...
号外:听说「nanchen」搞了一个 Android 开发者的免费福利,不行你看:给 Android 开发者的一点福利:免费模拟面试 该项目主要参考了 https://github.com/GoodieBag/Pinview 的部分代码。 效果图 ⊙开源不易,...
PinCodeView is Android UI library for replace EditText's PIN input with pretty customizable view. Demo See demo app for usage example. Installation Edit your master gradle.build file and add maven {...
前端项目-jquery.pin,Pin any element within a container
You can customize the notifications title and content, as well as its priority and visibility (Works on Android 5.0 and above). Features The application currently has the following ...
你铃铛你攀登 你你你低估我我你你你你你你你人欠欠欠我你你铃铛人
行业分类-电子-PIN驱动电路的说明分析.rar
行业分类-电子-PIN二极管电路装置的说明分析.rar
PinEntryEditText for Android This repository contains PinEntryEditText which extends the behaviour of EditText and implement features that are otherwise not available. Features PinEntryEditText ...