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
api-impl: stubs and fixes for latest WhatsApp version
This commit is contained in:
committed by
Julian Winkler
parent
09a38f9a28
commit
c81442321e
@@ -15,6 +15,7 @@ import android.bluetooth.BluetoothManager;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageParser;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.content.res.AssetManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
@@ -39,6 +40,7 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.PowerManager;
|
||||
import android.os.UserManager;
|
||||
import android.os.Vibrator;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.AttributeSet;
|
||||
@@ -386,6 +388,10 @@ public class Context extends Object {
|
||||
return prefs_dir;
|
||||
}
|
||||
|
||||
public File[] getExternalMediaDirs() {
|
||||
return getExternalFilesDirs("media");
|
||||
}
|
||||
|
||||
public File getDir(String name, int mode) {
|
||||
File dir = new File(getFilesDir(), name);
|
||||
if (!dir.exists()) {
|
||||
@@ -656,4 +662,11 @@ public class Context extends Object {
|
||||
public void revokeUriPermission(Uri uri, int mode) {
|
||||
System.out.println("revokeUriPermission(" + uri + ", " + mode + ") called");
|
||||
}
|
||||
|
||||
public String getAttributionTag() {
|
||||
return null;
|
||||
}
|
||||
public boolean isDeviceProtectedStorage() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,4 +364,8 @@ public class Intent implements Parcelable {
|
||||
public byte[] getByteArrayExtra(String name) {
|
||||
return extras.getByteArray(name);
|
||||
}
|
||||
|
||||
public void removeExtra(String name) {
|
||||
extras.remove(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,4 +243,10 @@ public class PackageInfo {
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long getLongVersionCode() {
|
||||
return versionCode;
|
||||
}
|
||||
|
||||
public SigningInfo signingInfo = new SigningInfo();
|
||||
}
|
||||
|
||||
15
src/api-impl/android/content/pm/ShortcutManager.java
Normal file
15
src/api-impl/android/content/pm/ShortcutManager.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package android.content.pm;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class ShortcutManager {
|
||||
public void removeAllDynamicShortcuts() {
|
||||
}
|
||||
|
||||
public List getShortcuts(int matchFlags) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
public void removeLongLivedShortcuts(List<String> shortcutIds) {
|
||||
}
|
||||
}
|
||||
7
src/api-impl/android/content/pm/SigningInfo.java
Normal file
7
src/api-impl/android/content/pm/SigningInfo.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package android.content.pm;
|
||||
|
||||
public final class SigningInfo {
|
||||
public Signature[] getApkContentsSigners() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1471,6 +1471,8 @@ public class Resources {
|
||||
}
|
||||
|
||||
private final AssetManager mAssets;
|
||||
|
||||
public void rebase() {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user