Help me bypass GoogleSignatureVerifier!!! - Android Software/Hacking General [Developers Only]

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

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

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][HOW TO] Quick PIN Unlock And Scramble Pad For Lollipop

This is a how to add quick pin unlock and scramble pad to lollipop. It has been tested and working on s5, s6, note 3 and possibly note 4.
This is a guide for people to add it themselves, not for people to upload their files and expect it done for them. It does require the ability to decompile and compile apks and is done with making a toggle for it in custom settings which can be found in this great thread here so it can be toggled on or off depending on what people want to use.
For this mod we will be modifying SystemUI from system/priv-app. It requires 3 files to be modified and 2 to be added which are attached to this post.
Download and extract the attached zip and place the two smali files into
Code:
com/android/keyguard/
in the same folder com/android/keyguard/ look for these 3 files which we will need to modify for this.
KeyguardPINView.smali
PasswordTextView.smali
NumPadKey.smali
Lets start with NumPadKey.smali
look for this method which should be near the top
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
and look for the following section of code in that method
Code:
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
above the iget we will add this line
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
so it should look something like this
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
Now look for the following line
Code:
# virtual methods
and add this whole method above it
Code:
.method private updateText()V
.locals 4
.prologue
.line 122
iget v2, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-ltz v2, :cond_1
.line 123
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mDigitText:Landroid/widget/TextView;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 124
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-nez v2, :cond_0
.line 125
invoke-virtual {p0}, Lcom/android/keyguard/NumPadKey;->getResources()Landroid/content/res/Resources;
move-result-object v2
sget v3, Lcom/android/keyguard/R$array;->lockscreen_num_pad_klondike:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v2
sput-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
.line 127
:cond_0
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-eqz v2, :cond_1
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
array-length v2, v2
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-le v2, v3, :cond_1
.line 128
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
aget-object v0, v2, v3
.line 129
.local v0, "klondike":Ljava/lang/String;
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
.line 130
.local v1, "len":I
if-lez v1, :cond_2
.line 131
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 137
.end local v0 # "klondike":Ljava/lang/String;
.end local v1 # "len":I
:cond_1
:goto_0
return-void
.line 133
.restart local v0 # "klondike":Ljava/lang/String;
.restart local v1 # "len":I
:cond_2
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
const/4 v3, 0x4
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V
goto :goto_0
.end method
Now anywhere under the virtual method line add the following whole method. It can be right at the end of the smali if want, thats where I usually add it
Code:
.method public setDigit(I)V
.locals 0
.param p1, "digit" # I
.prologue
.line 117
iput p1, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
.line 118
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
.line 119
return-void
.end method
That it for that smali and move onto the next
so now we will modify PasswordTextView.smali.
at the start of this file you will see
Code:
# annotations
To this annotation
Code:
.annotation system Ldalvik/annotation/MemberClasses;
we will add the following
Code:
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
so it will look like this for example. Note some devices may have more values there, do not remove and values just ass the quick unlock listener value
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/keyguard/PasswordTextView$CharState;,
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
}
.end annotation
now also up the top look for
Code:
# instance fields
and add the following field below that
Code:
.field protected mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
now find the following method
Code:
.method public append(C)V
and in it look for the following section of code
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
.line 296
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
and add this below it
Code:
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
.line 215
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
so it looks like this for example
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
goto :goto_0
.end local v0 # "charState":Lcom/android/keyguard/PasswordTextView$CharState;
:cond_2
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mTextChars:Ljava/util/ArrayList;
add-int/lit8 v5, v1, -0x1
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
then at the end of the smali add this whole method
Code:
.method public setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.locals 0
.param p1, "listener" # Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.prologue
.line 101
iput-object p1, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.line 102
return-void
.end method
Now we move on to the final smali KeyguardPINView.smali
look for this at the top
Code:
# static fields
and add the following field
Code:
.field private static sNumbers:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
also under this line
Code:
# instance fields
you may need to add the following line if it is not present already. It already exists on s5 and note 3 but needs to be added for s6. So if it is not there then add it
Code:
.field private mDivider:Landroid/view/View;
now look for
Code:
# direct methods
which should be not far from the above added lines and add the following constructor method
Code:
.method static constructor <clinit>()V
.locals 7
.prologue
const/4 v6, 0x4
const/4 v5, 0x3
const/4 v4, 0x2
const/4 v2, 0x1
const/4 v3, 0x0
.line 48
const/16 v0, 0xa
new-array v0, v0, [Ljava/lang/Integer;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v3
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v2
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v4
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v5
const/4 v1, 0x5
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v6
const/4 v1, 0x5
const/4 v2, 0x6
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x6
const/4 v2, 0x7
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x7
const/16 v2, 0x8
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x8
const/16 v2, 0x9
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x9
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
sput-object v0, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
return-void
.end method
look for this access
Code:
.method static synthetic access$000(Lcom/android/keyguard/KeyguardPINView;Z)V
and add the following two methods below that method
Code:
.method static synthetic access$100(Lcom/android/keyguard/KeyguardPINView;Ljava/lang/String;)V
.locals 0
.param p0, "x0" # Lcom/android/keyguard/KeyguardPINView;
.param p1, "x1" # Ljava/lang/String;
.prologue
.line 37
invoke-direct {p0, p1}, Lcom/android/keyguard/KeyguardPINView;->validateQuickUnlock(Ljava/lang/String;)V
return-void
.end method
Code:
.method private validateQuickUnlock(Ljava/lang/String;)V
.locals 3
.param p1, "password" # Ljava/lang/String;
.prologue
const/4 v2, 0x1
.line 198
if-eqz p1, :cond_0
.line 199
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x3
if-le v0, v1, :cond_0
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v0, p1}, Lcom/android/internal/widget/LockPatternUtils;->checkPassword(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_0
.line 201
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->reportUnlockAttempt(Z)V
.line 202
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->dismiss(Z)V
.line 203
invoke-virtual {p0, v2}, Lcom/android/keyguard/KeyguardPINView;->resetPasswordText(Z)V
.line 206
:cond_0
return-void
.end method
now look for this method
Code:
.method protected onFinishInflate()V
and replace the whole method with this one
Code:
.method protected onFinishInflate()V
.locals 12
.prologue
const/4 v9, 0x1
const/4 v10, 0x0
.line 77
invoke-super {p0}, Lcom/android/keyguard/KeyguardPinBasedInputView;->onFinishInflate()V
.line 78
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mKeyguardBouncerFrame:Landroid/view/ViewGroup;
.line 79
sget v8, Lcom/android/keyguard/R$id;->row0:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow0:Landroid/view/ViewGroup;
.line 80
sget v8, Lcom/android/keyguard/R$id;->row1:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow1:Landroid/view/ViewGroup;
.line 81
sget v8, Lcom/android/keyguard/R$id;->row2:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow2:Landroid/view/ViewGroup;
.line 82
sget v8, Lcom/android/keyguard/R$id;->row3:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow3:Landroid/view/ViewGroup;
.line 83
sget v8, Lcom/android/keyguard/R$id;->divider:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mDivider:Landroid/view/View;
.line 85
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_quick_unlock_control"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_1
move v4, v9
.line 88
.local v4, "quickUnlock":Z
:goto_0
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_scramble_pin_layout"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_2
move v5, v9
.line 91
.local v5, "scramblePin":Z
:goto_1
if-eqz v5, :cond_5
.line 92
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-static {v8}, Ljava/util/Collections;->shuffle(Ljava/util/List;)V
.line 94
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/LinearLayout;
.line 95
.local v0, "bouncer":Landroid/widget/LinearLayout;
new-instance v7, Ljava/util/ArrayList;
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
.line 96
.local v7, "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
const/4 v1, 0x0
.local v1, "i":I
:goto_2
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v1, v8, :cond_4
.line 97
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v8
instance-of v8, v8, Landroid/widget/LinearLayout;
if-eqz v8, :cond_3
.line 98
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/LinearLayout;
.line 99
.local v3, "nestedLayout":Landroid/widget/LinearLayout;
const/4 v2, 0x0
.local v2, "j":I
:goto_3
invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v2, v8, :cond_3
.line 100
invoke-virtual {v3, v2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v6
.line 101
.local v6, "view":Landroid/view/View;
invoke-virtual {v6}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v8
const-class v9, Lcom/android/keyguard/NumPadKey;
if-ne v8, v9, :cond_0
.line 102
check-cast v6, Lcom/android/keyguard/NumPadKey;
.end local v6 # "view":Landroid/view/View;
invoke-interface {v7, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 99
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_3
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v2 # "j":I
.end local v3 # "nestedLayout":Landroid/widget/LinearLayout;
.end local v4 # "quickUnlock":Z
.end local v5 # "scramblePin":Z
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_1
move v4, v10
.line 85
goto :goto_0
.restart local v4 # "quickUnlock":Z
:cond_2
move v5, v10
.line 88
goto :goto_1
.line 96
.restart local v0 # "bouncer":Landroid/widget/LinearLayout;
.restart local v1 # "i":I
.restart local v5 # "scramblePin":Z
.restart local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_3
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 109
:cond_4
const/4 v1, 0x0
:goto_4
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8}, Ljava/util/List;->size()I
move-result v8
if-ge v1, v8, :cond_5
.line 110
invoke-interface {v7, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/android/keyguard/NumPadKey;
.line 111
.local v6, "view":Lcom/android/keyguard/NumPadKey;
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v8
check-cast v8, Ljava/lang/Integer;
invoke-virtual {v8}, Ljava/lang/Integer;->intValue()I
move-result v8
invoke-virtual {v6, v8}, Lcom/android/keyguard/NumPadKey;->setDigit(I)V
.line 109
add-int/lit8 v1, v1, 0x1
goto :goto_4
.line 115
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v6 # "view":Lcom/android/keyguard/NumPadKey;
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_5
if-eqz v4, :cond_6
.line 116
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
new-instance v9, Lcom/android/keyguard/KeyguardPINView$2;
invoke-direct {v9, p0}, Lcom/android/keyguard/KeyguardPINView$2;-><init>(Lcom/android/keyguard/KeyguardPINView;)V
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.line 124
:goto_5
return-void
.line 122
:cond_6
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
const/4 v9, 0x0
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
goto :goto_5
.end method
Thats all we need to do for the modifications all that is left now is add the following keys to custom settings to toggle them on and off
Code:
<CheckBoxPreference android:title="Quick Unlock" android:key="lockscreen_quick_unlock_control" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<CheckBoxPreference android:title="Pin Pad Scramble" android:key="lockscreen_scramble_pin_layout" android:summaryOn="Enabled" android:summaryOff="Disabled" />
Thats it.
If you use this in your rom please give credits.
An example of what scramble pad is, is attached to this post
Thanks for sharing this with us bro. Nice work
Works great.
Thank you again for the guide!
Create a diff instead please... The guide above isn't applicable on BOD3. Lots of the code above don't have any matches and have some slight reiterations.
thank you for the awsome guide but I have this problem.
Code:
..\3-Out\SystemUI.apk\smali\com\android\keyguard\PasswordTextView.smali[10,2] no viable alternative at input 'Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;'
nambavuong said:
thank you for the awsome guide but I have this problem.
Code:
..\3-Out\SystemUI.apk\smali\com\android\keyguard\PasswordTextView.smali[10,2] no viable alternative at input 'Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;'
Click to expand...
Click to collapse
try to add the comma after the last memberclasses
from this
Code:
Lcom/android/keyguard/PasswordTextView$CharState;
to this
Code:
Lcom/android/keyguard/PasswordTextView$CharState;,
then add
Code:
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
so the final code is
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/keyguard/PasswordTextView$1;,
Lcom/android/keyguard/PasswordTextView$CharState;[COLOR="Red"],
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener; [/COLOR]
}
.end annotation
txr33 said:
This is a how to add quick pin unlock and scramble pad to lollipop. It has been tested and working on s5, s6, note 3 and possibly note 4.
This is a guide for people to add it themselves, not for people to upload their files and expect it done for them. It does require the ability to decompile and compile apks and is done with making a toggle for it in custom settings which can be found in this great thread here so it can be toggled on or off depending on what people want to use.
For this mod we will be modifying SystemUI from system/priv-app. It requires 3 files to be modified and 2 to be added which are attached to this post.
Download and extract the attached zip and place the two smali files into
Code:
com/android/keyguard/
in the same folder com/android/keyguard/ look for these 3 files which we will need to modify for this.
KeyguardPINView.smali
PasswordTextView.smali
NumPadKey.smali
Lets start with NumPadKey.smali
look for this method which should be near the top
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
and look for the following section of code in that method
Code:
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
above the iget we will add this line
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
so it should look something like this
Code:
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
iget-object v5, p0, Lcom/android/keyguard/NumPadKey;->mContext:Landroid/content/Context;
sget v6, Lcom/android/keyguard/R$drawable;->lock_ripple_drawable:I
invoke-virtual {v5, v6}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;
Now look for the following line
Code:
# virtual methods
and add this whole method above it
Code:
.method private updateText()V
.locals 4
.prologue
.line 122
iget v2, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-ltz v2, :cond_1
.line 123
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mDigitText:Landroid/widget/TextView;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 124
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-nez v2, :cond_0
.line 125
invoke-virtual {p0}, Lcom/android/keyguard/NumPadKey;->getResources()Landroid/content/res/Resources;
move-result-object v2
sget v3, Lcom/android/keyguard/R$array;->lockscreen_num_pad_klondike:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v2
sput-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
.line 127
:cond_0
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
if-eqz v2, :cond_1
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
array-length v2, v2
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
if-le v2, v3, :cond_1
.line 128
sget-object v2, Lcom/android/keyguard/NumPadKey;->sKlondike:[Ljava/lang/String;
iget v3, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
aget-object v0, v2, v3
.line 129
.local v0, "klondike":Ljava/lang/String;
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
.line 130
.local v1, "len":I
if-lez v1, :cond_2
.line 131
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 137
.end local v0 # "klondike":Ljava/lang/String;
.end local v1 # "len":I
:cond_1
:goto_0
return-void
.line 133
.restart local v0 # "klondike":Ljava/lang/String;
.restart local v1 # "len":I
:cond_2
iget-object v2, p0, Lcom/android/keyguard/NumPadKey;->mKlondikeText:Landroid/widget/TextView;
const/4 v3, 0x4
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V
goto :goto_0
.end method
Now anywhere under the virtual method line add the following whole method. It can be right at the end of the smali if want, thats where I usually add it
Code:
.method public setDigit(I)V
.locals 0
.param p1, "digit" # I
.prologue
.line 117
iput p1, p0, Lcom/android/keyguard/NumPadKey;->mDigit:I
.line 118
invoke-direct {p0}, Lcom/android/keyguard/NumPadKey;->updateText()V
.line 119
return-void
.end method
That it for that smali and move onto the next
so now we will modify PasswordTextView.smali.
at the start of this file you will see
Code:
# annotations
To this annotation
Code:
.annotation system Ldalvik/annotation/MemberClasses;
we will add the following
Code:
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
so it will look like this for example. Note some devices may have more values there, do not remove and values just ass the quick unlock listener value
Code:
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/keyguard/PasswordTextView$CharState;,
Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
}
.end annotation
now also up the top look for
Code:
# instance fields
and add the following field below that
Code:
.field protected mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
now find the following method
Code:
.method public append(C)V
and in it look for the following section of code
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
.line 296
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
and add this below it
Code:
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
.line 215
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
so it looks like this for example
Code:
:cond_1
invoke-direct {p0}, Lcom/android/keyguard/PasswordTextView;->userActivity()V
const-wide/16 v4, 0x0
invoke-direct {p0, v4, v5}, Lcom/android/keyguard/PasswordTextView;->showAndHideHint(J)V
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
if-eqz v4, :cond_next
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
iget-object v5, p0, Lcom/android/keyguard/PasswordTextView;->mText:Ljava/lang/String;
invoke-interface {v4, v5}, Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;->onValidateQuickUnlock(Ljava/lang/String;)V
:cond_next
return-void
goto :goto_0
.end local v0 # "charState":Lcom/android/keyguard/PasswordTextView$CharState;
:cond_2
iget-object v4, p0, Lcom/android/keyguard/PasswordTextView;->mTextChars:Ljava/util/ArrayList;
add-int/lit8 v5, v1, -0x1
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
then at the end of the smali add this whole method
Code:
.method public setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.locals 0
.param p1, "listener" # Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.prologue
.line 101
iput-object p1, p0, Lcom/android/keyguard/PasswordTextView;->mQuickUnlockListener:Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;
.line 102
return-void
.end method
Now we move on to the final smali KeyguardPINView.smali
look for this at the top
Code:
# static fields
and add the following field
Code:
.field private static sNumbers:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
also under this line
Code:
# instance fields
you may need to add the following line if it is not present already. It already exists on s5 and note 3 but needs to be added for s6. So if it is not there then add it
Code:
.field private mDivider:Landroid/view/View;
now look for
Code:
# direct methods
which should be not far from the above added lines and add the following constructor method
Code:
.method static constructor <clinit>()V
.locals 7
.prologue
const/4 v6, 0x4
const/4 v5, 0x3
const/4 v4, 0x2
const/4 v2, 0x1
const/4 v3, 0x0
.line 48
const/16 v0, 0xa
new-array v0, v0, [Ljava/lang/Integer;
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v3
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v2
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v4
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v5
const/4 v1, 0x5
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v6
const/4 v1, 0x5
const/4 v2, 0x6
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x6
const/4 v2, 0x7
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x7
const/16 v2, 0x8
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x8
const/16 v2, 0x9
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/16 v1, 0x9
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
sput-object v0, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
return-void
.end method
look for this access
Code:
.method static synthetic access$000(Lcom/android/keyguard/KeyguardPINView;Z)V
and add the following two methods below that method
Code:
.method static synthetic access$100(Lcom/android/keyguard/KeyguardPINView;Ljava/lang/String;)V
.locals 0
.param p0, "x0" # Lcom/android/keyguard/KeyguardPINView;
.param p1, "x1" # Ljava/lang/String;
.prologue
.line 37
invoke-direct {p0, p1}, Lcom/android/keyguard/KeyguardPINView;->validateQuickUnlock(Ljava/lang/String;)V
return-void
.end method
Code:
.method private validateQuickUnlock(Ljava/lang/String;)V
.locals 3
.param p1, "password" # Ljava/lang/String;
.prologue
const/4 v2, 0x1
.line 198
if-eqz p1, :cond_0
.line 199
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x3
if-le v0, v1, :cond_0
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
invoke-virtual {v0, p1}, Lcom/android/internal/widget/LockPatternUtils;->checkPassword(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_0
.line 201
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->reportUnlockAttempt(Z)V
.line 202
iget-object v0, p0, Lcom/android/keyguard/KeyguardPINView;->mCallback:Lcom/android/keyguard/KeyguardSecurityCallback;
invoke-interface {v0, v2}, Lcom/android/keyguard/KeyguardSecurityCallback;->dismiss(Z)V
.line 203
invoke-virtual {p0, v2}, Lcom/android/keyguard/KeyguardPINView;->resetPasswordText(Z)V
.line 206
:cond_0
return-void
.end method
now look for this method
Code:
.method protected onFinishInflate()V
and replace the whole method with this one
Code:
.method protected onFinishInflate()V
.locals 12
.prologue
const/4 v9, 0x1
const/4 v10, 0x0
.line 77
invoke-super {p0}, Lcom/android/keyguard/KeyguardPinBasedInputView;->onFinishInflate()V
.line 78
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mKeyguardBouncerFrame:Landroid/view/ViewGroup;
.line 79
sget v8, Lcom/android/keyguard/R$id;->row0:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow0:Landroid/view/ViewGroup;
.line 80
sget v8, Lcom/android/keyguard/R$id;->row1:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow1:Landroid/view/ViewGroup;
.line 81
sget v8, Lcom/android/keyguard/R$id;->row2:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow2:Landroid/view/ViewGroup;
.line 82
sget v8, Lcom/android/keyguard/R$id;->row3:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
check-cast v8, Landroid/view/ViewGroup;
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mRow3:Landroid/view/ViewGroup;
.line 83
sget v8, Lcom/android/keyguard/R$id;->divider:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v8
iput-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mDivider:Landroid/view/View;
.line 85
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_quick_unlock_control"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_1
move v4, v9
.line 88
.local v4, "quickUnlock":Z
:goto_0
invoke-virtual {p0}, Lcom/android/keyguard/KeyguardPINView;->getContext()Landroid/content/Context;
move-result-object v8
invoke-virtual {v8}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
const-string v11, "lockscreen_scramble_pin_layout"
invoke-static {v8, v11, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v8
if-ne v8, v9, :cond_2
move v5, v9
.line 91
.local v5, "scramblePin":Z
:goto_1
if-eqz v5, :cond_5
.line 92
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-static {v8}, Ljava/util/Collections;->shuffle(Ljava/util/List;)V
.line 94
sget v8, Lcom/android/keyguard/R$id;->keyguard_bouncer_frame:I
invoke-virtual {p0, v8}, Lcom/android/keyguard/KeyguardPINView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/LinearLayout;
.line 95
.local v0, "bouncer":Landroid/widget/LinearLayout;
new-instance v7, Ljava/util/ArrayList;
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
.line 96
.local v7, "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
const/4 v1, 0x0
.local v1, "i":I
:goto_2
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v1, v8, :cond_4
.line 97
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v8
instance-of v8, v8, Landroid/widget/LinearLayout;
if-eqz v8, :cond_3
.line 98
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v3
check-cast v3, Landroid/widget/LinearLayout;
.line 99
.local v3, "nestedLayout":Landroid/widget/LinearLayout;
const/4 v2, 0x0
.local v2, "j":I
:goto_3
invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v8
if-ge v2, v8, :cond_3
.line 100
invoke-virtual {v3, v2}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v6
.line 101
.local v6, "view":Landroid/view/View;
invoke-virtual {v6}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v8
const-class v9, Lcom/android/keyguard/NumPadKey;
if-ne v8, v9, :cond_0
.line 102
check-cast v6, Lcom/android/keyguard/NumPadKey;
.end local v6 # "view":Landroid/view/View;
invoke-interface {v7, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 99
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_3
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v2 # "j":I
.end local v3 # "nestedLayout":Landroid/widget/LinearLayout;
.end local v4 # "quickUnlock":Z
.end local v5 # "scramblePin":Z
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_1
move v4, v10
.line 85
goto :goto_0
.restart local v4 # "quickUnlock":Z
:cond_2
move v5, v10
.line 88
goto :goto_1
.line 96
.restart local v0 # "bouncer":Landroid/widget/LinearLayout;
.restart local v1 # "i":I
.restart local v5 # "scramblePin":Z
.restart local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_3
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 109
:cond_4
const/4 v1, 0x0
:goto_4
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8}, Ljava/util/List;->size()I
move-result v8
if-ge v1, v8, :cond_5
.line 110
invoke-interface {v7, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/android/keyguard/NumPadKey;
.line 111
.local v6, "view":Lcom/android/keyguard/NumPadKey;
sget-object v8, Lcom/android/keyguard/KeyguardPINView;->sNumbers:Ljava/util/List;
invoke-interface {v8, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v8
check-cast v8, Ljava/lang/Integer;
invoke-virtual {v8}, Ljava/lang/Integer;->intValue()I
move-result v8
invoke-virtual {v6, v8}, Lcom/android/keyguard/NumPadKey;->setDigit(I)V
.line 109
add-int/lit8 v1, v1, 0x1
goto :goto_4
.line 115
.end local v0 # "bouncer":Landroid/widget/LinearLayout;
.end local v1 # "i":I
.end local v6 # "view":Lcom/android/keyguard/NumPadKey;
.end local v7 # "views":Ljava/util/List;, "Ljava/util/List<Lcom/android/keyguard/NumPadKey;>;"
:cond_5
if-eqz v4, :cond_6
.line 116
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
new-instance v9, Lcom/android/keyguard/KeyguardPINView$2;
invoke-direct {v9, p0}, Lcom/android/keyguard/KeyguardPINView$2;-><init>(Lcom/android/keyguard/KeyguardPINView;)V
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
.line 124
:goto_5
return-void
.line 122
:cond_6
iget-object v8, p0, Lcom/android/keyguard/KeyguardPINView;->mPasswordEntry:Lcom/android/keyguard/PasswordTextView;
const/4 v9, 0x0
invoke-virtual {v8, v9}, Lcom/android/keyguard/PasswordTextView;->setQuickUnlockListener(Lcom/android/keyguard/PasswordTextView$QuickUnlockListener;)V
goto :goto_5
.end method
Thats all we need to do for the modifications all that is left now is add the following keys to custom settings to toggle them on and off
Code:
<CheckBoxPreference android:title="Quick Unlock" android:key="lockscreen_quick_unlock_control" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<CheckBoxPreference android:title="Pin Pad Scramble" android:key="lockscreen_scramble_pin_layout" android:summaryOn="Enabled" android:summaryOff="Disabled" />
Thats it.
If you use this in your rom please give credits.
An example of what scramble pad is, is attached to this post
Click to expand...
Click to collapse
Will this xposed with work on Samsung Infuser?
Riyal said:
Create a diff instead please... The guide above isn't applicable on BOD3. Lots of the code above don't have any matches and have some slight reiterations.
Click to expand...
Click to collapse
Nope
Cowboy from Hell on a twisted trail.
Koffed From my Big Ass Outlaw Phone.
Bubbajoe40356 said:
Will this xposed with work on Samsung Infuser?
Nope
Cowboy from Hell on a twisted trail.
Koffed From my Big Ass Outlaw Phone.
Click to expand...
Click to collapse
1. Dont quote O.P
2. Gravity also supported.
3. Pls dont talk xposed in this guide. Thank you!
Sent from my SM-G9250
nambavuong said:
1. Dont quote O.P
2. Gravity also supported.
3. Pls dont talk xposed in this guide. Thank you!
Sent from my SM-G9250
Click to expand...
Click to collapse
1 . It's a team thing. You worry about you and I'll take care of Bubba.
2. Who cares.
3. See #1 and have a lovely day. When you get your police badge ... come pull me over.
Cowboy from Hell on a twisted trail.
Koffed From my Big Ass Outlaw Phone.
Thanks for sharing, working great on N3.
I have not tried it yet but from the pictures i can see that if a key with number and letters is in the first position it loses the letters
it's normal?
remuntada78 said:
I have not tried it yet but from the pictures i can see that if a key with number and letters is in the first position it loses the letters
it's normal?
Click to expand...
Click to collapse
Are you talking about "Scramble Pad", that can be enabled/disabled. I guess it for higher security level.
kmokhtar79 said:
Are you talking about "Scramble Pad", that can be enabled/disabled. I guess it for higher security level.
Click to expand...
Click to collapse
Yes talking about it, ok
Inviato dal mio SM-G900F utilizzando Tapatalk
@Bubbajoe40356
Seriously, you just quoted the entire first post only to type one line underneath. This added a lot of unnecessary scrolling and it is very annoying.
corncobman said:
@Bubbajoe40356
Seriously, you just quoted the entire first post only to type one line underneath. This added a lot of unnecessary scrolling and it is very annoying.
Click to expand...
Click to collapse
I dont find it annoying but complaining about it is unnecessary
txr33 said:
Thats all we need to do for the modifications all that is left now is add the following keys to custom settings to toggle them on and off
Code:
<CheckBoxPreference android:title="Quick Unlock" android:key="lockscreen_quick_unlock_control" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<CheckBoxPreference android:title="Pin Pad Scramble" android:key="lockscreen_scramble_pin_layout" android:summaryOn="Enabled" android:summaryOff="Disabled" />
Click to expand...
Click to collapse
Who help me add this segment to where ?
huaminhquan93 said:
Who help me add this segment to where ?
Click to expand...
Click to collapse
add to xml/pref of your custom setting.apk
nambavuong said:
add to xml/pref of your custom setting.apk
Click to expand...
Click to collapse
xml/pref name ?
you need to have a custom settings app to enable/disable this mod, you can find the custom settings apk in the op of the link posted in this op. once you have the custom settings apk you need to decompile it and go to res/xml/preferences.xml and thats where those 2 lines will be added
JoHnNYBlaZE716 said:
you need to have a custom settings app to enable/disable this mod, you can find the custom settings apk in the op of the link posted in this op. once you have the custom settings apk you need to decompile it and go to res/xml/preferences.xml and thats where those 2 lines will be added
Click to expand...
Click to collapse
no link for custom setting apk in the OP

[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