Fix all calls to Log so that they pass in the constant LOG_TAG with the value "Affdex"

This commit is contained in:
Abraham Hedtke 2016-01-05 16:43:08 -05:00 committed by toby cabot
parent e582107431
commit 9eaa0b626b
4 changed files with 8 additions and 7 deletions

View File

@ -19,7 +19,7 @@ import java.io.IOException;
public class ImageHelper {
private static final String LOG_TAG = ImageHelper.class.getSimpleName();
private static final String LOG_TAG = "AffdexMe";
// Prevent instantiation of this object
private ImageHelper() {

View File

@ -81,7 +81,7 @@ public class MainActivity extends AppCompatActivity
public static final int MAX_SUPPORTED_FACES = 4;
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)
int cameraPreviewWidth = 0;
int cameraPreviewHeight = 0;

View File

@ -31,7 +31,7 @@ import static com.affectiva.affdexme.MainActivity.NUM_METRICS_DISPLAYED;
*/
public class MetricSelectionFragment extends Fragment implements View.OnClickListener {
final static String LOG_TAG = "Affectiva";
final static String LOG_TAG = "AffdexMe";
int numberOfSelectedItems = 0;
@ -267,7 +267,7 @@ public class MetricSelectionFragment extends Fragment implements View.OnClickLis
item.setOnClickListener(this);
gridLayout.addView(item);
} 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

View File

@ -9,6 +9,7 @@ import android.util.Log;
public class PreferencesUtils {
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.
@ -87,21 +88,21 @@ public class PreferencesUtils {
emotion = MetricsManager.Emotions.valueOf(metricString);
return emotion;
} catch (IllegalArgumentException emotionParseFailed) {
Log.v(PreferencesUtils.class.getSimpleName(), "Not an Emotion...");
Log.v(LOG_TAG, "Not an Emotion...");
}
try {
MetricsManager.Expressions expression;
expression = MetricsManager.Expressions.valueOf(metricString);
return expression;
} catch (IllegalArgumentException expressionParseFailed) {
Log.v(PreferencesUtils.class.getSimpleName(), "Not an Expression...");
Log.v(LOG_TAG, "Not an Expression...");
}
try {
MetricsManager.Emojis emoji;
emoji = MetricsManager.Emojis.getEnum(metricString);
return emoji;
} 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");
}