multiple additions and fixes for the Java APIs

Stuff needed for WhatsApp support
This commit is contained in:
Julian Winkler
2024-06-24 18:44:31 +02:00
committed by Mis012
parent ef77bb287a
commit 3c5a21357d
53 changed files with 357 additions and 43 deletions

View File

@@ -0,0 +1,12 @@
package android.telephony;
public class PhoneNumberUtils {
public static boolean isNonSeparator(char c) {
return c != ' ' && c != '\t' && c != '\n' && c != '\r' && c != '-';
}
public static boolean isGlobalPhoneNumber(String phoneNumber) {
return phoneNumber.startsWith("+") || phoneNumber.startsWith("00");
}
}

View File

@@ -37,4 +37,20 @@ public class TelephonyManager {
}
public void listen(PhoneStateListener listener, int events) {}
public int getNetworkType() {
return 0; // NETWORK_TYPE_UNKNOWN
}
public String getLine1Number() {
return null;
}
public int getSimState() {
return 0; // SIM_STATE_UNKNOWN
}
public String getSimOperatorName() {
return null;
}
}