From b0ee467d50ec5290cfcce320450ec4dbd479e276 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 20 Feb 2023 12:17:49 +0600 Subject: [PATCH 1/2] 4339-Set_log_level_for_release_build issue: https://gitlab.e.foundation/e/backlog/-/issues/4339 `co.trikita.Log` provides set log level support, which `android.util.Log` is missing. Again, `co.trikita.Log` maintains the same interface structure of `android.util.Log`, so only updating the `import` statement is only needed to update the code structure. --- app/build.gradle | 3 ++- .../owncloud/notes/AppendToNoteActivity.java | 2 +- .../it/niedermann/owncloud/notes/LockedActivity.java | 2 +- .../it/niedermann/owncloud/notes/NotesApplication.java | 10 +++++++++- .../owncloud/notes/branding/BrandingUtil.java | 2 +- .../owncloud/notes/edit/BaseNoteFragment.java | 2 +- .../owncloud/notes/edit/EditNoteActivity.java | 2 +- .../owncloud/notes/edit/NoteEditFragment.java | 2 +- .../owncloud/notes/edit/NotePreviewFragment.java | 2 +- .../notes/edit/SearchableBaseNoteFragment.java | 2 +- .../notes/edit/category/CategoryDialogFragment.java | 2 +- .../notes/edit/title/EditTitleDialogFragment.java | 2 +- .../owncloud/notes/exception/ExceptionHandler.java | 2 +- .../notes/importaccount/ImportAccountActivity.java | 2 +- .../niedermann/owncloud/notes/main/MainActivity.java | 2 +- .../niedermann/owncloud/notes/main/MainViewModel.java | 2 +- .../main/items/list/NotesListViewItemTouchHelper.java | 2 +- .../owncloud/notes/persistence/ApiProvider.java | 2 +- .../owncloud/notes/persistence/CapabilitiesClient.java | 2 +- .../owncloud/notes/persistence/CapabilitiesWorker.java | 2 +- .../owncloud/notes/persistence/NotesDatabase.java | 2 +- .../owncloud/notes/persistence/NotesImportTask.java | 2 +- .../owncloud/notes/persistence/NotesRepository.java | 2 +- .../notes/persistence/NotesServerSyncTask.java | 2 +- .../owncloud/notes/persistence/SyncWorker.java | 2 +- .../notes/persistence/migration/Migration_13_14.java | 2 +- .../notes/persistence/migration/Migration_14_15.java | 2 +- .../notes/persistence/migration/Migration_15_16.java | 2 +- .../notes/persistence/migration/Migration_18_19.java | 2 +- .../owncloud/notes/persistence/sync/NotesAPI.java | 2 +- .../notes/preferences/PreferencesFragment.java | 2 +- .../owncloud/notes/receiver/AccountRemoveReceiver.java | 2 +- .../owncloud/notes/shared/util/AccountSyncUtil.java | 2 +- .../notes/shared/util/CustomAppGlideModule.java | 2 +- .../notes/shared/util/DeviceCredentialUtil.java | 2 +- .../niedermann/owncloud/notes/shared/util/SSOUtil.java | 2 +- .../notes/widget/notelist/NoteListViewModel.java | 2 +- .../owncloud/notes/widget/notelist/NoteListWidget.java | 2 +- .../notelist/NoteListWidgetConfigurationActivity.java | 2 +- .../notes/widget/notelist/NoteListWidgetFactory.java | 2 +- .../notes/widget/singlenote/SingleNoteWidget.java | 2 +- .../widget/singlenote/SingleNoteWidgetFactory.java | 2 +- .../owncloud/notes/main/MainViewModelTest.java | 2 +- 43 files changed, 52 insertions(+), 43 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2d110a622..ed7d513e8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,7 +56,7 @@ dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6' // Nextcloud SSO - implementation 'foundation.e.lib:Android-SingleSignOn:1.0.2-alpha' + implementation 'foundation.e.lib:Android-SingleSignOn:1.0.3-alpha' implementation ('com.github.stefan-niedermann:android-commons:0.2.7') { exclude group: 'com.github.nextcloud', module: 'Android-SingleSignOn' } @@ -109,4 +109,5 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'foundation.e:elib:0.0.1-alpha11' + implementation 'co.trikita:log:1.1.5' } diff --git a/app/src/main/java/it/niedermann/owncloud/notes/AppendToNoteActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/AppendToNoteActivity.java index 4f0fb2803..148fc126c 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/AppendToNoteActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/AppendToNoteActivity.java @@ -2,7 +2,7 @@ package it.niedermann.owncloud.notes; import android.os.Bundle; import android.text.TextUtils; -import android.util.Log; +import trikita.log.Log; import android.view.View; import android.widget.Toast; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/LockedActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/LockedActivity.java index f5695a408..879b5e2c1 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/LockedActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/LockedActivity.java @@ -4,7 +4,7 @@ import android.app.KeyguardManager; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import android.view.WindowManager; import androidx.annotation.Nullable; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java b/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java index 0ef676091..13c93783a 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/NotesApplication.java @@ -4,7 +4,7 @@ import android.app.Application; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; -import android.util.Log; +import trikita.log.Log; import androidx.appcompat.app.AppCompatDelegate; import androidx.preference.PreferenceManager; @@ -28,6 +28,8 @@ public class NotesApplication extends Application { final var prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); lockedPreference = prefs.getBoolean(getString(R.string.pref_key_lock), false); isGridViewEnabled = getDefaultSharedPreferences(this).getBoolean(getString(R.string.pref_key_gridview), false); + + setLogLevel(); super.onCreate(); } @@ -80,4 +82,10 @@ public class NotesApplication extends Application { public static void updateLastInteraction() { lastInteraction = System.currentTimeMillis(); } + + private void setLogLevel() { + if (!BuildConfig.DEBUG) { + Log.level(Log.E); + } + } } diff --git a/app/src/main/java/it/niedermann/owncloud/notes/branding/BrandingUtil.java b/app/src/main/java/it/niedermann/owncloud/notes/branding/BrandingUtil.java index ba79fa0e6..6b214cb09 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/branding/BrandingUtil.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/branding/BrandingUtil.java @@ -8,7 +8,7 @@ import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Color; import android.graphics.drawable.LayerDrawable; -import android.util.Log; +import trikita.log.Log; import android.util.TypedValue; import android.view.MenuItem; import android.widget.EditText; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java index e7284a80e..8334634b7 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java @@ -12,7 +12,7 @@ import android.content.Intent; import android.graphics.Color; import android.os.Build; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/EditNoteActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/EditNoteActivity.java index 8cb12bad1..3b0a88166 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/EditNoteActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/EditNoteActivity.java @@ -5,7 +5,7 @@ import static it.niedermann.owncloud.notes.shared.model.ENavigationCategoryType. import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; -import android.util.Log; +import trikita.log.Log; import android.view.Menu; import android.view.MenuItem; import android.view.WindowManager; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java index 081c60d86..c480a39de 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/NoteEditFragment.java @@ -13,7 +13,7 @@ import android.text.Editable; import android.text.Layout; import android.text.TextUtils; import android.text.TextWatcher; -import android.util.Log; +import trikita.log.Log; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.Menu; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java index 52db93a46..5439a1178 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/NotePreviewFragment.java @@ -9,7 +9,7 @@ import android.graphics.Typeface; import android.os.Bundle; import android.text.Layout; import android.text.method.LinkMovementMethod; -import android.util.Log; +import trikita.log.Log; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.Menu; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java index 794bfee71..0fc3dcc96 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java @@ -5,7 +5,7 @@ import android.os.Bundle; import android.os.Handler; import android.text.Layout; import android.text.TextUtils; -import android.util.Log; +import trikita.log.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/category/CategoryDialogFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/category/CategoryDialogFragment.java index c440f8302..3210a19cf 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/category/CategoryDialogFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/category/CategoryDialogFragment.java @@ -5,7 +5,7 @@ import android.content.Context; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; -import android.util.Log; +import trikita.log.Log; import android.view.View; import android.view.WindowManager; import android.widget.EditText; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/title/EditTitleDialogFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/title/EditTitleDialogFragment.java index e48ff63dc..00714c769 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/title/EditTitleDialogFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/title/EditTitleDialogFragment.java @@ -5,7 +5,7 @@ import static it.niedermann.owncloud.notes.branding.BrandingUtil.applyBrandToEdi import android.app.Dialog; import android.content.Context; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import android.view.View; import android.view.Window; import android.view.WindowManager; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/exception/ExceptionHandler.java b/app/src/main/java/it/niedermann/owncloud/notes/exception/ExceptionHandler.java index 7e90bd724..950040fee 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/exception/ExceptionHandler.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/exception/ExceptionHandler.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.exception; import android.app.Activity; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/importaccount/ImportAccountActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/importaccount/ImportAccountActivity.java index 05d06a784..649d4b0c4 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/importaccount/ImportAccountActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/importaccount/ImportAccountActivity.java @@ -3,7 +3,7 @@ package it.niedermann.owncloud.notes.importaccount; import android.accounts.NetworkErrorException; import android.content.Intent; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import android.view.View; import androidx.annotation.NonNull; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java index a42c836af..00d54c48f 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java @@ -23,7 +23,7 @@ import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; -import android.util.Log; +import trikita.log.Log; import android.view.View; import androidx.annotation.NonNull; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/main/MainViewModel.java b/app/src/main/java/it/niedermann/owncloud/notes/main/MainViewModel.java index 15e3cb54d..4b721e898 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/main/MainViewModel.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/main/MainViewModel.java @@ -20,7 +20,7 @@ import android.accounts.NetworkErrorException; import android.app.Application; import android.content.Context; import android.text.TextUtils; -import android.util.Log; +import trikita.log.Log; import android.util.Pair; import androidx.annotation.MainThread; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/main/items/list/NotesListViewItemTouchHelper.java b/app/src/main/java/it/niedermann/owncloud/notes/main/items/list/NotesListViewItemTouchHelper.java index bb93b7b70..756fa8097 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/main/items/list/NotesListViewItemTouchHelper.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/main/items/list/NotesListViewItemTouchHelper.java @@ -3,7 +3,7 @@ package it.niedermann.owncloud.notes.main.items.list; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Canvas; -import android.util.Log; +import trikita.log.Log; import android.view.View; import androidx.annotation.NonNull; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/ApiProvider.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/ApiProvider.java index ce6096075..2caa3f8ff 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/ApiProvider.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/ApiProvider.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesClient.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesClient.java index bc53af45d..8b8f79c41 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesClient.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesClient.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesWorker.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesWorker.java index b593f86da..3d8700abd 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesWorker.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/CapabilitiesWorker.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.work.Constraints; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesDatabase.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesDatabase.java index 5cc50641e..ac9898c1e 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesDatabase.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesDatabase.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.room.Database; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesImportTask.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesImportTask.java index 38172b94d..a33d99c4b 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesImportTask.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesImportTask.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.lifecycle.LiveData; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesRepository.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesRepository.java index fa3e2575b..9770197b9 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesRepository.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesRepository.java @@ -21,7 +21,7 @@ import android.content.pm.ShortcutManager; import android.graphics.drawable.Icon; import android.net.ConnectivityManager; import android.text.TextUtils; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.AnyThread; import androidx.annotation.ColorInt; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesServerSyncTask.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesServerSyncTask.java index f50dd21ef..b46c39f40 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesServerSyncTask.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesServerSyncTask.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/SyncWorker.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/SyncWorker.java index 3816f6b8f..e10b80bfd 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/SyncWorker.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/SyncWorker.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.work.Constraints; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_13_14.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_13_14.java index 805204f69..aa144eabd 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_13_14.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_13_14.java @@ -5,7 +5,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.preference.PreferenceManager; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_14_15.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_14_15.java index bda4d0462..70c57294b 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_14_15.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_14_15.java @@ -3,7 +3,7 @@ package it.niedermann.owncloud.notes.persistence.migration; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.room.OnConflictStrategy; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_15_16.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_15_16.java index 7be785112..df84f1de1 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_15_16.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_15_16.java @@ -6,7 +6,7 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.preference.PreferenceManager; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_18_19.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_18_19.java index 576e2204a..f21b8dd6a 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_18_19.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/migration/Migration_18_19.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence.migration; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.room.migration.Migration; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/sync/NotesAPI.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/sync/NotesAPI.java index 4f8bee926..4eaa81a19 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/sync/NotesAPI.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/sync/NotesAPI.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.persistence.sync; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/preferences/PreferencesFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/preferences/PreferencesFragment.java index 462d5884a..ae8e8caa4 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/preferences/PreferencesFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/preferences/PreferencesFragment.java @@ -2,7 +2,7 @@ package it.niedermann.owncloud.notes.preferences; import android.app.Activity; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.ColorInt; import androidx.lifecycle.ViewModelProvider; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java b/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java index 362a407ed..480a7d1a7 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/receiver/AccountRemoveReceiver.java @@ -20,7 +20,7 @@ import android.accounts.AccountManager; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/AccountSyncUtil.java b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/AccountSyncUtil.java index 27c379e87..45cd09646 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/AccountSyncUtil.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/AccountSyncUtil.java @@ -19,7 +19,7 @@ package it.niedermann.owncloud.notes.shared.util; import android.accounts.AccountManager; import android.content.ContentResolver; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import it.niedermann.owncloud.notes.persistence.entity.Account; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/CustomAppGlideModule.java b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/CustomAppGlideModule.java index 35625119d..4ffd23426 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/CustomAppGlideModule.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/CustomAppGlideModule.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.shared.util; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.annotation.UiThread; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/DeviceCredentialUtil.java b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/DeviceCredentialUtil.java index d0a60fcf4..721980038 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/DeviceCredentialUtil.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/DeviceCredentialUtil.java @@ -2,7 +2,7 @@ package it.niedermann.owncloud.notes.shared.util; import android.app.KeyguardManager; import android.content.Context; -import android.util.Log; +import trikita.log.Log; /** * Utility class with methods for handling device credentials. diff --git a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/SSOUtil.java b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/SSOUtil.java index 1e2542b07..115009aaf 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/SSOUtil.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/SSOUtil.java @@ -2,7 +2,7 @@ package it.niedermann.owncloud.notes.shared.util; import android.app.Activity; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListViewModel.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListViewModel.java index cd43ee8a0..8a8207b9b 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListViewModel.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListViewModel.java @@ -1,7 +1,7 @@ package it.niedermann.owncloud.notes.widget.notelist; import android.app.Application; -import android.util.Log; +import trikita.log.Log; import androidx.annotation.NonNull; import androidx.lifecycle.AndroidViewModel; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java index 7342b08c8..b74fd9676 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.java @@ -9,7 +9,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.util.Log; +import trikita.log.Log; import android.widget.RemoteViews; import java.util.NoSuchElementException; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetConfigurationActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetConfigurationActivity.java index a488288dc..2cf36e421 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetConfigurationActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetConfigurationActivity.java @@ -9,7 +9,7 @@ import android.app.Activity; import android.appwidget.AppWidgetManager; import android.content.Intent; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import android.widget.Toast; import androidx.annotation.Nullable; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java index 1a701ef16..a17124a8a 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidgetFactory.java @@ -6,7 +6,7 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import android.widget.RemoteViews; import android.widget.RemoteViewsService; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java index 77339e3ef..52131ced8 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidget.java @@ -9,7 +9,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.util.Log; +import trikita.log.Log; import android.widget.RemoteViews; import java.util.concurrent.ExecutorService; diff --git a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java index 5369d3c70..7a4d11a7d 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/widget/singlenote/SingleNoteWidgetFactory.java @@ -4,7 +4,7 @@ import android.appwidget.AppWidgetManager; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.util.Log; +import trikita.log.Log; import android.widget.RemoteViews; import android.widget.RemoteViewsService; diff --git a/app/src/test/java/it/niedermann/owncloud/notes/main/MainViewModelTest.java b/app/src/test/java/it/niedermann/owncloud/notes/main/MainViewModelTest.java index cd06b063f..0b3a86a67 100644 --- a/app/src/test/java/it/niedermann/owncloud/notes/main/MainViewModelTest.java +++ b/app/src/test/java/it/niedermann/owncloud/notes/main/MainViewModelTest.java @@ -7,7 +7,7 @@ import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import android.content.Context; -import android.util.Log; +import trikita.log.Log; import androidx.arch.core.executor.testing.InstantTaskExecutorRule; import androidx.lifecycle.SavedStateHandle; -- GitLab From dd5bbff80d0e329afeb726a3b61cc3d2b2691e92 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 20 Feb 2023 14:54:39 +0600 Subject: [PATCH 2/2] Fix gitlab pipeline failed for non-protected branch --- .gitlab-ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38220a3da..bfbbba567 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,14 +5,6 @@ stages: - build before_script: - - if [ -d "/srv/userscripts" ]; then cp -R userscripts/* /srv/userscripts ; fi - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew -- GitLab