mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-28 03:25:18 +03:00
Use getClass().getSimpleName() as logging tag
This commit is contained in:
parent
8ed007e19d
commit
7b1a8987df
5 changed files with 15 additions and 15 deletions
|
@ -199,7 +199,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
|
||||
try { // to get current account from SingleAccountHelper
|
||||
selectAccount(SingleAccountHelper.getCurrentSingleSignOnAccount(getApplicationContext()).name);
|
||||
Log.v("Notes", "NextcloudRequest account: " + localAccount);
|
||||
Log.v(getClass().getSimpleName(), "NextcloudRequest account: " + localAccount);
|
||||
} catch (NextcloudFilesAppAccountNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoCurrentAccountSelectedException e) {
|
||||
|
@ -583,7 +583,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
db.deleteNoteAndSync((dbNote).getId());
|
||||
adapter.remove(dbNote);
|
||||
refreshLists();
|
||||
Log.v("Note", "Item deleted through swipe ----------------------------------------------");
|
||||
Log.v(getClass().getSimpleName(), "Item deleted through swipe ----------------------------------------------");
|
||||
Snackbar.make(swipeRefreshLayout, R.string.action_note_deleted, Snackbar.LENGTH_LONG)
|
||||
.setAction(R.string.action_undo, (View v) -> {
|
||||
db.addNoteAndSync(dbNote.getAccountId(), dbNote);
|
||||
|
@ -741,7 +741,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
AccountImporter.onActivityResult(requestCode, resultCode, data, this, (SingleSignOnAccount account) -> {
|
||||
Log.v("Notes", "Added account: " + "name:" + account.name + ", " + account.url + ", userId" + account.userId);
|
||||
Log.v(getClass().getSimpleName(), "Added account: " + "name:" + account.name + ", " + account.url + ", userId" + account.userId);
|
||||
db.addAccount(account.url, account.userId, account.name);
|
||||
selectAccount(account.name);
|
||||
clickHeader();
|
||||
|
@ -801,7 +801,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
.load(R.mipmap.ic_launcher)
|
||||
.apply(RequestOptions.circleCropTransform())
|
||||
.into(this.currentAccountImage);
|
||||
e.printStackTrace();
|
||||
Log.w(getClass().getSimpleName(), "Tried to update username in drawer, but localAccount was null");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class PreferencesFragment extends PreferenceFragment {
|
|||
final SwitchPreference wifiOnlyPref = (SwitchPreference) findPreference(getString(R.string.pref_key_wifi_only));
|
||||
wifiOnlyPref.setOnPreferenceChangeListener((Preference preference, Object newValue) -> {
|
||||
Boolean syncOnWifiOnly = (Boolean) newValue;
|
||||
Log.v("Notes", "syncOnWifiOnly: " + syncOnWifiOnly);
|
||||
Log.v(getClass().getSimpleName(), "syncOnWifiOnly: " + syncOnWifiOnly);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ public class NoteSQLiteOpenHelper extends SQLiteOpenHelper {
|
|||
private List<DBNote> getNotesCustom(long accountId, @NonNull String selection, @NonNull String[] selectionArgs, @Nullable String orderBy, @Nullable String limit) {
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
if (selectionArgs.length > 2) {
|
||||
Log.v("Note", selection + " ---- " + selectionArgs[0] + " " + selectionArgs[1] + " " + selectionArgs[2]);
|
||||
Log.v(getClass().getSimpleName(), selection + " ---- " + selectionArgs[0] + " " + selectionArgs[1] + " " + selectionArgs[2]);
|
||||
}
|
||||
Cursor cursor = db.query(table_notes, columns, selection, selectionArgs, null, null, orderBy, limit);
|
||||
List<DBNote> notes = new ArrayList<>();
|
||||
|
|
|
@ -101,7 +101,7 @@ public class NoteServerSyncHelper {
|
|||
try {
|
||||
this.localAccount = db.getLocalAccountByAccountName(SingleAccountHelper.getCurrentSingleSignOnAccount(appContext).name);
|
||||
notesClient = new NotesClient(appContext);
|
||||
Log.v("Notes", "NextcloudRequest account: " + localAccount);
|
||||
Log.v(getClass().getSimpleName(), "NextcloudRequest account: " + localAccount);
|
||||
} catch (NextcloudFilesAppAccountNotFoundException | NoCurrentAccountSelectedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -127,11 +127,11 @@ public class NoteServerSyncHelper {
|
|||
} else {
|
||||
notesClient.updateAccount();
|
||||
}
|
||||
Log.v("Notes", "NextcloudRequest account: " + localAccount);
|
||||
Log.v(getClass().getSimpleName(), "NextcloudRequest account: " + localAccount);
|
||||
} catch (NextcloudFilesAppAccountNotFoundException | NoCurrentAccountSelectedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.v("Note", "Reinstanziation NotesClient because of SSO acc changed");
|
||||
Log.v(getClass().getSimpleName(), "Reinstanziation NotesClient because of SSO acc changed");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -78,11 +78,11 @@ public class NotesClient {
|
|||
this.context = context;
|
||||
try {
|
||||
SingleSignOnAccount ssoAccount = SingleAccountHelper.getCurrentSingleSignOnAccount(context);
|
||||
Log.v("Notes", "NextcloudRequest account: " + ssoAccount.name);
|
||||
Log.v(getClass().getSimpleName(), "NextcloudRequest account: " + ssoAccount.name);
|
||||
mNextcloudAPI = new NextcloudAPI(context, ssoAccount, new GsonBuilder().create(), new NextcloudAPI.ApiConnectedListener() {
|
||||
@Override
|
||||
public void onConnected() {
|
||||
Log.v("Notes", "SSO API connected");
|
||||
Log.v(getClass().getSimpleName(), "SSO API connected");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -101,11 +101,11 @@ public class NotesClient {
|
|||
}
|
||||
try {
|
||||
SingleSignOnAccount ssoAccount = SingleAccountHelper.getCurrentSingleSignOnAccount(context);
|
||||
Log.v("Notes", "NextcloudRequest account: " + ssoAccount.name);
|
||||
Log.v(getClass().getSimpleName(), "NextcloudRequest account: " + ssoAccount.name);
|
||||
mNextcloudAPI = new NextcloudAPI(context, ssoAccount, new GsonBuilder().create(), new NextcloudAPI.ApiConnectedListener() {
|
||||
@Override
|
||||
public void onConnected() {
|
||||
Log.v("Notes", "SSO API connected");
|
||||
Log.v(getClass().getSimpleName(), "SSO API connected");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -194,9 +194,9 @@ public class NotesClient {
|
|||
StringBuilder result = new StringBuilder();
|
||||
|
||||
try {
|
||||
Log.v("Notes", "NextcloudRequest: " + nextcloudRequest.toString());
|
||||
Log.v(getClass().getSimpleName(), "NextcloudRequest: " + nextcloudRequest.toString());
|
||||
InputStream inputStream = mNextcloudAPI.performNetworkRequest(nextcloudRequest);
|
||||
Log.v("Notes", "NextcloudRequest: " + nextcloudRequest.toString());
|
||||
Log.v(getClass().getSimpleName(), "NextcloudRequest: " + nextcloudRequest.toString());
|
||||
BufferedReader rd = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
while ((line = rd.readLine()) != null) {
|
||||
|
|
Loading…
Reference in a new issue