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
add Java APIs needed for WhatsApp MainActivity and ConversationActivity
This commit is contained in:
@@ -28,10 +28,12 @@ public class Settings {
|
||||
}
|
||||
}
|
||||
public static final class System {
|
||||
public static final Uri CONTENT_URI = null; // Uri.parse("content://settings/system");
|
||||
public static final Uri CONTENT_URI = Uri.parse("content://settings/system");
|
||||
|
||||
public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor("notification_sound");
|
||||
|
||||
public static final Uri DEFAULT_RINGTONE_URI = getUriFor("ringtone");
|
||||
|
||||
public static int getInt(ContentResolver cr, String key, int def) {
|
||||
int ret = getInt(cr, key);
|
||||
if (ret != -1) {
|
||||
@@ -54,7 +56,7 @@ public class Settings {
|
||||
}
|
||||
|
||||
public static Uri getUriFor(String name) {
|
||||
return null;
|
||||
return Uri.withAppendedPath(CONTENT_URI, name);
|
||||
}
|
||||
|
||||
public static float getFloat(ContentResolver cr, String key, float def) {
|
||||
@@ -71,6 +73,14 @@ public class Settings {
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
||||
public static float getFloat(ContentResolver cr, String key, float def) {
|
||||
switch (key) {
|
||||
default:
|
||||
java.lang.System.out.println("!!!! Settings$Global.getFloat: unknown key: >" + key + "<");
|
||||
return def;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class SettingNotFoundException extends AndroidException {}
|
||||
|
||||
Reference in New Issue
Block a user