Commit 2930a255 authored by Daniel Sonck's avatar Daniel Sonck
Browse files

Merge pull request #9 in THFM/fm.touhou.touhoufm from...

Merge pull request #9 in THFM/fm.touhou.touhoufm from bugfix/THFMA-4-app-keeps-asking-for-disabling-power to development

* commit '65f4a594':
  Use actual package name instead of hardcoded package name
parents ddbe0ccd 65f4a594
......@@ -88,7 +88,7 @@ public class MainActivity extends AppCompatActivity implements RadioService.Call
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M ) {
PowerManager pm;
pm = getSystemService(PowerManager.class);
if(pm != null && !pm.isIgnoringBatteryOptimizations("fm.touhou.touhoufm.debug")) {
if(pm != null && !pm.isIgnoringBatteryOptimizations(getPackageName())) {
AlertDialog dialog = new AlertDialog.Builder(this)
.setPositiveButton(R.string.trigger_battery_optimization, new DialogInterface.OnClickListener() {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment