Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright (C) 2013 The CyanogenMod 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.internal.telephony;
- import static com.android.internal.telephony.RILConstants.*;
- import android.content.Context;
- import android.os.Message;
- import android.os.Parcel;
- import android.os.SystemProperties;
- import android.telephony.SignalStrength;
- import android.text.TextUtils;
- import android.util.Log;
- import com.android.internal.telephony.cdma.CdmaInformationRecords;
- import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaSignalInfoRec;
- import com.android.internal.telephony.cdma.SignalToneUtil;
- import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo;
- import java.util.ArrayList;
- /**
- * Custom Qualcomm SimReady RIL for Huawei using the latest Uicc stack
- *
- * {@hide}
- */
- public class HuaweiQualcommRIL extends QualcommSharedRIL implements CommandsInterface {
- boolean RILJ_LOGV = true;
- boolean RILJ_LOGD = true;
- public HuaweiQualcommRIL(Context context, int networkMode, int cdmaSubscription) {
- super(context, networkMode, cdmaSubscription);
- mQANElements = 4;
- }
- @Override
- protected void notifyRegistrantsCdmaInfoRec(CdmaInformationRecords infoRec) {
- final int response = RIL_UNSOL_CDMA_INFO_REC;
- if (infoRec.record instanceof CdmaSignalInfoRec) {
- CdmaSignalInfoRec sir = (CdmaSignalInfoRec) infoRec.record;
- if (sir != null
- && sir.isPresent
- && sir.signalType == SignalToneUtil.IS95_CONST_IR_SIGNAL_IS54B
- && sir.alertPitch == SignalToneUtil.IS95_CONST_IR_ALERT_MED
- && sir.signal == SignalToneUtil.IS95_CONST_IR_SIG_IS54B_L) {
- Log.d(LOG_TAG, "Dropping \"" + responseToString(response) + " "
- + retToString(response, sir)
- + "\" to prevent \"ring of death\" bug.");
- return;
- }
- }
- super.notifyRegistrantsCdmaInfoRec(infoRec);
- }
- public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] paramArrayOfSmsBroadcastConfigInfo, Message paramMessage)
- {
- RILRequest localRILRequest = RILRequest.obtain(90, paramMessage);
- int i = paramArrayOfSmsBroadcastConfigInfo.length;
- mp.writeInt(i);
- int j = 0;
- if (j < i)
- {
- mp.writeInt(paramArrayOfSmsBroadcastConfigInfo[j].getFromServiceId());
- mp.writeInt(paramArrayOfSmsBroadcastConfigInfo[j].getToServiceId());
- mp.writeInt(paramArrayOfSmsBroadcastConfigInfo[j].getFromCodeScheme());
- mp.writeInt(paramArrayOfSmsBroadcastConfigInfo[j].getToCodeScheme());
- Parcel localParcel = mp;
- if (paramArrayOfSmsBroadcastConfigInfo[j].isSelected()) {}
- for (int m = 1;; m = 0)
- {
- localParcel.writeInt(m);
- j++;
- break;
- }
- }
- riljLog(localRILRequest.serialString() + "> " + requestToString(mRequest) + " with " + i + " configs : ");
- for (int k = 0; k < i; k++)
- riljLog(paramArrayOfSmsBroadcastConfigInfo[k].toString());
- send(localRILRequest);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement