You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
src/api-impl: fix up code style, mainly for code imported from AOSP
used the following (plus manual edits):
`clang-format --style="{BasedOnStyle: LLVM, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: true, ColumnLimit: 0}`
This commit is contained in:
@@ -23,28 +23,28 @@ package android.util;
|
||||
* @hide
|
||||
*/
|
||||
public class PrefixPrinter implements Printer {
|
||||
private final Printer mPrinter;
|
||||
private final String mPrefix;
|
||||
private final Printer mPrinter;
|
||||
private final String mPrefix;
|
||||
|
||||
/**
|
||||
* Creates a new PrefixPrinter.
|
||||
*
|
||||
* <p>If prefix is null or empty, the provided printer is returned, rather
|
||||
* than making a prefixing printer.
|
||||
*/
|
||||
public static Printer create(Printer printer, String prefix) {
|
||||
if (prefix == null || prefix.equals("")) {
|
||||
return printer;
|
||||
}
|
||||
return new PrefixPrinter(printer, prefix);
|
||||
}
|
||||
/**
|
||||
* Creates a new PrefixPrinter.
|
||||
*
|
||||
* <p>If prefix is null or empty, the provided printer is returned, rather
|
||||
* than making a prefixing printer.
|
||||
*/
|
||||
public static Printer create(Printer printer, String prefix) {
|
||||
if (prefix == null || prefix.equals("")) {
|
||||
return printer;
|
||||
}
|
||||
return new PrefixPrinter(printer, prefix);
|
||||
}
|
||||
|
||||
private PrefixPrinter(Printer printer, String prefix) {
|
||||
mPrinter = printer;
|
||||
mPrefix = prefix;
|
||||
}
|
||||
private PrefixPrinter(Printer printer, String prefix) {
|
||||
mPrinter = printer;
|
||||
mPrefix = prefix;
|
||||
}
|
||||
|
||||
public void println(String str) {
|
||||
mPrinter.println(mPrefix + str);
|
||||
}
|
||||
public void println(String str) {
|
||||
mPrinter.println(mPrefix + str);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user