Loading src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java +2 −2 Original line number Diff line number Diff line Loading @@ -344,12 +344,12 @@ public class SubscriptionInfoUpdater extends Handler { if (iccId == null) { IccCard iccCard = mPhone[slotId].getIccCard(); if (iccCard == null) { logd("handleSimLoaded: IccCard null"); logd("handleSimLocked: IccCard null"); return; } IccRecords records = iccCard.getIccRecords(); if (records == null) { logd("handleSimLoaded: IccRecords null"); logd("handleSimLocked: IccRecords null"); return; } if (IccUtils.stripTrailingFs(records.getFullIccId()) == null) { Loading src/java/com/android/internal/telephony/uicc/UiccCard.java +0 −8 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.os.Handler; import android.os.Message; import android.telephony.Rlog; import android.telephony.TelephonyManager; import android.util.LocalLog; import com.android.internal.telephony.CommandsInterface; import com.android.internal.telephony.TelephonyComponentFactory; Loading @@ -47,8 +46,6 @@ public class UiccCard { public static final String EXTRA_ICC_CARD_ADDED = "com.android.internal.telephony.uicc.ICC_CARD_ADDED"; private static final String OPERATOR_BRAND_OVERRIDE_PREFIX = "operator_branding_"; private final Object mLock = new Object(); private CardState mCardState; private String mIccid; Loading @@ -56,7 +53,6 @@ public class UiccCard { private UiccProfile mUiccProfile; private Context mContext; private CommandsInterface mCi; private static final LocalLog mLocalLog = new LocalLog(100); private final int mPhoneId; public UiccCard(Context c, CommandsInterface ci, IccCardStatus ics, int phoneId) { Loading Loading @@ -506,10 +502,6 @@ public class UiccCard { Rlog.e(LOG_TAG, msg); } private void loglocal(String msg) { if (DBG) mLocalLog.log(msg); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("UiccCard:"); pw.println(" mCi=" + mCi); Loading src/java/com/android/internal/telephony/uicc/UiccController.java +28 −37 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import android.os.storage.StorageManager; import android.telephony.CarrierConfigManager; import android.telephony.Rlog; import android.telephony.TelephonyManager; import android.text.format.Time; import android.util.LocalLog; import com.android.internal.telephony.CommandException; import com.android.internal.telephony.CommandsInterface; Loading @@ -40,7 +40,6 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; /** Loading Loading @@ -125,14 +124,13 @@ public class UiccController extends Handler { private UiccStateChangedLauncher mLauncher; private RadioConfig mRadioConfig; // Logging for dumpsys. Useful in cases when the cards run into errors. private static final int MAX_PROACTIVE_COMMANDS_TO_LOG = 20; private LinkedList<String> mCardLogs = new LinkedList<String>(); // LocalLog buffer to hold important SIM related events for debugging static LocalLog sLocalLog = new LocalLog(100); public static UiccController make(Context c, CommandsInterface[] ci) { synchronized (mLock) { if (mInstance != null) { throw new RuntimeException("MSimUiccController.make() should only be called once"); throw new RuntimeException("UiccController.make() should only be called once"); } mInstance = new UiccController(c, ci); return mInstance; Loading @@ -143,9 +141,11 @@ public class UiccController extends Handler { if (DBG) log("Creating UiccController"); mContext = c; mCis = ci; if (VDBG) { log("config_num_physical_slots = " + c.getResources().getInteger( com.android.internal.R.integer.config_num_physical_slots)); if (DBG) { String logStr = "config_num_physical_slots = " + c.getResources().getInteger( com.android.internal.R.integer.config_num_physical_slots); log(logStr); sLocalLog.log(logStr); } int numPhysicalSlots = c.getResources().getInteger( com.android.internal.R.integer.config_num_physical_slots); Loading Loading @@ -371,6 +371,8 @@ public class UiccController extends Handler { return; } sLocalLog.log("handleMessage: Received " + msg.what + " for phoneId " + phoneId); AsyncResult ar = (AsyncResult)msg.obj; switch (msg.what) { case EVENT_ICC_STATUS_CHANGED: Loading Loading @@ -473,6 +475,8 @@ public class UiccController extends Handler { IccCardStatus status = (IccCardStatus)ar.result; sLocalLog.log("onGetIccCardStatusDone: phoneId " + index + " IccCardStatus: " + status); int slotId = status.physicalSlotIndex; if (VDBG) log("onGetIccCardStatusDone: phoneId " + index + " physicalSlotIndex " + slotId); if (slotId == INVALID_SLOT_ID) { Loading Loading @@ -503,15 +507,20 @@ public class UiccController extends Handler { } Throwable e = ar.exception; if (e != null) { String logStr; if (!(e instanceof CommandException) || ((CommandException) e).getCommandError() != CommandException.Error.REQUEST_NOT_SUPPORTED) { // this is not expected; there should be no exception other than // REQUEST_NOT_SUPPORTED Rlog.e(LOG_TAG, "Unexpected error getting slot status: " + ar.exception); logStr = "Unexpected error getting slot status: " + ar.exception; Rlog.e(LOG_TAG, logStr); sLocalLog.log(logStr); } else { // REQUEST_NOT_SUPPORTED log("onGetSlotStatusDone: request not supported; marking mIsSlotStatusSupported " + "to false"); logStr = "onGetSlotStatusDone: request not supported; marking " + "mIsSlotStatusSupported to false"; log(logStr); sLocalLog.log(logStr); mIsSlotStatusSupported = false; } return; Loading @@ -524,6 +533,8 @@ public class UiccController extends Handler { return; } sLastSlotStatus = status; int numActiveSlots = 0; for (int i = 0; i < status.size(); i++) { IccSlotStatus iss = status.get(i); Loading Loading @@ -589,22 +600,10 @@ public class UiccController extends Handler { log(" phoneId " + i + " slotId " + mPhoneIdToSlotId[i]); } } /** * Slots are initialized when none of them are null. * todo: is this even needed? */ private synchronized boolean areSlotsInitialized() { for (UiccSlot slot : mUiccSlots) { if (slot == null) { return false; } } return true; } private void onSimRefresh(AsyncResult ar, Integer index) { if (ar.exception != null) { Rlog.e(LOG_TAG, "Sim REFRESH with exception: " + ar.exception); Rlog.e(LOG_TAG, "onSimRefresh: Sim REFRESH with exception: " + ar.exception); return; } Loading @@ -615,6 +614,7 @@ public class UiccController extends Handler { IccRefreshResponse resp = (IccRefreshResponse) ar.result; log("onSimRefresh: " + resp); sLocalLog.log("onSimRefresh: " + resp); if (resp == null) { Rlog.e(LOG_TAG, "onSimRefresh: received without input"); Loading @@ -627,7 +627,6 @@ public class UiccController extends Handler { return; } log("Handling refresh: " + resp); boolean changed = false; switch(resp.refreshResult) { case IccRefreshResponse.REFRESH_RESULT_RESET: Loading Loading @@ -670,14 +669,8 @@ public class UiccController extends Handler { Rlog.d(LOG_TAG, string); } // TODO: This is hacky. We need a better way of saving the logs. public void addCardLog(String data) { Time t = new Time(); t.setToNow(); mCardLogs.addLast(t.format("%m-%d %H:%M:%S") + " " + data); if (mCardLogs.size() > MAX_PROACTIVE_COMMANDS_TO_LOG) { mCardLogs.removeFirst(); } sLocalLog.log(data); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading @@ -700,9 +693,7 @@ public class UiccController extends Handler { mUiccSlots[i].dump(fd, pw, args); } } pw.println("mCardLogs: "); for (int i = 0; i < mCardLogs.size(); ++i) { pw.println(" " + mCardLogs.get(i)); } pw.println(" sLocalLog= "); sLocalLog.dump(fd, pw, args); } } src/java/com/android/internal/telephony/uicc/UiccProfile.java +30 −45 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import android.telephony.UiccAccessRule; import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; import android.util.LocalLog; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.CommandsInterface; Loading Loading @@ -87,7 +86,6 @@ public class UiccProfile extends Handler implements IccCard { protected static final String LOG_TAG = "UiccProfile"; protected static final boolean DBG = true; private static final boolean VDBG = false; //STOPSHIP if true private static final boolean ICC_CARD_PROXY_REMOVED = true; private static final String OPERATOR_BRAND_OVERRIDE_PREFIX = "operator_branding_"; Loading @@ -114,8 +112,6 @@ public class UiccProfile extends Handler implements IccCard { private static final int EVENT_SIM_IO_DONE = 19; private static final int EVENT_CARRIER_PRIVILEGES_LOADED = 20; private static final LocalLog sLocalLog = new LocalLog(100); private final int mPhoneId; /*----------------------------------------------------*/ Loading Loading @@ -159,27 +155,21 @@ public class UiccProfile extends Handler implements IccCard { if (DBG) log("Creating profile"); mUiccCard = uiccCard; mPhoneId = phoneId; if (ICC_CARD_PROXY_REMOVED) { // set current app type based on phone type - do this before calling update() as that // calls updateIccAvailability() which uses mCurrentAppType Phone phone = PhoneFactory.getPhone(phoneId); if (phone != null) { setCurrentAppType(phone.getPhoneType() == PhoneConstants.PHONE_TYPE_GSM); } } if (mUiccCard instanceof EuiccCard) { ((EuiccCard) mUiccCard).registerForEidReady(this, EVENT_EID_READY, null); } update(c, ci, ics); if (ICC_CARD_PROXY_REMOVED) { ci.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_UNAVAILABLE, null); resetProperties(); } } /** * Dispose the UiccProfile. Loading @@ -198,9 +188,7 @@ public class UiccProfile extends Handler implements IccCard { ((EuiccCard) mUiccCard).unregisterForEidReady(this); } if (ICC_CARD_PROXY_REMOVED) { mCi.unregisterForOffOrNotAvailable(this); } if (mCatService != null) mCatService.dispose(); for (UiccCardApplication app : mUiccApplications) { Loading Loading @@ -248,6 +236,7 @@ public class UiccProfile extends Handler implements IccCard { loge("handleMessage: Received " + msg.what + " after dispose(); ignoring the message"); return; } loglocal("handleMessage: Received " + msg.what + " for phoneId " + mPhoneId); switch (msg.what) { case EVENT_NETWORK_LOCKED: mNetworkLockedRegistrants.notifyRegistrants(); Loading @@ -273,7 +262,7 @@ public class UiccProfile extends Handler implements IccCard { break; case EVENT_CARRIER_PRIVILEGES_LOADED: if (VDBG) log("EVENT_CARRIER_PRIVILEGES_LOADED"); if (VDBG) log("handleMessage: EVENT_CARRIER_PRIVILEGES_LOADED"); onCarrierPrivilegesLoadedMessage(); updateExternalState(); break; Loading @@ -285,15 +274,15 @@ public class UiccProfile extends Handler implements IccCard { case EVENT_SIM_IO_DONE: AsyncResult ar = (AsyncResult) msg.obj; if (ar.exception != null) { loglocal("Exception: " + ar.exception); log("Error in SIM access with exception" + ar.exception); loglocal("handleMessage: Exception " + ar.exception); log("handleMessage: Error in SIM access with exception" + ar.exception); } AsyncResult.forMessage((Message) ar.userObj, ar.result, ar.exception); ((Message) ar.userObj).sendToTarget(); break; default: loge("Unhandled message with number: " + msg.what); loge("handleMessage: Unhandled message with number: " + msg.what); break; } } Loading Loading @@ -504,8 +493,10 @@ public class UiccProfile extends Handler implements IccCard { intent.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE, value); intent.putExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON, reason); intent.putExtra(PhoneConstants.PHONE_KEY, phoneId); // SubId may not be valid. log("Sending intent ACTION_INTERNAL_SIM_STATE_CHANGED value=" + value + " for mPhoneId : " + phoneId); String logStr = "Sending intent ACTION_INTERNAL_SIM_STATE_CHANGED value=" + value + " for mPhoneId : " + phoneId; log(logStr); UiccController.sLocalLog.log("UiccProfile[" + phoneId + "]: " + logStr); ActivityManager.broadcastStickyIntent(intent, UserHandle.USER_ALL); } Loading Loading @@ -1221,7 +1212,7 @@ public class UiccProfile extends Handler implements IccCard { * Exposes {@link CommandsInterface#iccOpenLogicalChannel} */ public void iccOpenLogicalChannel(String aid, int p2, Message response) { loglocal("Open Logical Channel: " + aid + " , " + p2 + " by pid:" + Binder.getCallingPid() loglocal("iccOpenLogicalChannel: " + aid + " , " + p2 + " by pid:" + Binder.getCallingPid() + " uid:" + Binder.getCallingUid()); mCi.iccOpenLogicalChannel(aid, p2, obtainMessage(EVENT_OPEN_LOGICAL_CHANNEL_DONE, response)); Loading @@ -1231,7 +1222,7 @@ public class UiccProfile extends Handler implements IccCard { * Exposes {@link CommandsInterface#iccCloseLogicalChannel} */ public void iccCloseLogicalChannel(int channel, Message response) { loglocal("Close Logical Channel: " + channel); loglocal("iccCloseLogicalChannel: " + channel); mCi.iccCloseLogicalChannel(channel, obtainMessage(EVENT_CLOSE_LOGICAL_CHANNEL_DONE, response)); } Loading Loading @@ -1449,8 +1440,8 @@ public class UiccProfile extends Handler implements IccCard { Rlog.e(LOG_TAG, msg); } private static void loglocal(String msg) { if (DBG) sLocalLog.log(msg); private void loglocal(String msg) { if (DBG) UiccController.sLocalLog.log("UiccProfile[" + mPhoneId + "]: " + msg); } /** Loading Loading @@ -1509,7 +1500,6 @@ public class UiccProfile extends Handler implements IccCard { } pw.flush(); if (ICC_CARD_PROXY_REMOVED) { pw.println(" mNetworkLockedRegistrants: size=" + mNetworkLockedRegistrants.size()); for (int i = 0; i < mNetworkLockedRegistrants.size(); i++) { pw.println(" mNetworkLockedRegistrants[" + i + "]=" Loading @@ -1522,9 +1512,4 @@ public class UiccProfile extends Handler implements IccCard { pw.println(" mExternalState=" + mExternalState); pw.flush(); } pw.println("sLocalLog:"); sLocalLog.dump(fd, pw, args); pw.flush(); } } src/java/com/android/internal/telephony/uicc/UiccSlot.java +0 −9 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.os.Handler; import android.os.Message; import android.os.PowerManager; import android.telephony.Rlog; import android.util.LocalLog; import android.view.WindowManager; import com.android.internal.R; Loading Loading @@ -66,8 +65,6 @@ public class UiccSlot extends Handler { private static final int EVENT_CARD_REMOVED = 13; private static final int EVENT_CARD_ADDED = 14; private static final LocalLog sLocalLog = new LocalLog(100); public UiccSlot(Context c, boolean isActive) { if (DBG) log("Creating"); mContext = c; Loading Loading @@ -339,10 +336,6 @@ public class UiccSlot extends Handler { Rlog.e(TAG, msg); } private void loglocal(String msg) { if (DBG) sLocalLog.log(msg); } /** * Dump */ Loading @@ -360,8 +353,6 @@ public class UiccSlot extends Handler { } pw.println(); pw.flush(); pw.println("sLocalLog:"); sLocalLog.dump(fd, pw, args); pw.flush(); } } Loading
src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java +2 −2 Original line number Diff line number Diff line Loading @@ -344,12 +344,12 @@ public class SubscriptionInfoUpdater extends Handler { if (iccId == null) { IccCard iccCard = mPhone[slotId].getIccCard(); if (iccCard == null) { logd("handleSimLoaded: IccCard null"); logd("handleSimLocked: IccCard null"); return; } IccRecords records = iccCard.getIccRecords(); if (records == null) { logd("handleSimLoaded: IccRecords null"); logd("handleSimLocked: IccRecords null"); return; } if (IccUtils.stripTrailingFs(records.getFullIccId()) == null) { Loading
src/java/com/android/internal/telephony/uicc/UiccCard.java +0 −8 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.os.Handler; import android.os.Message; import android.telephony.Rlog; import android.telephony.TelephonyManager; import android.util.LocalLog; import com.android.internal.telephony.CommandsInterface; import com.android.internal.telephony.TelephonyComponentFactory; Loading @@ -47,8 +46,6 @@ public class UiccCard { public static final String EXTRA_ICC_CARD_ADDED = "com.android.internal.telephony.uicc.ICC_CARD_ADDED"; private static final String OPERATOR_BRAND_OVERRIDE_PREFIX = "operator_branding_"; private final Object mLock = new Object(); private CardState mCardState; private String mIccid; Loading @@ -56,7 +53,6 @@ public class UiccCard { private UiccProfile mUiccProfile; private Context mContext; private CommandsInterface mCi; private static final LocalLog mLocalLog = new LocalLog(100); private final int mPhoneId; public UiccCard(Context c, CommandsInterface ci, IccCardStatus ics, int phoneId) { Loading Loading @@ -506,10 +502,6 @@ public class UiccCard { Rlog.e(LOG_TAG, msg); } private void loglocal(String msg) { if (DBG) mLocalLog.log(msg); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("UiccCard:"); pw.println(" mCi=" + mCi); Loading
src/java/com/android/internal/telephony/uicc/UiccController.java +28 −37 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import android.os.storage.StorageManager; import android.telephony.CarrierConfigManager; import android.telephony.Rlog; import android.telephony.TelephonyManager; import android.text.format.Time; import android.util.LocalLog; import com.android.internal.telephony.CommandException; import com.android.internal.telephony.CommandsInterface; Loading @@ -40,7 +40,6 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; /** Loading Loading @@ -125,14 +124,13 @@ public class UiccController extends Handler { private UiccStateChangedLauncher mLauncher; private RadioConfig mRadioConfig; // Logging for dumpsys. Useful in cases when the cards run into errors. private static final int MAX_PROACTIVE_COMMANDS_TO_LOG = 20; private LinkedList<String> mCardLogs = new LinkedList<String>(); // LocalLog buffer to hold important SIM related events for debugging static LocalLog sLocalLog = new LocalLog(100); public static UiccController make(Context c, CommandsInterface[] ci) { synchronized (mLock) { if (mInstance != null) { throw new RuntimeException("MSimUiccController.make() should only be called once"); throw new RuntimeException("UiccController.make() should only be called once"); } mInstance = new UiccController(c, ci); return mInstance; Loading @@ -143,9 +141,11 @@ public class UiccController extends Handler { if (DBG) log("Creating UiccController"); mContext = c; mCis = ci; if (VDBG) { log("config_num_physical_slots = " + c.getResources().getInteger( com.android.internal.R.integer.config_num_physical_slots)); if (DBG) { String logStr = "config_num_physical_slots = " + c.getResources().getInteger( com.android.internal.R.integer.config_num_physical_slots); log(logStr); sLocalLog.log(logStr); } int numPhysicalSlots = c.getResources().getInteger( com.android.internal.R.integer.config_num_physical_slots); Loading Loading @@ -371,6 +371,8 @@ public class UiccController extends Handler { return; } sLocalLog.log("handleMessage: Received " + msg.what + " for phoneId " + phoneId); AsyncResult ar = (AsyncResult)msg.obj; switch (msg.what) { case EVENT_ICC_STATUS_CHANGED: Loading Loading @@ -473,6 +475,8 @@ public class UiccController extends Handler { IccCardStatus status = (IccCardStatus)ar.result; sLocalLog.log("onGetIccCardStatusDone: phoneId " + index + " IccCardStatus: " + status); int slotId = status.physicalSlotIndex; if (VDBG) log("onGetIccCardStatusDone: phoneId " + index + " physicalSlotIndex " + slotId); if (slotId == INVALID_SLOT_ID) { Loading Loading @@ -503,15 +507,20 @@ public class UiccController extends Handler { } Throwable e = ar.exception; if (e != null) { String logStr; if (!(e instanceof CommandException) || ((CommandException) e).getCommandError() != CommandException.Error.REQUEST_NOT_SUPPORTED) { // this is not expected; there should be no exception other than // REQUEST_NOT_SUPPORTED Rlog.e(LOG_TAG, "Unexpected error getting slot status: " + ar.exception); logStr = "Unexpected error getting slot status: " + ar.exception; Rlog.e(LOG_TAG, logStr); sLocalLog.log(logStr); } else { // REQUEST_NOT_SUPPORTED log("onGetSlotStatusDone: request not supported; marking mIsSlotStatusSupported " + "to false"); logStr = "onGetSlotStatusDone: request not supported; marking " + "mIsSlotStatusSupported to false"; log(logStr); sLocalLog.log(logStr); mIsSlotStatusSupported = false; } return; Loading @@ -524,6 +533,8 @@ public class UiccController extends Handler { return; } sLastSlotStatus = status; int numActiveSlots = 0; for (int i = 0; i < status.size(); i++) { IccSlotStatus iss = status.get(i); Loading Loading @@ -589,22 +600,10 @@ public class UiccController extends Handler { log(" phoneId " + i + " slotId " + mPhoneIdToSlotId[i]); } } /** * Slots are initialized when none of them are null. * todo: is this even needed? */ private synchronized boolean areSlotsInitialized() { for (UiccSlot slot : mUiccSlots) { if (slot == null) { return false; } } return true; } private void onSimRefresh(AsyncResult ar, Integer index) { if (ar.exception != null) { Rlog.e(LOG_TAG, "Sim REFRESH with exception: " + ar.exception); Rlog.e(LOG_TAG, "onSimRefresh: Sim REFRESH with exception: " + ar.exception); return; } Loading @@ -615,6 +614,7 @@ public class UiccController extends Handler { IccRefreshResponse resp = (IccRefreshResponse) ar.result; log("onSimRefresh: " + resp); sLocalLog.log("onSimRefresh: " + resp); if (resp == null) { Rlog.e(LOG_TAG, "onSimRefresh: received without input"); Loading @@ -627,7 +627,6 @@ public class UiccController extends Handler { return; } log("Handling refresh: " + resp); boolean changed = false; switch(resp.refreshResult) { case IccRefreshResponse.REFRESH_RESULT_RESET: Loading Loading @@ -670,14 +669,8 @@ public class UiccController extends Handler { Rlog.d(LOG_TAG, string); } // TODO: This is hacky. We need a better way of saving the logs. public void addCardLog(String data) { Time t = new Time(); t.setToNow(); mCardLogs.addLast(t.format("%m-%d %H:%M:%S") + " " + data); if (mCardLogs.size() > MAX_PROACTIVE_COMMANDS_TO_LOG) { mCardLogs.removeFirst(); } sLocalLog.log(data); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading @@ -700,9 +693,7 @@ public class UiccController extends Handler { mUiccSlots[i].dump(fd, pw, args); } } pw.println("mCardLogs: "); for (int i = 0; i < mCardLogs.size(); ++i) { pw.println(" " + mCardLogs.get(i)); } pw.println(" sLocalLog= "); sLocalLog.dump(fd, pw, args); } }
src/java/com/android/internal/telephony/uicc/UiccProfile.java +30 −45 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import android.telephony.UiccAccessRule; import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; import android.util.LocalLog; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.CommandsInterface; Loading Loading @@ -87,7 +86,6 @@ public class UiccProfile extends Handler implements IccCard { protected static final String LOG_TAG = "UiccProfile"; protected static final boolean DBG = true; private static final boolean VDBG = false; //STOPSHIP if true private static final boolean ICC_CARD_PROXY_REMOVED = true; private static final String OPERATOR_BRAND_OVERRIDE_PREFIX = "operator_branding_"; Loading @@ -114,8 +112,6 @@ public class UiccProfile extends Handler implements IccCard { private static final int EVENT_SIM_IO_DONE = 19; private static final int EVENT_CARRIER_PRIVILEGES_LOADED = 20; private static final LocalLog sLocalLog = new LocalLog(100); private final int mPhoneId; /*----------------------------------------------------*/ Loading Loading @@ -159,27 +155,21 @@ public class UiccProfile extends Handler implements IccCard { if (DBG) log("Creating profile"); mUiccCard = uiccCard; mPhoneId = phoneId; if (ICC_CARD_PROXY_REMOVED) { // set current app type based on phone type - do this before calling update() as that // calls updateIccAvailability() which uses mCurrentAppType Phone phone = PhoneFactory.getPhone(phoneId); if (phone != null) { setCurrentAppType(phone.getPhoneType() == PhoneConstants.PHONE_TYPE_GSM); } } if (mUiccCard instanceof EuiccCard) { ((EuiccCard) mUiccCard).registerForEidReady(this, EVENT_EID_READY, null); } update(c, ci, ics); if (ICC_CARD_PROXY_REMOVED) { ci.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_UNAVAILABLE, null); resetProperties(); } } /** * Dispose the UiccProfile. Loading @@ -198,9 +188,7 @@ public class UiccProfile extends Handler implements IccCard { ((EuiccCard) mUiccCard).unregisterForEidReady(this); } if (ICC_CARD_PROXY_REMOVED) { mCi.unregisterForOffOrNotAvailable(this); } if (mCatService != null) mCatService.dispose(); for (UiccCardApplication app : mUiccApplications) { Loading Loading @@ -248,6 +236,7 @@ public class UiccProfile extends Handler implements IccCard { loge("handleMessage: Received " + msg.what + " after dispose(); ignoring the message"); return; } loglocal("handleMessage: Received " + msg.what + " for phoneId " + mPhoneId); switch (msg.what) { case EVENT_NETWORK_LOCKED: mNetworkLockedRegistrants.notifyRegistrants(); Loading @@ -273,7 +262,7 @@ public class UiccProfile extends Handler implements IccCard { break; case EVENT_CARRIER_PRIVILEGES_LOADED: if (VDBG) log("EVENT_CARRIER_PRIVILEGES_LOADED"); if (VDBG) log("handleMessage: EVENT_CARRIER_PRIVILEGES_LOADED"); onCarrierPrivilegesLoadedMessage(); updateExternalState(); break; Loading @@ -285,15 +274,15 @@ public class UiccProfile extends Handler implements IccCard { case EVENT_SIM_IO_DONE: AsyncResult ar = (AsyncResult) msg.obj; if (ar.exception != null) { loglocal("Exception: " + ar.exception); log("Error in SIM access with exception" + ar.exception); loglocal("handleMessage: Exception " + ar.exception); log("handleMessage: Error in SIM access with exception" + ar.exception); } AsyncResult.forMessage((Message) ar.userObj, ar.result, ar.exception); ((Message) ar.userObj).sendToTarget(); break; default: loge("Unhandled message with number: " + msg.what); loge("handleMessage: Unhandled message with number: " + msg.what); break; } } Loading Loading @@ -504,8 +493,10 @@ public class UiccProfile extends Handler implements IccCard { intent.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE, value); intent.putExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON, reason); intent.putExtra(PhoneConstants.PHONE_KEY, phoneId); // SubId may not be valid. log("Sending intent ACTION_INTERNAL_SIM_STATE_CHANGED value=" + value + " for mPhoneId : " + phoneId); String logStr = "Sending intent ACTION_INTERNAL_SIM_STATE_CHANGED value=" + value + " for mPhoneId : " + phoneId; log(logStr); UiccController.sLocalLog.log("UiccProfile[" + phoneId + "]: " + logStr); ActivityManager.broadcastStickyIntent(intent, UserHandle.USER_ALL); } Loading Loading @@ -1221,7 +1212,7 @@ public class UiccProfile extends Handler implements IccCard { * Exposes {@link CommandsInterface#iccOpenLogicalChannel} */ public void iccOpenLogicalChannel(String aid, int p2, Message response) { loglocal("Open Logical Channel: " + aid + " , " + p2 + " by pid:" + Binder.getCallingPid() loglocal("iccOpenLogicalChannel: " + aid + " , " + p2 + " by pid:" + Binder.getCallingPid() + " uid:" + Binder.getCallingUid()); mCi.iccOpenLogicalChannel(aid, p2, obtainMessage(EVENT_OPEN_LOGICAL_CHANNEL_DONE, response)); Loading @@ -1231,7 +1222,7 @@ public class UiccProfile extends Handler implements IccCard { * Exposes {@link CommandsInterface#iccCloseLogicalChannel} */ public void iccCloseLogicalChannel(int channel, Message response) { loglocal("Close Logical Channel: " + channel); loglocal("iccCloseLogicalChannel: " + channel); mCi.iccCloseLogicalChannel(channel, obtainMessage(EVENT_CLOSE_LOGICAL_CHANNEL_DONE, response)); } Loading Loading @@ -1449,8 +1440,8 @@ public class UiccProfile extends Handler implements IccCard { Rlog.e(LOG_TAG, msg); } private static void loglocal(String msg) { if (DBG) sLocalLog.log(msg); private void loglocal(String msg) { if (DBG) UiccController.sLocalLog.log("UiccProfile[" + mPhoneId + "]: " + msg); } /** Loading Loading @@ -1509,7 +1500,6 @@ public class UiccProfile extends Handler implements IccCard { } pw.flush(); if (ICC_CARD_PROXY_REMOVED) { pw.println(" mNetworkLockedRegistrants: size=" + mNetworkLockedRegistrants.size()); for (int i = 0; i < mNetworkLockedRegistrants.size(); i++) { pw.println(" mNetworkLockedRegistrants[" + i + "]=" Loading @@ -1522,9 +1512,4 @@ public class UiccProfile extends Handler implements IccCard { pw.println(" mExternalState=" + mExternalState); pw.flush(); } pw.println("sLocalLog:"); sLocalLog.dump(fd, pw, args); pw.flush(); } }
src/java/com/android/internal/telephony/uicc/UiccSlot.java +0 −9 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.os.Handler; import android.os.Message; import android.os.PowerManager; import android.telephony.Rlog; import android.util.LocalLog; import android.view.WindowManager; import com.android.internal.R; Loading Loading @@ -66,8 +65,6 @@ public class UiccSlot extends Handler { private static final int EVENT_CARD_REMOVED = 13; private static final int EVENT_CARD_ADDED = 14; private static final LocalLog sLocalLog = new LocalLog(100); public UiccSlot(Context c, boolean isActive) { if (DBG) log("Creating"); mContext = c; Loading Loading @@ -339,10 +336,6 @@ public class UiccSlot extends Handler { Rlog.e(TAG, msg); } private void loglocal(String msg) { if (DBG) sLocalLog.log(msg); } /** * Dump */ Loading @@ -360,8 +353,6 @@ public class UiccSlot extends Handler { } pw.println(); pw.flush(); pw.println("sLocalLog:"); sLocalLog.dump(fd, pw, args); pw.flush(); } }