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:
@@ -7,30 +7,30 @@ import android.util.AndroidException;
|
||||
public class Settings {
|
||||
public static final class Secure {
|
||||
public static String getString(ContentResolver content_resolver, String key) {
|
||||
switch(key) {
|
||||
switch (key) {
|
||||
case "android_id":
|
||||
return "_totally_an_androidID"; // TODO: is this a good ID? :P
|
||||
default:
|
||||
java.lang.System.out.println("!!!! Settings$Secure.getString: unknown key: >"+key+"<");
|
||||
java.lang.System.out.println("!!!! Settings$Secure.getString: unknown key: >" + key + "<");
|
||||
return "NOTICEME";
|
||||
}
|
||||
}
|
||||
public static int getInt(ContentResolver content_resolver, String key) {
|
||||
switch(key) {
|
||||
switch (key) {
|
||||
case "limit_ad_tracking":
|
||||
return 1; // obviously, duh
|
||||
default:
|
||||
java.lang.System.out.println("!!!! Settings$Secure.getInt: unknown key: >"+key+"<");
|
||||
java.lang.System.out.println("!!!! Settings$Secure.getInt: unknown key: >" + key + "<");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
public static final class System {
|
||||
public static final Uri CONTENT_URI = null;//Uri.parse("content://settings/system");
|
||||
public static final Uri CONTENT_URI = null; // Uri.parse("content://settings/system");
|
||||
|
||||
public static int getInt(ContentResolver cr, String key, int def) {
|
||||
int ret = getInt(cr, key);
|
||||
if(ret != -1) {
|
||||
if (ret != -1) {
|
||||
return ret;
|
||||
} else {
|
||||
return def; // FIXME
|
||||
@@ -38,13 +38,13 @@ public class Settings {
|
||||
}
|
||||
|
||||
public static int getInt(ContentResolver cr, String key) {
|
||||
switch(key) {
|
||||
switch (key) {
|
||||
case "accelerometer_rotation":
|
||||
return 0; // degrees? no clue
|
||||
case "always_finish_activities":
|
||||
return 0; // we certainly don't aggressively kill activities :P
|
||||
default:
|
||||
java.lang.System.out.println("!!!! Settings$System.getInt: unknown key: >"+key+"<");
|
||||
java.lang.System.out.println("!!!! Settings$System.getInt: unknown key: >" + key + "<");
|
||||
return 0; // TODO: should be -1 probably?
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user