Removing block/allow menu for root/no uid

This commit is contained in:
M66B 2019-05-05 12:43:58 +02:00
parent b663990cd4
commit cf800398df
1 changed files with 6 additions and 1 deletions

View File

@ -209,7 +209,12 @@ public class ActivityLog extends AppCompatActivity implements SharedPreferences.
else else
popup.getMenu().findItem(R.id.menu_port).setTitle(getString(R.string.title_log_port, port)); popup.getMenu().findItem(R.id.menu_port).setTitle(getString(R.string.title_log_port, port));
if (!prefs.getBoolean("filter", false)) { if (prefs.getBoolean("filter", false)) {
if (uid <= 0) {
popup.getMenu().removeItem(R.id.menu_allow);
popup.getMenu().removeItem(R.id.menu_block);
}
} else {
popup.getMenu().removeItem(R.id.menu_allow); popup.getMenu().removeItem(R.id.menu_allow);
popup.getMenu().removeItem(R.id.menu_block); popup.getMenu().removeItem(R.id.menu_block);
} }