Browse Source

show battery optimiz. menu item now hidden if not supported by os

pull/1409/head
kote 5 years ago
parent
commit
5eab5f2437
  1. 2
      android/src/org/purplei2p/i2pd/I2PDActivity.java

2
android/src/org/purplei2p/i2pd/I2PDActivity.java

@ -231,7 +231,7 @@ public class I2PDActivity extends Activity { @@ -231,7 +231,7 @@ public class I2PDActivity extends Activity {
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.options_main, menu);
menu.findItem(R.id.action_battery_otimizations).setEnabled(isBatteryOptimizationsOpenOsDialogApiAvailable());
menu.findItem(R.id.action_battery_otimizations).setVisible(isBatteryOptimizationsOpenOsDialogApiAvailable());
return true;
}

Loading…
Cancel
Save