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

Commit a3544718 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Fix alarm text in QSHeader to use PendingIntent

For security reasons, we should be using the PendingIntent.

Test: set alarm in clock and 3rd party app and test click. Behavior
remains the same
Fixes: 131342866

Change-Id: I7f773404aadc2b51cbfbcd128ac0155eed82b420
parent 7e36009d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.provider.Settings;
import android.service.notification.ZenModeConfig;
import android.text.format.DateUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Pair;
import android.util.StatsLog;
import android.view.DisplayCutout;
@@ -523,11 +524,11 @@ public class QuickStatusBarHeader extends RelativeLayout implements
            mActivityStarter.postStartActivityDismissingKeyguard(new Intent(
                    AlarmClock.ACTION_SHOW_ALARMS), 0);
        } else if (v == mNextAlarmContainer) {
            if (mNextAlarm.getShowIntent() != null
                    && mNextAlarm.getShowIntent().getIntent() != null) {
            if (mNextAlarm.getShowIntent() != null) {
                mActivityStarter.postStartActivityDismissingKeyguard(
                        mNextAlarm.getShowIntent().getIntent(), 0);
                        mNextAlarm.getShowIntent());
            } else {
                Log.d(TAG, "No PendingIntent for next alarm. Using default intent");
                mActivityStarter.postStartActivityDismissingKeyguard(new Intent(
                        AlarmClock.ACTION_SHOW_ALARMS), 0);
            }