Stop spamming the log
This commit is contained in:
@@ -37,6 +37,7 @@ import java.util.Locale;
|
|||||||
|
|
||||||
public class LocalePicker extends ListActivity {
|
public class LocalePicker extends ListActivity {
|
||||||
private static final String TAG = "LocalePicker";
|
private static final String TAG = "LocalePicker";
|
||||||
|
private static final boolean DEBUG = false;
|
||||||
|
|
||||||
Loc[] mLocales;
|
Loc[] mLocales;
|
||||||
String[] mSpecialLocaleCodes;
|
String[] mSpecialLocaleCodes;
|
||||||
@@ -90,8 +91,9 @@ public class LocalePicker extends ListActivity {
|
|||||||
Locale l = new Locale(language, country);
|
Locale l = new Locale(language, country);
|
||||||
|
|
||||||
if (finalSize == 0) {
|
if (finalSize == 0) {
|
||||||
Log.v(TAG, "adding initial "+
|
if (DEBUG) {
|
||||||
toTitleCase(l.getDisplayLanguage(l)));
|
Log.v(TAG, "adding initial "+ toTitleCase(l.getDisplayLanguage(l)));
|
||||||
|
}
|
||||||
preprocess[finalSize++] =
|
preprocess[finalSize++] =
|
||||||
new Loc(toTitleCase(l.getDisplayLanguage(l)), l);
|
new Loc(toTitleCase(l.getDisplayLanguage(l)), l);
|
||||||
} else {
|
} else {
|
||||||
@@ -101,13 +103,16 @@ public class LocalePicker extends ListActivity {
|
|||||||
// diff lang -> insert ours with lang-only name
|
// diff lang -> insert ours with lang-only name
|
||||||
if (preprocess[finalSize-1].locale.getLanguage().equals(
|
if (preprocess[finalSize-1].locale.getLanguage().equals(
|
||||||
language)) {
|
language)) {
|
||||||
Log.v(TAG, "backing up and fixing "+
|
if (DEBUG) {
|
||||||
preprocess[finalSize-1].label+" to "+
|
Log.v(TAG, "backing up and fixing "+
|
||||||
getDisplayName(preprocess[finalSize-1].locale));
|
preprocess[finalSize-1].label+" to "+
|
||||||
|
getDisplayName(preprocess[finalSize-1].locale));
|
||||||
|
}
|
||||||
preprocess[finalSize-1].label = toTitleCase(
|
preprocess[finalSize-1].label = toTitleCase(
|
||||||
getDisplayName(preprocess[finalSize-1].locale));
|
getDisplayName(preprocess[finalSize-1].locale));
|
||||||
Log.v(TAG, " and adding "+
|
if (DEBUG) {
|
||||||
toTitleCase(getDisplayName(l)));
|
Log.v(TAG, " and adding "+ toTitleCase(getDisplayName(l)));
|
||||||
|
}
|
||||||
preprocess[finalSize++] =
|
preprocess[finalSize++] =
|
||||||
new Loc(toTitleCase(getDisplayName(l)), l);
|
new Loc(toTitleCase(getDisplayName(l)), l);
|
||||||
} else {
|
} else {
|
||||||
@@ -117,7 +122,9 @@ public class LocalePicker extends ListActivity {
|
|||||||
} else {
|
} else {
|
||||||
displayName = toTitleCase(l.getDisplayLanguage(l));
|
displayName = toTitleCase(l.getDisplayLanguage(l));
|
||||||
}
|
}
|
||||||
Log.v(TAG, "adding "+displayName);
|
if (DEBUG) {
|
||||||
|
Log.v(TAG, "adding "+displayName);
|
||||||
|
}
|
||||||
preprocess[finalSize++] = new Loc(displayName, l);
|
preprocess[finalSize++] = new Loc(displayName, l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user