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

Commit b188442f authored by Annie Chin's avatar Annie Chin Committed by Android (Google) Code Review
Browse files

Merge "Re-query for AlarmInstance state in AlarmActivity onResume." into ub-deskclock-army

parents c43b9a81 e3029858
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -246,6 +246,10 @@ public class AlarmActivity extends AppCompatActivity
    protected void onResume() {
        super.onResume();

        // Re-query for AlarmInstance in case the state has changed externally
        final long instanceId = AlarmInstance.getId(getIntent().getData());
        mAlarmInstance = AlarmInstance.getInstance(getContentResolver(), instanceId);

        // Verify that the alarm is still firing before showing the activity
        if (mAlarmInstance.mAlarmState != AlarmInstance.FIRED_STATE) {
            LogUtils.i(LOGTAG, "Skip displaying alarm for instance: %s", mAlarmInstance);