Fix all calls to Log so that they pass in the constant LOG_TAG with the value "Affdex"
This commit is contained in:
parent
e582107431
commit
9eaa0b626b
4 changed files with 8 additions and 7 deletions
|
@ -19,7 +19,7 @@ import java.io.IOException;
|
||||||
|
|
||||||
public class ImageHelper {
|
public class ImageHelper {
|
||||||
|
|
||||||
private static final String LOG_TAG = ImageHelper.class.getSimpleName();
|
private static final String LOG_TAG = "AffdexMe";
|
||||||
|
|
||||||
// Prevent instantiation of this object
|
// Prevent instantiation of this object
|
||||||
private ImageHelper() {
|
private ImageHelper() {
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
|
|
||||||
public static final int MAX_SUPPORTED_FACES = 4;
|
public static final int MAX_SUPPORTED_FACES = 4;
|
||||||
public static final int NUM_METRICS_DISPLAYED = 6;
|
public static final int NUM_METRICS_DISPLAYED = 6;
|
||||||
private static final String LOG_TAG = "Affectiva";
|
private static final String LOG_TAG = "AffdexMe";
|
||||||
private static final int AFFDEXME_PERMISSIONS_REQUEST = 42; //value is arbitrary (between 0 and 255)
|
private static final int AFFDEXME_PERMISSIONS_REQUEST = 42; //value is arbitrary (between 0 and 255)
|
||||||
int cameraPreviewWidth = 0;
|
int cameraPreviewWidth = 0;
|
||||||
int cameraPreviewHeight = 0;
|
int cameraPreviewHeight = 0;
|
||||||
|
|
|
@ -31,7 +31,7 @@ import static com.affectiva.affdexme.MainActivity.NUM_METRICS_DISPLAYED;
|
||||||
*/
|
*/
|
||||||
public class MetricSelectionFragment extends Fragment implements View.OnClickListener {
|
public class MetricSelectionFragment extends Fragment implements View.OnClickListener {
|
||||||
|
|
||||||
final static String LOG_TAG = "Affectiva";
|
final static String LOG_TAG = "AffdexMe";
|
||||||
|
|
||||||
int numberOfSelectedItems = 0;
|
int numberOfSelectedItems = 0;
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ public class MetricSelectionFragment extends Fragment implements View.OnClickLis
|
||||||
item.setOnClickListener(this);
|
item.setOnClickListener(this);
|
||||||
gridLayout.addView(item);
|
gridLayout.addView(item);
|
||||||
} else {
|
} else {
|
||||||
Log.e(this.getClass().getSimpleName(), "Unknown MetricSelector item for Metric: " + metric.toString());
|
Log.e(LOG_TAG, "Unknown MetricSelector item for Metric: " + metric.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
currentRow.value += 1; //point currentRow to row where next views should be added
|
currentRow.value += 1; //point currentRow to row where next views should be added
|
||||||
|
|
|
@ -9,6 +9,7 @@ import android.util.Log;
|
||||||
public class PreferencesUtils {
|
public class PreferencesUtils {
|
||||||
|
|
||||||
static final int DEFAULT_FPS = 20;
|
static final int DEFAULT_FPS = 20;
|
||||||
|
private final static String LOG_TAG = "AffdexMe";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempt to parse and return FPS set by user. If the FPS is invalid, we set it to be the default FPS.
|
* Attempt to parse and return FPS set by user. If the FPS is invalid, we set it to be the default FPS.
|
||||||
|
@ -87,21 +88,21 @@ public class PreferencesUtils {
|
||||||
emotion = MetricsManager.Emotions.valueOf(metricString);
|
emotion = MetricsManager.Emotions.valueOf(metricString);
|
||||||
return emotion;
|
return emotion;
|
||||||
} catch (IllegalArgumentException emotionParseFailed) {
|
} catch (IllegalArgumentException emotionParseFailed) {
|
||||||
Log.v(PreferencesUtils.class.getSimpleName(), "Not an Emotion...");
|
Log.v(LOG_TAG, "Not an Emotion...");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
MetricsManager.Expressions expression;
|
MetricsManager.Expressions expression;
|
||||||
expression = MetricsManager.Expressions.valueOf(metricString);
|
expression = MetricsManager.Expressions.valueOf(metricString);
|
||||||
return expression;
|
return expression;
|
||||||
} catch (IllegalArgumentException expressionParseFailed) {
|
} catch (IllegalArgumentException expressionParseFailed) {
|
||||||
Log.v(PreferencesUtils.class.getSimpleName(), "Not an Expression...");
|
Log.v(LOG_TAG, "Not an Expression...");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
MetricsManager.Emojis emoji;
|
MetricsManager.Emojis emoji;
|
||||||
emoji = MetricsManager.Emojis.getEnum(metricString);
|
emoji = MetricsManager.Emojis.getEnum(metricString);
|
||||||
return emoji;
|
return emoji;
|
||||||
} catch (IllegalArgumentException expressionParseFailed) {
|
} catch (IllegalArgumentException expressionParseFailed) {
|
||||||
Log.v(PreferencesUtils.class.getSimpleName(), "Not an Emoji...");
|
Log.v(LOG_TAG, "Not an Emoji...");
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("String did not match any known metric");
|
throw new IllegalArgumentException("String did not match any known metric");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue