AI 144185: Integrate cdma into the main code base.
Automated import of CL 144185
This commit is contained in:
committed by
The Android Open Source Project
parent
0ecadf71e0
commit
37c124c3fa
@@ -34,7 +34,7 @@ import static android.provider.Telephony.Intents.EXTRA_SHOW_PLMN;
|
||||
import static android.provider.Telephony.Intents.EXTRA_SHOW_SPN;
|
||||
import static android.provider.Telephony.Intents.EXTRA_SPN;
|
||||
import static android.provider.Telephony.Intents.SPN_STRINGS_UPDATED_ACTION;
|
||||
import com.android.internal.telephony.SimCard;
|
||||
import com.android.internal.telephony.IccCard;
|
||||
import com.android.internal.telephony.TelephonyIntents;
|
||||
import android.util.Log;
|
||||
import com.android.internal.R;
|
||||
@@ -61,7 +61,7 @@ public class KeyguardUpdateMonitor {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
private SimCard.State mSimState = SimCard.State.READY;
|
||||
private IccCard.State mSimState = IccCard.State.READY;
|
||||
private boolean mInPortrait;
|
||||
private boolean mKeyboardOpen;
|
||||
|
||||
@@ -94,38 +94,39 @@ public class KeyguardUpdateMonitor {
|
||||
|
||||
|
||||
/**
|
||||
* When we receive a {@link com.android.internal.telephony.TelephonyIntents#ACTION_SIM_STATE_CHANGED} broadcast, and
|
||||
* then pass a result via our handler to {@link KeyguardUpdateMonitor#handleSimStateChange},
|
||||
* When we receive a
|
||||
* {@link com.android.internal.telephony.TelephonyIntents#ACTION_SIM_STATE_CHANGED} broadcast,
|
||||
* and then pass a result via our handler to {@link KeyguardUpdateMonitor#handleSimStateChange},
|
||||
* we need a single object to pass to the handler. This class helps decode
|
||||
* the intent and provide a {@link SimCard.State} result.
|
||||
*/
|
||||
private static class SimArgs {
|
||||
|
||||
public final SimCard.State simState;
|
||||
public final IccCard.State simState;
|
||||
|
||||
private SimArgs(Intent intent) {
|
||||
if (!TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) {
|
||||
throw new IllegalArgumentException("only handles intent ACTION_SIM_STATE_CHANGED");
|
||||
}
|
||||
String stateExtra = intent.getStringExtra(SimCard.INTENT_KEY_SIM_STATE);
|
||||
if (SimCard.INTENT_VALUE_SIM_ABSENT.equals(stateExtra)) {
|
||||
this.simState = SimCard.State.ABSENT;
|
||||
} else if (SimCard.INTENT_VALUE_SIM_READY.equals(stateExtra)) {
|
||||
this.simState = SimCard.State.READY;
|
||||
} else if (SimCard.INTENT_VALUE_SIM_LOCKED.equals(stateExtra)) {
|
||||
String stateExtra = intent.getStringExtra(IccCard.INTENT_KEY_ICC_STATE);
|
||||
if (IccCard.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) {
|
||||
this.simState = IccCard.State.ABSENT;
|
||||
} else if (IccCard.INTENT_VALUE_ICC_READY.equals(stateExtra)) {
|
||||
this.simState = IccCard.State.READY;
|
||||
} else if (IccCard.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) {
|
||||
final String lockedReason = intent
|
||||
.getStringExtra(SimCard.INTENT_KEY_LOCKED_REASON);
|
||||
if (SimCard.INTENT_VALUE_LOCKED_ON_PIN.equals(lockedReason)) {
|
||||
this.simState = SimCard.State.PIN_REQUIRED;
|
||||
} else if (SimCard.INTENT_VALUE_LOCKED_ON_PUK.equals(lockedReason)) {
|
||||
this.simState = SimCard.State.PUK_REQUIRED;
|
||||
.getStringExtra(IccCard.INTENT_KEY_LOCKED_REASON);
|
||||
if (IccCard.INTENT_VALUE_LOCKED_ON_PIN.equals(lockedReason)) {
|
||||
this.simState = IccCard.State.PIN_REQUIRED;
|
||||
} else if (IccCard.INTENT_VALUE_LOCKED_ON_PUK.equals(lockedReason)) {
|
||||
this.simState = IccCard.State.PUK_REQUIRED;
|
||||
} else {
|
||||
this.simState = SimCard.State.UNKNOWN;
|
||||
this.simState = IccCard.State.UNKNOWN;
|
||||
}
|
||||
} else if (SimCard.INTENT_VALUE_LOCKED_NETWORK.equals(stateExtra)) {
|
||||
this.simState = SimCard.State.NETWORK_LOCKED;
|
||||
} else if (IccCard.INTENT_VALUE_LOCKED_NETWORK.equals(stateExtra)) {
|
||||
this.simState = IccCard.State.NETWORK_LOCKED;
|
||||
} else {
|
||||
this.simState = SimCard.State.UNKNOWN;
|
||||
this.simState = IccCard.State.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +196,7 @@ public class KeyguardUpdateMonitor {
|
||||
mKeyboardOpen = queryKeyboardOpen();
|
||||
|
||||
// take a guess to start
|
||||
mSimState = SimCard.State.READY;
|
||||
mSimState = IccCard.State.READY;
|
||||
mDevicePluggedIn = true;
|
||||
mBatteryLevel = 100;
|
||||
|
||||
@@ -317,14 +318,14 @@ public class KeyguardUpdateMonitor {
|
||||
* Handle {@link #MSG_SIM_STATE_CHANGE}
|
||||
*/
|
||||
private void handleSimStateChange(SimArgs simArgs) {
|
||||
final SimCard.State state = simArgs.simState;
|
||||
final IccCard.State state = simArgs.simState;
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "handleSimStateChange: intentValue = " + simArgs + " "
|
||||
+ "state resolved to " + state.toString());
|
||||
}
|
||||
|
||||
if (state != SimCard.State.UNKNOWN && state != mSimState) {
|
||||
if (state != IccCard.State.UNKNOWN && state != mSimState) {
|
||||
mSimState = state;
|
||||
for (int i = 0; i < mSimStateCallbacks.size(); i++) {
|
||||
mSimStateCallbacks.get(i).onSimStateChanged(state);
|
||||
@@ -461,7 +462,7 @@ public class KeyguardUpdateMonitor {
|
||||
* Callback to notify of sim state change.
|
||||
*/
|
||||
interface SimStateCallback {
|
||||
void onSimStateChanged(SimCard.State simState);
|
||||
void onSimStateChanged(IccCard.State simState);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -489,7 +490,7 @@ public class KeyguardUpdateMonitor {
|
||||
mSimStateCallbacks.add(callback);
|
||||
}
|
||||
|
||||
public SimCard.State getSimState() {
|
||||
public IccCard.State getSimState() {
|
||||
return mSimState;
|
||||
}
|
||||
|
||||
@@ -499,7 +500,7 @@ public class KeyguardUpdateMonitor {
|
||||
* broadcast from the telephony code.
|
||||
*/
|
||||
public void reportSimPinUnlocked() {
|
||||
mSimState = SimCard.State.READY;
|
||||
mSimState = IccCard.State.READY;
|
||||
}
|
||||
|
||||
public boolean isInPortrait() {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.android.internal.policy.impl;
|
||||
|
||||
import com.android.internal.telephony.SimCard;
|
||||
import com.android.internal.telephony.IccCard;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
@@ -41,6 +41,7 @@ import android.view.KeyEvent;
|
||||
import android.view.WindowManagerImpl;
|
||||
import android.view.WindowManagerPolicy;
|
||||
|
||||
|
||||
/**
|
||||
* Mediates requests related to the keyguard. This includes queries about the
|
||||
* state of the keyguard, power management events that effect whether the keyguard
|
||||
@@ -89,7 +90,8 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
|
||||
private final static String TAG = "KeyguardViewMediator";
|
||||
|
||||
private static final String DELAYED_KEYGUARD_ACTION = "com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD";
|
||||
private static final String DELAYED_KEYGUARD_ACTION =
|
||||
"com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD";
|
||||
|
||||
// used for handler messages
|
||||
private static final int TIMEOUT = 1;
|
||||
@@ -301,7 +303,8 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
|
||||
mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, when,
|
||||
sender);
|
||||
if (DEBUG) Log.d(TAG, "setting alarm to turn off keyguard, seq = " + mDelayedShowingSequence);
|
||||
if (DEBUG) Log.d(TAG, "setting alarm to turn off keyguard, seq = "
|
||||
+ mDelayedShowingSequence);
|
||||
} else {
|
||||
doKeyguard();
|
||||
}
|
||||
@@ -461,8 +464,8 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
|
||||
// if the setup wizard hasn't run yet, don't show
|
||||
final boolean provisioned = mUpdateMonitor.isDeviceProvisioned();
|
||||
final SimCard.State state = mUpdateMonitor.getSimState();
|
||||
final boolean lockedOrMissing = state.isPinLocked() || (state == SimCard.State.ABSENT);
|
||||
final IccCard.State state = mUpdateMonitor.getSimState();
|
||||
final boolean lockedOrMissing = state.isPinLocked() || (state == IccCard.State.ABSENT);
|
||||
if (!lockedOrMissing && !provisioned) {
|
||||
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because device isn't provisioned"
|
||||
+ " and the sim is not locked or missing");
|
||||
@@ -576,7 +579,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public void onSimStateChanged(SimCard.State simState) {
|
||||
public void onSimStateChanged(IccCard.State simState) {
|
||||
if (DEBUG) Log.d(TAG, "onSimStateChanged: " + simState);
|
||||
|
||||
switch (simState) {
|
||||
@@ -585,7 +588,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
// gone through setup wizard
|
||||
if (!mUpdateMonitor.isDeviceProvisioned()) {
|
||||
if (!isShowing()) {
|
||||
if (DEBUG) Log.d(TAG, "INTENT_VALUE_SIM_ABSENT and keygaurd isn't showing, we need "
|
||||
if (DEBUG) Log.d(TAG, "INTENT_VALUE_ICC_ABSENT and keygaurd isn't showing, we need "
|
||||
+ "to show the keyguard since the device isn't provisioned yet.");
|
||||
doKeyguard();
|
||||
} else {
|
||||
@@ -596,7 +599,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
case PIN_REQUIRED:
|
||||
case PUK_REQUIRED:
|
||||
if (!isShowing()) {
|
||||
if (DEBUG) Log.d(TAG, "INTENT_VALUE_SIM_LOCKED and keygaurd isn't showing, we need "
|
||||
if (DEBUG) Log.d(TAG, "INTENT_VALUE_ICC_LOCKED and keygaurd isn't showing, we need "
|
||||
+ "to show the keyguard so the user can enter their sim pin");
|
||||
doKeyguard();
|
||||
} else {
|
||||
@@ -759,10 +762,8 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
*/
|
||||
private Handler mHandler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(Message msg)
|
||||
{
|
||||
switch (msg.what)
|
||||
{
|
||||
public void handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case TIMEOUT:
|
||||
handleTimeout(msg.arg1);
|
||||
return ;
|
||||
@@ -947,3 +948,5 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import android.content.ServiceConnection;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemProperties;
|
||||
import com.android.internal.telephony.SimCard;
|
||||
import com.android.internal.telephony.IccCard;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
@@ -142,7 +142,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
private boolean stuckOnLockScreenBecauseSimMissing() {
|
||||
return mRequiresSim
|
||||
&& (!mUpdateMonitor.isDeviceProvisioned())
|
||||
&& (mUpdateMonitor.getSimState() == SimCard.State.ABSENT);
|
||||
&& (mUpdateMonitor.getSimState() == IccCard.State.ABSENT);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -184,9 +184,9 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
}
|
||||
|
||||
public void goToUnlockScreen() {
|
||||
final SimCard.State simState = mUpdateMonitor.getSimState();
|
||||
final IccCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (stuckOnLockScreenBecauseSimMissing()
|
||||
|| (simState == SimCard.State.PUK_REQUIRED)){
|
||||
|| (simState == IccCard.State.PUK_REQUIRED)){
|
||||
// stuck on lock screen when sim missing or puk'd
|
||||
return;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
public void wakeWhenReadyTq(int keyCode) {
|
||||
if (DEBUG) Log.d(TAG, "onWakeKey");
|
||||
if (keyCode == KeyEvent.KEYCODE_MENU && isSecure() && (mMode == Mode.LockScreen)
|
||||
&& (mUpdateMonitor.getSimState() != SimCard.State.PUK_REQUIRED)) {
|
||||
&& (mUpdateMonitor.getSimState() != IccCard.State.PUK_REQUIRED)) {
|
||||
if (DEBUG) Log.d(TAG, "switching screens to unlock screen because wake key was MENU");
|
||||
updateScreen(Mode.UnlockScreen);
|
||||
getCallback().pokeWakelock();
|
||||
@@ -403,8 +403,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
if (unlockMode == UnlockMode.Pattern) {
|
||||
return mLockPatternUtils.isLockPatternEnabled();
|
||||
} else if (unlockMode == UnlockMode.SimPin) {
|
||||
return mUpdateMonitor.getSimState() == SimCard.State.PIN_REQUIRED
|
||||
|| mUpdateMonitor.getSimState() == SimCard.State.PUK_REQUIRED;
|
||||
return mUpdateMonitor.getSimState() == IccCard.State.PIN_REQUIRED
|
||||
|| mUpdateMonitor.getSimState() == IccCard.State.PUK_REQUIRED;
|
||||
} else if (unlockMode == UnlockMode.Account) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -522,8 +522,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
* the lock screen (lock or unlock).
|
||||
*/
|
||||
private Mode getInitialMode() {
|
||||
final SimCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (stuckOnLockScreenBecauseSimMissing() || (simState == SimCard.State.PUK_REQUIRED)) {
|
||||
final IccCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (stuckOnLockScreenBecauseSimMissing() || (simState == IccCard.State.PUK_REQUIRED)) {
|
||||
return Mode.LockScreen;
|
||||
} else if (mUpdateMonitor.isKeyboardOpen() && isSecure()) {
|
||||
return Mode.UnlockScreen;
|
||||
@@ -536,8 +536,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
* Given the current state of things, what should the unlock screen be?
|
||||
*/
|
||||
private UnlockMode getUnlockMode() {
|
||||
final SimCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (simState == SimCard.State.PIN_REQUIRED || simState == SimCard.State.PUK_REQUIRED) {
|
||||
final IccCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (simState == IccCard.State.PIN_REQUIRED || simState == IccCard.State.PUK_REQUIRED) {
|
||||
return UnlockMode.SimPin;
|
||||
} else {
|
||||
return mLockPatternUtils.isPermanentlyLocked() ?
|
||||
@@ -568,7 +568,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
int timeoutInSeconds = (int) LockPatternUtils.FAILED_ATTEMPT_TIMEOUT_MS / 1000;
|
||||
String message = mContext.getString(
|
||||
R.string.lockscreen_failed_attempts_almost_glogin,
|
||||
LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET - LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT,
|
||||
LockPatternUtils.FAILED_ATTEMPTS_BEFORE_RESET
|
||||
- LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT,
|
||||
LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT,
|
||||
timeoutInSeconds);
|
||||
final AlertDialog dialog = new AlertDialog.Builder(mContext)
|
||||
@@ -637,3 +638,4 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.android.internal.policy.impl;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import com.android.internal.telephony.SimCard;
|
||||
import com.android.internal.telephony.IccCard;
|
||||
|
||||
/**
|
||||
* Knows how to create a lock pattern keyguard view, and answer questions about
|
||||
@@ -59,9 +59,9 @@ public class LockPatternKeyguardViewProperties implements KeyguardViewProperties
|
||||
}
|
||||
|
||||
private boolean isSimPinSecure() {
|
||||
final SimCard.State simState = mUpdateMonitor.getSimState();
|
||||
return (simState == SimCard.State.PIN_REQUIRED || simState == SimCard.State.PUK_REQUIRED
|
||||
|| simState == SimCard.State.ABSENT);
|
||||
final IccCard.State simState = mUpdateMonitor.getSimState();
|
||||
return (simState == IccCard.State.PIN_REQUIRED || simState == IccCard.State.PUK_REQUIRED
|
||||
|| simState == IccCard.State.ABSENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import com.android.internal.telephony.SimCard;
|
||||
import com.android.internal.telephony.IccCard;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -193,7 +193,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
final View view = mOnlyVisibleWhenSimNotOk[i];
|
||||
view.setVisibility(View.GONE);
|
||||
}
|
||||
refreshSimOkHeaders(mUpdateMonitor.getTelephonyPlmn(), mUpdateMonitor.getTelephonySpn());
|
||||
refreshSimOkHeaders(mUpdateMonitor.getTelephonyPlmn(),
|
||||
mUpdateMonitor.getTelephonySpn());
|
||||
refreshAlarmDisplay();
|
||||
refreshBatteryDisplay();
|
||||
} else {
|
||||
@@ -210,11 +211,11 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
}
|
||||
|
||||
private void refreshSimBadInfo() {
|
||||
final SimCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (simState == SimCard.State.PUK_REQUIRED) {
|
||||
final IccCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (simState == IccCard.State.PUK_REQUIRED) {
|
||||
mHeaderSimBad1.setText(R.string.lockscreen_sim_puk_locked_message);
|
||||
mHeaderSimBad2.setText(R.string.lockscreen_sim_puk_locked_instructions);
|
||||
} else if (simState == SimCard.State.ABSENT) {
|
||||
} else if (simState == IccCard.State.ABSENT) {
|
||||
mHeaderSimBad1.setText(R.string.lockscreen_missing_sim_message);
|
||||
mHeaderSimBad2.setVisibility(View.GONE);
|
||||
//mHeaderSimBad2.setText(R.string.lockscreen_missing_sim_instructions);
|
||||
@@ -226,7 +227,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
|
||||
private void refreshUnlockIntructions() {
|
||||
if (mLockPatternUtils.isLockPatternEnabled()
|
||||
|| mUpdateMonitor.getSimState() == SimCard.State.PIN_REQUIRED) {
|
||||
|| mUpdateMonitor.getSimState() == IccCard.State.PIN_REQUIRED) {
|
||||
mLockInstructions.setText(R.string.lockscreen_instructions_when_pattern_enabled);
|
||||
} else {
|
||||
mLockInstructions.setText(R.string.lockscreen_instructions_when_pattern_disabled);
|
||||
@@ -293,8 +294,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
}
|
||||
|
||||
private void refreshSimOkHeaders(CharSequence plmn, CharSequence spn) {
|
||||
final SimCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (simState == SimCard.State.READY) {
|
||||
final IccCard.State simState = mUpdateMonitor.getSimState();
|
||||
if (simState == IccCard.State.READY) {
|
||||
if (plmn != null) {
|
||||
mHeaderSimOk1.setVisibility(View.VISIBLE);
|
||||
mHeaderSimOk1.setText(plmn);
|
||||
@@ -308,22 +309,22 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
} else {
|
||||
mHeaderSimOk2.setVisibility(View.GONE);
|
||||
}
|
||||
} else if (simState == SimCard.State.PIN_REQUIRED) {
|
||||
} else if (simState == IccCard.State.PIN_REQUIRED) {
|
||||
mHeaderSimOk1.setVisibility(View.VISIBLE);
|
||||
mHeaderSimOk1.setText(R.string.lockscreen_sim_locked_message);
|
||||
mHeaderSimOk2.setVisibility(View.GONE);
|
||||
} else if (simState == SimCard.State.ABSENT) {
|
||||
} else if (simState == IccCard.State.ABSENT) {
|
||||
mHeaderSimOk1.setVisibility(View.VISIBLE);
|
||||
mHeaderSimOk1.setText(R.string.lockscreen_missing_sim_message_short);
|
||||
mHeaderSimOk2.setVisibility(View.GONE);
|
||||
} else if (simState == SimCard.State.NETWORK_LOCKED) {
|
||||
} else if (simState == IccCard.State.NETWORK_LOCKED) {
|
||||
mHeaderSimOk1.setVisibility(View.VISIBLE);
|
||||
mHeaderSimOk1.setText(R.string.lockscreen_network_locked_message);
|
||||
mHeaderSimOk2.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSimStateChanged(SimCard.State simState) {
|
||||
public void onSimStateChanged(IccCard.State simState) {
|
||||
mSimOk = isSimOk(simState);
|
||||
refreshViewsWRTSimOk();
|
||||
}
|
||||
@@ -333,10 +334,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
* a special screen with the emergency call button and keep them from
|
||||
* doing anything else.
|
||||
*/
|
||||
private boolean isSimOk(SimCard.State simState) {
|
||||
private boolean isSimOk(IccCard.State simState) {
|
||||
boolean missingAndNotProvisioned = (!mUpdateMonitor.isDeviceProvisioned()
|
||||
&& simState == SimCard.State.ABSENT);
|
||||
return !(missingAndNotProvisioned || simState == SimCard.State.PUK_REQUIRED);
|
||||
&& simState == IccCard.State.ABSENT);
|
||||
return !(missingAndNotProvisioned || simState == IccCard.State.PUK_REQUIRED);
|
||||
}
|
||||
|
||||
public void onOrientationChange(boolean inPortrait) {
|
||||
@@ -369,3 +370,4 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
mUpdateMonitor.removeCallback(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -285,6 +285,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
mFancyRotationAnimation);
|
||||
} catch (RemoteException e) {
|
||||
// Ignore
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1831,3 +1832,4 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user