Loading core/java/com/android/internal/widget/LockPatternUtils.java +13 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; import java.io.File; import java.io.FileNotFoundException; Loading Loading @@ -869,6 +870,18 @@ public class LockPatternUtils { button.setText(textId); } /** * Sets the visibility of emergency call prompt based on emergency capable * @param emergencyText the emergency call text to be updated */ public void updateEmergencyCallText(TextView emergencyText) { if (isEmergencyCallCapable()) { emergencyText.setVisibility(View.VISIBLE); } else { emergencyText.setVisibility(View.GONE); } } /** * Resumes a call in progress. Typically launched from the EmergencyCall button * on various lockscreens. Loading policy/src/com/android/internal/policy/impl/LockScreen.java +5 −6 Original line number Diff line number Diff line Loading @@ -538,7 +538,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen, // layout mScreenLocked.setVisibility(View.VISIBLE); mEmergencyCallText.setVisibility(View.VISIBLE); mLockPatternUtils.updateEmergencyCallText(mEmergencyCallText); enableUnlock(); // do not need to show the e-call button; user may unlock break; Loading @@ -552,8 +552,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen, // layout mScreenLocked.setVisibility(View.VISIBLE); mEmergencyCallText.setVisibility(View.VISIBLE); mEmergencyCallButton.setVisibility(View.VISIBLE); mLockPatternUtils.updateEmergencyCallText(mEmergencyCallText); mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton); disableUnlock(); break; Loading @@ -579,14 +579,13 @@ class LockScreen extends LinearLayout implements KeyguardScreen, mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions); // layout mLockPatternUtils.updateEmergencyCallText(mEmergencyCallText); mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton); if (mLockPatternUtils.isPukUnlockScreenEnable()) { mScreenLocked.setVisibility(View.INVISIBLE); mEmergencyCallText.setVisibility(View.GONE); enableUnlock(); } else { mScreenLocked.setVisibility(View.VISIBLE); mEmergencyCallText.setVisibility(View.VISIBLE); mEmergencyCallButton.setVisibility(View.VISIBLE); disableUnlock(); } break; Loading Loading
core/java/com/android/internal/widget/LockPatternUtils.java +13 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; import java.io.File; import java.io.FileNotFoundException; Loading Loading @@ -869,6 +870,18 @@ public class LockPatternUtils { button.setText(textId); } /** * Sets the visibility of emergency call prompt based on emergency capable * @param emergencyText the emergency call text to be updated */ public void updateEmergencyCallText(TextView emergencyText) { if (isEmergencyCallCapable()) { emergencyText.setVisibility(View.VISIBLE); } else { emergencyText.setVisibility(View.GONE); } } /** * Resumes a call in progress. Typically launched from the EmergencyCall button * on various lockscreens. Loading
policy/src/com/android/internal/policy/impl/LockScreen.java +5 −6 Original line number Diff line number Diff line Loading @@ -538,7 +538,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen, // layout mScreenLocked.setVisibility(View.VISIBLE); mEmergencyCallText.setVisibility(View.VISIBLE); mLockPatternUtils.updateEmergencyCallText(mEmergencyCallText); enableUnlock(); // do not need to show the e-call button; user may unlock break; Loading @@ -552,8 +552,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen, // layout mScreenLocked.setVisibility(View.VISIBLE); mEmergencyCallText.setVisibility(View.VISIBLE); mEmergencyCallButton.setVisibility(View.VISIBLE); mLockPatternUtils.updateEmergencyCallText(mEmergencyCallText); mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton); disableUnlock(); break; Loading @@ -579,14 +579,13 @@ class LockScreen extends LinearLayout implements KeyguardScreen, mScreenLocked.setText(R.string.lockscreen_sim_puk_locked_instructions); // layout mLockPatternUtils.updateEmergencyCallText(mEmergencyCallText); mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton); if (mLockPatternUtils.isPukUnlockScreenEnable()) { mScreenLocked.setVisibility(View.INVISIBLE); mEmergencyCallText.setVisibility(View.GONE); enableUnlock(); } else { mScreenLocked.setVisibility(View.VISIBLE); mEmergencyCallText.setVisibility(View.VISIBLE); mEmergencyCallButton.setVisibility(View.VISIBLE); disableUnlock(); } break; Loading