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

Commit 8dac45cc authored by Robyn Coultas's avatar Robyn Coultas Committed by Isaac Katzenelson
Browse files

Revert Alarm behavior for Back and Home keys

Bug: 7367668
Change-Id: I8fd7f0b762ecbaad3b5f9730f864eb982650230a
parent fa850403
Loading
Loading
Loading
Loading
+10 −14
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig
    private static final long PING_AUTO_REPEAT_DELAY_MSEC = 1200;

    private boolean mPingEnabled = true;
    boolean mCallSnoozeonStop = true;

    // Receives the ALARM_KILLED action from the AlarmKlaxon,
    // and also ALARM_SNOOZE_ACTION / ALARM_DISMISS_ACTION from other applications
@@ -186,7 +185,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig
        if (LOG) {
            Log.v("AlarmAlertFullScreen - snooze");
        }
        mCallSnoozeonStop = false;

        final String snooze =
                PreferenceManager.getDefaultSharedPreferences(this)
@@ -251,7 +249,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig
        if (LOG) {
            Log.v("AlarmAlertFullScreen - dismiss");
        }
        mCallSnoozeonStop = false;

        Log.i(killed ? "Alarm killed" : "Alarm dismissed by user");
        // The service told us that the alarm has been killed, do not modify
@@ -303,17 +300,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig
        }
    }

    @Override
    protected void onStop() {
        if (LOG) {
            Log.v("AlarmAlertFullScreen - onStop snooze=" + mCallSnoozeonStop);
        }
        if (mCallSnoozeonStop) {
            snooze();
        }
        super.onStop();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
@@ -358,6 +344,16 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig
        return super.dispatchKeyEvent(event);
    }

    @Override
    public void onBackPressed() {
        // Don't allow back to dismiss. This method is overriden by AlarmAlert
        // so that the dialog is dismissed.
        if (LOG) {
            Log.v("AlarmAlertFullScreen - onBackPressed");
        }
        return;
    }


    @Override
    public void onGrabbed(View v, int handle) {