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:
Mis012
2023-06-22 11:45:46 +02:00
parent 824b821f5a
commit 0a9591c474
208 changed files with 154568 additions and 150150 deletions

View File

@@ -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?
}
}