Android内部構造
超ざっくり
Android (OS) 内で
通信の状態を監視している
GSM
Service Status
Tracker
Android (OS) と
ハードウェアの仲介
Radio Interface
Layer
Base Band
(通信ハードウェア)
RIL
GsmSST
ここの出力ログに注目
W-CDMA系の機種はGSM Service Status Tracker
CDMA EV-DO系の機種ではCDMA Service Status Tracker
‐8‐
修正内容
author
Junichi Monma <monma@google.com> Fri Oct 26 10:22:01 2012 +0900
committer Wink Saville <wink@google.com>
Fri Oct 26 10:29:01 2012 -0700
Allowing to change the poll state even if only PS is avairable on the network.
There are some MVNO operators are shipping the data only SIM. It isn't
connectable with CS, but wroks for PS. If the poll is not shown on the system bar
when network registration returns STATE_OUT_OF_SERVICE for CS, user doesn't
notice whether or not they can use PS. In addition, PS might works while CS
restriction.
final boolean voice_capable = phone.getContext().getResources().getBoolean(
com.android.internal.R.bool.config_voice_capable);
if (!voice_capable && newGPRSState == ServiceState.STATE_IN_SERVICE) {
newSS.setState (newGPRSState);
}
上書き
config_voice_capable
の値がfalseの時
もし、PSが利用可能であれば
CSの状態を管理する変数
PSの状態を管理する変数
最新のコードでは別のclassで実装されています
※GPRS: GSM(2G)におけるデータ通信規格
Android内では2G用語が今でも幅をきかしています
CSの状態をPSの状態で上書きする
‐ 25 ‐
効能
実際のCSの状態にかかわらず、PSの状態を優先
• 割と強引な修正のような……
• ともかく、アンテナピクトは表示されるようになる
バッテリーの消費に影響が出るか?
• GsmServiceTrackerレベルでの書き換えであり、
Radio Interface Layer以下の挙動は今まで通りでは?
config_voice_capableは副作用が大きい
• 電話関係のアプリが無効になるなど
(Android4.3では調整されている模様?)
ここの挙動が変るだけ
GSM
Service Status
Tracker
Radio Interface
Layer
‐ 26 ‐
Base Band
(通信ハードウェア)