Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e52036a authored by Danesh M's avatar Danesh M Committed by Gerrit Code Review
Browse files

Settings: Add overlay for hiding performance options

Change-Id: I657c94aea5da1591a72c4758d4bfec93b8f77dad
parent ffc3b3c4
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -76,4 +76,7 @@


    <bool name="config_default_advanced_mode_enabled">false</bool>
    <bool name="config_default_advanced_mode_enabled">false</bool>


    <!-- This is use to determine whether to hide the performance settings-->
    <bool name="config_hidePerformanceSettings" translatable="false">false</bool>

</resources>
</resources>
+4 −1
Original line number Original line Diff line number Diff line
@@ -1235,7 +1235,10 @@ public class SettingsActivity extends Activity
                        removeTile = true;
                        removeTile = true;
                    }
                    }
                } else if (id == R.id.performance_settings) {
                } else if (id == R.id.performance_settings) {
                    if (!(pm.hasPowerProfiles() || (showDev && !Build.TYPE.equals("user")))) {
                    final boolean forceHide =
                            getResources().getBoolean(R.bool.config_hidePerformanceSettings);
                    if (forceHide ||
                            !(pm.hasPowerProfiles() || (showDev && !Build.TYPE.equals("user")))) {
                        removeTile = true;
                        removeTile = true;
                    }
                    }
                }
                }