rsteckler / unbounce-android

Take control of your battery life by limiting wakelocks and alarms
MIT License
126 stars 45 forks source link

Improve regex support + minor bug fixes #136

Open dlo9 opened 8 years ago

dlo9 commented 8 years ago

Some improvements:

  1. Regex creation/info follows the look & feel of the rest of the app with a detail view, similar to when an alarm/wakelock/service is clicked
  2. Regex fragment code has been consolidated
  3. Regex blocks can be enabled/disabled without removal
  4. A description of the regex, consisting of which alarms/wakelocks it will apply to helps the user to prevent bugs in complex patterns
  5. Tasker plugin supports regex modification (this required a UI change to the tasker_which layout which I think looks reasonable)

Some minor bugs were also fixed:

  1. The Tasker plugin missed the $2 donation amount (probably the cause of issue #112)
  2. Changing fragments with the navigation bar sometimes kept menu items from a previous fragment (this happened a lot when navigating from the regex list)
  3. Service blocking doesn't support regex, so I disabled the menu button in that fragment

Since regex enabling/disabling required (minor) changes to the preference file, the code was written in a way to read either the new or old version but I forgot to test this thoroughly.