Convert isReleaseApk to lazy value
This commit is contained in:
parent
bec18e13d3
commit
2e53a99361
4 changed files with 8 additions and 11 deletions
|
|
@ -23,7 +23,7 @@ public class MainSettingsFragment extends BasePreferenceFragment {
|
|||
setHasOptionsMenu(true); // Otherwise onCreateOptionsMenu is not called
|
||||
|
||||
// Check if the app is updatable
|
||||
if (!ReleaseVersionUtil.isReleaseApk()) {
|
||||
if (!ReleaseVersionUtil.INSTANCE.isReleaseApk()) {
|
||||
getPreferenceScreen().removePreference(
|
||||
findPreference(getString(R.string.update_pref_screen_key)));
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ public class SettingsActivity extends AppCompatActivity implements
|
|||
*/
|
||||
private void ensureSearchRepresentsApplicationState() {
|
||||
// Check if the update settings are available
|
||||
if (!ReleaseVersionUtil.isReleaseApk()) {
|
||||
if (!ReleaseVersionUtil.INSTANCE.isReleaseApk()) {
|
||||
SettingsResourceRegistry.getInstance()
|
||||
.getEntryByPreferencesResId(R.xml.update_settings)
|
||||
.setSearchable(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue