1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-13 15:27:52 +00:00

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

This commit is contained in:
kote 2019-08-24 18:00:11 +08:00
parent 80f632c19a
commit 5eab5f2437

View File

@ -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;
}