Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/main/java/org/mtransit/android/commons/BundleUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
@SuppressWarnings("unused")
public final class BundleUtils implements MTLog.Loggable {

private static final String TAG = BundleUtils.class.getSimpleName();
private static final String LOG_TAG = BundleUtils.class.getSimpleName();

@NonNull
@Override
public String getLogTag() {
return TAG;
return LOG_TAG;
}

@Nullable
Expand All @@ -28,7 +28,7 @@ public static Boolean getBoolean(@NonNull String key, @Nullable Bundle... bundle
}
}
}
MTLog.d(TAG, "Can't find the boolean value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the boolean value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -41,7 +41,7 @@ public static Integer getInt(@NonNull String key, @Nullable Bundle... bundles) {
}
}
}
MTLog.d(TAG, "Can't find the int value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the int value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -54,7 +54,7 @@ public static Long getLong(@NonNull String key, @Nullable Bundle... bundles) {
}
}
}
MTLog.d(TAG, "Can't find the long value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the long value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -67,7 +67,7 @@ public static String getString(@NonNull String key, @Nullable Bundle... bundles)
}
}
}
MTLog.d(TAG, "Can't find the string value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the string value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -80,7 +80,7 @@ public static Float getFloat(@NonNull String key, @Nullable Bundle... bundles) {
}
}
}
MTLog.d(TAG, "Can't find the float value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the float value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -93,7 +93,7 @@ public static Double getDouble(@NonNull String key, @Nullable Bundle... bundles)
}
}
}
MTLog.d(TAG, "Can't find the double value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the double value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -106,7 +106,7 @@ public static <T extends Parcelable> T getParcelable(@NonNull String key, @Nulla
}
}
}
MTLog.d(TAG, "Can't find the parcelable value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the parcelable value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -119,7 +119,7 @@ public static String[] getStringArray(@NonNull String key, @Nullable Bundle... b
}
}
}
MTLog.d(TAG, "Can't find the string array value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the string array value for key '%s' (returned null)", key);
return null;
}

Expand All @@ -132,7 +132,7 @@ public static ArrayList<String> getStringArrayList(@NonNull String key, @Nullabl
}
}
}
MTLog.d(TAG, "Can't find the string array list value for key '%s' (returned null)", key);
MTLog.d(LOG_TAG, "Can't find the string array list value for key '%s' (returned null)", key);
return null;
}
}
6 changes: 3 additions & 3 deletions src/main/java/org/mtransit/android/commons/ThreadUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

public final class ThreadUtils implements MTLog.Loggable {

private static final String TAG = ThreadUtils.class.getSimpleName();
private static final String LOG_TAG = ThreadUtils.class.getSimpleName();

@NonNull
@Override
public String getLogTag() {
return TAG;
return LOG_TAG;
}

/**
Expand All @@ -30,7 +30,7 @@ public static void sleepInMs(long sleepDurationInMs) {
try {
Thread.sleep(sleepDurationInMs);
} catch (InterruptedException e) {
MTLog.d(TAG, e, "Error while sleeping!");
MTLog.d(LOG_TAG, e, "Error while sleeping!");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

public class ServiceUpdate implements MTLog.Loggable {

private static final String TAG = ServiceUpdate.class.getSimpleName();
private static final String LOG_TAG = ServiceUpdate.class.getSimpleName();

@NonNull
@Override
public String getLogTag() {
return TAG;
return LOG_TAG;
}

public static final HigherSeverityFirstComparator HIGHER_SEVERITY_FIRST_COMPARATOR = new HigherSeverityFirstComparator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
@SuppressLint("Registered")
public class JCDecauxBikeStationProvider extends BikeStationProvider {

private static final String TAG = JCDecauxBikeStationProvider.class.getSimpleName();
private static final String LOG_TAG = JCDecauxBikeStationProvider.class.getSimpleName();

@NonNull
@Override
public String getLogTag() {
return TAG;
return LOG_TAG;
}

/**
Expand Down Expand Up @@ -229,10 +229,10 @@ private HashSet<DefaultPOI> loadDataFromWWW(int tried) {
}
return null;
} catch (SocketException se) {
MTLog.w(TAG, se, "No Internet Connection!");
MTLog.w(LOG_TAG, se, "No Internet Connection!");
return null;
} catch (Exception e) {
MTLog.e(TAG, e, "INTERNAL ERROR: Unknown Exception");
MTLog.e(LOG_TAG, e, "INTERNAL ERROR: Unknown Exception");
if (tried < MAX_RETRY) {
return loadDataFromWWW(++tried);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,12 @@ public static synchronized int insertDefaultPOIs(@NonNull POIProviderContract pr
@SuppressWarnings({"WeakerAccess", "unused"})
public static class POIDbHelper extends MTSQLiteOpenHelper {

private static final String TAG = POIDbHelper.class.getSimpleName();
private static final String LOG_TAG = POIDbHelper.class.getSimpleName();

@NonNull
@Override
public String getLogTag() {
return TAG;
return LOG_TAG;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ class Columns {
@SuppressWarnings("WeakerAccess")
class Filter implements MTLog.Loggable {

private static final String TAG = ServiceUpdateProviderContract.class.getSimpleName() + ">" + Filter.class.getSimpleName();
private static final String LOG_TAG = ServiceUpdateProviderContract.class.getSimpleName() + ">" + Filter.class.getSimpleName();

@NonNull
@Override
public String getLogTag() {
return TAG;
return LOG_TAG;
}

private static final boolean CACHE_ONLY_DEFAULT = false;
Expand Down Expand Up @@ -331,7 +331,7 @@ public static Filter fromJSONString(@Nullable String jsonString) {
try {
return jsonString == null ? null : fromJSON(new JSONObject(jsonString));
} catch (JSONException jsone) {
MTLog.w(TAG, jsone, "Error while parsing JSON string '%s'", jsonString);
MTLog.w(LOG_TAG, jsone, "Error while parsing JSON string '%s'", jsonString);
return null;
}
}
Expand Down Expand Up @@ -374,7 +374,7 @@ public static Filter fromJSON(@NonNull JSONObject json) {
}
return serviceUpdateFilter;
} catch (JSONException jsone) {
MTLog.w(TAG, jsone, "Error while parsing JSON object '%s'", json);
MTLog.w(LOG_TAG, jsone, "Error while parsing JSON object '%s'", json);
return null;
}
}
Expand Down Expand Up @@ -420,7 +420,7 @@ public static JSONObject toJSON(@NonNull Filter serviceUpdateFilter) {
}
return json;
} catch (JSONException jsone) {
MTLog.w(TAG, jsone, "Error while making JSON object '%s'", serviceUpdateFilter);
MTLog.w(LOG_TAG, jsone, "Error while making JSON object '%s'", serviceUpdateFilter);
return null;
}
}
Expand Down