Skip to content

Instantly share code, notes, and snippets.

@00p513-dev
Last active October 7, 2021 22:13
Show Gist options
  • Save 00p513-dev/f647e788b089b0ffbe0652b2f0dad24c to your computer and use it in GitHub Desktop.
Save 00p513-dev/f647e788b089b0ffbe0652b2f0dad24c to your computer and use it in GitHub Desktop.
MIUI Stub for ports
package miui.os;
public class Build extends android.os.Build {
public static final boolean IS_INTERNATIONAL_BUILD = false;
public static String getRegion() {
return "CN";
}
public static boolean checkRegion(String region) {
return getRegion().equalsIgnoreCase(region);
}
}
.class public Lmiui/os/Build;
.super Landroid/os/Build;
.source "Build.java"
# static fields
.field public static final IS_INTERNATIONAL_BUILD:Z = false
# direct methods
.method public constructor <init>()V
.locals 0
.line 3
invoke-direct {p0}, Landroid/os/Build;-><init>()V
return-void
.end method
.method public static checkRegion(Ljava/lang/String;)Z
.locals 1
.param p0, "region" # Ljava/lang/String;
.line 12
invoke-static {}, Lmiui/os/Build;->getRegion()Ljava/lang/String;
move-result-object v0
invoke-virtual {v0, p0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
return v0
.end method
.method public static getRegion()Ljava/lang/String;
.locals 1
.line 8
const-string v0, "CN"
return-object v0
.end method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment