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

Unverified Commit 436ce6ae authored by Rashed Abdel-Tawab's avatar Rashed Abdel-Tawab
Browse files

clock: Reset profile if profile is already selected

Selecting a profile that is already selected currently does nothing.
Instead, just re-apply the profile anyway.

BUGBASH-811
Change-Id: I97f33d5c9e320f5906055bab0a961e30cfd473e8
parent 33a443d5
Loading
Loading
Loading
Loading
+3 −11
Original line number Original line Diff line number Diff line
@@ -165,17 +165,9 @@ public class AlarmService extends Service {
            return;
            return;
        }
        }


        // Is the current profile different?
        Profile activeProfile = profileManager.getActiveProfile();
        if (activeProfile == null || !profile.getUuid().equals(activeProfile.getUuid())) {
        // Change to profile
        // Change to profile
            LogUtils.i("Changing to profile \"" + profile.getName() + "\" (" + profile.getUuid()
                    + ") requested by alarm \"" + instance.mLabel + "\" (" + instance.mId + ")");
        profileManager.setActiveProfile(profile.getUuid());
        profileManager.setActiveProfile(profile.getUuid());
        } else {

            LogUtils.v("The profile \"" + profile.getName() + "\" (" + profile.getUuid()
                    + " is already active. No need to change to");
        }
    }
    }


    public static void startAlarm(Context context, AlarmInstance instance) {
    public static void startAlarm(Context context, AlarmInstance instance) {