QuantumBadger / RedReader

An unofficial open source Android app for Reddit.
GNU General Public License v3.0
1.98k stars 484 forks source link

Make pref_behaviour_notifications disable the alarm #204

Open alexzorin opened 9 years ago

alexzorin commented 9 years ago

Don't really do Android but wouldn't it save some battery life/alarm invocations to just disable the 30 min alarm if notifications are disabled?

At the moment my reading of it is

QuantumBadger commented 9 years ago

You're right, although the amount of battery life used by this is basically none. The alarm is set using setInexactRepeating(), which means Android will schedule the alarm in sync with other alarms (so if you have five alarms, Android will wake up once to service all five). Also, only the CPU gets woken up (not the radio).

Even so, I'd happily accept a pull request that disabled the alarm.