Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 381451bc authored by myzb's avatar myzb Committed by Gerrit Code Review
Browse files

Keyguard: Squash undo UI changes after merge of branch 'LA.BF64.1.2.2_rb4.7'

	Revert "Hide emergency button when OOS"
	This reverts commit 5ccaaff4.

	* Buggy on MSIM, making the button perma enable.

	Revert "EmergencyCall Button on Swipe Lock Screen"
	This reverts commit 5f712cc9.

	* Introduces some ugly padding to make room for a button we have
	  disabled by default since forever.

	Revert "Emergency call button on Swipe lock Screen."
	This reverts commit f17cb289.

	* See above, adds the option to enable the button itself.

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java

Change-Id: Ie95f0b075e25b625298eac3c06d278e6cb1e7b17
parent 848baf95
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -17,5 +17,4 @@
<resources>
    <bool name="kg_show_ime_at_screen_on">true</bool>
    <bool name="kg_use_all_caps">true</bool>
    <bool name="kg_hide_emgcy_btn_when_oos">false</bool>
</resources>
+2 −15
Original line number Diff line number Diff line
@@ -22,10 +22,8 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.telecom.TelecomManager;
import android.telephony.ServiceState;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
@@ -59,11 +57,6 @@ public class EmergencyButton extends Button {
        public void onPhoneStateChanged(int phoneState) {
            updateEmergencyCallButton();
        }

        @Override
        public void onServiceStateChanged(int sub, ServiceState state) {
            updateEmergencyCallButton();
        }
    };

    public interface EmergencyButtonCallback {
@@ -142,7 +135,7 @@ public class EmergencyButton extends Button {
        }
    }

    public void updateEmergencyCallButton() {
    private void updateEmergencyCallButton() {
        boolean visible = false;
        if (mIsVoiceCapable) {
            // Emergency calling requires voice capability.
@@ -156,13 +149,7 @@ public class EmergencyButton extends Button {
                    visible = mEnableEmergencyCallWhileSimLocked;
                } else {
                    // Only show if there is a secure screen (pin/pattern/SIM pin/SIM puk);
                    visible = mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser()) ||
                            SystemProperties.getBoolean("persist.radio.emgcy_btn_onswipe", false);
                }

                if (mContext.getResources().getBoolean(R.bool.kg_hide_emgcy_btn_when_oos)) {
                    KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
                    visible = visible && !monitor.isOOS();
                    visible = mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser());
                }
            }
        }
+0 −16
Original line number Diff line number Diff line
@@ -1356,7 +1356,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
            KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get();
            if (cb != null) {
                cb.onRefreshCarrierInfo();
                cb.onServiceStateChanged(subId, serviceState);
            }
        }
    }
@@ -1585,21 +1584,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        }
    }

    public boolean isOOS()
    {
        boolean ret = true;
        for (int subId : mServiceStates.keySet()) {
            ServiceState state = mServiceStates.get(subId);
            if (((state.getVoiceRegState() != ServiceState.STATE_OUT_OF_SERVICE)
                    && (state.getVoiceRegState() != ServiceState.STATE_POWER_OFF))
                    || (state.isEmergencyOnly())) {
                ret = false;
                break;
            }
        }
        return ret;
    }

    /**
     * @return true if and only if the state has changed for the specified {@code slotId}
     */
+0 −8
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.graphics.Bitmap;
import android.media.AudioManager;
import android.os.SystemClock;
import android.hardware.fingerprint.FingerprintManager;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.view.WindowManagerPolicy;

@@ -123,13 +122,6 @@ public class KeyguardUpdateMonitorCallback {
     */
    public void onSimStateChanged(int subId, int slotId, IccCardConstants.State simState) { }

    /**
     * Called when the sevice state changes.
     * @param subId
     * @param serviceState
     */
    public void onServiceStateChanged(int sub, ServiceState state) { }

    /**
     * Called when the user's info changed.
     */
+0 −9
Original line number Diff line number Diff line
@@ -36,15 +36,6 @@
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:accessibilityLiveRegion="polite" />

    <include layout="@layout/keyguard_eca"
        android:id="@+id/keyguard_selector_fade_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="36dp"
        android:orientation="vertical"
        android:layout_gravity="bottom|center_horizontal"
        android:gravity="center_horizontal" />

    <FrameLayout
        android:id="@+id/preview_container"
        android:layout_width="match_parent"
Loading