Change/Fake Screen Size in Dalvik not DPI - Optimus One, P500, V Q&A, Help & Troubleshooting

As the titles implies, i'd be glad to know if there is a way to fake or change the screen size of the optimus one...
I'm not talking about DPI but the aspect ratio... I want to basically let an application think that my screen is an 800x480 or more.
I have tried by decompiling the apk and tweaking with some codes, but i'm no java expert so i've decided to change my approach to this issue.
By searching around i found out that this apk directly reads the screen size from the "DeviceInfoAndroid,smali" which i assume takes the code directly from the dalvik.
Thanks in advance
This is the DeviceInfoAndroid.smali
Code:
.class public Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
.super Ljava/lang/Object;
# static fields
.field static a:Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
# instance fields
.field b:J
.field c:Landroid/net/wifi/WifiManager;
.field d:Landroid/telephony/TelephonyManager;
.field e:Landroid/net/ConnectivityManager;
.field f:Landroid/content/pm/PackageManager;
.field g:Landroid/view/WindowManager;
.field h:Landroid/app/ActivityManager;
# direct methods
.method public constructor <init>()V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
sput-object p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->a:Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
invoke-direct {p0}, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->createCPPFacade()J
move-result-wide v0
iput-wide v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->b:J
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "wifi"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/wifi/WifiManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->c:Landroid/net/wifi/WifiManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "phone"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/telephony/TelephonyManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "connectivity"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/ConnectivityManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->e:Landroid/net/ConnectivityManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
invoke-virtual {v0}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->f:Landroid/content/pm/PackageManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "window"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/WindowManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "activity"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/ActivityManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->h:Landroid/app/ActivityManager;
return-void
.end method
.method private _areVoiceCallsSupported()Z
.locals 3
const/4 v0, 0x0
:try_start_0
invoke-virtual {p0}, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->_isLargeScreen()Z
move-result v1
if-nez v1, :cond_0
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getPhoneType()I
move-result v1
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getPhoneType()I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v1
const/4 v2, 0x3
if-eq v1, v2, :cond_0
const/4 v0, 0x1
:cond_0
:goto_0
return v0
:catch_0
move-exception v1
goto :goto_0
.end method
.method private _getCPUInfo()Ljava/lang/String;
.locals 1
const-string v0, "ARM"
return-object v0
.end method
.method private _getCurrentNetworkConnectionType()Ljava/lang/String;
.locals 2
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->e:Landroid/net/ConnectivityManager;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v0
invoke-virtual {v0}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v0
if-eqz v0, :cond_0
const-string v0, "WiFi"
:goto_0
return-object v0
:cond_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->e:Landroid/net/ConnectivityManager;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v0
invoke-virtual {v0}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v0
if-eqz v0, :cond_1
const-string v0, "Cellular"
goto :goto_0
:cond_1
const-string v0, "UNKNOWN"
goto :goto_0
.end method
.method private _getMACAddress()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->c:Landroid/net/wifi/WifiManager;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->c:Landroid/net/wifi/WifiManager;
invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;
move-result-object v0
invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getMacAddress()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
:goto_0
return-object v0
:cond_0
const-string v0, ""
goto :goto_0
:cond_1
const-string v0, ""
goto :goto_0
.end method
.method private _getMaxAppMemory()J
.locals 2
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Runtime;->maxMemory()J
move-result-wide v0
return-wide v0
.end method
.method private _getMemoryInfo()J
.locals 2
new-instance v0, Landroid/app/ActivityManager$MemoryInfo;
invoke-direct {v0}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->h:Landroid/app/ActivityManager;
invoke-virtual {v1, v0}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
iget-wide v0, v0, Landroid/app/ActivityManager$MemoryInfo;->availMem:J
return-wide v0
.end method
.method private _getNetworkCarrierName()Ljava/lang/String;
.locals 2
:try_start_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimState()I
move-result v0
const/4 v1, 0x5
if-ne v0, v1, :cond_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperatorName()Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
:goto_0
return-object v0
:catch_0
move-exception v0
:cond_0
const-string v0, "UNKNOWN"
goto :goto_0
.end method
.method private _getScreenSize()D
.locals 5
invoke-virtual {p0}, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->_getScreenResolution()[I
move-result-object v0
new-instance v1, Landroid/util/DisplayMetrics;
invoke-direct {v1}, Landroid/util/DisplayMetrics;-><init>()V
iget-object v2, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-interface {v2}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v2
invoke-virtual {v2, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V
const/4 v2, 0x0
aget v2, v0, v2
int-to-float v2, v2
iget v3, v1, Landroid/util/DisplayMetrics;->xdpi:F
div-float/2addr v2, v3
float-to-double v2, v2
const/4 v4, 0x1
aget v0, v0, v4
int-to-float v0, v0
iget v1, v1, Landroid/util/DisplayMetrics;->ydpi:F
div-float/2addr v0, v1
float-to-double v0, v0
mul-double/2addr v2, v2
mul-double/2addr v0, v0
add-double/2addr v0, v2
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
const-wide/high16 v2, 0x4024
mul-double/2addr v0, v2
double-to-int v0, v0
int-to-float v0, v0
const/high16 v1, 0x4120
div-float/2addr v0, v1
float-to-double v0, v0
return-wide v0
.end method
.method private _getTotalStorage()J
.locals 2
const-wide/16 v0, 0x0
return-wide v0
.end method
.method private _isInstalledInInternalMemory()Z
.locals 4
const/4 v0, 0x0
:try_start_0
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->f:Landroid/content/pm/PackageManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v2
invoke-virtual {v2}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getPackageName()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object v1
iget-object v1, v1, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v1, v1, Landroid/content/pm/ApplicationInfo;->flags:I
:try_end_0
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
const/high16 v2, 0x4
and-int/2addr v1, v2
if-lez v1, :cond_0
const/4 v0, 0x1
:cond_0
:goto_0
return v0
:catch_0
move-exception v1
goto :goto_0
.end method
.method private _isRoaming()Z
.locals 1
:try_start_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->isNetworkRoaming()Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v0
:goto_0
return v0
:catch_0
move-exception v0
const/4 v0, 0x0
goto :goto_0
.end method
.method public static a()Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
.locals 1
sget-object v0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->a:Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
return-object v0
.end method
.method private native createCPPFacade()J
.end method
# virtual methods
.method public _getAndroidID()Ljava/lang/String;
.locals 2
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
invoke-virtual {v0}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "android_id"
invoke-static {v0, v1}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
:goto_0
return-object v0
:cond_0
const-string v0, ""
goto :goto_0
.end method
.method public _getMake()Ljava/lang/String;
.locals 1
sget-object v0, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;
return-object v0
.end method
.method public _getModel()Ljava/lang/String;
.locals 2
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, " ("
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
sget-object v1, Landroid/os/Build;->PRODUCT:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ")"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public _getOSVersion()Ljava/lang/String;
.locals 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
invoke-static {v0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public _getScreenResolution()[I
.locals 7
const/4 v2, 0x0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0xd
if-lt v0, v1, :cond_2
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v3
:try_start_0
const-class v0, Landroid/view/Display;
const-string v1, "getRawWidth"
const/4 v4, 0x0
new-array v4, v4, [Ljava/lang/Class;
invoke-virtual {v0, v1, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v4
const-class v0, Landroid/view/Display;
const-string v1, "getRawHeight"
const/4 v5, 0x0
new-array v5, v5, [Ljava/lang/Class;
invoke-virtual {v0, v1, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
const/4 v1, 0x0
new-array v1, v1, [Ljava/lang/Object;
invoke-virtual {v0, v3, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v1
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
invoke-virtual {v4, v3, v0}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v0
if-le v1, v0, :cond_0
move v3, v1
:goto_0
if-le v1, v0, :cond_1
:goto_1
move v1, v3
:goto_2
const/4 v3, 0x2
new-array v3, v3, [I
aput v1, v3, v2
const/4 v1, 0x1
aput v0, v3, v1
return-object v3
:cond_0
move v3, v0
goto :goto_0
:cond_1
move v0, v1
goto :goto_1
:catch_0
move-exception v0
move v0, v2
move v1, v2
goto :goto_2
:cond_2
new-instance v1, Landroid/util/DisplayMetrics;
invoke-direct {v1}, Landroid/util/DisplayMetrics;-><init>()V
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v0
invoke-virtual {v0, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V
iget v0, v1, Landroid/util/DisplayMetrics;->widthPixels:I
iget v3, v1, Landroid/util/DisplayMetrics;->heightPixels:I
if-le v0, v3, :cond_3
iget v0, v1, Landroid/util/DisplayMetrics;->widthPixels:I
:goto_3
iget v3, v1, Landroid/util/DisplayMetrics;->widthPixels:I
iget v4, v1, Landroid/util/DisplayMetrics;->heightPixels:I
if-le v3, v4, :cond_4
iget v1, v1, Landroid/util/DisplayMetrics;->heightPixels:I
:goto_4
move v6, v1
move v1, v0
move v0, v6
goto :goto_2
:cond_3
iget v0, v1, Landroid/util/DisplayMetrics;->heightPixels:I
goto :goto_3
:cond_4
iget v1, v1, Landroid/util/DisplayMetrics;->widthPixels:I
goto :goto_4
.end method
.method public _isLargeScreen()Z
.locals 2
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
invoke-virtual {v0}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
iget v0, v0, Landroid/content/res/Configuration;->screenLayout:I
and-int/lit8 v0, v0, 0xf
const/4 v1, 0x4
if-lt v0, v1, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method

Related

Change/Fake Screen Size in Dalvik not DPI

As the titles implies, i'd be glad to know if there is a way to fake or change the screen size of the optimus one...
I'm not talking about DPI but the aspect ratio... I want to basically let an application think that my screen is an 800x480 or more.
I have tried by decompiling the apk and tweaking with some codes, but i'm no java expert so i've decided to change my approach to this issue.
By searching around i found out that this apk directly reads the screen size from the "DeviceInfoAndroid,smali" which i assume takes the code directly from the dalvik.
Thanks in advance
This is the DeviceInfoAndroid.smali
Code:
.class public Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
.super Ljava/lang/Object;
# static fields
.field static a:Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
# instance fields
.field b:J
.field c:Landroid/net/wifi/WifiManager;
.field d:Landroid/telephony/TelephonyManager;
.field e:Landroid/net/ConnectivityManager;
.field f:Landroid/content/pm/PackageManager;
.field g:Landroid/view/WindowManager;
.field h:Landroid/app/ActivityManager;
# direct methods
.method public constructor <init>()V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
sput-object p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->a:Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
invoke-direct {p0}, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->createCPPFacade()J
move-result-wide v0
iput-wide v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->b:J
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "wifi"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/wifi/WifiManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->c:Landroid/net/wifi/WifiManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "phone"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/telephony/TelephonyManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "connectivity"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/ConnectivityManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->e:Landroid/net/ConnectivityManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
invoke-virtual {v0}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->f:Landroid/content/pm/PackageManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "window"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/WindowManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
const-string v1, "activity"
invoke-virtual {v0, v1}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/ActivityManager;
iput-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->h:Landroid/app/ActivityManager;
return-void
.end method
.method private _areVoiceCallsSupported()Z
.locals 3
const/4 v0, 0x0
:try_start_0
invoke-virtual {p0}, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->_isLargeScreen()Z
move-result v1
if-nez v1, :cond_0
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getPhoneType()I
move-result v1
if-eqz v1, :cond_0
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getPhoneType()I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v1
const/4 v2, 0x3
if-eq v1, v2, :cond_0
const/4 v0, 0x1
:cond_0
:goto_0
return v0
:catch_0
move-exception v1
goto :goto_0
.end method
.method private _getCPUInfo()Ljava/lang/String;
.locals 1
const-string v0, "ARM"
return-object v0
.end method
.method private _getCurrentNetworkConnectionType()Ljava/lang/String;
.locals 2
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->e:Landroid/net/ConnectivityManager;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v0
invoke-virtual {v0}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v0
if-eqz v0, :cond_0
const-string v0, "WiFi"
:goto_0
return-object v0
:cond_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->e:Landroid/net/ConnectivityManager;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v0
invoke-virtual {v0}, Landroid/net/NetworkInfo;->isConnected()Z
move-result v0
if-eqz v0, :cond_1
const-string v0, "Cellular"
goto :goto_0
:cond_1
const-string v0, "UNKNOWN"
goto :goto_0
.end method
.method private _getMACAddress()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->c:Landroid/net/wifi/WifiManager;
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->c:Landroid/net/wifi/WifiManager;
invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;
move-result-object v0
invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getMacAddress()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
:goto_0
return-object v0
:cond_0
const-string v0, ""
goto :goto_0
:cond_1
const-string v0, ""
goto :goto_0
.end method
.method private _getMaxAppMemory()J
.locals 2
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Runtime;->maxMemory()J
move-result-wide v0
return-wide v0
.end method
.method private _getMemoryInfo()J
.locals 2
new-instance v0, Landroid/app/ActivityManager$MemoryInfo;
invoke-direct {v0}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->h:Landroid/app/ActivityManager;
invoke-virtual {v1, v0}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
iget-wide v0, v0, Landroid/app/ActivityManager$MemoryInfo;->availMem:J
return-wide v0
.end method
.method private _getNetworkCarrierName()Ljava/lang/String;
.locals 2
:try_start_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimState()I
move-result v0
const/4 v1, 0x5
if-ne v0, v1, :cond_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperatorName()Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
:goto_0
return-object v0
:catch_0
move-exception v0
:cond_0
const-string v0, "UNKNOWN"
goto :goto_0
.end method
.method private _getScreenSize()D
.locals 5
invoke-virtual {p0}, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->_getScreenResolution()[I
move-result-object v0
new-instance v1, Landroid/util/DisplayMetrics;
invoke-direct {v1}, Landroid/util/DisplayMetrics;-><init>()V
iget-object v2, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-interface {v2}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v2
invoke-virtual {v2, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V
const/4 v2, 0x0
aget v2, v0, v2
int-to-float v2, v2
iget v3, v1, Landroid/util/DisplayMetrics;->xdpi:F
div-float/2addr v2, v3
float-to-double v2, v2
const/4 v4, 0x1
aget v0, v0, v4
int-to-float v0, v0
iget v1, v1, Landroid/util/DisplayMetrics;->ydpi:F
div-float/2addr v0, v1
float-to-double v0, v0
mul-double/2addr v2, v2
mul-double/2addr v0, v0
add-double/2addr v0, v2
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
const-wide/high16 v2, 0x4024
mul-double/2addr v0, v2
double-to-int v0, v0
int-to-float v0, v0
const/high16 v1, 0x4120
div-float/2addr v0, v1
float-to-double v0, v0
return-wide v0
.end method
.method private _getTotalStorage()J
.locals 2
const-wide/16 v0, 0x0
return-wide v0
.end method
.method private _isInstalledInInternalMemory()Z
.locals 4
const/4 v0, 0x0
:try_start_0
iget-object v1, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->f:Landroid/content/pm/PackageManager;
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v2
invoke-virtual {v2}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getPackageName()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object v1
iget-object v1, v1, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v1, v1, Landroid/content/pm/ApplicationInfo;->flags:I
:try_end_0
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
const/high16 v2, 0x4
and-int/2addr v1, v2
if-lez v1, :cond_0
const/4 v0, 0x1
:cond_0
:goto_0
return v0
:catch_0
move-exception v1
goto :goto_0
.end method
.method private _isRoaming()Z
.locals 1
:try_start_0
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->d:Landroid/telephony/TelephonyManager;
invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->isNetworkRoaming()Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v0
:goto_0
return v0
:catch_0
move-exception v0
const/4 v0, 0x0
goto :goto_0
.end method
.method public static a()Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
.locals 1
sget-object v0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->a:Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;
return-object v0
.end method
.method private native createCPPFacade()J
.end method
# virtual methods
.method public _getAndroidID()Ljava/lang/String;
.locals 2
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
invoke-virtual {v0}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "android_id"
invoke-static {v0, v1}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
:goto_0
return-object v0
:cond_0
const-string v0, ""
goto :goto_0
.end method
.method public _getMake()Ljava/lang/String;
.locals 1
sget-object v0, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;
return-object v0
.end method
.method public _getModel()Ljava/lang/String;
.locals 2
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, " ("
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
sget-object v1, Landroid/os/Build;->PRODUCT:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ")"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public _getOSVersion()Ljava/lang/String;
.locals 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
invoke-static {v0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public _getScreenResolution()[I
.locals 7
const/4 v2, 0x0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0xd
if-lt v0, v1, :cond_2
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v3
:try_start_0
const-class v0, Landroid/view/Display;
const-string v1, "getRawWidth"
const/4 v4, 0x0
new-array v4, v4, [Ljava/lang/Class;
invoke-virtual {v0, v1, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v4
const-class v0, Landroid/view/Display;
const-string v1, "getRawHeight"
const/4 v5, 0x0
new-array v5, v5, [Ljava/lang/Class;
invoke-virtual {v0, v1, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
const/4 v1, 0x0
new-array v1, v1, [Ljava/lang/Object;
invoke-virtual {v0, v3, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v1
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
invoke-virtual {v4, v3, v0}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v0
if-le v1, v0, :cond_0
move v3, v1
:goto_0
if-le v1, v0, :cond_1
:goto_1
move v1, v3
:goto_2
const/4 v3, 0x2
new-array v3, v3, [I
aput v1, v3, v2
const/4 v1, 0x1
aput v0, v3, v1
return-object v3
:cond_0
move v3, v0
goto :goto_0
:cond_1
move v0, v1
goto :goto_1
:catch_0
move-exception v0
move v0, v2
move v1, v2
goto :goto_2
:cond_2
new-instance v1, Landroid/util/DisplayMetrics;
invoke-direct {v1}, Landroid/util/DisplayMetrics;-><init>()V
iget-object v0, p0, Lcom/pyrsoftware/pokerstars/DeviceInfoAndroid;->g:Landroid/view/WindowManager;
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
move-result-object v0
invoke-virtual {v0, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V
iget v0, v1, Landroid/util/DisplayMetrics;->widthPixels:I
iget v3, v1, Landroid/util/DisplayMetrics;->heightPixels:I
if-le v0, v3, :cond_3
iget v0, v1, Landroid/util/DisplayMetrics;->widthPixels:I
:goto_3
iget v3, v1, Landroid/util/DisplayMetrics;->widthPixels:I
iget v4, v1, Landroid/util/DisplayMetrics;->heightPixels:I
if-le v3, v4, :cond_4
iget v1, v1, Landroid/util/DisplayMetrics;->heightPixels:I
:goto_4
move v6, v1
move v1, v0
move v0, v6
goto :goto_2
:cond_3
iget v0, v1, Landroid/util/DisplayMetrics;->heightPixels:I
goto :goto_3
:cond_4
iget v1, v1, Landroid/util/DisplayMetrics;->widthPixels:I
goto :goto_4
.end method
.method public _isLargeScreen()Z
.locals 2
invoke-static {}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->a()Lcom/pyrsoftware/pokerstars/PokerStarsApp;
move-result-object v0
invoke-virtual {v0}, Lcom/pyrsoftware/pokerstars/PokerStarsApp;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
iget v0, v0, Landroid/content/res/Configuration;->screenLayout:I
and-int/lit8 v0, v0, 0xf
const/4 v1, 0x4
if-lt v0, v1, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method

Help in line numbering smali code

Hi. I really want to add a next line mod for my stock Messaging app. I used to have succeeded doing this on my previous phone but my new phone is a dual sim phone and there are new codes in the smali method that needs to be edited and I can't seem to properly place the line numbering to match that of the original but at the same time follow that of the mod.. Can someone please help me on this?
This is the method from the xda guide.. (I'm new and cannot post links yet)
.method public onEditorAction(Landroid/widget/TextView;ILandroid/view/KeyEventZ
.locals 4
.parameter "v"
.parameter "actionId"
.parameter "event"
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
.line 3217
if-eqz p3, :cond_4
.line 3218
invoke-virtual {p3}, Landroid/view/KeyEvent;->getKeyCode()I
move-result v0
const/16 v1, 0x17
if-eq v0, v1, :cond_0
invoke-virtual {p3}, Landroid/view/KeyEvent;->getKeyCode()I
move-result v0
const/16 v1, 0x42
if-ne v0, v1, :cond_1
:cond_0
move v0, v2
.line 3232
:goto_0
return v0
.line 3221
:cond_1
invoke-virtual {p3}, Landroid/view/KeyEvent;->isShiftPressed()Z
move-result v0
if-nez v0, :cond_3
.line 3222
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isPreparedForSending()Z
move-result v0
if-eqz v0, :cond_2
.line 3223
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->confirmSendMessageIfNeeded()V
:cond_2
move v0, v3
.line 3225
goto :goto_0
:cond_3
move v0, v2
.line 3227
goto :goto_0
.line 3229
:cond_4
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isPreparedForSending()Z
move-result v0
if-eqz v0, :cond_5
.line 3230
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->confirmSendMessageIfNeeded()V
:cond_5
move v0, v3
.line 3232
goto :goto_0
.end method
While here is the method from my phone:
.method public onEditorAction(Landroid/widget/TextView;ILandroid/view/KeyEventZ
.locals 4
.parameter
.parameter
.parameter
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
.line 4478
if-eqz p3, :cond_4
.line 4481
invoke-virtual {p3}, Landroid/view/KeyEvent;->isShiftPressed()Z
move-result v0
if-nez v0, :cond_3
invoke-virtual {p3}, Landroid/view/KeyEvent;->getAction()I
move-result v0
if-nez v0, :cond_3
.line 4483
invoke-virtual {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "airplane_mode_on"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 4484
if-ne v0, v3, :cond_0
move v0, v3
.line 4523
:goto_0
return v0
.line 4488
:cond_0
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isPreparedForSending()Z
move-result v0
if-eqz v0, :cond_1
.line 4491
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isMultiSim()Z
move-result v0
if-eqz v0, :cond_2
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isMultiSimEnabled()Z
move-result v0
if-eqz v0, :cond_2
.line 4493
invoke-direct {p0, v2, v3}, Lcom/android/mms/ui/ComposeMessageActivity;->confirmSendMessageIfNeeded(IZ)V
:cond_1
:goto_1
move v0, v3
.line 4500
goto :goto_0
.line 4496
:cond_2
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->getCurrentEnabledSim()I
move-result v0
invoke-direct {p0, v0, v2}, Lcom/android/mms/ui/ComposeMessageActivity;->confirmSendMessageIfNeeded(IZ)V
goto :goto_1
:cond_3
move v0, v2
.line 4502
goto :goto_0
.line 4505
:cond_4
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isPreparedForSending()Z
move-result v0
if-eqz v0, :cond_6
.line 4508
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isMultiSim()Z
move-result v0
if-eqz v0, :cond_5
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->isMultiSimEnabled()Z
move-result v0
if-eqz v0, :cond_5
.line 4510
invoke-direct {p0, v2, v3}, Lcom/android/mms/ui/ComposeMessageActivity;->confirmSendMessageIfNeeded(IZ)V
:goto_2
move v0, v3
.line 4523
goto :goto_0
.line 4513
:cond_5
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->getCurrentEnabledSim()I
move-result v0
invoke-direct {p0, v0, v2}, Lcom/android/mms/ui/ComposeMessageActivity;->confirmSendMessageIfNeeded(IZ)V
goto :goto_2
:cond_6
move v0, v2
.line 4520
goto :goto_0
.end method
PLEASE can anybody help me? Im not good at this so please anyone kind enough to correctly do the line numbering thingy? I will really appreciate it.. Thanks.

[GUIDE][MOD][4.0.4] Add Hide time and am/pm toggle Samsung ICS Devices

***Here is a guide for Adding Hide time and am/pm toggle in Samsung ICS Devices***
This guide is specially for GT-S7562. But should work for other Samsung ICS devices also. Values may differ.​
Things you need:
Tool for decompiling/compiling work (I will not cover this, there are many guides for this)
Notepad++
Patience
Some common sense
Click to expand...
Click to collapse
Here, we will edit two files:
SecSettings.apk
SystemUI.apk
Here we start-
Decompile SecSettings.apk
Open smali/com/android/settings/DateTimeSettings.smali
Add blue one
Code:
# instance fields
.field private mAutoTimePref:Landroid/preference/CheckBoxPreference;
.field private mAutoTimeZonePref:Landroid/preference/CheckBoxPreference;
.field private mDateFormat:Landroid/preference/ListPreference;
.field private mDatePref:Landroid/preference/Preference;
.field private mDummyDate:Ljava/util/Calendar;
[COLOR="Blue"].field private mHideAmPm:Landroid/preference/Preference;[/COLOR]
[COLOR="blue"].field private mHideTime:Landroid/preference/Preference;[/COLOR]
.field private mIntentReceiver:Landroid/content/BroadcastReceiver;
.field private mSettingsObserver:Lcom/android/settings/DateTimeSettings$SettingsObserver;
.field private mTime24Pref:Landroid/preference/Preference;
.field private mTimePref:Landroid/preference/Preference;
.field private mTimeZone:Landroid/preference/Preference;
Search
.method private initUI()V
Click to expand...
Click to collapse
Replace the whole method with this
Code:
.method private initUI()V
.locals 8
.prologue
const/4 v5, 0x1
const/4 v6, 0x0
.line 152
const-string v4, "auto_time"
invoke-direct {p0, v4}, Lcom/android/settings/DateTimeSettings;->getAutoState(Ljava/lang/String;)Z
move-result v0
.line 153
.local v0, autoTimeEnabled:Z
const-string v4, "auto_time_zone"
invoke-direct {p0, v4}, Lcom/android/settings/DateTimeSettings;->getAutoState(Ljava/lang/String;)Z
move-result v1
.line 155
.local v1, autoTimeZoneEnabled:Z
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v4
invoke-virtual {v4}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
move-result-object v2
.line 156
.local v2, intent:Landroid/content/Intent;
const-string v4, "firstRun"
invoke-virtual {v2, v4, v6}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v3
.line 158
.local v3, isFirstRun:Z
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mDummyDate:Ljava/util/Calendar;
.line 160
const-string v4, "auto_time"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
check-cast v4, Landroid/preference/CheckBoxPreference;
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimePref:Landroid/preference/CheckBoxPreference;
.line 161
iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 162
const-string v4, "auto_zone"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
check-cast v4, Landroid/preference/CheckBoxPreference;
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimeZonePref:Landroid/preference/CheckBoxPreference;
.line 165
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v4
invoke-static {v4}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z
move-result v4
if-nez v4, :cond_0
if-eqz v3, :cond_2
.line 166
.line 167
:cond_0
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v4
invoke-static {v4}, Lcom/android/settings/Utils;->isWifiOnly(Landroid/content/Context;)Z
move-result v4
if-eqz v4, :cond_1
.line 168
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v4
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 169
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "auto_time_zone"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 171
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v7, "auto_time"
invoke-static {v4, v7, v6}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 173
const/4 v0, 0x0
.line 175
:cond_1
const/4 v1, 0x0
.line 177
:cond_2
iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mAutoTimeZonePref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v4, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
.line 179
const-string v4, "time"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;
.line 180
const-string v4, "24 hour"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
.line 181
const-string v4, "timezone"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTimeZone:Landroid/preference/Preference;
.line 182
const-string v4, "date"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
.line 183
const-string v4, "date_format"
invoke-virtual {p0, v4}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v4
check-cast v4, Landroid/preference/ListPreference;
iput-object v4, p0, Lcom/android/settings/DateTimeSettings;->mDateFormat:Landroid/preference/ListPreference;
.line 184
if-eqz v3, :cond_3
.line 185
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v4
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 186
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v4
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mDateFormat:Landroid/preference/ListPreference;
invoke-virtual {v4, v7}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
.line 189
:cond_3
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->updateDateFormatEntries()V
.line 192
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;
if-nez v0, :cond_6
move v4, v5
:goto_0
invoke-virtual {v7, v4}, Landroid/preference/Preference;->setEnabled(Z)V
.line 193
iget-object v7, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
if-nez v0, :cond_7
move v4, v5
:goto_1
invoke-virtual {v7, v4}, Landroid/preference/Preference;->setEnabled(Z)V
.line 194
iget-object v4, p0, Lcom/android/settings/DateTimeSettings;->mTimeZone:Landroid/preference/Preference;
if-nez v1, :cond_8
:goto_2
invoke-virtual {v4, v5}, Landroid/preference/Preference;->setEnabled(Z)V
.line 197
invoke-direct {p0}, Lcom/android/settings/DateTimeSettings;->applyEDMDateTimeChangePolicy()V
.line 199
const-string v6, "hide_time"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
const-string v6, "hide_ampm"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_4
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:cond_4
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_5
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:cond_5
return-void
:cond_6
move v4, v6
.line 192
goto :goto_0
:cond_7
move v4, v6
.line 193
goto :goto_1
:cond_8
move v5, v6
.line 194
goto :goto_2
.end method
Search this method
Code:
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
Replace full method with this
Code:
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 6
.parameter "preferenceScreen"
.parameter "preference"
.prologue
const/4 v1, 0x1
.line 490
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mDatePref:Landroid/preference/Preference;
if-ne p2, v0, :cond_1
.line 491
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/android/settings/DateTimeSettings;->showDialog(I)V
.line 501
:cond_0
:goto_0
invoke-super {p0, p1, p2}, Lcom/android/settings/SettingsPreferenceFragment;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v0
return v0
.line 492
:cond_1
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTimePref:Landroid/preference/Preference;
if-ne p2, v0, :cond_2
.line 494
invoke-virtual {p0, v1}, Lcom/android/settings/DateTimeSettings;->removeDialog(I)V
.line 495
invoke-virtual {p0, v1}, Lcom/android/settings/DateTimeSettings;->showDialog(I)V
goto :goto_0
.line 496
:cond_2
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
if-ne p2, v0, :cond_4
.line 497
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
invoke-direct {p0, v0}, Lcom/android/settings/DateTimeSettings;->set24Hour(Z)V
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-nez v0, :cond_3
const/4 v0, 0x1
goto :goto_1
:cond_3
const/4 v0, 0x0
:goto_1
invoke-virtual {v1, v0}, Landroid/preference/Preference;->setEnabled(Z)V
.line 498
:goto_2
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getActivity()Landroid/app/Activity;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/android/settings/DateTimeSettings;->updateTimeAndDateDisplay(Landroid/content/Context;)V
.line 499
invoke-direct {p0}, Lcom/android/settings/DateTimeSettings;->timeUpdated()V
goto :goto_0
:cond_4
const-string v3, "hide_ampm"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-ne p2, v0, :cond_5
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_ampm"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_2
:cond_5
const-string v3, "hide_time"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
if-ne p2, v0, :cond_0
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_time"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
if-nez v2, :cond_6
const/4 v2, 0x1
goto :goto_3
:cond_6
const/4 v2, 0x0
:goto_3
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
goto :goto_2
.end method
Save it.
Now open res/xm/Date_Time_Prefs.xml
Add blue lines
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/date_and_time"
xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference android:title="@string/date_time_auto" android:key="auto_time" android:summaryOn="@string/date_time_auto_summaryOn" android:summaryOff="@string/date_time_auto_summaryOff" />
<Preference android:title="@string/date_time_set_date" android:key="date" android:summary="03/10/2008" android:widgetLayout="@layout/round_more_icon" />
<Preference android:title="@string/date_time_set_time" android:key="time" android:summary="12:00am" android:widgetLayout="@layout/round_more_icon" />
<CheckBoxPreference android:title="@string/zone_auto" android:key="auto_zone" android:summaryOn="@string/zone_auto_summaryOn" android:summaryOff="@string/zone_auto_summaryOff" />
[COLOR="blue"]<CheckBoxPreference android:title="@string/disable_time" android:key="hide_time" android:summary="@string/disable_time_text" />
<CheckBoxPreference android:title="@string/disable_ampm" android:key="hide_ampm" android:summary="@string/disable_ampm_text" />[/COLOR]
<PreferenceScreen android:title="@string/date_time_set_timezone" android:key="timezone" android:summary="GMT-8:00" android:fragment="com.android.settings.ZonePicker" />
<CheckBoxPreference android:title="@string/date_time_24hour" android:key="24 hour" />
<ListPreference android:title="@string/date_time_date_format" android:key="date_format" android:summary="mm/dd/yyyy" android:widgetLayout="@layout/round_more_icon" />
</PreferenceScreen>
Save it.
Open res/values/strings.xml
Add these lines at the end
Code:
<string name="disable_time">Hide time</string>
<string name="disable_time_text">Remove time from status bar</string>
<string name="disable_ampm">Hide AM/PM</string>
<string name="disable_ampm_text">Remove AM/PM from time in status bar</string>
Save it and recompile SecSettings.apk
Conitnue to next Post
Decompile SystemUI.apk
Open smali/com/android/systemui/statusbar/policy/Clock.smali
Search-
Code:
.method private final getSmallTime()Ljava/lang/CharSequence;
Replace whole method with this
Code:
.method private final getSmallTime()Ljava/lang/CharSequence;
.locals 22
.prologue
.line 237
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/policy/Clock;->getContext()Landroid/content/Context;
move-result-object v8
.line 238
.local v8, context:Landroid/content/Context;
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v7, "hide_time"
const/4 v0, 0x0
invoke-static {v2, v7, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const/4 v0, 0x0
if-eqz v7, :cond_0
const/16 v0, 0x8
:cond_0
[COLOR="Red"]const v1, 0x7f0f003d[/COLOR]
move-object/from16 v2, p0
invoke-virtual {v2, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
invoke-static {v8}, Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;)Z
move-result v6
.line 244
.local v6, b24:Z
if-eqz v6, :cond_5
.line 245
const v16, 0x104007f
.line 259
.local v16, res:I
:goto_0
const v2, 0xef00
.line 260
.local v2, MAGIC1:C
const v3, 0xef01
.line 263
.local v3, MAGIC2:C
move/from16 v0, v16
invoke-virtual {v8, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v9
if-nez v6, :cond_1
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_ampm"
const/4 v0, 0x0
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const-string v0, "ampm"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "getint returned="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
move v2, v7
if-eqz v2, :cond_1
const-string v9, "h:mm"
.line 266
.local v9, format:Ljava/lang/String;
:cond_1
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormatString:Ljava/lang/String;
move-object/from16 v20, v0
move-object/from16 v0, v20
invoke-virtual {v9, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v20
if-eqz v20, :cond_2
if-nez v6, :cond_a
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mLocaleChanged:Z
move/from16 v20, v0
if-eqz v20, :cond_a
.line 267
:cond_2
const/16 v20, 0x0
move/from16 v0, v20
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/systemui/statusbar/policy/Clock;->mLocaleChanged:Z
.line 274
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
if-eqz v20, :cond_9
.line 275
const/4 v4, -0x1
.line 276
.local v4, a:I
const/4 v15, 0x0
.line 277
.local v15, quoted:Z
const/4 v11, 0x0
.local v11, i:I
:goto_1
invoke-virtual {v9}, Ljava/lang/String;->length()I
move-result v20
move/from16 v0, v20
if-ge v11, v0, :cond_4
.line 278
invoke-virtual {v9, v11}, Ljava/lang/String;->charAt(I)C
move-result v7
.line 280
.local v7, c:C
const/16 v20, 0x27
move/from16 v0, v20
if-ne v7, v0, :cond_3
.line 281
if-nez v15, :cond_6
const/4 v15, 0x1
.line 283
:cond_3
:goto_2
if-nez v15, :cond_7
const/16 v20, 0x61
move/from16 v0, v20
if-ne v7, v0, :cond_7
.line 284
move v4, v11
.line 289
.end local v7 #c:C
:cond_4
if-ltz v4, :cond_9
.line 291
move v5, v4
.line 292
.local v5, b:I
:goto_3
if-lez v4, :cond_8
add-int/lit8 v20, v4, -0x1
move/from16 v0, v20
invoke-virtual {v9, v0}, Ljava/lang/String;->charAt(I)C
move-result v20
invoke-static/range {v20 .. v20}, Ljava/lang/Character;->isWhitespace(C)Z
move-result v20
if-eqz v20, :cond_8
.line 293
add-int/lit8 v4, v4, -0x1
goto :goto_3
.line 247
.end local v2 #MAGIC1:C
.end local v3 #MAGIC2:C
.end local v4 #a:I
.end local v5 #b:I
.end local v9 #format:Ljava/lang/String;
.end local v11 #i:I
.end local v15 #quoted:Z
.end local v16 #res:I
:cond_5
const v16, 0x104007e
.restart local v16 #res:I
goto/16 :goto_0
.line 281
.restart local v2 #MAGIC1:C
.restart local v3 #MAGIC2:C
.restart local v4 #a:I
.restart local v7 #c:C
.restart local v9 #format:Ljava/lang/String;
.restart local v11 #i:I
.restart local v15 #quoted:Z
:cond_6
const/4 v15, 0x0
goto :goto_2
.line 277
:cond_7
add-int/lit8 v11, v11, 0x1
goto :goto_1
.line 295
.end local v7 #c:C
.restart local v5 #b:I
:cond_8
new-instance v20, Ljava/lang/StringBuilder;
invoke-direct/range {v20 .. v20}, Ljava/lang/StringBuilder;-><init>()V
const/16 v21, 0x0
move/from16 v0, v21
invoke-virtual {v9, v0, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v21
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
const v21, 0xef00
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v20
invoke-virtual {v9, v4, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v21
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
const-string v21, "a"
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
const v21, 0xef01
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v20
add-int/lit8 v21, v5, 0x1
move/from16 v0, v21
invoke-virtual {v9, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v21
invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v20
invoke-virtual/range {v20 .. v20}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
.line 300
.end local v4 #a:I
.end local v5 #b:I
.end local v11 #i:I
.end local v15 #quoted:Z
:cond_9
new-instance v18, Ljava/text/SimpleDateFormat;
move-object/from16 v0, v18
invoke-direct {v0, v9}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
.local v18, sdf:Ljava/text/SimpleDateFormat;
move-object/from16 v0, v18
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormat:Ljava/text/SimpleDateFormat;
.line 301
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormatString:Ljava/lang/String;
.line 305
:goto_4
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mCalendar:Ljava/util/Calendar;
move-object/from16 v20, v0
invoke-virtual/range {v20 .. v20}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
move-result-object v20
move-object/from16 v0, v18
move-object/from16 v1, v20
invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v17
.line 307
.local v17, result:Ljava/lang/String;
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
if-eqz v20, :cond_e
.line 308
const v20, 0xef00
move-object/from16 v0, v17
move/from16 v1, v20
invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
move-result v12
.line 309
.local v12, magic1:I
const v20, 0xef01
move-object/from16 v0, v17
move/from16 v1, v20
invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I
move-result v13
.line 310
.local v13, magic2:I
if-ltz v12, :cond_e
if-le v13, v12, :cond_e
.line 311
new-instance v10, Landroid/text/SpannableStringBuilder;
move-object/from16 v0, v17
invoke-direct {v10, v0}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V
.line 312
.local v10, formatted:Landroid/text/SpannableStringBuilder;
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
const/16 v21, 0x2
move/from16 v0, v20
move/from16 v1, v21
if-ne v0, v1, :cond_b
.line 313
add-int/lit8 v20, v13, 0x1
move/from16 v0, v20
invoke-virtual {v10, v12, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
.line 334
.end local v10 #formatted:Landroid/text/SpannableStringBuilder;
.end local v12 #magic1:I
.end local v13 #magic2:I
:goto_5
return-object v10
.line 303
.end local v17 #result:Ljava/lang/String;
.end local v18 #sdf:Ljava/text/SimpleDateFormat;
:cond_a
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/policy/Clock;->mClockFormat:Ljava/text/SimpleDateFormat;
move-object/from16 v18, v0
.restart local v18 #sdf:Ljava/text/SimpleDateFormat;
goto :goto_4
.line 315
.restart local v10 #formatted:Landroid/text/SpannableStringBuilder;
.restart local v12 #magic1:I
.restart local v13 #magic2:I
.restart local v17 #result:Ljava/lang/String;
:cond_b
sget v20, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
const/16 v21, 0x1
move/from16 v0, v20
move/from16 v1, v21
if-ne v0, v1, :cond_d
.line 317
const v14, 0x3f333333
.line 318
.local v14, proportion:F
sget-boolean v20, Lcom/android/systemui/statusbar/StatusBar;->useTouchWizGUI:Z
if-eqz v20, :cond_c
sget-boolean v20, Lcom/android/systemui/statusbar/StatusBar;->canStatusBarHide:Z
if-nez v20, :cond_c
.line 319
const/high16 v14, 0x3f00
.line 322
:cond_c
new-instance v19, Landroid/text/style/RelativeSizeSpan;
move-object/from16 v0, v19
invoke-direct {v0, v14}, Landroid/text/style/RelativeSizeSpan;-><init>(F)V
.line 324
.local v19, style:Landroid/text/style/CharacterStyle;
const/16 v20, 0x22
move-object/from16 v0, v19
move/from16 v1, v20
invoke-virtual {v10, v0, v12, v13, v1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V
.line 327
.end local v14 #proportion:F
.end local v19 #style:Landroid/text/style/CharacterStyle;
:cond_d
add-int/lit8 v20, v13, 0x1
move/from16 v0, v20
invoke-virtual {v10, v13, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
.line 328
add-int/lit8 v20, v12, 0x1
move/from16 v0, v20
invoke-virtual {v10, v12, v0}, Landroid/text/SpannableStringBuilder;->delete(II)Landroid/text/SpannableStringBuilder;
goto :goto_5
.end local v10 #formatted:Landroid/text/SpannableStringBuilder;
.end local v12 #magic1:I
.end local v13 #magic2:I
:cond_e
move-object/from16 v10, v17
.line 334
goto :goto_5
.end method
One ID is highlighted in red color in the above method, match this ID with "Clock" ID in res/values/public.xml. Make them same if they are different.
Save it and recompile SystemUI.apk
Thats it
Enjoy
Credits:
Me
Codename13
Didact74
Click to expand...
Click to collapse

Help me bypass GoogleSignatureVerifier!!!

Hello guys,
I've already written there but I think that was the wrong forum.
I need to bypass google signature check in application Waze in order to mod Waze and bring back radars in France!
I think I've found the smali files to patch which is googleSignatureverifier.smali.
I try to spoof the genuine signature but I get crashes every time!
I think some of you have already broken this type of security since it is necessary to mod GAPPs!
Code:
.class public Lcom/google/android/gms/common/GoogleSignatureVerifier;
.super Ljava/lang/Object;
# static fields
.field private static final zzaqd:Lcom/google/android/gms/common/GoogleSignatureVerifier;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Lcom/google/android/gms/common/GoogleSignatureVerifier;
invoke-direct {v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;-><init>()V
sput-object v0, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzaqd:Lcom/google/android/gms/common/GoogleSignatureVerifier;
return-void
.end method
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getInstance()Lcom/google/android/gms/common/GoogleSignatureVerifier;
.locals 1
sget-object v0, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzaqd:Lcom/google/android/gms/common/GoogleSignatureVerifier;
return-object v0
.end method
.method private zzb(Landroid/content/pm/PackageInfo;Z)Z
.locals 5
const/4 v2, 0x1
const/4 v1, 0x0
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
array-length v0, v0
if-eq v0, v2, :cond_0
const-string/jumbo v0, "GoogleSignatureVerifier"
const-string/jumbo v2, "Package has more than one signature."
invoke-static {v0, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
move v0, v1
:goto_0
return v0
:cond_0
new-instance v3, Lcom/google/android/gms/common/zzc$zzb;
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
aget-object v0, v0, v1
invoke-virtual {v0}, Landroid/content/pm/Signature;->toByteArray()[B
move-result-object v0
invoke-direct {v3, v0}, Lcom/google/android/gms/common/zzc$zzb;-><init>([B)V
if-eqz p2, :cond_1
invoke-static {}, Lcom/google/android/gms/common/zzc;->zzpc()Ljava/util/Set;
move-result-object v0
:goto_1
invoke-interface {v0, v3}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
move v0, v2
goto :goto_0
:cond_1
invoke-static {}, Lcom/google/android/gms/common/zzc;->zzpd()Ljava/util/Set;
move-result-object v0
goto :goto_1
:cond_2
const-string/jumbo v0, "GoogleSignatureVerifier"
const/4 v2, 0x2
invoke-static {v0, v2}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_3
const-string/jumbo v0, "GoogleSignatureVerifier"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v4, "Signature not valid. Found: \n"
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v3}, Lcom/google/android/gms/common/zzc$zza;->getBytes()[B
move-result-object v3
invoke-static {v3, v1}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_3
move v0, v1
goto :goto_0
.end method
# virtual methods
.method public isPackageGoogleSigned(Landroid/content/pm/PackageManager;Landroid/content/pm/PackageInfo;)Z
.locals 3
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "packageInfo" # Landroid/content/pm/PackageInfo;
.prologue
const/4 v2, 0x1
const/4 v0, 0x0
if-nez p2, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->honorsDebugCertificates(Landroid/content/pm/PackageManager;)Z
move-result v1
if-eqz v1, :cond_2
invoke-direct {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzb(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
goto :goto_0
:cond_2
invoke-direct {p0, p2, v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzb(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
if-nez v0, :cond_0
invoke-direct {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzb(Landroid/content/pm/PackageInfo;Z)Z
move-result v1
if-eqz v1, :cond_0
const-string/jumbo v1, "GoogleSignatureVerifier"
const-string/jumbo v2, "Test-keys aren\'t accepted on this build."
invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.end method
.method public isPackageGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)Z
.locals 3
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "callingPackage" # Ljava/lang/String;
.prologue
const/16 v0, 0x40
:try_start_0
invoke-virtual {p1, p2, v0}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
:try_end_0
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
invoke-virtual {p0, p1, v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isPackageGoogleSigned(Landroid/content/pm/PackageManager;Landroid/content/pm/PackageInfo;)Z
move-result v0
:goto_0
return v0
:catch_0
move-exception v0
const-string/jumbo v0, "GoogleSignatureVerifier"
const/4 v1, 0x3
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_0
const-string/jumbo v0, "GoogleSignatureVerifier"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v2, "Package manager can\'t find package "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string/jumbo v2, ", defaulting to false"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public isUidGoogleSigned(Landroid/content/pm/PackageManager;I)Z
.locals 5
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "uid" # I
.prologue
const/4 v0, 0x0
invoke-virtual {p1, p2}, Landroid/content/pm/PackageManager;->getPackagesForUid(I)[Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_0
array-length v1, v2
if-nez v1, :cond_1
:cond_0
:goto_0
return v0
:cond_1
array-length v3, v2
move v1, v0
:goto_1
if-ge v1, v3, :cond_0
aget-object v4, v2, v1
invoke-virtual {p0, p1, v4}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isPackageGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)Z
move-result v4
if-eqz v4, :cond_2
const/4 v0, 0x1
goto :goto_0
:cond_2
add-int/lit8 v1, v1, 0x1
goto :goto_1
.end method
.method public verifyPackageIsGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)V
.locals 3
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "callingPackage" # Ljava/lang/String;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/SecurityException;
}
.end annotation
.prologue
invoke-virtual {p0, p1, p2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isPackageGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
new-instance v0, Ljava/lang/SecurityException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v2, "Signature check failed for "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
:cond_0
return-void
.end method
.method public verifyUidIsGoogleSigned(Landroid/content/pm/PackageManager;I)V
.locals 2
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "uid" # I
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/SecurityException;
}
.end annotation
.prologue
if-nez p1, :cond_0
new-instance v0, Ljava/lang/SecurityException;
const-string/jumbo v1, "Unknown error: invalid Package Manager"
invoke-direct {v0, v1}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
:cond_0
invoke-virtual {p0, p1, p2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isUidGoogleSigned(Landroid/content/pm/PackageManager;I)Z
move-result v0
if-nez v0, :cond_1
new-instance v0, Ljava/lang/SecurityException;
const-string/jumbo v1, "Uid is not Google Signed"
invoke-direct {v0, v1}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
return-void
.end method
.method varargs zza(Landroid/content/pm/PackageInfo;[Lcom/google/android/gms/common/zzc$zza;)Lcom/google/android/gms/common/zzc$zza;
.locals 6
const/4 v2, 0x0
const/4 v1, 0x0
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
array-length v0, v0
const/4 v3, 0x1
if-eq v0, v3, :cond_0
const-string/jumbo v0, "GoogleSignatureVerifier"
const-string/jumbo v1, "Package has more than one signature."
invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
move-object v0, v2
:goto_0
return-object v0
:cond_0
new-instance v3, Lcom/google/android/gms/common/zzc$zzb;
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
aget-object v0, v0, v1
invoke-virtual {v0}, Landroid/content/pm/Signature;->toByteArray()[B
move-result-object v0
invoke-direct {v3, v0}, Lcom/google/android/gms/common/zzc$zzb;-><init>([B)V
move v0, v1
:goto_1
array-length v4, p2
if-ge v0, v4, :cond_2
aget-object v4, p2, v0
invoke-virtual {v4, v3}, Lcom/google/android/gms/common/zzc$zza;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1
aget-object v0, p2, v0
goto :goto_0
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_1
:cond_2
const-string/jumbo v0, "GoogleSignatureVerifier"
const/4 v4, 0x2
invoke-static {v0, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_3
const-string/jumbo v0, "GoogleSignatureVerifier"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v5, "Signature not valid. Found: \n"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v3}, Lcom/google/android/gms/common/zzc$zza;->getBytes()[B
move-result-object v3
invoke-static {v3, v1}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
move-result-object v1
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_3
move-object v0, v2
goto :goto_0
.end method
.method public zza(Landroid/content/pm/PackageInfo;Z)Z
.locals 4
const/4 v0, 0x1
const/4 v1, 0x0
if-eqz p1, :cond_1
iget-object v2, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
if-eqz v2, :cond_1
if-eqz p2, :cond_0
sget-object v2, Lcom/google/android/gms/common/zzc$zzcm;->zzapV:[Lcom/google/android/gms/common/zzc$zza;
invoke-virtual {p0, p1, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;[Lcom/google/android/gms/common/zzc$zza;)Lcom/google/android/gms/common/zzc$zza;
move-result-object v2
:goto_0
if-eqz v2, :cond_1
:goto_1
return v0
:cond_0
new-array v2, v0, [Lcom/google/android/gms/common/zzc$zza;
sget-object v3, Lcom/google/android/gms/common/zzc$zzcm;->zzapV:[Lcom/google/android/gms/common/zzc$zza;
aget-object v3, v3, v1
aput-object v3, v2, v1
invoke-virtual {p0, p1, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;[Lcom/google/android/gms/common/zzc$zza;)Lcom/google/android/gms/common/zzc$zza;
move-result-object v2
goto :goto_0
:cond_1
move v0, v1
goto :goto_1
.end method
.method public zza(Landroid/content/pm/PackageManager;Landroid/content/pm/PackageInfo;)Z
.locals 3
const/4 v2, 0x1
const/4 v0, 0x0
if-nez p2, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->honorsDebugCertificates(Landroid/content/pm/PackageManager;)Z
move-result v1
if-eqz v1, :cond_2
invoke-virtual {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
goto :goto_0
:cond_2
invoke-virtual {p0, p2, v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
if-nez v0, :cond_0
invoke-virtual {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result v1
if-eqz v1, :cond_0
const-string/jumbo v1, "GoogleSignatureVerifier"
const-string/jumbo v2, "Test-keys aren\'t accepted on this build."
invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.end method
As for the problem the OP is facing, there is a ridiculously powerful app called My Android Tools available on the playstore that I believe will do everything you need to accomplish.
Those features are left out purposely because its illegal to include in certain areas. And so we don't need it discussed on XDA.
Thread closed.
Darth
Forum Moderator

[HELP][LOG]java.lang.NullPointerException:

Short story, i am modifying systemui and got forcing close.
This is my logcat
Code:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setTextSize(int, float)' on a null object reference
at com.android.systemui.statusbar.phone.KeyguardStatusBarView.onConfigurationChanged(KeyguardStatusBarView.java)
at android.view.View.dispatchConfigurationChanged(View.java:8940)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1174)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1178)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1178)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1178)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1178)
at android.view.ViewRootImpl.updateConfiguration(ViewRootImpl.java:3065)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3211)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5389)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
And this is smali part from the error log
Code:
.method protected onConfigurationChanged(Landroid/content/res/Configuration;)V
.locals 4
const/4 v3, 0x0
invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->onConfigurationChanged(Landroid/content/res/Configuration;)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mCarrierLabel:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x10500f2
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v1
int-to-float v1, v1
invoke-virtual {v0, v3, v1}, Landroid/widget/TextView;->setTextSize(IF)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryLevel:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f0e00b5
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v1
int-to-float v1, v1
invoke-virtual {v0, v3, v1}, Landroid/widget/TextView;->setTextSize(IF)V
return-void
.end method
And this is fullpart KeyguardStatusBarView.smali
Code:
.class public Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;
.super Landroid/widget/RelativeLayout;
.source "KeyguardStatusBarView.java"
# interfaces
.implements Lcom/android/systemui/statusbar/policy/BatteryController$BatteryPercentCallback;
.implements Lcom/android/systemui/statusbar/policy/BatteryController$BatteryStateChangeCallback;
# instance fields
.field private mBatteryCharging:Z
.field private mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
.field private mBatteryLevel:Landroid/widget/TextView;
.field private mBatteryListening:Z
.field private mCarrierLabel:Landroid/widget/TextView;
.field private mFastOutSlowInInterpolator:Landroid/view/animation/Interpolator;
.field private mKeyguardUserSwitcher:Lcom/android/systemui/statusbar/policy/KeyguardUserSwitcher;
.field private mKeyguardUserSwitcherShowing:Z
.field private mMultiUserAvatar:Landroid/widget/ImageView;
.field private mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
.field private mSystemIconsSuperContainer:Landroid/view/View;
.field private mSystemIconsSwitcherHiddenExpandedMargin:I
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 0
invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method static synthetic access$000(Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;)Landroid/widget/ImageView;
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserAvatar:Landroid/widget/ImageView;
return-object v0
.end method
.method static synthetic access$100(Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;)Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
return-object v0
.end method
.method static synthetic access$200(Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;)Landroid/view/View;
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSuperContainer:Landroid/view/View;
return-object v0
.end method
.method static synthetic access$300(Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;)Landroid/view/animation/Interpolator;
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mFastOutSlowInInterpolator:Landroid/view/animation/Interpolator;
return-object v0
.end method
.method private animateNextLayoutChange()V
.locals 4
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSuperContainer:Landroid/view/View;
invoke-virtual {v2}, Landroid/view/View;->getLeft()I
move-result v0
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->getParent()Landroid/view/ViewParent;
move-result-object v2
if-ne v2, p0, :cond_0
const/4 v1, 0x1
:goto_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
move-result-object v2
new-instance v3, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView$2;
invoke-direct {v3, p0, v1, v0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView$2;-><init>(Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;ZI)V
invoke-virtual {v2, v3}, Landroid/view/ViewTreeObserver;->addOnPreDrawListener(Landroid/view/ViewTreeObserver$OnPreDrawListener;)V
return-void
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method private loadDimens()V
.locals 2
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x7f0e0091
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v0
iput v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSwitcherHiddenExpandedMargin:I
return-void
.end method
.method private updateSystemIconsLayoutParams()V
.locals 3
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSuperContainer:Landroid/view/View;
invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mKeyguardUserSwitcherShowing:Z
if-eqz v2, :cond_1
iget v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSwitcherHiddenExpandedMargin:I
:goto_0
invoke-virtual {v0}, Landroid/widget/RelativeLayout$LayoutParams;->getMarginEnd()I
move-result v2
if-eq v1, v2, :cond_0
invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;->setMarginEnd(I)V
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSuperContainer:Landroid/view/View;
invoke-virtual {v2, v0}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
:cond_0
return-void
:cond_1
const/4 v1, 0x0
goto :goto_0
.end method
.method private updateUserSwitcher()V
.locals 2
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mKeyguardUserSwitcher:Lcom/android/systemui/statusbar/policy/KeyguardUserSwitcher;
if-eqz v1, :cond_0
const/4 v0, 0x1
:goto_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v1, v0}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->setClickable(Z)V
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v1, v0}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->setFocusable(Z)V
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v1, v0}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->setKeyguardMode(Z)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method private updateVisibilities()V
.locals 5
const/16 v2, 0x8
const/4 v3, 0x0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->getParent()Landroid/view/ViewParent;
move-result-object v1
if-eq v1, p0, :cond_3
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mKeyguardUserSwitcherShowing:Z
if-nez v1, :cond_3
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->getParent()Landroid/view/ViewParent;
move-result-object v1
if-eqz v1, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getOverlay()Landroid/view/ViewGroupOverlay;
move-result-object v1
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v1, v4}, Landroid/view/ViewGroupOverlay;->remove(Landroid/view/View;)V
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {p0, v1, v3}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->addView(Landroid/view/View;I)V
:cond_1
:goto_0
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryLevel:Landroid/widget/TextView;
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryCharging:Z
if-nez v1, :cond_2
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/policy/BatteryController;->showPercent()Z
move-result v1
if-eqz v1, :cond_4
:cond_2
move v1, v3
:goto_1
invoke-virtual {v4, v1}, Landroid/widget/TextView;->setVisibility(I)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v4, 0x7f0a0061
invoke-virtual {v1, v4}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mCarrierLabel:Landroid/widget/TextView;
if-eqz v0, :cond_5
:goto_2
invoke-virtual {v1, v3}, Landroid/widget/TextView;->setVisibility(I)V
return-void
:cond_3
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->getParent()Landroid/view/ViewParent;
move-result-object v1
if-ne v1, p0, :cond_1
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mKeyguardUserSwitcherShowing:Z
if-eqz v1, :cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->removeView(Landroid/view/View;)V
goto :goto_0
:cond_4
move v1, v2
goto :goto_1
:cond_5
move v3, v2
goto :goto_2
.end method
# virtual methods
.method public hasOverlappingRendering()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public onBatteryLevelChanged(IZZ)V
.locals 8
invoke-static {}, Ljava/text/NumberFormat;->getPercentInstance()Ljava/text/NumberFormat;
move-result-object v2
int-to-double v4, p1
const-wide/high16 v6, 0x4059000000000000L # 100.0
div-double/2addr v4, v6
invoke-virtual {v2, v4, v5}, Ljava/text/NumberFormat;->format(D)Ljava/lang/String;
move-result-object v1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryLevel:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryCharging:Z
if-eq v2, p3, :cond_1
const/4 v0, 0x1
:goto_0
iput-boolean p3, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryCharging:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->updateVisibilities()V
:cond_0
return-void
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method protected onConfigurationChanged(Landroid/content/res/Configuration;)V
.locals 4
const/4 v3, 0x0
invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->onConfigurationChanged(Landroid/content/res/Configuration;)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mCarrierLabel:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x10500f2
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v1
int-to-float v1, v1
invoke-virtual {v0, v3, v1}, Landroid/widget/TextView;->setTextSize(IF)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryLevel:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f0e00b5
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v1
int-to-float v1, v1
invoke-virtual {v0, v3, v1}, Landroid/widget/TextView;->setTextSize(IF)V
return-void
.end method
.method protected onFinishInflate()V
.locals 2
invoke-super {p0}, Landroid/widget/RelativeLayout;->onFinishInflate()V
const v0, 0x7f1000a0
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSuperContainer:Landroid/view/View;
const v0, 0x7f10009e
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
const v0, 0x7f10009f
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserAvatar:Landroid/widget/ImageView;
const v0, 0x7f1000a2
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryLevel:Landroid/widget/TextView;
const v0, 0x7f1000a3
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mCarrierLabel:Landroid/widget/TextView;
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->loadDimens()V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->getContext()Landroid/content/Context;
move-result-object v0
const v1, 0x10c000d
invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadInterpolator(Landroid/content/Context;I)Landroid/view/animation/Interpolator;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mFastOutSlowInInterpolator:Landroid/view/animation/Interpolator;
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->updateUserSwitcher()V
return-void
.end method
.method public onPowerSaveChanged()V
.locals 0
return-void
.end method
.method public onShowPercentChanged()V
.locals 0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->updateVisibilities()V
return-void
.end method
.method public setBatteryController(Lcom/android/systemui/statusbar/policy/BatteryController;)V
.locals 1
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v0, 0x7f100112
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/android/systemui/BatteryMeterView;
invoke-virtual {v0, p1}, Lcom/android/systemui/BatteryMeterView;->setBatteryController(Lcom/android/systemui/statusbar/policy/BatteryController;)V
return-void
.end method
.method public setKeyguardUserSwitcher(Lcom/android/systemui/statusbar/policy/KeyguardUserSwitcher;)V
.locals 1
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mKeyguardUserSwitcher:Lcom/android/systemui/statusbar/policy/KeyguardUserSwitcher;
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->setKeyguardUserSwitcher(Lcom/android/systemui/statusbar/policy/KeyguardUserSwitcher;)V
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->updateUserSwitcher()V
return-void
.end method
.method public setKeyguardUserSwitcherShowing(ZZ)V
.locals 0
iput-boolean p1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mKeyguardUserSwitcherShowing:Z
if-eqz p2, :cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->animateNextLayoutChange()V
:cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->updateVisibilities()V
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->updateSystemIconsLayoutParams()V
return-void
.end method
.method public setListening(Z)V
.locals 1
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryListening:Z
if-ne p1, v0, :cond_0
:goto_0
return-void
:cond_0
iput-boolean p1, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryListening:Z
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryListening:Z
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
invoke-virtual {v0, p0}, Lcom/android/systemui/statusbar/policy/BatteryController;->addStateChangedCallback(Lcom/android/systemui/statusbar/policy/BatteryController$BatteryStateChangeCallback;)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
invoke-virtual {v0, p0}, Lcom/android/systemui/statusbar/policy/BatteryController;->addPercentCallback(Lcom/android/systemui/statusbar/policy/BatteryController$BatteryPercentCallback;)V
goto :goto_0
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
invoke-virtual {v0, p0}, Lcom/android/systemui/statusbar/policy/BatteryController;->removeStateChangedCallback(Lcom/android/systemui/statusbar/policy/BatteryController$BatteryStateChangeCallback;)V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
invoke-virtual {v0, p0}, Lcom/android/systemui/statusbar/policy/BatteryController;->removePercentCallback(Lcom/android/systemui/statusbar/policy/BatteryController$BatteryPercentCallback;)V
goto :goto_0
.end method
.method public setUserInfoController(Lcom/android/systemui/statusbar/policy/UserInfoController;)V
.locals 1
new-instance v0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView$1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView$1;-><init>(Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;)V
invoke-virtual {p1, v0}, Lcom/android/systemui/statusbar/policy/UserInfoController;->addListener(Lcom/android/systemui/statusbar/policy/UserInfoController$OnUserInfoChangedListener;)V
return-void
.end method
.method public setUserSwitcherController(Lcom/android/systemui/statusbar/policy/UserSwitcherController;)V
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->setUserSwitcherController(Lcom/android/systemui/statusbar/policy/UserSwitcherController;)V
return-void
.end method
.method public setVisibility(I)V
.locals 2
invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->setVisibility(I)V
if-eqz p1, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mSystemIconsSuperContainer:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewPropertyAnimator;->cancel()V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->animate()Landroid/view/ViewPropertyAnimator;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewPropertyAnimator;->cancel()V
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mMultiUserSwitch:Lcom/android/systemui/statusbar/phone/MultiUserSwitch;
const/high16 v1, 0x3f800000 # 1.0f
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/MultiUserSwitch;->setAlpha(F)V
:cond_0
return-void
.end method
Any help is apreciated.
Upload all the files in a zip
-Hope- said:
Upload all the files in a zip
Click to expand...
Click to collapse
Here the files, packed in a zip
nophyan said:
Here the files, packed in a zip
Click to expand...
Click to collapse
Hello, did you get your logcat using adb?
plug your phone to pc type in : adb logcat > logcatname2017.txt
work with the phone until the error pops up -while it's still plugged in-
wait a bit then press ctrl +C then upload the logcat
logging through adb is better to understand
-Hope- said:
Hello, did you get your logcat using adb?
plug your phone to pc type in : adb logcat > logcatname2017.txt
work with the phone until the error pops up -while it's still plugged in-
wait a bit then press ctrl +C then upload the logcat
logging through adb is better to understand
Click to expand...
Click to collapse
Oh, i use autogenerated log by android for crash app on data/system/dropbox/crash.txt
I will upload adb log later
Now i attach logcat via adb
nophyan said:
Now i attach logcat via adb
Click to expand...
Click to collapse
Hello again i surfed through the log and found out it was AndroidRuntime having problem executing methods
however try using CM security to see it it detects what's wrong or try these basic troubleshootings: https://android-fix.com/android-errors/41-unfortunately-system-ui-has-stopped.html
-Hope- said:
Hello again i surfed through the log and found out it was AndroidRuntime having problem executing methods
however try using CM security to see it it detects what's wrong or try these basic troubleshootings: https://android-fix.com/android-errors/41-unfortunately-system-ui-has-stopped.html
Click to expand...
Click to collapse
I think that app will not help, because i was modified my systemui using apktool, and on half way i found this error log, the only way is change the smali code, but i'm bad on coding
nophyan said:
I think that app will not help, because i was modified my systemui using apktool, and on half way i found this error log, the only way is change the smali code, but i'm bad on coding
Click to expand...
Click to collapse
What did you modify exactly?

Categories

Resources