Touch activation screen shown up fix
During the time of OTA activation screen startup, the app needs to get MIN by calling getCdmaMin(). The issue in current code is that OTA app calls getCdmaMin() before framework gets MIN data from lower layer. To fix this issue, framework will be providing the following new APIs to applications for checking if MIN data is ready: 1. isMinInfoReady(): Check if mMin variable in getCdmaMin() has been assigned a non-null value. 2. registerForSubscriptionInfoReady(): Apps uses this API to register for notification. 3. unregisterForSubscriptionInfoReady(): This API is used by apps to unregister notification. Framework will be sending out the notification in the following situations: 1. when mMin is assigned a non-null MIN value; 2. When app calls register API and MIN is ready.
This commit is contained in:
committed by
Wink Saville
parent
44495b7134
commit
9e652dcc21
@@ -541,6 +541,20 @@ public interface Phone {
|
||||
*/
|
||||
void unregisterForCdmaOtaStatusChange(Handler h);
|
||||
|
||||
/**
|
||||
* Registration point for subscription info ready
|
||||
* @param h handler to notify
|
||||
* @param what what code of message when delivered
|
||||
* @param obj placed in Message.obj
|
||||
*/
|
||||
public void registerForSubscriptionInfoReady(Handler h, int what, Object obj);
|
||||
|
||||
/**
|
||||
* Unregister for notifications for subscription info
|
||||
* @param h Handler to be removed from the registrant list.
|
||||
*/
|
||||
public void unregisterForSubscriptionInfoReady(Handler h);
|
||||
|
||||
/**
|
||||
* Returns SIM record load state. Use
|
||||
* <code>getSimCard().registerForReady()</code> for change notification.
|
||||
@@ -1365,6 +1379,13 @@ public interface Phone {
|
||||
*/
|
||||
String getCdmaMin();
|
||||
|
||||
/**
|
||||
* Check if subscription data has been assigned to mMin
|
||||
*
|
||||
* return true if MIN info is ready; false otherwise.
|
||||
*/
|
||||
boolean isMinInfoReady();
|
||||
|
||||
/**
|
||||
* Retrieves PRL Version for CDMA phones
|
||||
*/
|
||||
|
||||
@@ -698,6 +698,12 @@ public abstract class PhoneBase implements Phone {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isMinInfoReady() {
|
||||
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
|
||||
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getCdmaPrlVersion(){
|
||||
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
|
||||
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
|
||||
@@ -724,6 +730,16 @@ public abstract class PhoneBase implements Phone {
|
||||
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
|
||||
}
|
||||
|
||||
public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) {
|
||||
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
|
||||
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
|
||||
}
|
||||
|
||||
public void unregisterForSubscriptionInfoReady(Handler h) {
|
||||
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
|
||||
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
|
||||
}
|
||||
|
||||
public boolean isOtaSpNumber(String dialStr) {
|
||||
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
|
||||
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
|
||||
|
||||
@@ -315,6 +315,14 @@ public class PhoneProxy extends Handler implements Phone {
|
||||
mActivePhone.unregisterForCdmaOtaStatusChange(h);
|
||||
}
|
||||
|
||||
public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) {
|
||||
mActivePhone.registerForSubscriptionInfoReady(h, what, obj);
|
||||
}
|
||||
|
||||
public void unregisterForSubscriptionInfoReady(Handler h) {
|
||||
mActivePhone.unregisterForSubscriptionInfoReady(h);
|
||||
}
|
||||
|
||||
public boolean getIccRecordsLoaded() {
|
||||
return mActivePhone.getIccRecordsLoaded();
|
||||
}
|
||||
@@ -419,6 +427,10 @@ public class PhoneProxy extends Handler implements Phone {
|
||||
return mActivePhone.getCdmaMin();
|
||||
}
|
||||
|
||||
public boolean isMinInfoReady() {
|
||||
return mActivePhone.isMinInfoReady();
|
||||
}
|
||||
|
||||
public String getCdmaPrlVersion() {
|
||||
return mActivePhone.getCdmaPrlVersion();
|
||||
}
|
||||
|
||||
@@ -441,6 +441,10 @@ public class CDMAPhone extends PhoneBase {
|
||||
return mSST.getCdmaMin();
|
||||
}
|
||||
|
||||
public boolean isMinInfoReady() {
|
||||
return mSST.isMinInfoReady();
|
||||
}
|
||||
|
||||
public void getCallWaiting(Message onComplete) {
|
||||
mCM.queryCallWaiting(CommandsInterface.SERVICE_CLASS_VOICE, onComplete);
|
||||
}
|
||||
@@ -556,6 +560,14 @@ public class CDMAPhone extends PhoneBase {
|
||||
mCM.unregisterForCdmaOtaProvision(h);
|
||||
}
|
||||
|
||||
public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) {
|
||||
mSST.registerForSubscriptionInfoReady(h, what, obj);
|
||||
}
|
||||
|
||||
public void unregisterForSubscriptionInfoReady(Handler h) {
|
||||
mSST.unregisterForSubscriptionInfoReady(h);
|
||||
}
|
||||
|
||||
public void setOnEcbModeExitResponse(Handler h, int what, Object obj) {
|
||||
mECMExitRespRegistrant = new Registrant (h, what, obj);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
private int mRegistrationState = -1;
|
||||
private RegistrantList cdmaDataConnectionAttachedRegistrants = new RegistrantList();
|
||||
private RegistrantList cdmaDataConnectionDetachedRegistrants = new RegistrantList();
|
||||
private RegistrantList cdmaForSubscriptionInfoReadyRegistrants = new RegistrantList();
|
||||
|
||||
// Sometimes we get the NITZ time before we know what country we are in.
|
||||
// Keep the time zone information from the NITZ string so we can fix
|
||||
@@ -125,6 +126,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
private int mHomeNetworkId[] = null;
|
||||
private String mMin;
|
||||
private String mPrlVersion;
|
||||
private boolean mIsMinInfoReady = false;
|
||||
|
||||
private boolean isEriTextLoaded = false;
|
||||
private boolean isSubscriptionFromRuim = false;
|
||||
@@ -264,6 +266,25 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
cdmaDataConnectionDetachedRegistrants.remove(h);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registration point for subscription info ready
|
||||
* @param h handler to notify
|
||||
* @param what what code of message when delivered
|
||||
* @param obj placed in Message.obj
|
||||
*/
|
||||
public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) {
|
||||
Registrant r = new Registrant(h, what, obj);
|
||||
cdmaForSubscriptionInfoReadyRegistrants.add(r);
|
||||
|
||||
if (isMinInfoReady()) {
|
||||
r.notifyRegistrant();
|
||||
}
|
||||
}
|
||||
|
||||
public void unregisterForSubscriptionInfoReady(Handler h) {
|
||||
cdmaForSubscriptionInfoReadyRegistrants.remove(h);
|
||||
}
|
||||
|
||||
//***** Called from CDMAPhone
|
||||
public void
|
||||
getLacAndCid(Message onComplete) {
|
||||
@@ -426,6 +447,13 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
mMin = cdmaSubscription[3];
|
||||
mPrlVersion = cdmaSubscription[4];
|
||||
Log.d(LOG_TAG,"GET_CDMA_SUBSCRIPTION MDN=" + mMdn);
|
||||
//Notify apps subscription info is ready
|
||||
if (cdmaForSubscriptionInfoReadyRegistrants != null) {
|
||||
cdmaForSubscriptionInfoReadyRegistrants.notifyRegistrants();
|
||||
}
|
||||
if (!mIsMinInfoReady) {
|
||||
mIsMinInfoReady = true;
|
||||
}
|
||||
} else {
|
||||
Log.w(LOG_TAG,"error parsing cdmaSubscription params num="
|
||||
+ cdmaSubscription.length);
|
||||
@@ -1545,4 +1573,13 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if subscription data has been assigned to mMin
|
||||
*
|
||||
* return true if MIN info is ready; false otherwise.
|
||||
*/
|
||||
public boolean isMinInfoReady() {
|
||||
return mIsMinInfoReady;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user