mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 18:59:18 +03:00
better variable naming
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
66902d2ced
commit
8bdfbb49ab
5 changed files with 18 additions and 18 deletions
|
@ -339,8 +339,8 @@ public class MainApp extends Application implements HasAndroidInjector, NetworkC
|
||||||
// initialise thumbnails cache on background thread
|
// initialise thumbnails cache on background thread
|
||||||
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
|
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
|
||||||
|
|
||||||
boolean disableLog = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableLog, getResources().getBoolean(R.bool.disable_log));
|
boolean disableLogViaMDM = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableLog, getResources().getBoolean(R.bool.disable_log));
|
||||||
if ((BuildConfig.DEBUG || getApplicationContext().getResources().getBoolean(R.bool.logger_enabled)) && !disableLog) {
|
if ((BuildConfig.DEBUG || getApplicationContext().getResources().getBoolean(R.bool.logger_enabled)) && !disableLogViaMDM) {
|
||||||
// use app writable dir, no permissions needed
|
// use app writable dir, no permissions needed
|
||||||
Log_OC.setLoggerImplementation(new LegacyLoggerAdapter(logger));
|
Log_OC.setLoggerImplementation(new LegacyLoggerAdapter(logger));
|
||||||
Log_OC.d("Debug", "start logging");
|
Log_OC.d("Debug", "start logging");
|
||||||
|
|
|
@ -186,8 +186,8 @@ public class FileMenuFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void filterSendFiles(List<Integer> toHide, boolean inSingleFileFragment) {
|
private void filterSendFiles(List<Integer> toHide, boolean inSingleFileFragment) {
|
||||||
boolean disableSharing = ContextExtensionsKt.getRestriction(context, AppConfigKeys.DisableSharing, context.getResources().getBoolean(R.bool.disable_sharing));
|
boolean disableSharingViaMDM = ContextExtensionsKt.getRestriction(context, AppConfigKeys.DisableSharing, context.getResources().getBoolean(R.bool.disable_sharing));
|
||||||
if (!disableSharing || (overflowMenu || SEND_OFF.equalsIgnoreCase(context.getString(R.string.send_files_to_other_apps)) || containsEncryptedFile()) ||
|
if (!disableSharingViaMDM || (overflowMenu || SEND_OFF.equalsIgnoreCase(context.getString(R.string.send_files_to_other_apps)) || containsEncryptedFile()) ||
|
||||||
(!inSingleFileFragment && (isSingleSelection() || !allFileDown())) ||
|
(!inSingleFileFragment && (isSingleSelection() || !allFileDown())) ||
|
||||||
!toHide.contains(R.id.action_send_share_file)) {
|
!toHide.contains(R.id.action_send_share_file)) {
|
||||||
toHide.add(R.id.action_send_file);
|
toHide.add(R.id.action_send_file);
|
||||||
|
|
|
@ -604,11 +604,11 @@ public abstract class DrawerActivity extends ToolbarActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openAddAccount() {
|
public void openAddAccount() {
|
||||||
boolean disableIntro = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableIntro, getResources().getBoolean(R.bool.disable_intro));
|
boolean disableIntroViaMDM = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableIntro, getResources().getBoolean(R.bool.disable_intro));
|
||||||
boolean isProviderOrOwnInstallationVisible = getResources()
|
boolean isProviderOrOwnInstallationVisible = getResources()
|
||||||
.getBoolean(R.bool.show_provider_or_own_installation);
|
.getBoolean(R.bool.show_provider_or_own_installation);
|
||||||
|
|
||||||
if (isProviderOrOwnInstallationVisible && !disableIntro) {
|
if (isProviderOrOwnInstallationVisible && !disableIntroViaMDM) {
|
||||||
Intent firstRunIntent = new Intent(getApplicationContext(), FirstRunActivity.class);
|
Intent firstRunIntent = new Intent(getApplicationContext(), FirstRunActivity.class);
|
||||||
firstRunIntent.putExtra(FirstRunActivity.EXTRA_ALLOW_CLOSE, true);
|
firstRunIntent.putExtra(FirstRunActivity.EXTRA_ALLOW_CLOSE, true);
|
||||||
startActivity(firstRunIntent);
|
startActivity(firstRunIntent);
|
||||||
|
@ -827,8 +827,8 @@ public abstract class DrawerActivity extends ToolbarActivity
|
||||||
|
|
||||||
private void updateQuotaLink() {
|
private void updateQuotaLink() {
|
||||||
if (mQuotaTextLink != null) {
|
if (mQuotaTextLink != null) {
|
||||||
boolean disableMoreExternalSite = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
boolean disableMoreExternalSiteViaMDM = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
||||||
if (getBaseContext().getResources().getBoolean(R.bool.show_external_links) && !disableMoreExternalSite) {
|
if (getBaseContext().getResources().getBoolean(R.bool.show_external_links) && !disableMoreExternalSiteViaMDM) {
|
||||||
List<ExternalLink> quotas = externalLinksProvider.getExternalLink(ExternalLinkType.QUOTA);
|
List<ExternalLink> quotas = externalLinksProvider.getExternalLink(ExternalLinkType.QUOTA);
|
||||||
|
|
||||||
float density = getResources().getDisplayMetrics().density;
|
float density = getResources().getDisplayMetrics().density;
|
||||||
|
@ -977,8 +977,8 @@ public abstract class DrawerActivity extends ToolbarActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateExternalLinksInDrawer() {
|
private void updateExternalLinksInDrawer() {
|
||||||
boolean disableMoreExternalSite = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
boolean disableMoreExternalSiteViaMDM = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
||||||
if (mNavigationView != null && getBaseContext().getResources().getBoolean(R.bool.show_external_links) && !disableMoreExternalSite) {
|
if (mNavigationView != null && getBaseContext().getResources().getBoolean(R.bool.show_external_links) && !disableMoreExternalSiteViaMDM) {
|
||||||
mNavigationView.getMenu().removeGroup(R.id.drawer_menu_external_links);
|
mNavigationView.getMenu().removeGroup(R.id.drawer_menu_external_links);
|
||||||
|
|
||||||
int greyColor = ContextCompat.getColor(this, R.color.drawer_menu_icon);
|
int greyColor = ContextCompat.getColor(this, R.color.drawer_menu_icon);
|
||||||
|
@ -1227,8 +1227,8 @@ public abstract class DrawerActivity extends ToolbarActivity
|
||||||
* Retrieves external links via api from 'external' app
|
* Retrieves external links via api from 'external' app
|
||||||
*/
|
*/
|
||||||
public void fetchExternalLinks(final boolean force) {
|
public void fetchExternalLinks(final boolean force) {
|
||||||
boolean disableMoreExternalSite = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
boolean disableMoreExternalSiteViaMDM = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
||||||
if (!getBaseContext().getResources().getBoolean(R.bool.show_external_links) || disableMoreExternalSite) {
|
if (!getBaseContext().getResources().getBoolean(R.bool.show_external_links) || disableMoreExternalSiteViaMDM) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -381,11 +381,11 @@ public class SettingsActivity extends PreferenceActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupLoggingPreference(PreferenceCategory preferenceCategoryMore) {
|
private void setupLoggingPreference(PreferenceCategory preferenceCategoryMore) {
|
||||||
boolean disableLog = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableLog, getResources().getBoolean(R.bool.disable_log));
|
boolean disableLogViaMDM = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableLog, getResources().getBoolean(R.bool.disable_log));
|
||||||
boolean loggerEnabled = getResources().getBoolean(R.bool.logger_enabled) || BuildConfig.DEBUG;
|
boolean loggerEnabled = getResources().getBoolean(R.bool.logger_enabled) || BuildConfig.DEBUG;
|
||||||
Preference pLogger = findPreference("logger");
|
Preference pLogger = findPreference("logger");
|
||||||
if (pLogger != null) {
|
if (pLogger != null) {
|
||||||
if (loggerEnabled && !disableLog) {
|
if (loggerEnabled && !disableLogViaMDM) {
|
||||||
pLogger.setOnPreferenceClickListener(preference -> {
|
pLogger.setOnPreferenceClickListener(preference -> {
|
||||||
Intent loggerIntent = new Intent(getApplicationContext(), LogsActivity.class);
|
Intent loggerIntent = new Intent(getApplicationContext(), LogsActivity.class);
|
||||||
startActivity(loggerIntent);
|
startActivity(loggerIntent);
|
||||||
|
@ -1103,8 +1103,8 @@ public class SettingsActivity extends PreferenceActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadExternalSettingLinks(PreferenceCategory preferenceCategory) {
|
private void loadExternalSettingLinks(PreferenceCategory preferenceCategory) {
|
||||||
boolean disableMoreExternalSite = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
boolean disableMoreExternalSiteViaMDM = ContextExtensionsKt.getRestriction(this, AppConfigKeys.DisableMoreExternalSite, getResources().getBoolean(R.bool.disable_more_external_site));
|
||||||
if (getBaseContext().getResources().getBoolean(R.bool.show_external_links) && !disableMoreExternalSite) {
|
if (getBaseContext().getResources().getBoolean(R.bool.show_external_links) && !disableMoreExternalSiteViaMDM) {
|
||||||
ExternalLinksProvider externalLinksProvider = new ExternalLinksProvider(getContentResolver());
|
ExternalLinksProvider externalLinksProvider = new ExternalLinksProvider(getContentResolver());
|
||||||
|
|
||||||
for (final ExternalLink link : externalLinksProvider.getExternalLink(ExternalLinkType.SETTINGS)) {
|
for (final ExternalLink link : externalLinksProvider.getExternalLink(ExternalLinkType.SETTINGS)) {
|
||||||
|
|
|
@ -320,11 +320,11 @@ public class UserListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
||||||
* @param accountListAdapterListener {@link Listener}
|
* @param accountListAdapterListener {@link Listener}
|
||||||
*/
|
*/
|
||||||
private void bind(Listener accountListAdapterListener) {
|
private void bind(Listener accountListAdapterListener) {
|
||||||
boolean disableIntro = ContextExtensionsKt.getRestriction(context, AppConfigKeys.DisableIntro, context.getResources().getBoolean(R.bool.disable_intro));
|
boolean disableIntroViaMDM = ContextExtensionsKt.getRestriction(context, AppConfigKeys.DisableIntro, context.getResources().getBoolean(R.bool.disable_intro));
|
||||||
boolean isProviderOrOwnInstallationVisible = itemView.getContext().getResources()
|
boolean isProviderOrOwnInstallationVisible = itemView.getContext().getResources()
|
||||||
.getBoolean(R.bool.show_provider_or_own_installation);
|
.getBoolean(R.bool.show_provider_or_own_installation);
|
||||||
|
|
||||||
if (isProviderOrOwnInstallationVisible && !disableIntro) {
|
if (isProviderOrOwnInstallationVisible && !disableIntroViaMDM) {
|
||||||
itemView.setOnClickListener(v -> accountListAdapterListener.showFirstRunActivity());
|
itemView.setOnClickListener(v -> accountListAdapterListener.showFirstRunActivity());
|
||||||
} else {
|
} else {
|
||||||
itemView.setOnClickListener(v -> accountListAdapterListener.startAccountCreation());
|
itemView.setOnClickListener(v -> accountListAdapterListener.startAccountCreation());
|
||||||
|
|
Loading…
Reference in a new issue