Loading src/java/com/android/internal/telephony/SignalStrengthController.java +31 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.telephony.SignalStrengthUpdateRequest; import android.telephony.SignalThresholdInfo; import android.telephony.SubscriptionInfo; import android.telephony.TelephonyManager; import android.util.LocalLog; import android.util.Pair; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -137,6 +138,9 @@ public class SignalStrengthController extends Handler { @NonNull private PersistableBundle mCarrierConfig; @NonNull private final LocalLog mLocalLog = new LocalLog(64); private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Loading Loading @@ -574,6 +578,9 @@ public class SignalStrengthController extends Handler { .build()); } mCi.setSignalStrengthReportingCriteria(consolidatedSignalThresholdInfos, null); localLog("setSignalStrengthReportingCriteria consolidatedSignalThresholdInfos=" + consolidatedSignalThresholdInfos); } void setSignalStrengthDefaultValues() { Loading Loading @@ -604,6 +611,11 @@ public class SignalStrengthController extends Handler { * @param args Additional arguments to the dump request. */ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("SignalStrengthController - phoneId: " + mPhone.getPhoneId()); pw.println("SignalStrengthController - Log Begin ----"); mLocalLog.dump(fd, pw, args); pw.println("SignalStrengthController - Log End ----"); final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " "); ipw.increaseIndent(); pw.println("mSignalRequestRecords=" + mSignalRequestRecords); Loading @@ -625,6 +637,11 @@ public class SignalStrengthController extends Handler { SignalRequestRecord record = new SignalRequestRecord(subId, callingUid, request); sendMessage(obtainMessage(EVENT_SET_SIGNAL_STRENGTH_UPDATE_REQUEST, new Pair<SignalRequestRecord, Message>(record, onCompleted))); localLog("setSignalStrengthUpdateRequest" + " subId=" + subId + " callingUid=" + callingUid + " request=" + request); } /** Loading @@ -635,6 +652,11 @@ public class SignalStrengthController extends Handler { SignalRequestRecord record = new SignalRequestRecord(subId, callingUid, request); sendMessage(obtainMessage(EVENT_CLEAR_SIGNAL_STRENGTH_UPDATE_REQUEST, new Pair<SignalRequestRecord, Message>(record, onCompleted))); localLog("clearSignalStrengthUpdateRequest" + " subId=" + subId + " callingUid=" + callingUid + " request=" + request); } /** Loading Loading @@ -711,6 +733,8 @@ public class SignalStrengthController extends Handler { void onDeviceIdleStateChanged(boolean isDeviceIdle) { sendMessage(obtainMessage(EVENT_ON_DEVICE_IDLE_STATE_CHANGED, isDeviceIdle)); localLog("onDeviceIdleStateChanged isDeviceIdle=" + isDeviceIdle); } /** Loading Loading @@ -785,6 +809,7 @@ public class SignalStrengthController extends Handler { @Override public void binderDied() { localLog("binderDied record=" + this); clearSignalStrengthUpdateRequest(mSubId, mCallingUid, mRequest, null /*onCompleted*/); } Loading Loading @@ -1081,4 +1106,10 @@ public class SignalStrengthController extends Handler { private static void loge(String msg) { Rlog.e(TAG, msg); } /** Print to both Radio log and LocalLog, used only for critical but non-sensitive msg. */ private void localLog(String msg) { Rlog.d(TAG, msg); mLocalLog.log(TAG + ": " + msg); } } Loading
src/java/com/android/internal/telephony/SignalStrengthController.java +31 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.telephony.SignalStrengthUpdateRequest; import android.telephony.SignalThresholdInfo; import android.telephony.SubscriptionInfo; import android.telephony.TelephonyManager; import android.util.LocalLog; import android.util.Pair; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -137,6 +138,9 @@ public class SignalStrengthController extends Handler { @NonNull private PersistableBundle mCarrierConfig; @NonNull private final LocalLog mLocalLog = new LocalLog(64); private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Loading Loading @@ -574,6 +578,9 @@ public class SignalStrengthController extends Handler { .build()); } mCi.setSignalStrengthReportingCriteria(consolidatedSignalThresholdInfos, null); localLog("setSignalStrengthReportingCriteria consolidatedSignalThresholdInfos=" + consolidatedSignalThresholdInfos); } void setSignalStrengthDefaultValues() { Loading Loading @@ -604,6 +611,11 @@ public class SignalStrengthController extends Handler { * @param args Additional arguments to the dump request. */ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("SignalStrengthController - phoneId: " + mPhone.getPhoneId()); pw.println("SignalStrengthController - Log Begin ----"); mLocalLog.dump(fd, pw, args); pw.println("SignalStrengthController - Log End ----"); final IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " "); ipw.increaseIndent(); pw.println("mSignalRequestRecords=" + mSignalRequestRecords); Loading @@ -625,6 +637,11 @@ public class SignalStrengthController extends Handler { SignalRequestRecord record = new SignalRequestRecord(subId, callingUid, request); sendMessage(obtainMessage(EVENT_SET_SIGNAL_STRENGTH_UPDATE_REQUEST, new Pair<SignalRequestRecord, Message>(record, onCompleted))); localLog("setSignalStrengthUpdateRequest" + " subId=" + subId + " callingUid=" + callingUid + " request=" + request); } /** Loading @@ -635,6 +652,11 @@ public class SignalStrengthController extends Handler { SignalRequestRecord record = new SignalRequestRecord(subId, callingUid, request); sendMessage(obtainMessage(EVENT_CLEAR_SIGNAL_STRENGTH_UPDATE_REQUEST, new Pair<SignalRequestRecord, Message>(record, onCompleted))); localLog("clearSignalStrengthUpdateRequest" + " subId=" + subId + " callingUid=" + callingUid + " request=" + request); } /** Loading Loading @@ -711,6 +733,8 @@ public class SignalStrengthController extends Handler { void onDeviceIdleStateChanged(boolean isDeviceIdle) { sendMessage(obtainMessage(EVENT_ON_DEVICE_IDLE_STATE_CHANGED, isDeviceIdle)); localLog("onDeviceIdleStateChanged isDeviceIdle=" + isDeviceIdle); } /** Loading Loading @@ -785,6 +809,7 @@ public class SignalStrengthController extends Handler { @Override public void binderDied() { localLog("binderDied record=" + this); clearSignalStrengthUpdateRequest(mSubId, mCallingUid, mRequest, null /*onCompleted*/); } Loading Loading @@ -1081,4 +1106,10 @@ public class SignalStrengthController extends Handler { private static void loge(String msg) { Rlog.e(TAG, msg); } /** Print to both Radio log and LocalLog, used only for critical but non-sensitive msg. */ private void localLog(String msg) { Rlog.d(TAG, msg); mLocalLog.log(TAG + ": " + msg); } }