Related
Hello Guys!
Actually you know, the Stock Mms.apk recognizes only Smiley like :-( etc.
and not the "short" version etc..
So i tried to modify the Mms.apk to parse the other chars too but i don't know where to change them.
So can someone help me, or modify the Mms.apk file?
SmileyParser$Smileys.smali
Code:
.class Lcom/android/mms/util/SmileyParser$Smileys;
.super Ljava/lang/Object;
.source "SmileyParser.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/mms/util/SmileyParser;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "Smileys"
.end annotation
# static fields
.field public static ANGEL:I
.field public static COOL:I
.field public static CRYING:I
.field public static EMBARRASSED:I
.field public static FOOT_IN_MOUTH:I
.field public static HAPPY:I
.field public static KISSING:I
.field public static LAUGHING:I
.field public static LIPS_ARE_SEALED:I
.field public static MONEY_MOUTH:I
.field public static SAD:I
.field public static SURPRISED:I
.field public static TONGUE_STICKING_OUT:I
.field public static UNDECIDED:I
.field public static WINKING:I
.field public static WTF:I
.field public static YELLING:I
.field private static final sIconIds:[I
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 56
const/16 v0, 0x11
new-array v0, v0, [I
fill-array-data v0, :array_46
sput-object v0, Lcom/android/mms/util/SmileyParser$Smileys;->sIconIds:[I
.line 76
const/4 v0, 0x0
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->HAPPY:I
.line 77
const/4 v0, 0x1
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->SAD:I
.line 78
const/4 v0, 0x2
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->WINKING:I
.line 79
const/4 v0, 0x3
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->TONGUE_STICKING_OUT:I
.line 80
const/4 v0, 0x4
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->SURPRISED:I
.line 81
const/4 v0, 0x5
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->KISSING:I
.line 82
const/4 v0, 0x6
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->YELLING:I
.line 83
const/4 v0, 0x7
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->COOL:I
.line 84
const/16 v0, 0x8
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->MONEY_MOUTH:I
.line 85
const/16 v0, 0x9
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->FOOT_IN_MOUTH:I
.line 86
const/16 v0, 0xa
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->EMBARRASSED:I
.line 87
const/16 v0, 0xb
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->ANGEL:I
.line 88
const/16 v0, 0xc
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->UNDECIDED:I
.line 89
const/16 v0, 0xd
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->CRYING:I
.line 90
const/16 v0, 0xe
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->LIPS_ARE_SEALED:I
.line 91
const/16 v0, 0xf
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->LAUGHING:I
.line 92
const/16 v0, 0x10
sput v0, Lcom/android/mms/util/SmileyParser$Smileys;->WTF:I
return-void
.line 56
:array_46
.array-data 0x4
0x13t 0x0t 0x2t 0x7ft
0x18t 0x0t 0x2t 0x7ft
0x1ct 0x0t 0x2t 0x7ft
0x1at 0x0t 0x2t 0x7ft
0x19t 0x0t 0x2t 0x7ft
0x14t 0x0t 0x2t 0x7ft
0x1et 0x0t 0x2t 0x7ft
0xft 0x0t 0x2t 0x7ft
0x17t 0x0t 0x2t 0x7ft
0x12t 0x0t 0x2t 0x7ft
0x11t 0x0t 0x2t 0x7ft
0xet 0x0t 0x2t 0x7ft
0x1bt 0x0t 0x2t 0x7ft
0x10t 0x0t 0x2t 0x7ft
0x16t 0x0t 0x2t 0x7ft
0x15t 0x0t 0x2t 0x7ft
0x1dt 0x0t 0x2t 0x7ft
.end array-data
.end method
.method constructor <init>()V
.registers 1
.prologue
.line 55
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getSmileyResource(I)I
.registers 2
.parameter "which"
.prologue
.line 95
sget-object v0, Lcom/android/mms/util/SmileyParser$Smileys;->sIconIds:[I
aget v0, v0, p0
return v0
.end method
SmileyParser.smali
Code:
.class public Lcom/android/mms/util/SmileyParser;
.super Ljava/lang/Object;
.source "SmileyParser.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/mms/util/SmileyParser$Smileys;
}
.end annotation
# static fields
.field public static final DEFAULT_SMILEY_NAMES:I = 0x7f060001
.field public static final DEFAULT_SMILEY_RES_IDS:[I = null
.field public static final DEFAULT_SMILEY_TEXTS:I = 0x7f060000
.field private static sInstance:Lcom/android/mms/util/SmileyParser;
# instance fields
.field private final mContext:Landroid/content/Context;
.field private final mPattern:Ljava/util/regex/Pattern;
.field private final mSmileyTexts:[Ljava/lang/String;
.field private final mSmileyToRes:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap",
"<",
"Ljava/lang/String;",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 3
.prologue
.line 101
const/16 v0, 0x11
new-array v0, v0, [I
const/4 v1, 0x0
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->HAPPY:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/4 v1, 0x1
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->SAD:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/4 v1, 0x2
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->WINKING:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/4 v1, 0x3
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->TONGUE_STICKING_OUT:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/4 v1, 0x4
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->SURPRISED:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/4 v1, 0x5
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->KISSING:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/4 v1, 0x6
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->YELLING:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/4 v1, 0x7
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->COOL:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0x8
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->MONEY_MOUTH:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0x9
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->FOOT_IN_MOUTH:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0xa
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->EMBARRASSED:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0xb
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->ANGEL:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0xc
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->UNDECIDED:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0xd
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->CRYING:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0xe
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->LIPS_ARE_SEALED:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0xf
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->LAUGHING:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
const/16 v1, 0x10
sget v2, Lcom/android/mms/util/SmileyParser$Smileys;->WTF:I
invoke-static {v2}, Lcom/android/mms/util/SmileyParser$Smileys;->getSmileyResource(I)I
move-result v2
aput v2, v0, v1
sput-object v0, Lcom/android/mms/util/SmileyParser;->DEFAULT_SMILEY_RES_IDS:[I
return-void
.end method
.method private constructor <init>(Landroid/content/Context;)V
.registers 4
.parameter "context"
.prologue
.line 48
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 49
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v0
iput-object v0, p0, Lcom/android/mms/util/SmileyParser;->mContext:Landroid/content/Context;
.line 50
iget-object v0, p0, Lcom/android/mms/util/SmileyParser;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const/high16 v1, 0x7f06
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/android/mms/util/SmileyParser;->mSmileyTexts:[Ljava/lang/String;
.line 51
invoke-direct {p0}, Lcom/android/mms/util/SmileyParser;->buildSmileyToRes()Ljava/util/HashMap;
move-result-object v0
iput-object v0, p0, Lcom/android/mms/util/SmileyParser;->mSmileyToRes:Ljava/util/HashMap;
.line 52
invoke-direct {p0}, Lcom/android/mms/util/SmileyParser;->buildPattern()Ljava/util/regex/Pattern;
move-result-object v0
iput-object v0, p0, Lcom/android/mms/util/SmileyParser;->mPattern:Ljava/util/regex/Pattern;
.line 53
return-void
.end method
.method private buildPattern()Ljava/util/regex/Pattern;
.registers 9
.prologue
.line 150
new-instance v3, Ljava/lang/StringBuilder;
iget-object v5, p0, Lcom/android/mms/util/SmileyParser;->mSmileyTexts:[Ljava/lang/String;
array-length v5, v5
mul-int/lit8 v5, v5, 0x3
invoke-direct {v3, v5}, Ljava/lang/StringBuilder;-><init>(I)V
.line 154
.local v3, patternString:Ljava/lang/StringBuilder;
const/16 v5, 0x28
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
.line 155
iget-object v0, p0, Lcom/android/mms/util/SmileyParser;->mSmileyTexts:[Ljava/lang/String;
.local v0, arr$:[Ljava/lang/String;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_13
if-ge v1, v2, :cond_26
aget-object v4, v0, v1
.line 156
.local v4, s:Ljava/lang/String;
invoke-static {v4}, Ljava/util/regex/Pattern;->quote(Ljava/lang/String;)Ljava/lang/String;
move-result-object v5
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 157
const/16 v5, 0x7c
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
.line 155
add-int/lit8 v1, v1, 0x1
goto :goto_13
.line 160
.end local v4 #s:Ljava/lang/String;
:cond_26
invoke-virtual {v3}, Ljava/lang/StringBuilder;->length()I
move-result v5
const/4 v6, 0x1
sub-int/2addr v5, v6
invoke-virtual {v3}, Ljava/lang/StringBuilder;->length()I
move-result v6
const-string v7, ")"
invoke-virtual {v3, v5, v6, v7}, Ljava/lang/StringBuilder;->replace(IILjava/lang/String;)Ljava/lang/StringBuilder;
.line 162
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v5}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
move-result-object v5
return-object v5
.end method
.method private buildSmileyToRes()Ljava/util/HashMap;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/HashMap",
"<",
"Ljava/lang/String;",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.prologue
.line 129
sget-object v2, Lcom/android/mms/util/SmileyParser;->DEFAULT_SMILEY_RES_IDS:[I
array-length v2, v2
iget-object v3, p0, Lcom/android/mms/util/SmileyParser;->mSmileyTexts:[Ljava/lang/String;
array-length v3, v3
if-eq v2, v3, :cond_10
.line 132
new-instance v2, Ljava/lang/IllegalStateException;
const-string v3, "Smiley resource ID/text mismatch"
invoke-direct {v2, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v2
.line 135
:cond_10
new-instance v1, Ljava/util/HashMap;
iget-object v2, p0, Lcom/android/mms/util/SmileyParser;->mSmileyTexts:[Ljava/lang/String;
array-length v2, v2
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(I)V
.line 137
.local v1, smileyToRes:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Integer;>;"
const/4 v0, 0x0
.local v0, i:I
:goto_19
iget-object v2, p0, Lcom/android/mms/util/SmileyParser;->mSmileyTexts:[Ljava/lang/String;
array-length v2, v2
if-ge v0, v2, :cond_30
.line 138
iget-object v2, p0, Lcom/android/mms/util/SmileyParser;->mSmileyTexts:[Ljava/lang/String;
aget-object v2, v2, v0
sget-object v3, Lcom/android/mms/util/SmileyParser;->DEFAULT_SMILEY_RES_IDS:[I
aget v3, v3, v0
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
invoke-virtual {v1, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 137
add-int/lit8 v0, v0, 0x1
goto :goto_19
.line 141
:cond_30
return-object v1
.end method
.method public static getInstance()Lcom/android/mms/util/SmileyParser;
.registers 1
.prologue
.line 38
sget-object v0, Lcom/android/mms/util/SmileyParser;->sInstance:Lcom/android/mms/util/SmileyParser;
return-object v0
.end method
.method public static init(Landroid/content/Context;)V
.registers 2
.parameter "context"
.prologue
.line 40
new-instance v0, Lcom/android/mms/util/SmileyParser;
invoke-direct {v0, p0}, Lcom/android/mms/util/SmileyParser;-><init>(Landroid/content/Context;)V
sput-object v0, Lcom/android/mms/util/SmileyParser;->sInstance:Lcom/android/mms/util/SmileyParser;
.line 41
return-void
.end method
# virtual methods
.method public addSmileySpans(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
.registers 13
.parameter "text"
.prologue
const/16 v10, 0x29
const/4 v9, 0x1
.line 175
new-instance v0, Landroid/text/SpannableStringBuilder;
invoke-direct {v0, p1}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V
.line 176
.local v0, builder:Landroid/text/SpannableStringBuilder;
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v5
.line 178
.local v5, textLength:I
iget-object v6, p0, Lcom/android/mms/util/SmileyParser;->mPattern:Ljava/util/regex/Pattern;
invoke-virtual {v6, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v2
.line 179
.local v2, matcher:Ljava/util/regex/Matcher;
:cond_12
:goto_12
invoke-virtual {v2}, Ljava/util/regex/Matcher;->find()Z
move-result v6
if-eqz v6, :cond_79
.line 180
invoke-virtual {v2}, Ljava/util/regex/Matcher;->group()Ljava/lang/String;
move-result-object v4
.line 181
.local v4, smileyText:Ljava/lang/CharSequence;
invoke-virtual {v2}, Ljava/util/regex/Matcher;->end()I
move-result v1
.line 183
.local v1, end:I
const-string v6, ":-)"
invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_36
.line 184
sub-int v6, v5, v9
if-gt v1, v6, :cond_36
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v6
invoke-virtual {v6, v1}, Ljava/lang/String;->charAt(I)C
move-result v6
if-eq v6, v10, :cond_12
.line 187
:cond_36
const-string v6, ":-("
invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_58
.line 188
sub-int v6, v5, v9
if-gt v1, v6, :cond_58
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v6
invoke-virtual {v6, v1}, Ljava/lang/String;->charAt(I)C
move-result v6
if-eq v6, v10, :cond_12
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v6
invoke-virtual {v6, v1}, Ljava/lang/String;->charAt(I)C
move-result v6
const/16 v7, 0x28
if-eq v6, v7, :cond_12
.line 192
:cond_58
iget-object v6, p0, Lcom/android/mms/util/SmileyParser;->mSmileyToRes:Ljava/util/HashMap;
invoke-virtual {v2}, Ljava/util/regex/Matcher;->group()Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v6
check-cast v6, Ljava/lang/Integer;
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v3
.line 193
.local v3, resId:I
new-instance v6, Landroid/text/style/ImageSpan;
iget-object v7, p0, Lcom/android/mms/util/SmileyParser;->mContext:Landroid/content/Context;
invoke-direct {v6, v7, v3}, Landroid/text/style/ImageSpan;-><init>(Landroid/content/Context;I)V
invoke-virtual {v2}, Ljava/util/regex/Matcher;->start()I
move-result v7
const/16 v8, 0x21
invoke-virtual {v0, v6, v7, v1, v8}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V
goto :goto_12
.line 198
.end local v1 #end:I
.end local v3 #resId:I
.end local v4 #smileyText:Ljava/lang/CharSequence;
:cond_79
return-object v0
.end method
i hope, someone can help me.
APK File attached!
Kind regards.
I know this is an old post but just sharing some knowledge if you modify the text in mms.apk/res/values/arrays.xml you can remove the nose as well as change the smiley completely for example ":A" lol
A little OFF-TOPIC
Where can I find the "APN settings" for mobile_connection as well as for MMS?
I wish to change the APN settings for my service provider. They are at present wron in the current Custom ROM I am using.
1.MMS mod
2.Add 2G/3G toggle
3.CRT Animation toggle
4.Improve Sweep to Remove Notification
5.Long Press Volume Button to skip Song
6.Hack FM Radio
7.Make Option for Date style on Status Bar
8.Mod TouchWiz 3
Touchwiz 3 modded for example
Add MMS skin chooser
Need: stock Mms.apk + APKMulti tools + Notepad plus
Step:
1-decompile Mms.apk
2-go to ../res/xml/
open mms_config.xml
change the number to what ever you want.
2.1 Change limit contact to send
Code:
<int name="recipientLimit">10</int>
2.2 CHange limit of converting to MMS
Code:
<int name="smsToMmsTextThreshold">4</int>
3.Enable skin chooser
go to ../res/xml/
open preferences.xml
add this after the 3rd line
Code:
<ListPreference android:entries="@array/pref_entries_message_skin" android:title="@string/pref_title_message_skin" android:key="pref_key_message_skin" android:defaultValue="Default" android:dialogTitle="@string/pref_dialog_title_message_skin" android:entryValues="@array/pref_entry_values_message_skin" />
go to ../smali/com/android/mms/ui/
Open MessagingPreferenceActivity.smali
Find this
Code:
.method public static getMessageSkin(Landroid/content/Context;)I
.registers 2
.parameter "context"
.prologue
.line 631
const/4 v0, 0x0
return v0
.end method
change to this
Code:
.method public static getMessageSkin(Landroid/content/Context;)I
.locals 6
.parameter "context"
.prologue
.line 631
const/4 v4, 0x0
const-string v5, "Default"
.line 578
invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
move-result-object v0
.line 579
.local v0, pref:Landroid/content/SharedPreferences;
const-string v2, "pref_key_message_skin"
const-string v3, "Default"
invoke-interface {v0, v2, v5}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 580
.local v1, skinType:Ljava/lang/String;
const-string v2, "Default"
invoke-virtual {v5, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
move v2, v4
.line 591
:goto_0
return v2
.line 582
:cond_0
const-string v2, "Edge"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_1
.line 583
const/4 v2, 0x1
goto :goto_0
.line 584
:cond_1
const-string v2, "Gloss"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2
.line 585
const/4 v2, 0x2
goto :goto_0
.line 586
:cond_2
const-string v2, "Sticker note"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
.line 587
const/4 v2, 0x3
goto :goto_0
.line 588
:cond_3
const-string v2, "Memo"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_4
.line 589
const/4 v2, 0x4
goto :goto_0
:cond_4
move v2, v4
.line 591
goto :goto_0
.end method
Recompile your Mms.apk
Here Mms.apk( base on DXKT3 but all stock deodexed rom can use) i made with limit sending contact is 500, convert to MMS at 500 of course with skin enable.
End tut. Thank you for watching boring show
Add 2G/3G toggle to lidroid toggle bar
First go here and mod your Phone.apk
http://forum.xda-developers.com/showthread.php?t=1731187
At 2. Register the Receiver at runtime through Phone Application smali file
there are 2 options
1- for resigned rom
2- for stock
If your rom is resigned just open Androidmanifest.xml and add
Code:
<receiver android:name="NetworkModeReceiver">
<intent-filter>
<action android:name="com.android.phone.CHANGE_NETWORK_MODE" />
<action android:name="com.android.phone.NEW_NETWORK_MODE" />
</intent-filter>
</receiver>
If not just continue the guide above.
Dont recompile it. You can do some other modification.
Open /res/values/bools.xml and modify what you need.
Code:
<resources>
<bool name="ignore_sim_network_locked_events">false</bool>
<bool name="ignore_perso_locked_events">false</bool>
<bool name="sim_network_unlock_allow_dismiss">true</bool>
<bool name="icc_perso_unlock_allow_dismiss">true</bool>
<bool name="allow_incoming_call_touch_ui">true</bool>
<bool name="allow_in_call_touch_ui">true</bool>
The funniest thing
[COLOR="Red"]<bool name="world_phone">true</bool>[/COLOR]
<bool name="config_enable_dialer_key_vibration">true</bool>
<bool name="tty_enabled">true</bool>
<bool name="hac_enabled">true</bool>
<bool name="dtmf_type_enabled">true</bool>
<bool name="auto_retry_enabled">false</bool>
<bool name="allow_local_dtmf_tones">true</bool>
<bool name="allow_back_key_to_reject_incoming_call">true</bool>
<bool name="config_show_onscreen_dial_button">true</bool>
<bool name="send_mic_mute_to_AudioManager">true</bool>
<bool name="has_in_call_noise_suppression">true</bool>
<bool name="allow_menu_proximity_sensor">true</bool>
</resources>
Recompile Phone.apk
Prepare resource for Network Mode toggle. Decomile lidroid-res.pak
Add 3 images to lidroid-res( for 2G only,3G only and 2G&3G)
Depend on your image size you can put it in drawable-hdpi,mdpi,ldpi...
90x90 put in hdpi, 60x60 put in mdpi, 45x45 put in ldpi
Recompile lidroid-res.apk
Decompile lidroid-res.apk and take ID of 3 image above from public.xml
Next step for rom has 15 toggle bar
Decompile SystemUI.apk
Download quickpanel.rar
Extract to SystemUI.apk/smali/com/lidroid/systemui/quickpanel/
Open NetworkModebutton.smali, change all my resource ID to your
0x30b003f : Text display under toggle. If you use original lidroid-res. It doesnt change
0x3020102 : 2G&3G image ID
0x3020101 : 2G image ID
0x3020103 : 3G image ID
Recompile SystemUI.apk
Download modified QuickpanelSettings.apk support 16 toggle
Copy back to your phone an restart
How to test if toggle work
Open dialer pad
input
Code:
*#*#4636#*#*
Choose Phone Information
scroll to the end you will see a dropdown box display current network
press back button
now change network toggle
Again comeback to PhoneInformation and see if network change
Refine wilfredcool007 CRT animation Guide
Original thread
http://forum.xda-developers.com/showthread.php?t=1533255
Decompile services.jar
No need to change anything in PowerManagerService.smali
open PowerManagerService$BrightnessState
Search
Code:
invoke-static {v0, v1}, Lcom/android/server/PowerManagerService;->access$4700(Lcom/android/server/PowerManagerService;I)I
lookdown several line, after
Code:
.end method
add
Code:
.method private getScreenAnimationMode(Landroid/content/Context;)I
.registers 7
.parameter "context"
.prologue
const v0, 0x0
const v3, 0x1
const v4, 0x10
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "config_beam_screen_on"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_22
const v0, 0x1
:goto_18
const-string v2, "config_beam_screen_off"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_21
add-int/2addr v0, v4
:cond_21
return v0
:cond_22
const v0, 0x0
goto :goto_18
.end method
Find
Code:
.method public run()V
After
Code:
.prologue
const/4 v8, 0x0
add
Code:
.line 2078
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->[COLOR="Blue"]access$3400[/COLOR](Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v4
invoke-direct {p0, v4}, Lcom/android/server/PowerManagerService$BrightnessState;->getScreenAnimationMode(Landroid/content/Context;)I
move-result v4
if-nez v4, [COLOR="blue"]:cond_2f[/COLOR]
Go to the end of this method
Above
Code:
goto :goto_4e
.end method
add
Code:
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v6}, Lcom/android/server/PowerManagerService;->[COLOR="blue"]access$3400[/COLOR](Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v6
invoke-direct {p0, v6}, Lcom/android/server/PowerManagerService$BrightnessState;->getScreenAnimationMode(Landroid/content/Context;)I
move-result v6
Recompile services.jar
Enable CRT animation from framework-res.apk
Make Check box to control CRT effect in Settings.apk
Decompile Settings.apk
Open Settings.apk/res/xml/display_settings.xml
under
Code:
<PreferenceScreen android:title="@string/g_sensor_title" android:key="g_sensor" android:summary="@string/g_sensor_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.GSensorSettings" />
</PreferenceScreen>
add
Code:
<PreferenceCategory android:title="CRT Animation Control">
<CheckBoxPreference android:title="Use CRT Effect when turn on screen" android:key="config_beam_screen_on" android:defaultValue="true" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<CheckBoxPreference android:title="Use CRT Effect when turn off screen" android:key="config_beam_screen_off" android:defaultValue="true" android:summaryOn="Enabled" android:summaryOff="Disabled" />
</PreferenceCategory>
Recompile Settings.apk
Maybe need change build.prob to get CRT work
open /system/build.prob
Comment(#) or del line
Code:
debug.sf.hw=1
Improve Sweep to Remove
Original thread
http://forum.xda-developers.com/showthread.php?t=1691397
1. If your rom has Sweep to Remove
Decompile SystemUI.apk
Open /smali/com/android/systemui/statusbar/ExpandedView.smali
add under # instance fields
Code:
.field mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
add this method to the end
Code:
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 51
iget-object v0, p0, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;->needsInterceptTouch(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_0
.line 52
const/4 v0, 0x1
.line 54
:goto_0
return v0
:cond_0
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
goto :goto_0
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 2
.parameter "event"
.prologue
.line 59
iget-object v1, p0, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
invoke-virtual {v1, p1}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;->handleTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
.line 61
.local v0, handled:Z
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v1
if-eqz v1, :cond_0
.line 62
const/4 v0, 0x1
.line 65
:cond_0
return v0
.end method
Save
Delete LatestItemContainer$1.smali and LatestItemContainer.smali
Download statusbar.rar and extract to /smali/com/android/systemui/statusbar/
Edit StatusBarService.smali
Add under # instance fields
Code:
.field mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
In .method private makeStatusBarView
above
Code:
const v8, 0x1050005
invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
add
Code:
new-instance v6, Lcom/android/systemui/statusbar/ItemTouchDispatcher;
invoke-direct {v6, p0}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;-><init>(Landroid/content/Context;)V
iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
above
Code:
const v8, 0x7f030004
invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
add
Code:
iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
iput-object v6, v2, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
Replace method makeNotificationView ( from begin to end)
with modified
Code:
.method makeNotificationView(Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup;)[Landroid/view/View;
.locals 19
.parameter "notification"
.parameter "parent"
.prologue
const/4 v4, 0x0
const/4 v5, 0x0
.line 574
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->notification:Landroid/app/Notification;
move-object/from16 v16, v0
.line 575
.local v16, n:Landroid/app/Notification;
move-object/from16 v0, v16
iget-object v0, v0, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;
move-object/from16 v17, v0
.line 576
.local v17, remoteViews:Landroid/widget/RemoteViews;
if-nez v17, :cond_0
.line 577
.line 611
:goto_0
return-object v4
.line 581
:cond_0
const-string v4, "layout_inflater"
move-object/from16 v0, p0
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/StatusBarService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v15
check-cast v15, Landroid/view/LayoutInflater;
.line 582
.local v15, inflater:Landroid/view/LayoutInflater;
const v4, 0x7f030008
move-object v0, v15
move v1, v4
move-object/from16 v2, p2
move v3, v5
invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v18
check-cast v18, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v18, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
move-object v4, v0
new-instance v5, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v5
move-object/from16 v1, p0
move-object/from16 v2, p1
invoke-direct {v0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v18
move-object v1, v4
move-object v2, v5
invoke-virtual {v0, v1, v2}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Lcom/android/systemui/statusbar/ItemTouchDispatcher;Ljava/lang/Runnable;)V
:cond_1
const v4, 0x7f090024
move-object/from16 v0, v18
move v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v10
check-cast v10, Landroid/view/ViewGroup;
.line 586
.local v10, content:Landroid/view/ViewGroup;
const/high16 v4, 0x6
invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setDescendantFocusability(I)V
.line 587
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->mFocusChangeListener:Landroid/view/View$OnFocusChangeListener;
move-object v4, v0
invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V
.line 588
move-object/from16 v0, v16
iget-object v0, v0, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;
move-object v6, v0
.line 589
.local v6, contentIntent:Landroid/app/PendingIntent;
if-eqz v6, :cond_2
.line 590
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$Launcher;
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;
move-object v7, v0
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->tag:Ljava/lang/String;
move-object v8, v0
move-object/from16 v0, p1
iget v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->id:I
move v9, v0
move-object/from16 v5, p0
invoke-direct/range {v4 .. v9}, Lcom/android/systemui/statusbar/StatusBarService$Launcher;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Landroid/app/PendingIntent;Ljava/lang/String;Ljava/lang/String;I)V
invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 594
:cond_2
const/4 v13, 0x0
.line 595
.local v13, expanded:Landroid/view/View;
const/4 v12, 0x0
.line 597
.local v12, exception:Ljava/lang/Exception;
:try_start_0
move-object/from16 v0, v17
move-object/from16 v1, p0
move-object v2, v10
invoke-virtual {v0, v1, v2}, Landroid/widget/RemoteViews;->apply(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v13
.line 602
:goto_1
if-nez v13, :cond_3
.line 603
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;
move-object v5, v0
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, "/0x"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
move-object/from16 v0, p1
iget v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->id:I
move v5, v0
invoke-static {v5}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v14
.line 604
.local v14, ident:Ljava/lang/String;
const-string v4, "StatusBarService"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "couldn\'t inflate view for notification "
.end local v6 #contentIntent:Landroid/app/PendingIntent;
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5, v12}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 605
const/4 v4, 0x0
goto/16 :goto_0
.line 599
.end local v14 #ident:Ljava/lang/String;
.restart local v6 #contentIntent:Landroid/app/PendingIntent;
:catch_0
move-exception v11
.line 600
.local v11, e:Ljava/lang/RuntimeException;
move-object v12, v11
goto :goto_1
.line 607
.end local v11 #e:Ljava/lang/RuntimeException;
:cond_3
invoke-virtual {v10, v13}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
.line 608
const/4 v4, 0x1
move-object/from16 v0, v18
move v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setDrawingCacheEnabled(Z)V
.line 611
const/4 v4, 0x3
new-array v4, v4, [Landroid/view/View;
const/4 v5, 0x0
aput-object v18, v4, v5
const/4 v5, 0x1
aput-object v10, v4, v5
const/4 v5, 0x2
aput-object v13, v4, v5
goto/16 :goto_0
.end method
Recompile systemUI.apk
2. If your rom dont have Sweep to Remove
Go here first
http://forum.xda-developers.com/showthread.php?t=1483193 then comeback to this guide
Long press Volume to skip song
original thread
http://forum.xda-developers.com/showthread.php?t=1257260
Decompile android.policy.jar
go to /com/android/internal/policy/impl/
make 2 new text document, rename it to
Code:
PhoneWindowManager$12.smali
PhoneWindowManager$13.smali
Open PhoneWindowManager$12.smali
paste this
Code:
.class Lcom/android/internal/policy/impl/PhoneWindowManager$12;
.super Ljava/lang/Object;
.source "PhoneWindowManager.java"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/PhoneWindowManager;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
.registers 2
.parameter
.prologue
iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$12;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$12;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
const/4 v1, 0x1
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$12;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
const/16 v1, 0x57
invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendMediaButtonEvent(I)V
return-void
.end method
Open PhoneWindowManager$13.smali
paste this
Code:
.class Lcom/android/internal/policy/impl/PhoneWindowManager$13;
.super Ljava/lang/Object;
.source "PhoneWindowManager.java"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/PhoneWindowManager;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
.registers 2
.parameter
.prologue
iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$13;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$13;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
const/4 v1, 0x1
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsLongPress:Z
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$13;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
const/16 v1, 0x58
invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendMediaButtonEvent(I)V
return-void
.end method
Open PhoneWindowManager.smali
In # static fields
add
Code:
.field private static final LONG_PRESS_TIMEOUT:I = 0x3e8[COLOR="Blue"]/*=1000ms in hex*/[/COLOR]
in # instance fields
add
Code:
.field mIsLongPress:Z
.field mVolumeDownLongPress:Ljava/lang/Runnable;
.field mVolumeUpLongPress:Ljava/lang/Runnable;
find
Code:
.method public constructor <init>()V
go to the end of this method above
Code:
.line 2855
return-void
.end method
add
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$12;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$12;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$13;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$13;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
add this to the end of file
Code:
.method handleVolumeLongPress(I)V
.registers 6
.parameter "keycode"
.prologue
const/16 v1, 0x18
if-ne p1, v1, :cond_f
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
.local v0, btnHandler:Ljava/lang/Runnable;
:goto_6
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end local v0 #btnHandler:Ljava/lang/Runnable;
:cond_f
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
.restart local v0 #btnHandler:Ljava/lang/Runnable;
goto :goto_6
.end method
.method handleVolumeLongPressAbort()V
.registers 3
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method
.method protected sendMediaButtonEvent(I)V
.registers 15
.parameter "code"
.prologue
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
.local v1, eventtime:J
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v11, downIntent:Landroid/content/Intent;
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v0, downEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.local v12, upIntent:Landroid/content/Intent;
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
.local v3, upEvent:Landroid/view/KeyEvent;
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method
Now we moding
Code:
.method public interceptKeyBeforeQueueing(JIIIIIZ)I
There are alot of minor code
So compare with your method or just extract attacment and use my file
*Bonus can make long press to kill app, change FM channel. All are in XDA
Make FM Radio work without Earphone and in Airplane mode
Decompile FmRadio.apk
Edit /smali/com/samsung/app/fmradio/FmRadioPlaybackService.smali
Bypass Earphone plugged check
find all line
Code:
iget-boolean v2, p0, Lcom/samsung/app/fmradio/FmRadioPlaybackService;->mHeadsetPlugged:Z
replace 1st and 3rd line with
Code:
const/4 v2, 0x1
Bypass Airplane Mode check
Find all line
Code:
iget-boolean v2, p0, Lcom/samsung/app/fmradio/FmRadioPlaybackService;->mAirplaneMode:Z
replace 1st and 3rd line with
Code:
const/4 v2, 0x0
Save and recopile FmRadio.apk
*Note: without Earphone FM signal very bad. or you can cut an 3.5mm jack and plug to phone so you have better signal while sound still at phone speaker
Nice bro
GOod work mahn..
What the thread is about???
Sent from my GT-S5670 using xda app-developers app
that crt on guide ...is it a improvement to crt on or jus adding a switch to settings ??
It's called optimize code: less edit > less code to run >system run smooth( theoretically, because 1 code doesnot make system slower XD)
the swipe to remove mod made it swipe function really smoother !! gr8
Before know this, i hate sweep to remove it's annoying
Tổng hợp đầy đủ lắm anh, thêm vài bài hay nữa cho em học hỏi nào :x
So great. Thanks so much!
Anh Sơn ơi, u can make a tut mod this launcher ?
http://forum.xda-developers.com/showthread.php?t=1689249
Click to expand...
Click to collapse
Hì, thanks anh!
any rom with all des features ?
Those Are Really Helpful..! Specially For Every One Who Are Building There Own Rom..
shocklads said:
Tổng hợp đầy đủ lắm anh, thêm vài bài hay nữa cho em học hỏi nào :x
So great. Thanks so much!
Anh Sơn ơi, u can make a tut mod this launcher ?
Hì, thanks anh!
Click to expand...
Click to collapse
ofcourse it will have guide.
zcop said:
ofcourse it will have guide.
Click to expand...
Click to collapse
Awesome. Keep fighting, master
Custom Date, Clock style on StatusBar
After unsolved problem with Kahvitahra's mods
I start new mod. It's not good as Kahvitahra's mods but for now it's ok
So let's start
Decompile SystemUI.apk
open DateView.smali
Find
Code:
.method private final updateClock()V
Delete all this method
paste the new one
Code:
.method private final updateClock()V
.locals 7
.prologue
.line 78
new-instance v4, Ljava/text/SimpleDateFormat;
[COLOR="blue"]# total options[/COLOR]
const/16 v1, 0x5
const/16 v2, 0x0
iget-object v0, p0, Lcom/android/systemui/statusbar/DateView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v3, "custom_date_format"
invoke-static {v0, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
[COLOR="Blue"]# Option number 1[/COLOR]
const/16 v2, 0x1
if-eq v2, v0, :cond_0
[COLOR="blue"]# Option number 2[/COLOR]
const/16 v2, 0x2
if-eq v2, v0, :cond_1
const/16 v2, 0x3
if-eq v2, v0, :cond_2
const/16 v2, 0x4
if-eq v2, v0, :cond_3
const/16 v2, 0x5
if-eq v2, v0, :cond_4
[COLOR="blue"]# you can add option number N after here[/COLOR]
[COLOR="green"]# const/16 v2, 0xN
# if-eq v2, v0, :cond_N-1[/COLOR]
[COLOR="Blue"]#all date, time is in[/COLOR] [COLOR="Red"]Simple Date Format[/COLOR].[COLOR="blue"] Google it[/COLOR]
[COLOR="Blue"]#Format of Style number 1[/COLOR]
:cond_0
const-string v5, "yyyy-MM-dd HH:mm:ss.SSSZ"
goto :goto_0
[COLOR="blue"]# Format of style number 2[/COLOR]
:cond_1
const-string v5, "yyyy-MM-dd HH:mm:ssZ"
goto :goto_0
:cond_2
const-string v5, "yyyy-MM-dd HH:mmZ"
goto :goto_0
:cond_3
const-string v5, "yyyy-MM-dd"
goto :goto_0
:cond_4
const-string v5, "HH:mm"
goto :goto_0
[COLOR="blue"]# After here put style number N[/COLOR]
[COLOR="green"] :cond_N-1
const-string v5, "dd/MM/yy E HH:mm"
goto :goto_0[/COLOR]
[COLOR="Purple"]# Below is Display date format to statusbar, no need to change[/COLOR]
:goto_0
invoke-direct {v4,v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
.line 85
.local v4, sdf:Ljava/text/SimpleDateFormat;
new-instance v6, Ljava/util/Date;
invoke-direct {v6}, Ljava/util/Date;-><init>()V
.local v6, now:Ljava/util/Date;
invoke-virtual {v4, v6}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v6
invoke-virtual {p0, v6}, Lcom/android/systemui/statusbar/DateView;->setText(Ljava/lang/CharSequence;)V
.line 87
return-void
.end method
Recomplie SystemUI.apk
Decompile Settings.apk( or Decompile yourPart.apk if you want to put it in Part)
open /res/values/arrays.xml
Add
Code:
<array name="custom_date_entries">
<item>yyyy-MM-dd HH:mm:ss.SSSZ</item>
<item>yyyy-MM-dd HH:mm:ssZ</item>
<item>yyyy-MM-dd HH:mmZ</item>
<item>yyyy-MM-dd</item>
<item>HH:mm</item>
[COLOR="Blue"]/*add new option Name after this */[/COLOR]
</array>
<string-array name="custom_date_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
[COLOR="Blue"]/*add new option number( [COLOR="Green"]N[/COLOR] ) after this */[/COLOR]
</string-array>
Put option in Settings.apk
Open /res/xml/date_time_prefs.xml
Put option in Part
open /res/xml/settings.xml
go to the end of file
above
Code:
</PreferenceScreen>
paste
Code:
<PreferenceCategory android:title="StatusBar Date">
<CheckBoxPreference android:title="Enable Custom Date" android:key="custom_date" android:summaryOn="Enabled" android:summaryOff="Disabled" android:defaultValue="false" />
<ListPreference android:persistent="true" android:entries="@array/custom_date_entries" android:title="Choose custom date" android:key="custom_date_format" android:defaultValue="4" android:entryValues="@array/custom_date_values" android:dependency="custom_date" />
</PreferenceCategory>
Recompile Settings.apk or yourPart.apk
If you want to add more option
Just do folow the COLOR TEXT
I dont think this perfect.
here is perfect
Try to port it for me
Hello guys, today i want to share to u, how to add swipe to remove notification for galaxy pocket..
CREDITS:
hansip87 (thanks for the tutor) <Thread>
zcop (thanks for the fixement tuts) <Thread>
buddyisdead (thanks for the Galaxy Y systemUI, so i can change some smali's code from zcop to make compability) <Thread>
Click to expand...
Click to collapse
Here, lets us start now!
SYSTEMUI
1. Create folder anim (if not exists yet) inside /res folder
2. Create 2 file named slide_out_left_basic.xml and slide_out_right_basic.xml inside res/anim folder
3. for slide_out_left_basic.xml, edit the file and fill with this
Code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<translate android:duration="@android:integer/config_mediumAnimTime" android:fromXDelta="0.0" android:toXDelta="-50.0%p"
xmlns:android="http://schemas.android.com/apk/res/android" />
4. for slide_out_right_basic.xml, edit the file and fill with this
Code:
<?xml version="1.0" encoding="utf-8"?>
<translate android:duration="@android:integer/config_mediumAnimTime" android:fromXDelta="0.0" android:toXDelta="50.0%p"
xmlns:android="http://schemas.android.com/apk/res/android" />
5. Save both
* Editing res/layout/status_bar_latest_event.xml
We are replacing LinearLayout object used in StatusBar with LatestItemContainer here, so notification can be removed. We handle the Styling first by editing this .xml first. Here are the steps:
6. Change the code from Original code to this (change the bold one)
Code:
<?xml version="1.0" encoding="utf-8"?>
<[B]com.android.systemui.statusbar.LatestItemContainer[/B] android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="65.0sp"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.LatestItemView android:id="@id/content" android:background="@android:drawable/status_bar_item_background" android:paddingRight="6.0sp" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="64.0sp" android:shadowColor="#ff000000" android:shadowDx="0.0" android:shadowDy="1.0" android:shadowRadius="2.0" />
<View android:background="@drawable/divider_horizontal_light_opaque" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<[B]/com.android.systemui.statusbar.LatestItemContainer[/B]>
7. Save
* Editing res/values/public.xml
This one is for registering anim file that we made on step 1.1 to be available publicly and to be recognized in .smali program. Here are the steps:
8. Recompile your apk after putting anim file into /res folder
9. Decompile again the resulting apk
10. Inside /res/values/public.xml, you'll found something like this in the end:
Code:
<resources>
.
.
.
<public type="anim" name="slide_out_left_basic" id="0x7f0a0000" />
<public type="anim" name="slide_out_right_basic" id="0x7f0a0001" />
</resources>
11. Remember the ID for both anim lines. As a backup
12. Extract the StatusBarService$7.smali from smali_files.zip at attachment
13. Extract the ItemTouchDispatcher$1.smali from smali_files.zip at attachment
14. Extract the ItemTouchDispatcher.smali from smali_files.zip at attachment
15. Extract the LatestItemContainer.smali from smali_files.zip at attachment
16. Put these 4 files in smali/com/android/systemui/statusbar/
17. Open /smali/com/android/systemui/statusbar/ExpandedView.smali
add under # instance fields
Code:
.field mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
18. Delete any method u found after this
Code:
.method protected onFinishInflate()V
.locals 0
.prologue
.line 42
invoke-super {p0}, Landroid/widget/LinearLayout;->onFinishInflate()V
.line 43
return-void
.end method
19. Then, add this method below the method above
Code:
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 51
iget-object v0, p0, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;->needsInterceptTouch(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_0
.line 52
const/4 v0, 0x1
.line 54
:goto_0
return v0
:cond_0
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
goto :goto_0
.end method
.method protected onLayout(ZIIII)V
.locals 3
.parameter "changed"
.parameter "left"
.parameter "top"
.parameter "right"
.parameter "bottom"
.prologue
.line 53
invoke-super/range {p0 .. p5}, Landroid/widget/LinearLayout;->onLayout(ZIIII)V
.line 54
sub-int v0, p5, p3
.line 55
.local v0, height:I
iget v1, p0, Lcom/android/systemui/statusbar/ExpandedView;->mPrevHeight:I
if-eq v0, v1, :cond_0
.line 58
iput v0, p0, Lcom/android/systemui/statusbar/ExpandedView;->mPrevHeight:I
.line 59
iget-object v1, p0, Lcom/android/systemui/statusbar/ExpandedView;->mService:Lcom/android/systemui/statusbar/StatusBarService;
const/16 v2, -0x2710
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/StatusBarService;->updateExpandedViewPos(I)V
.line 61
:cond_0
return-void
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 2
.parameter "event"
.prologue
.line 59
iget-object v1, p0, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
invoke-virtual {v1, p1}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;->handleTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
.line 61
.local v0, handled:Z
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v1
if-eqz v1, :cond_0
.line 62
const/4 v0, 0x1
.line 65
:cond_0
return v0
.end method
20. Save.
21. Edit StatusBarService.smali
Add under .field private mTicking:Z in #instance fields
Code:
.field mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
22. In .method private makeStatusBarView
above
Code:
const v7, 0x1050005
invoke-virtual {v4, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
23. Add
Code:
new-instance v5, Lcom/android/systemui/statusbar/ItemTouchDispatcher;
invoke-direct {v5, p0}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;-><init>(Landroid/content/Context;)V
iput-object v5, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
24. Above
Code:
const v7, 0x7f030004
invoke-static {p1, v7, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
25. Add
Code:
iget-object v5, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
iput-object v5, v1, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
26. Replace method makeNotificationView ( from begin to end)
with modified
Code:
.method makeNotificationView(Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup;)[Landroid/view/View;
.locals 19
.parameter "notification"
.parameter "parent"
.prologue
.line 574
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->notification:Landroid/app/Notification;
move-object/from16 v16, v0
.line 575
.local v16, n:Landroid/app/Notification;
move-object/from16 v0, v16
iget-object v0, v0, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;
move-object/from16 v17, v0
.line 576
.local v17, remoteViews:Landroid/widget/RemoteViews;
if-nez v17, :cond_0
.line 577
const/4 v4, 0x0
.line 611
:goto_0
return-object v4
.line 581
:cond_0
const-string v4, "layout_inflater"
move-object/from16 v0, p0
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/StatusBarService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v15
check-cast v15, Landroid/view/LayoutInflater;
.line 582
.local v15, inflater:Landroid/view/LayoutInflater;
const v4, 0x7f030008
const/4 v5, 0x0
move-object v0, v15
move v1, v4
move-object/from16 v2, p2
move v3, v5
invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v18
check-cast v18, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v18, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v16
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;
move-object v4, v0
new-instance v5, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v5
move-object/from16 v1, p0
move-object/from16 v2, p1
invoke-direct {v0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v18
move-object v1, v4
move-object v2, v5
invoke-virtual {v0, v1, v2}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Lcom/android/systemui/statusbar/ItemTouchDispatcher;Ljava/lang/Runnable;)V
:cond_1
const v4, 0x7f090024
move-object/from16 v0, v18
move v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v10
check-cast v10, Landroid/view/ViewGroup;
.line 586
.local v10, content:Landroid/view/ViewGroup;
const/high16 v4, 0x6
invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setDescendantFocusability(I)V
.line 587
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->mFocusChangeListener:Landroid/view/View$OnFocusChangeListener;
move-object v4, v0
invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V
.line 588
move-object/from16 v0, v16
iget-object v0, v0, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;
move-object v6, v0
.line 589
.local v6, contentIntent:Landroid/app/PendingIntent;
if-eqz v6, :cond_2
.line 590
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$Launcher;
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;
move-object v7, v0
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->tag:Ljava/lang/String;
move-object v8, v0
move-object/from16 v0, p1
iget v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->id:I
move v9, v0
move-object/from16 v5, p0
invoke-direct/range {v4 .. v9}, Lcom/android/systemui/statusbar/StatusBarService$Launcher;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Landroid/app/PendingIntent;Ljava/lang/String;Ljava/lang/String;I)V
invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 594
:cond_2
const/4 v13, 0x0
.line 595
.local v13, expanded:Landroid/view/View;
const/4 v12, 0x0
.line 597
.local v12, exception:Ljava/lang/Exception;
:try_start_0
move-object/from16 v0, v17
move-object/from16 v1, p0
move-object v2, v10
invoke-virtual {v0, v1, v2}, Landroid/widget/RemoteViews;->apply(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v13
.line 602
:goto_1
if-nez v13, :cond_3
.line 603
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
move-object/from16 v0, p1
iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;
move-object v5, v0
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, "/0x"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
move-object/from16 v0, p1
iget v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->id:I
move v5, v0
invoke-static {v5}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v14
.line 604
.local v14, ident:Ljava/lang/String;
const-string v4, "StatusBarService"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "couldn\'t inflate view for notification "
.end local v6 #contentIntent:Landroid/app/PendingIntent;
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5, v12}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 605
const/4 v4, 0x0
goto/16 :goto_0
.line 599
.end local v14 #ident:Ljava/lang/String;
.restart local v6 #contentIntent:Landroid/app/PendingIntent;
:catch_0
move-exception v11
.line 600
.local v11, e:Ljava/lang/RuntimeException;
move-object v12, v11
goto :goto_1
.line 607
.end local v11 #e:Ljava/lang/RuntimeException;
:cond_3
invoke-virtual {v10, v13}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V
.line 608
const/4 v4, 0x1
move-object/from16 v0, v18
move v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setDrawingCacheEnabled(Z)V
.line 611
const/4 v4, 0x3
new-array v4, v4, [Landroid/view/View;
const/4 v5, 0x0
aput-object v18, v4, v5
const/4 v5, 0x1
aput-object v10, v4, v5
const/4 v5, 0x2
aput-object v13, v4, v5
goto/16 :goto_0
.end method
27. Save
28. Recompile your SystemUI.apk
FRAMEWORK.JAR
The tutorial for this, i will share soon..
Use my framework.jar for now.. (work with almost rom)
<deleted>
Thank you very much
Thank you very much for this guide.
I was trying very hard with Hancip's guide, but SystemUI structure of galaxy y is different.
Editing SystemUI was only problem, not framwork.jar which you solved.
Thanks button pressed.
Note for Galaxy y users, framework.jar attached is of Galaxy Pocket. If you want a bootloop you can use it.
Hello guys
Here is a new guide on setting up the recents.
Credit:-
KachalkinGeorg (The GK)
Requirements (deodexed):-
1.Settings.apk
2.SystemUI.apk
3.NotePad++
4.Patience.. if you dont have try to get it
First Part ( Settings.apk )
1.Decompile Settings.apk
2.Download recentsettings.zip from attachment. extract and copy to your Decompiled Settings.
3.Open Settings\res\values\ids.xml and add below code
Code:
<item type="id" name="gk_system_section">false</item>
4.Open Settings\res\values\strings.xml and add below code
Code:
<string name="header_gk_system_special">Systemâ„¢</string>
<string name="recents_panel_title">Recents panel</string>
<string name="recents_panel_settings">Recents panel settings</string>
<string name="show_clear_all_recents_button_title">Clear all recents button</string>
<string name="show_clear_all_recents_button_summary">Show clear all button on recents panel</string>
<string name="recents_clear_all_location_title">Clear all recents location</string>
<string name="recents_clear_all_location_top_right">Top right</string>
<string name="recents_clear_all_location_top_left">Top left</string>
<string name="recents_clear_all_location_top_center">Top center</string>
<string name="recents_clear_all_location_bottom_right">Bottom right</string>
<string name="recents_clear_all_location_bottom_left">Bottom left</string>
<string name="recents_clear_all_location_bottom_center">Bottom center</string>
<string name="recents_clear_all_dismiss_all_title">Clear all tasks</string>
<string name="recents_clear_all_dismiss_all_summary">Choose whether to dismiss all tasks or ignore the foreground task</string>
<string name="recents_show_searchbar">Show Search Bar in Recents</string>
<string name="recents_show_searchbar_summary">Enable or disable the Google search bar in the recents menu</string>
5.Open Settings\res\values\arrays.xml and add below code
Code:
<string-array name="recents_clear_all_location_entries">
<item>@string/recents_clear_all_location_top_right</item>
<item>@string/recents_clear_all_location_top_left</item>
<item>@string/recents_clear_all_location_top_center</item>
<item>@string/recents_clear_all_location_bottom_right</item>
<item>@string/recents_clear_all_location_bottom_left</item>
<item>@string/recents_clear_all_location_bottom_center</item>
</string-array>
6.Open Settings\res\xml\dashboard_categories.xml and add below code
Code:
<dashboard-tile android:icon="@drawable/ic_settings_gk_system" android:id="@id/gk_system_section" android:title="@string/header_gk_system_special" android:fragment="com.android.settings.gk.GKmodSystem" />
7.Now Recompile and Decompile Settings (For ids)
8.Open Settings\smali\com\android\settings\gk\GKmodSystem.smali and find below code
Code:
0x7f050055
replace with below id
Code:
<public type="xml" name="gk_system_settings"
9.Open Settings\smali\com\android\settings\gk\Resents\RecentsPanelSettings.smali and find below codes
find
Code:
0x7f090356
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_right"
find
Code:
0x7f090357
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_left"
find
Code:
0x7f090358
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_center"
find
Code:
0x7f090359
replace with below code
Code:
<public type="string" name="recents_clear_all_location_bottom_right"
find
Code:
0x7f09035a
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_left"
find
Code:
0x7f09035b
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_center"
find
Code:
0x7f060042
replace with below id
Code:
<public type="xml" name="gk_recents_panel_settings"
10.Now Compile Settings and move to your device.
Continued in next post
Final Part ( SystemUI.apk )
1.Decompile SystemUI.apk
2.Download recetsystemui.zip from attachment. extract and copy to your decompiled SystemUI
3.Open SystemUI\res\values\colors.xml and add below code
Code:
<color name="gk_recents_color">#ff90A4AE</color>
<color name="gk_recents_icon_color">#ffffffff</color>
4.Open SystemUI\res\values\dimens.xml and add below code
Code:
<dimen name="gk_recents_action_button_height">54.0dip</dimen>
<dimen name="gk_recents_action_button_width">54.0dip</dimen>
<dimen name="gk_recents_action_button_translation_z">12.0dip</dimen>
<dimen name="gk_recents_action_button_margin_side">32.0dip</dimen>
<dimen name="gk_recents_action_button_margin_bottom">45.0dip</dimen>
5.Open SystemUI\res\values\ids.xml and add below code
Code:
<item type="id" name="gk_recents">false</item>
6.Now Recompile and Decompile SystemUI (For ids)
7.Open SystemUI\smali\com\android\systemui\recents\RecentsActivity.smali and do below edittings.
find below method
Code:
.method bindSearchBarAppWidget()V
replace whole method with this
Code:
.method bindSearchBarAppWidget()V
.locals 5
.prologue
const/4 v4, 0x0
.line 293
invoke-static {}, Lcom/android/systemui/recents/model/RecentsTaskLoader;->getInstance()Lcom/android/systemui/recents/model/RecentsTaskLoader;
move-result-object v3
invoke-virtual {v3}, Lcom/android/systemui/recents/model/RecentsTaskLoader;->getSystemServicesProxy()Lcom/android/systemui/recents/misc/SystemServicesProxy;
move-result-object v1
.line 296
.local v1, "ssp":Lcom/android/systemui/recents/misc/SystemServicesProxy;
iput-object v4, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetHostView:Landroid/appwidget/AppWidgetHostView;
.line 297
iput-object v4, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;
.line 300
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget v0, v3, Lcom/android/systemui/recents/RecentsConfiguration;->searchBarAppWidgetId:I
.line 301
.local v0, "appWidgetId":I
if-ltz v0, :cond_0
.line 302
invoke-virtual {v1, v0}, Lcom/android/systemui/recents/misc/SystemServicesProxy;->getAppWidgetInfo(I)Landroid/appwidget/AppWidgetProviderInfo;
move-result-object v3
iput-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;
.line 303
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;
if-nez v3, :cond_0
.line 306
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mAppWidgetHost:Lcom/android/systemui/recents/RecentsAppWidgetHost;
invoke-virtual {v1, v3, v0}, Lcom/android/systemui/recents/misc/SystemServicesProxy;->unbindSearchAppWidget(Landroid/appwidget/AppWidgetHost;I)V
.line 307
const/4 v0, -0x1
.line 312
:cond_0
if-gez v0, :cond_1
.line 313
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mAppWidgetHost:Lcom/android/systemui/recents/RecentsAppWidgetHost;
invoke-virtual {v1, v3}, Lcom/android/systemui/recents/misc/SystemServicesProxy;->bindSearchAppWidget(Landroid/appwidget/AppWidgetHost;)Landroid/util/Pair;
move-result-object v2
.line 315
.local v2, "widgetInfo":Landroid/util/Pair;, "Landroid/util/Pair<Ljava/lang/Integer;Landroid/appwidget/AppWidgetProviderInfo;>;"
if-eqz v2, :cond_2
.line 317
iget-object v4, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget-object v3, v2, Landroid/util/Pair;->first:Ljava/lang/Object;
check-cast v3, Ljava/lang/Integer;
invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I
move-result v3
invoke-virtual {v4, p0, v3}, Lcom/android/systemui/recents/RecentsConfiguration;->updateSearchBarAppWidgetId(Landroid/content/Context;I)V
.line 318
iget-object v3, v2, Landroid/util/Pair;->second:Ljava/lang/Object;
check-cast v3, Landroid/appwidget/AppWidgetProviderInfo;
iput-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;
.line 324
.end local v2 # "widgetInfo":Landroid/util/Pair;, "Landroid/util/Pair<Ljava/lang/Integer;Landroid/appwidget/AppWidgetProviderInfo;>;"
:cond_1
:goto_0
return-void
.line 320
.restart local v2 # "widgetInfo":Landroid/util/Pair;, "Landroid/util/Pair<Ljava/lang/Integer;Landroid/appwidget/AppWidgetProviderInfo;>;"
:cond_2
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
const/4 v4, -0x1
invoke-virtual {v3, p0, v4}, Lcom/android/systemui/recents/RecentsConfiguration;->updateSearchBarAppWidgetId(Landroid/content/Context;I)V
goto :goto_0
.end method
find below method
Code:
.method public onAllTaskViewsDismissed()V
replace whole method with this
Code:
.method public onAllTaskViewsDismissed()V
.locals 1
.prologue
.line 663
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mFinishLaunchHomeRunnable:Lcom/android/systemui/recents/RecentsActivity$FinishRecentsRunnable;
invoke-virtual {v0}, Lcom/android/systemui/recents/RecentsActivity$FinishRecentsRunnable;->run()V
.line 664
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V
.line 665
return-void
.end method
find below method
Code:
.method public onBackPressed()V
replace whole method with this
Code:
.method public onBackPressed()V
.locals 1
.prologue
.line 598
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget-boolean v0, v0, Lcom/android/systemui/recents/RecentsConfiguration;->debugModeEnabled:Z
if-eqz v0, :cond_0
.line 604
:goto_0
return-void
.line 601
:cond_0
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/android/systemui/recents/RecentsActivity;->dismissRecentsToFocusedTaskOrHome(Z)Z
.line 603
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V
goto :goto_0
.end method
find below method
Code:
.method public onEnterAnimationTriggered()V
replace whole method with this
Code:
.method public onEnterAnimationTriggered()V
.locals 1
.prologue
.line 633
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mScrimViews:Lcom/android/systemui/recents/views/SystemBarScrimViews;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/SystemBarScrimViews;->startEnterRecentsAnimation()V
.line 634
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->startFABanimation()V
.line 635
return-void
.end method
find below method
Code:
.method public onExitToHomeAnimationTriggered()V
replace whole method with this
Code:
.method public onExitToHomeAnimationTriggered()V
.locals 1
.prologue
.line 642
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mScrimViews:Lcom/android/systemui/recents/views/SystemBarScrimViews;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/SystemBarScrimViews;->startExitRecentsAnimation()V
.line 643
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V
.line 644
return-void
.end method
find below method
Code:
.method public onTaskLaunchFailed()V
replace whole method with this
Code:
.method public onTaskLaunchFailed()V
.locals 1
.prologue
.line 657
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/android/systemui/recents/RecentsActivity;->dismissRecentsToHomeRaw(Z)V
.line 658
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V
.line 659
return-void
.end method
find below method
Code:
.method public onTaskViewClicked()V
replace whole method with this
Code:
.method public onTaskViewClicked()V
.locals 1
.prologue
const/4 v0, 0x0
.line 649
invoke-static {v0}, Lcom/android/systemui/recents/AlternateRecentsComponent;->notifyVisibilityChanged(Z)V
.line 650
iput-boolean v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mVisible:Z
.line 651
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V
.line 652
return-void
.end method
Continued in next post
Continued.
find below method
Code:
.method updateRecentsTasks(Landroid/content/Intent;)V
replace whole method with this
Code:
.method updateRecentsTasks(Landroid/content/Intent;)V
.locals 19
.param p1, "launchIntent" # Landroid/content/Intent;
.prologue
.line 189
const-string v16, "recents.triggeredOverSearchHome"
const/16 v17, 0x0
move-object/from16 v0, p1
move-object/from16 v1, v16
move/from16 v2, v17
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v3
.line 191
.local v3, "fromSearchHome":Z
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v17, v0
if-nez v3, :cond_0
const-string v16, "recents.triggeredOverHome"
const/16 v18, 0x0
move-object/from16 v0, p1
move-object/from16 v1, v16
move/from16 v2, v18
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v16
if-eqz v16, :cond_3
:cond_0
const/16 v16, 0x1
:goto_0
move/from16 v0, v16
move-object/from16 v1, v17
iput-boolean v0, v1, Lcom/android/systemui/recents/RecentsConfiguration;->launchedFromHome:Z
.line 193
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v16, v0
const-string v17, "recents.animatingWithThumbnail"
const/16 v18, 0x0
move-object/from16 v0, p1
move-object/from16 v1, v17
move/from16 v2, v18
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v17
move/from16 v0, v17
move-object/from16 v1, v16
iput-boolean v0, v1, Lcom/android/systemui/recents/RecentsConfiguration;->launchedFromAppWithThumbnail:Z
.line 195
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v16, v0
const-string v17, "recents.thumbnail"
const/16 v18, 0x0
move-object/from16 v0, p1
move-object/from16 v1, v17
move/from16 v2, v18
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v17
move/from16 v0, v17
move-object/from16 v1, v16
iput-boolean v0, v1, Lcom/android/systemui/recents/RecentsConfiguration;->launchedFromAppWithScreenshot:Z
.line 197
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v16, v0
const-string v17, "recents.activeTaskId"
const/16 v18, -0x1
move-object/from16 v0, p1
move-object/from16 v1, v17
move/from16 v2, v18
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
move-result v17
move/from16 v0, v17
move-object/from16 v1, v16
iput v0, v1, Lcom/android/systemui/recents/RecentsConfiguration;->launchedToTaskId:I
.line 199
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v16, v0
const-string v17, "recents.triggeredFromAltTab"
const/16 v18, 0x0
move-object/from16 v0, p1
move-object/from16 v1, v17
move/from16 v2, v18
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v17
move/from16 v0, v17
move-object/from16 v1, v16
iput-boolean v0, v1, Lcom/android/systemui/recents/RecentsConfiguration;->launchedWithAltTab:Z
.line 203
invoke-static {}, Lcom/android/systemui/recents/model/RecentsTaskLoader;->getInstance()Lcom/android/systemui/recents/model/RecentsTaskLoader;
move-result-object v7
.line 204
.local v7, "loader":Lcom/android/systemui/recents/model/RecentsTaskLoader;
const/16 v16, 0x6
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v17, v0
move-object/from16 v0, v17
iget-boolean v0, v0, Lcom/android/systemui/recents/RecentsConfiguration;->launchedFromHome:Z
move/from16 v17, v0
move-object/from16 v0, p0
move/from16 v1, v16
move/from16 v2, v17
invoke-virtual {v7, v0, v1, v2}, Lcom/android/systemui/recents/model/RecentsTaskLoader;->reload(Landroid/content/Context;IZ)Lcom/android/systemui/recents/model/SpaceNode;
move-result-object v9
.line 207
.local v9, "root":Lcom/android/systemui/recents/model/SpaceNode;
invoke-virtual {v9}, Lcom/android/systemui/recents/model/SpaceNode;->getStacks()Ljava/util/ArrayList;
move-result-object v11
.line 208
.local v11, "stacks":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/android/systemui/recents/model/TaskStack;>;"
invoke-virtual {v11}, Ljava/util/ArrayList;->isEmpty()Z
move-result v16
if-nez v16, :cond_1
.line 209
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
move-object/from16 v16, v0
invoke-virtual {v9}, Lcom/android/systemui/recents/model/SpaceNode;->getStacks()Ljava/util/ArrayList;
move-result-object v17
invoke-virtual/range {v16 .. v17}, Lcom/android/systemui/recents/views/RecentsView;->setTaskStacks(Ljava/util/ArrayList;)V
.line 211
:cond_1
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v17, v0
invoke-virtual {v9}, Lcom/android/systemui/recents/model/SpaceNode;->hasTasks()Z
move-result v16
if-nez v16, :cond_4
const/16 v16, 0x1
:goto_1
move/from16 v0, v16
move-object/from16 v1, v17
iput-boolean v0, v1, Lcom/android/systemui/recents/RecentsConfiguration;->launchedWithNoRecentTasks:Z
.line 214
new-instance v4, Landroid/content/Intent;
const-string v16, "android.intent.action.MAIN"
const/16 v17, 0x0
move-object/from16 v0, v16
move-object/from16 v1, v17
invoke-direct {v4, v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
.line 215
.local v4, "homeIntent":Landroid/content/Intent;
const-string v16, "android.intent.category.HOME"
move-object/from16 v0, v16
invoke-virtual {v4, v0}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;
.line 216
const/high16 v16, 0x10200000
move/from16 v0, v16
invoke-virtual {v4, v0}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
.line 218
new-instance v18, Lcom/android/systemui/recents/RecentsActivity$FinishRecentsRunnable;
if-eqz v3, :cond_5
const v16, 0x7f05002e
move/from16 v17, v16
:goto_2
if-eqz v3, :cond_6
const v16, 0x7f05002f
:goto_3
move-object/from16 v0, p0
move/from16 v1, v17
move/from16 v2, v16
invoke-static {v0, v1, v2}, Landroid/app/ActivityOptions;->makeCustomAnimation(Landroid/content/Context;II)Landroid/app/ActivityOptions;
move-result-object v16
move-object/from16 v0, v18
move-object/from16 v1, p0
move-object/from16 v2, v16
invoke-direct {v0, v1, v4, v2}, Lcom/android/systemui/recents/RecentsActivity$FinishRecentsRunnable;-><init>(Lcom/android/systemui/recents/RecentsActivity;Landroid/content/Intent;Landroid/app/ActivityOptions;)V
move-object/from16 v0, v18
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/recents/RecentsActivity;->mFinishLaunchHomeRunnable:Lcom/android/systemui/recents/RecentsActivity$FinishRecentsRunnable;
.line 226
invoke-virtual {v11}, Ljava/util/ArrayList;->size()I
move-result v14
.line 227
.local v14, "taskStackCount":I
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v16, v0
move-object/from16 v0, v16
iget v0, v0, Lcom/android/systemui/recents/RecentsConfiguration;->launchedToTaskId:I
move/from16 v16, v0
const/16 v17, -0x1
move/from16 v0, v16
move/from16 v1, v17
if-eq v0, v1, :cond_8
.line 228
const/4 v5, 0x0
.local v5, "i":I
:goto_4
if-ge v5, v14, :cond_8
.line 229
invoke-virtual {v11, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v10
check-cast v10, Lcom/android/systemui/recents/model/TaskStack;
.line 230
.local v10, "stack":Lcom/android/systemui/recents/model/TaskStack;
invoke-virtual {v10}, Lcom/android/systemui/recents/model/TaskStack;->getTasks()Ljava/util/ArrayList;
move-result-object v15
.line 231
.local v15, "tasks":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/android/systemui/recents/model/Task;>;"
invoke-virtual {v15}, Ljava/util/ArrayList;->size()I
move-result v13
.line 232
.local v13, "taskCount":I
const/4 v6, 0x0
.local v6, "j":I
:goto_5
if-ge v6, v13, :cond_2
.line 233
invoke-virtual {v15, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v12
check-cast v12, Lcom/android/systemui/recents/model/Task;
.line 234
.local v12, "t":Lcom/android/systemui/recents/model/Task;
iget-object v0, v12, Lcom/android/systemui/recents/model/Task;->key:Lcom/android/systemui/recents/model/Task$TaskKey;
move-object/from16 v16, v0
move-object/from16 v0, v16
iget v0, v0, Lcom/android/systemui/recents/model/Task$TaskKey;->id:I
move/from16 v16, v0
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v17, v0
move-object/from16 v0, v17
iget v0, v0, Lcom/android/systemui/recents/RecentsConfiguration;->launchedToTaskId:I
move/from16 v17, v0
move/from16 v0, v16
move/from16 v1, v17
if-ne v0, v1, :cond_7
.line 235
const/16 v16, 0x1
move/from16 v0, v16
iput-boolean v0, v12, Lcom/android/systemui/recents/model/Task;->isLaunchTarget:Z
.line 228
.end local v12 # "t":Lcom/android/systemui/recents/model/Task;
:cond_2
add-int/lit8 v5, v5, 0x1
goto :goto_4
.line 191
.end local v4 # "homeIntent":Landroid/content/Intent;
.end local v5 # "i":I
.end local v6 # "j":I
.end local v7 # "loader":Lcom/android/systemui/recents/model/RecentsTaskLoader;
.end local v9 # "root":Lcom/android/systemui/recents/model/SpaceNode;
.end local v10 # "stack":Lcom/android/systemui/recents/model/TaskStack;
.end local v11 # "stacks":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/android/systemui/recents/model/TaskStack;>;"
.end local v13 # "taskCount":I
.end local v14 # "taskStackCount":I
.end local v15 # "tasks":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/android/systemui/recents/model/Task;>;"
:cond_3
const/16 v16, 0x0
goto/16 :goto_0
.line 211
.restart local v7 # "loader":Lcom/android/systemui/recents/model/RecentsTaskLoader;
.restart local v9 # "root":Lcom/android/systemui/recents/model/SpaceNode;
.restart local v11 # "stacks":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/android/systemui/recents/model/TaskStack;>;"
:cond_4
const/16 v16, 0x0
goto/16 :goto_1
.line 218
.restart local v4 # "homeIntent":Landroid/content/Intent;
:cond_5
const v16, 0x7f05002c
move/from16 v17, v16
goto/16 :goto_2
:cond_6
const v16, 0x7f05002d
goto/16 :goto_3
.line 232
.restart local v5 # "i":I
.restart local v6 # "j":I
.restart local v10 # "stack":Lcom/android/systemui/recents/model/TaskStack;
.restart local v12 # "t":Lcom/android/systemui/recents/model/Task;
.restart local v13 # "taskCount":I
.restart local v14 # "taskStackCount":I
.restart local v15 # "tasks":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/android/systemui/recents/model/Task;>;"
:cond_7
add-int/lit8 v6, v6, 0x1
goto :goto_5
.line 243
.end local v5 # "i":I
.end local v6 # "j":I
.end local v10 # "stack":Lcom/android/systemui/recents/model/TaskStack;
.end local v12 # "t":Lcom/android/systemui/recents/model/Task;
.end local v13 # "taskCount":I
.end local v15 # "tasks":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/android/systemui/recents/model/Task;>;"
:cond_8
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v16, v0
move-object/from16 v0, v16
iget-boolean v0, v0, Lcom/android/systemui/recents/RecentsConfiguration;->launchedWithNoRecentTasks:Z
move/from16 v16, v0
if-eqz v16, :cond_d
.line 244
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mEmptyView:Landroid/view/View;
move-object/from16 v16, v0
if-nez v16, :cond_9
.line 245
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mEmptyViewStub:Landroid/view/ViewStub;
move-object/from16 v16, v0
invoke-virtual/range {v16 .. v16}, Landroid/view/ViewStub;->inflate()Landroid/view/View;
move-result-object v16
move-object/from16 v0, v16
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/recents/RecentsActivity;->mEmptyView:Landroid/view/View;
.line 247
:cond_9
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mEmptyView:Landroid/view/View;
move-object/from16 v16, v0
const/16 v17, 0x0
invoke-virtual/range {v16 .. v17}, Landroid/view/View;->setVisibility(I)V
.line 248
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
move-object/from16 v16, v0
const/16 v17, 0x8
invoke-virtual/range {v16 .. v17}, Lcom/android/systemui/recents/views/RecentsView;->setSearchBarVisibility(I)V
.line 249
const v16, 0x7f0e0170
move-object/from16 v0, p0
move/from16 v1, v16
invoke-virtual {v0, v1}, Lcom/android/systemui/recents/RecentsActivity;->findViewById(I)Landroid/view/View;
move-result-object v16
const/16 v17, 0x8
invoke-virtual/range {v16 .. v17}, Landroid/view/View;->setVisibility(I)V
.line 273
:cond_a
:goto_6
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/RecentsActivity;->getResources()Landroid/content/res/Resources;
move-result-object v8
.line 275
.local v8, "reso":Landroid/content/res/Resources;
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/RecentsActivity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v16
const-string v17, "recents_show_hide_search_bar"
const/16 v18, 0x0
invoke-static/range {v16 .. v18}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v16
const/16 v17, 0x1
move/from16 v0, v16
move/from16 v1, v17
if-eq v0, v1, :cond_b
.line 277
const/16 v16, 0x0
sput v16, Lcom/android/systemui/recents/RecentsConfiguration;->searchBarSpaceHeightPx:I
.line 281
:cond_b
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/RecentsActivity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v16
const-string v17, "recents_show_hide_search_bar"
const/16 v18, 0x1
invoke-static/range {v16 .. v18}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v16
if-eqz v16, :cond_c
.line 283
const v16, 0x7f08006d
move/from16 v0, v16
invoke-virtual {v8, v0}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v16
sput v16, Lcom/android/systemui/recents/RecentsConfiguration;->searchBarSpaceHeightPx:I
.line 287
:cond_c
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mScrimViews:Lcom/android/systemui/recents/views/SystemBarScrimViews;
move-object/from16 v16, v0
invoke-virtual/range {v16 .. v16}, Lcom/android/systemui/recents/views/SystemBarScrimViews;->prepareEnterRecentsAnimation()V
.line 288
return-void
.line 251
.end local v8 # "reso":Landroid/content/res/Resources;
:cond_d
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mEmptyView:Landroid/view/View;
move-object/from16 v16, v0
if-eqz v16, :cond_e
.line 252
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mEmptyView:Landroid/view/View;
move-object/from16 v16, v0
const/16 v17, 0x8
invoke-virtual/range {v16 .. v17}, Landroid/view/View;->setVisibility(I)V
.line 254
:cond_e
const v16, 0x7f0e0170
move-object/from16 v0, p0
move/from16 v1, v16
invoke-virtual {v0, v1}, Lcom/android/systemui/recents/RecentsActivity;->findViewById(I)Landroid/view/View;
move-result-object v16
const/16 v17, 0x0
invoke-virtual/range {v16 .. v17}, Landroid/view/View;->setVisibility(I)V
.line 255
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
move-object/from16 v16, v0
invoke-virtual/range {v16 .. v16}, Lcom/android/systemui/recents/views/RecentsView;->hasSearchBar()Z
move-result v16
if-eqz v16, :cond_10
.line 257
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/RecentsActivity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v16
const-string v17, "recents_show_hide_search_bar"
const/16 v18, 0x0
invoke-static/range {v16 .. v18}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v16
const/16 v17, 0x1
move/from16 v0, v16
move/from16 v1, v17
if-ne v0, v1, :cond_f
.line 259
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
move-object/from16 v16, v0
const/16 v17, 0x0
invoke-virtual/range {v16 .. v17}, Lcom/android/systemui/recents/views/RecentsView;->setSearchBarVisibility(I)V
goto/16 :goto_6
.line 261
:cond_f
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;
move-object/from16 v16, v0
const/16 v17, 0x8
invoke-virtual/range {v16 .. v17}, Lcom/android/systemui/recents/views/RecentsView;->setSearchBarVisibility(I)V
goto/16 :goto_6
.line 264
:cond_10
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/RecentsActivity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v16
const-string v17, "recents_show_hide_search_bar"
const/16 v18, 0x0
invoke-static/range {v16 .. v18}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v16
const/16 v17, 0x1
move/from16 v0, v16
move/from16 v1, v17
if-ne v0, v1, :cond_a
.line 266
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/RecentsActivity;->addSearchBarAppWidgetView()V
goto/16 :goto_6
.end method
Find and replace id's
0x7f05002e - <public type="anim" name="recents_to_search_launcher_enter"
0x7f05002f - <public type="anim" name="recents_to_search_launcher_exit"
0x7f05002c - <public type="anim" name="recents_to_launcher_enter"
0x7f05002d - <public type="anim" name="recents_to_launcher_exit"
0x7f0e0170 - <public type="id" name="gk_recents"
0x7f08006d - <public type="dimen" name="recents_search_bar_space_height"
0x7f0e0170 - <public type="id" name="gk_recents"
Click to expand...
Click to collapse
8.Open SystemUI\smali\com\android\systemui\recents\views\RecentsView.smali
find
Code:
.field mDebugOverlay:Lcom/android/systemui/recents/views/DebugOverlayView;
below add a new field
Code:
.field mFloatingButton:Landroid/view/View;
find below method
Code:
.method public dismissFocusedTask()V
below add a new method
Code:
.method public endFABanimation()V
.locals 4
.prologue
.line 360
invoke-virtual {p0}, Lcom/android/systemui/recents/views/RecentsView;->getParent()Landroid/view/ViewParent;
move-result-object v0
check-cast v0, Landroid/view/View;
const v1, 0x7f0e0170
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
.line 361
iget-object v0, p0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;
move-result-object v0
const-wide/16 v2, 0x0
invoke-virtual {v0, v2, v3}, Landroid/view/ViewPropertyAnimator;->setStartDelay(J)Landroid/view/ViewPropertyAnimator;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget v1, v1, Lcom/android/systemui/recents/RecentsConfiguration;->taskBarExitAnimDuration:I
int-to-long v2, v1
invoke-virtual {v0, v2, v3}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget-object v1, v1, Lcom/android/systemui/recents/RecentsConfiguration;->fastOutLinearInInterpolator:Landroid/view/animation/Interpolator;
invoke-virtual {v0, v1}, Landroid/view/ViewPropertyAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)Landroid/view/ViewPropertyAnimator;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewPropertyAnimator;->withLayer()Landroid/view/ViewPropertyAnimator;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewPropertyAnimator;->start()V
.line 367
return-void
.end method
find and replace id
0x7f0e0170 - <public type="id" name="gk_recents"
Click to expand...
Click to collapse
find
Code:
.method protected onAttachedToWindow()V
replace whole method with this
Code:
.method protected onAttachedToWindow()V
.locals 2
.prologue
.line 371
invoke-super {p0}, Landroid/widget/FrameLayout;->onAttachedToWindow()V
.line 372
invoke-virtual {p0}, Lcom/android/systemui/recents/views/RecentsView;->getParent()Landroid/view/ViewParent;
move-result-object v0
check-cast v0, Landroid/view/View;
const v1, 0x7f0e0170
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
.line 373
invoke-virtual {p0}, Lcom/android/systemui/recents/views/RecentsView;->getParent()Landroid/view/ViewParent;
move-result-object v0
check-cast v0, Landroid/view/View;
const v1, 0x7f0e0115
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/recents/views/RecentsView;->mClearRecents:Landroid/view/View;
.line 374
iget-object v0, p0, Lcom/android/systemui/recents/views/RecentsView;->mClearRecents:Landroid/view/View;
new-instance v1, Lcom/android/systemui/recents/views/RecentsView$1;
invoke-direct {v1, p0}, Lcom/android/systemui/recents/views/RecentsView$1;-><init>(Lcom/android/systemui/recents/views/RecentsView;)V
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 379
return-void
.end method
find and replace id's
0x7f0e0170 - <public type="id" name="gk_recents"
0x7f0e0115 - <public type="id" name="clear_recents"
Click to expand...
Click to collapse
continued on next page
Continued.
find
Code:
.method protected onMeasure(II)V
replace whole method with this
Code:
.method protected onMeasure(II)V
.locals 17
.param p1, "widthMeasureSpec" # I
.param p2, "heightMeasureSpec" # I
.prologue
.line 274
invoke-static/range {p1 .. p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v3
.line 275
.local v3, "width":I
invoke-static/range {p2 .. p2}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v4
.line 278
.local v4, "height":I
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mSearchBar:Landroid/view/View;
if-eqz v2, :cond_0
.line 279
new-instance v13, Landroid/graphics/Rect;
invoke-direct {v13}, Landroid/graphics/Rect;-><init>()V
.line 280
.local v13, "searchBarSpaceBounds":Landroid/graphics/Rect;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget-object v5, v5, Lcom/android/systemui/recents/RecentsConfiguration;->systemInsets:Landroid/graphics/Rect;
iget v5, v5, Landroid/graphics/Rect;->top:I
invoke-virtual {v2, v3, v4, v5, v13}, Lcom/android/systemui/recents/RecentsConfiguration;->getSearchBarBounds(IIILandroid/graphics/Rect;)V
.line 281
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mSearchBar:Landroid/view/View;
invoke-virtual {v13}, Landroid/graphics/Rect;->width()I
move-result v5
const/high16 v6, 0x40000000
invoke-static {v5, v6}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v5
invoke-virtual {v13}, Landroid/graphics/Rect;->height()I
move-result v6
const/high16 v16, 0x40000000
move/from16 v0, v16
invoke-static {v6, v0}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v6
invoke-virtual {v2, v5, v6}, Landroid/view/View;->measure(II)V
.line 286
.end local v13 # "searchBarSpaceBounds":Landroid/graphics/Rect;
:cond_0
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v5, "show_clear_all_recents"
const/4 v6, 0x1
invoke-static {v2, v5, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
const/4 v5, 0x1
if-ne v2, v5, :cond_2
const/4 v14, 0x1
.line 289
.local v14, "showClearAllRecents":Z
:goto_0
new-instance v7, Landroid/graphics/Rect;
invoke-direct {v7}, Landroid/graphics/Rect;-><init>()V
.line 290
.local v7, "taskStackBounds":Landroid/graphics/Rect;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget-object v5, v5, Lcom/android/systemui/recents/RecentsConfiguration;->systemInsets:Landroid/graphics/Rect;
iget v5, v5, Landroid/graphics/Rect;->top:I
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget-object v6, v6, Lcom/android/systemui/recents/RecentsConfiguration;->systemInsets:Landroid/graphics/Rect;
iget v6, v6, Landroid/graphics/Rect;->right:I
invoke-virtual/range {v2 .. v7}, Lcom/android/systemui/recents/RecentsConfiguration;->getTaskStackBounds(IIIILandroid/graphics/Rect;)V
.line 293
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
if-eqz v2, :cond_3
if-eqz v14, :cond_3
.line 294
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v5, "recents_clear_all_location"
const/4 v6, 0x3
invoke-static {v2, v5, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v10
.line 296
.local v10, "clearRecentsLocation":I
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v12
check-cast v12, Landroid/widget/FrameLayout$LayoutParams;
.line 298
.local v12, "params":Landroid/widget/FrameLayout$LayoutParams;
iget v2, v7, Landroid/graphics/Rect;->top:I
iput v2, v12, Landroid/widget/FrameLayout$LayoutParams;->topMargin:I
.line 299
packed-switch v10, :pswitch_data_0
.line 305
const/16 v2, 0x35
iput v2, v12, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
.line 320
:goto_1
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
invoke-virtual {v2, v12}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
.line 327
.end local v10 # "clearRecentsLocation":I
.end local v12 # "params":Landroid/widget/FrameLayout$LayoutParams;
:goto_2
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/views/RecentsView;->getChildCount()I
move-result v9
.line 328
.local v9, "childCount":I
const/4 v11, 0x0
.local v11, "i":I
:goto_3
if-ge v11, v9, :cond_4
.line 329
move-object/from16 v0, p0
invoke-virtual {v0, v11}, Lcom/android/systemui/recents/views/RecentsView;->getChildAt(I)Landroid/view/View;
move-result-object v8
.line 330
.local v8, "child":Landroid/view/View;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mSearchBar:Landroid/view/View;
if-eq v8, v2, :cond_1
invoke-virtual {v8}, Landroid/view/View;->getVisibility()I
move-result v2
const/16 v5, 0x8
if-eq v2, v5, :cond_1
move-object v15, v8
.line 331
check-cast v15, Lcom/android/systemui/recents/views/TaskStackView;
.line 333
.local v15, "tsv":Lcom/android/systemui/recents/views/TaskStackView;
invoke-virtual {v15, v7}, Lcom/android/systemui/recents/views/TaskStackView;->setStackInsetRect(Landroid/graphics/Rect;)V
.line 334
move/from16 v0, p1
move/from16 v1, p2
invoke-virtual {v15, v0, v1}, Lcom/android/systemui/recents/views/TaskStackView;->measure(II)V
.line 328
.end local v15 # "tsv":Lcom/android/systemui/recents/views/TaskStackView;
:cond_1
add-int/lit8 v11, v11, 0x1
goto :goto_3
.line 286
.end local v7 # "taskStackBounds":Landroid/graphics/Rect;
.end local v8 # "child":Landroid/view/View;
.end local v9 # "childCount":I
.end local v11 # "i":I
.end local v14 # "showClearAllRecents":Z
:cond_2
const/4 v14, 0x0
goto :goto_0
.line 301
.restart local v7 # "taskStackBounds":Landroid/graphics/Rect;
.restart local v10 # "clearRecentsLocation":I
.restart local v12 # "params":Landroid/widget/FrameLayout$LayoutParams;
.restart local v14 # "showClearAllRecents":Z
:pswitch_0
const/16 v2, 0x33
iput v2, v12, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
goto :goto_1
.line 308
:pswitch_1
const/16 v2, 0x31
iput v2, v12, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
goto :goto_1
.line 311
:pswitch_2
const/16 v2, 0x53
iput v2, v12, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
goto :goto_1
.line 314
:pswitch_3
const/16 v2, 0x55
iput v2, v12, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
goto :goto_1
.line 317
:pswitch_4
const/16 v2, 0x51
iput v2, v12, Landroid/widget/FrameLayout$LayoutParams;->gravity:I
goto :goto_1
.line 322
.end local v10 # "clearRecentsLocation":I
.end local v12 # "params":Landroid/widget/FrameLayout$LayoutParams;
:cond_3
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
const/16 v5, 0x8
invoke-virtual {v2, v5}, Landroid/view/View;->setVisibility(I)V
goto :goto_2
.line 338
.restart local v9 # "childCount":I
.restart local v11 # "i":I
:cond_4
move-object/from16 v0, p0
invoke-virtual {v0, v3, v4}, Lcom/android/systemui/recents/views/RecentsView;->setMeasuredDimension(II)V
.line 339
return-void
.line 299
nop
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
:pswitch_3
:pswitch_2
:pswitch_4
.end packed-switch
.end method
find below method
Code:
.method public unfilterFilteredStacks()Z
add this on above of previous methos
Code:
.method public startFABanimation()V
.locals 4
.prologue
.line 349
invoke-virtual {p0}, Lcom/android/systemui/recents/views/RecentsView;->getParent()Landroid/view/ViewParent;
move-result-object v0
check-cast v0, Landroid/view/View;
const v1, 0x7f0e0170
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
.line 350
iget-object v0, p0, Lcom/android/systemui/recents/views/RecentsView;->mFloatingButton:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;
move-result-object v0
const/high16 v1, 0x3f800000
invoke-virtual {v0, v1}, Landroid/view/ViewPropertyAnimator;->alpha(F)Landroid/view/ViewPropertyAnimator;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget v1, v1, Lcom/android/systemui/recents/RecentsConfiguration;->taskBarEnterAnimDelay:I
int-to-long v2, v1
invoke-virtual {v0, v2, v3}, Landroid/view/ViewPropertyAnimator;->setStartDelay(J)Landroid/view/ViewPropertyAnimator;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget v1, v1, Lcom/android/systemui/recents/RecentsConfiguration;->taskBarEnterAnimDuration:I
int-to-long v2, v1
invoke-virtual {v0, v2, v3}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/recents/views/RecentsView;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;
iget-object v1, v1, Lcom/android/systemui/recents/RecentsConfiguration;->fastOutLinearInInterpolator:Landroid/view/animation/Interpolator;
invoke-virtual {v0, v1}, Landroid/view/ViewPropertyAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)Landroid/view/ViewPropertyAnimator;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewPropertyAnimator;->withLayer()Landroid/view/ViewPropertyAnimator;
move-result-object v0
invoke-virtual {v0}, Landroid/view/ViewPropertyAnimator;->start()V
.line 356
return-void
.end method
find and replace id's
0x7f0e0170 - <public type="id" name="gk_recents"
Click to expand...
Click to collapse
9.Open SystemUI\smali\com\android\systemui\recents\views\TaskStackView.smali
find
Code:
.method private updateStackTransforms(Ljava/util/ArrayList;Ljava/util/ArrayList;F[IZ)Z
add this on above of previous method
Code:
.method static synthetic access$000(Lcom/android/systemui/recents/views/TaskStackView;)Z
.locals 1
.param p0, "x0" # Lcom/android/systemui/recents/views/TaskStackView;
.prologue
.line 57
invoke-direct {p0}, Lcom/android/systemui/recents/views/TaskStackView;->dismissAll()Z
move-result v0
return v0
.end method
.method static synthetic access$102(Lcom/android/systemui/recents/views/TaskStackView;Landroid/widget/PopupMenu;)Landroid/widget/PopupMenu;
.locals 0
.param p0, "x0" # Lcom/android/systemui/recents/views/TaskStackView;
.param p1, "x1" # Landroid/widget/PopupMenu;
.prologue
.line 57
iput-object p1, p0, Lcom/android/systemui/recents/views/TaskStackView;->mPopup:Landroid/widget/PopupMenu;
return-object p1
.end method
.method private dismissAll()Z
.locals 3
.prologue
const/4 v0, 0x1
.line 495
iget-object v1, p0, Lcom/android/systemui/recents/views/TaskStackView;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "recents_clear_all_dismiss_all"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-ne v1, v0, :cond_0
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
10.Open SystemUI\smali\com\android\systemui\recents\RecentsConfiguration.smali
find
Code:
.field static sPrevConfigurationHashCode:I
below add this code
Code:
.field public static searchBarSpaceHeightPx:I
find and remove below code
Code:
.field public searchBarSpaceHeightPx:I
find below method
Code:
.method public getSearchBarBounds(IIILandroid/graphics/Rect;)V
in the same method find below line
Code:
iget v0, p0, Lcom/android/systemui/recents/RecentsConfiguration;->searchBarSpaceHeightPx:I
replace the line with below code
Code:
sget v0, Lcom/android/systemui/recents/RecentsConfiguration;->searchBarSpaceHeightPx:I
find
Code:
.method update (Landroid / content / Context;) V
in the same method find and remove the below code
Code:
.line 201
const v7, 0x7f080064
invoke-virtual {v2, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v7
iput v7, p0, Lcom/android/systemui/recents/RecentsConfiguration;->searchBarSpaceHeightPx:I
0x7f080064 - <public type="dimen" name="recents_search_bar_space_height"
Click to expand...
Click to collapse
11.Decompile SystemUI and move to your device
Abdullaharis said:
Hello guys
Here is a new guide on setting up the recents.
Credit:-
KachalkinGeorg (The GK)
Requirements (deodexed):-
1.Settings.apk
2.SystemUI.apk
3.NotePad++
4.Patience.. if you dont have try to get it
Click to expand...
Click to collapse
Can anyone get this in a module for the Xposed Installer ???
guillermorojaz said:
Can anyone get this in a module for the Xposed Installer ???
Click to expand...
Click to collapse
Editting Manually is Best i think.
Abdullaharis said:
Editting Manually is Best i think.
Click to expand...
Click to collapse
Thank you for prompt reply.
Unfortunately I do not have that knowledge :crying:
Can you help me
If I send the Settings.apk and the SystemUI.apk from my ROM you could help me?
Thank you in advance.
EDIT AND AGREEMENT.
Actually what I want is the button to clean recent apps all along the bottom of the screen, as shown in the image I attached
Unfortunately I do not have that knowledge :crying:
Can you help me
If I send the Settings.apk and the SystemUI.apk from my ROM you could help me?
Click to expand...
Click to collapse
ok, just send the files i will try
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?