Hey Folks, i'm Michael, i'm 28 and from Germany. First of all Great Forum you Guys build here. A really good Source for solutions in any kind of android problems.
Today i want talk with you about a Software "Problem" i have with my Android Car Stereo.
For a good overview i write a short briefing.
- Android Car Stereo: icartech Alpha v800
- Android 2.2 Froyo
- root access (with z4root)
- adb access only with wifi
- no recovery Menu
- i got the original Stock Rom, which can flash on the System
The Problem:
The Launcher has a Dock with several system App Shortcuts. The Dock is fix, so i can't delete icons, can't change Icon Order, can't add Icons. No new installed app can add a shortcut to the Dock. Except iGO Primo, it's the only app, that has automaticly add a shortcut to the Dock.
I want delete some shortcuts, cause i don't need them and i want add some shortcuts that i daily need.
My Question is: how can i unlock the Dock that i can change thins? Or modify non system apps to add a shortcut to the dock? Is it possible that the launcher has a app list, which controlls, what app can add a shortcut and what can't? And when a decompile the Launcher in which .smali i can possible find the "permissions"?
I really hoping to get help here, i tried to find help in several german Forums, but no one answered me. :-/
I hope you can't understand my english too.
I wish you all a great Day.
Michael
P.S. every app (Apk) is available, so i can post Sourcecode, if it needed
Thats the Car Stereo in my Skoda
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
michael08071984 said:
Hey Folks, i'm Michael, i'm 28 and from Germany. First of all Great Forum you Guys build here. A really good Source for solutions in any kind of android problems.
Click to expand...
Click to collapse
Why don't you experiment with different launchers - surely 1 of the hundreds available would work well for your car? I actually think one of the IOS clone launchers would work well for the car (i.e. no app drawer to navigate while driving). On the same vein, the Windows Launcher 8 clones could do a good job...
or this http://forum.xda-developers.com/showthread.php?t=2218231
Gosh! I forgot to mention, that other launchers not work properly, cause they set the system apps mute. I mean, when i hear analog Radio (fm Radio), AuxIn1 and 2 or Digital Radio, there is no Sound. Only with the stock Launcher.
Launchers i tested:
- Balance Launcher
- ADW Launcher
- go launcher ex
- zeam Launcher
- nemus Launcher
- smart Launcher pro
- Apex Launcher
Greetings
michael08071984 said:
Gosh! I forgot to mention, that other launchers not work properly, cause they set the system apps mute. I mean, when i hear analog Radio (fm Radio), AuxIn1 and 2 or Digital Radio, there is no Sound. Only with the stock Launcher.
Launchers i tested:
- Balance Launcher
- ADW Launcher
- go launcher ex
- zeam Launcher
- nemus Launcher
- smart Launcher pro
- Apex Launcher
Greetings
Click to expand...
Click to collapse
Odd... its possible the stock launcher has a list, I would check inside /data/data/com.name_of_launcher_package/
and see whether there is config files and or a sqllite database that has those entries... just a guess though
Have you tried pushing an alternate laucher to /system/app - might be a permissions thing that is preventing audio for user apps..
Sorry if you've tried this stuff, you quiet likely know more than me!
Thanks for the Tip, i'll give the data folder a sharper look.
I installed the different launcher from the system/apps Folder and i also renamed it like the original launcher, nothing helps.
Hey Folks.
Found the List in the CommUtil.smali. I changed the second app, with the spotify package name. Compiled the modified launcher2.apk. Interchanged the Launcher2.apk with the modified. Restart but nothing happens. Still no Spotify Icon in the Dock. Heres the CommUtil.smali Code:
Code:
.class public final Lcom/android/launcher2/foryou/CommUtil;
.super Ljava/lang/Object;
.source "CommUtil.java"
# static fields
.field public static final DELAY_TIME:I = 0x5dc
.field public static final IS_FORBID_THIRD_APPS:Z
.field public static mMatrix:Landroid/graphics/Matrix;
.field public static parkingFlag:I
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 22
new-instance v0, Landroid/graphics/Matrix;
invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V
sput-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
.line 26
const/4 v0, 0x1
sput v0, Lcom/android/launcher2/foryou/CommUtil;->parkingFlag:I
.line 21
return-void
.end method
.method public constructor <init>()V
.locals 0
.prologue
.line 21
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getSortFlagApplicationInfo(Ljava/lang/String;)I
.locals 3
.parameter "pkg"
.prologue
const/16 v2, 0x19
const/4 v1, 0x4
.line 131
if-eqz p0, :cond_19
.line 132
const-string v0, "com.foryou.radio.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 133
const/4 v0, 0x1
.line 186
:goto_0
return v0
.line 134
:cond_0
const-string v0, "com.spotify.mobile.android.ui"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
.line 135
const/4 v0, 0x2
goto :goto_0
.line 136
:cond_1
const-string v0, "com.foryou.dab.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
.line 137
const/4 v0, 0x3
goto :goto_0
.line 138
:cond_2
const-string v0, "com.foryou.mobilenavigation"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
move v0, v1
.line 139
goto :goto_0
.line 140
:cond_3
const-string v0, "com.navngo.igo.javaclient"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
move v0, v1
.line 141
goto :goto_0
.line 142
:cond_4
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_5
move v0, v1
.line 143
goto :goto_0
.line 144
:cond_5
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
move v0, v1
.line 145
goto :goto_0
.line 146
:cond_6
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_7
move v0, v1
.line 147
goto :goto_0
.line 148
:cond_7
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_8
move v0, v1
.line 149
goto :goto_0
.line 150
:cond_8
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_9
move v0, v1
.line 151
goto :goto_0
.line 152
:cond_9
const-string v0, "com.foryou.bt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_a
.line 153
const/4 v0, 0x5
goto :goto_0
.line 154
:cond_a
const-string v0, "com.android.contacts"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_b
.line 155
const/4 v0, 0x6
goto :goto_0
.line 156
:cond_b
const-string v0, "com.foryou.ipod.usb.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_c
.line 157
const/4 v0, 0x7
goto :goto_0
.line 158
:cond_c
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_d
.line 159
const/16 v0, 0x8
goto/16 :goto_0
.line 160
:cond_d
const-string v0, "com.foryou.rear.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_e
.line 161
const/16 v0, 0x9
goto/16 :goto_0
.line 162
:cond_e
const-string v0, "com.foryou.video"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_f
.line 163
const/16 v0, 0xa
goto/16 :goto_0
.line 164
:cond_f
const-string v0, "com.foryou.dvbt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_10
.line 165
const/16 v0, 0xb
goto/16 :goto_0
.line 166
:cond_10
const-string v0, "com.foryou.dvr.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_11
.line 167
const/16 v0, 0xc
goto/16 :goto_0
.line 168
:cond_11
const-string v0, "com.foryou.auxin1"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_12
.line 169
const/16 v0, 0xd
goto/16 :goto_0
.line 170
:cond_12
const-string v0, "com.foryou.auxin2"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_13
.line 171
const/16 v0, 0xe
goto/16 :goto_0
.line 172
:cond_13
const-string v0, "com.foryou.atv.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_14
.line 173
const/16 v0, 0xf
goto/16 :goto_0
.line 174
:cond_14
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_15
.line 175
const/16 v0, 0x10
goto/16 :goto_0
.line 176
:cond_15
const-string v0, "com.foryou.camera"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_16
.line 177
const/16 v0, 0x11
goto/16 :goto_0
.line 178
:cond_16
const-string v0, "com.foryou.swc.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_17
.line 179
const/16 v0, 0x12
goto/16 :goto_0
.line 180
:cond_17
const-string v0, "com.foryou.eq.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_18
.line 181
const/16 v0, 0x13
goto/16 :goto_0
:cond_18
move v0, v2
.line 183
goto/16 :goto_0
:cond_19
move v0, v2
.line 186
goto/16 :goto_0
.end method
.method public static final isForyouAPP(Lcom/android/launcher2/ApplicationInfo;)Z
.locals 2
.parameter "appInfo"
.prologue
.line 37
invoke-virtual {p0}, Lcom/android/launcher2/ApplicationInfo;->getComponentName()Landroid/content/ComponentName;
move-result-object v1
invoke-virtual {v1}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v0
.line 38
.local v0, pkgName:Ljava/lang/String;
invoke-static {v0}, Lcom/android/launcher2/foryou/CommUtil;->isForyouAPP(Ljava/lang/String;)Z
move-result v1
return v1
.end method
.method public static final isForyouAPP(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 44
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 45
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 46
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 47
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 48
const-string v0, "cityguide.probki.net"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 49
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 50
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 51
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 52
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 54
:cond_0
const/4 v0, 0x1
.line 56
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isForyouAPP2(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 60
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 61
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 62
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 69
:cond_0
const/4 v0, 0x1
.line 71
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isNotForyouApps(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 81
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 82
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 83
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 84
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 85
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 86
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 87
const-string v0, "com.android.APKTools"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 88
const-string v0, "com.android.calendar"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 89
const-string v0, "com.android.deskclock"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 90
const-string v0, "com.android.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 91
const-string v0, "com.foryou.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 92
const-string v0, "com.google.android.apps.maps"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 93
const-string v0, "com.chartcross.gpstestplus"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 95
:cond_0
const/4 v0, 0x1
.line 97
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final scaleBitmap(Landroid/graphics/Bitmap;FF)Landroid/graphics/Bitmap;
.locals 7
.parameter "src"
.parameter "scaleX"
.parameter "scaleY"
.prologue
const/4 v1, 0x0
.line 110
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0}, Landroid/graphics/Matrix;->reset()V
.line 111
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0, p1, p2}, Landroid/graphics/Matrix;->postScale(FF)Z
.line 112
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
sget-object v5, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
const/4 v6, 0x1
move-object v0, p0
move v2, v1
invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
move-result-object v0
return-object v0
.end method
.method public static final sendMessageToApp(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.locals 1
.parameter "who"
.parameter "receiver"
.parameter "messageTag"
.parameter "messageValue"
.prologue
.line 123
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 124
.local v0, intent:Landroid/content/Intent;
invoke-virtual {v0, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 125
invoke-virtual {v0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 126
invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 127
return-void
.end method
I hope anyone can help me. I become desperate. :-/
Android ICS Road Veles Car Stereo Help
michael08071984 said:
Hey Folks.
Found the List in the CommUtil.smali. I changed the second app, with the spotify package name. Compiled the modified launcher2.apk. Interchanged the Launcher2.apk with the modified. Restart but nothing happens. Still no Spotify Icon in the Dock. Heres the CommUtil.smali Code:
Code:
.class public final Lcom/android/launcher2/foryou/CommUtil;
.super Ljava/lang/Object;
.source "CommUtil.java"
# static fields
.field public static final DELAY_TIME:I = 0x5dc
.field public static final IS_FORBID_THIRD_APPS:Z
.field public static mMatrix:Landroid/graphics/Matrix;
.field public static parkingFlag:I
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 22
new-instance v0, Landroid/graphics/Matrix;
invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V
sput-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
.line 26
const/4 v0, 0x1
sput v0, Lcom/android/launcher2/foryou/CommUtil;->parkingFlag:I
.line 21
return-void
.end method
.method public constructor <init>()V
.locals 0
.prologue
.line 21
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getSortFlagApplicationInfo(Ljava/lang/String;)I
.locals 3
.parameter "pkg"
.prologue
const/16 v2, 0x19
const/4 v1, 0x4
.line 131
if-eqz p0, :cond_19
.line 132
const-string v0, "com.foryou.radio.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 133
const/4 v0, 0x1
.line 186
:goto_0
return v0
.line 134
:cond_0
const-string v0, "com.spotify.mobile.android.ui"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
.line 135
const/4 v0, 0x2
goto :goto_0
.line 136
:cond_1
const-string v0, "com.foryou.dab.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
.line 137
const/4 v0, 0x3
goto :goto_0
.line 138
:cond_2
const-string v0, "com.foryou.mobilenavigation"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3
move v0, v1
.line 139
goto :goto_0
.line 140
:cond_3
const-string v0, "com.navngo.igo.javaclient"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
move v0, v1
.line 141
goto :goto_0
.line 142
:cond_4
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_5
move v0, v1
.line 143
goto :goto_0
.line 144
:cond_5
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
move v0, v1
.line 145
goto :goto_0
.line 146
:cond_6
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_7
move v0, v1
.line 147
goto :goto_0
.line 148
:cond_7
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_8
move v0, v1
.line 149
goto :goto_0
.line 150
:cond_8
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_9
move v0, v1
.line 151
goto :goto_0
.line 152
:cond_9
const-string v0, "com.foryou.bt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_a
.line 153
const/4 v0, 0x5
goto :goto_0
.line 154
:cond_a
const-string v0, "com.android.contacts"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_b
.line 155
const/4 v0, 0x6
goto :goto_0
.line 156
:cond_b
const-string v0, "com.foryou.ipod.usb.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_c
.line 157
const/4 v0, 0x7
goto :goto_0
.line 158
:cond_c
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_d
.line 159
const/16 v0, 0x8
goto/16 :goto_0
.line 160
:cond_d
const-string v0, "com.foryou.rear.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_e
.line 161
const/16 v0, 0x9
goto/16 :goto_0
.line 162
:cond_e
const-string v0, "com.foryou.video"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_f
.line 163
const/16 v0, 0xa
goto/16 :goto_0
.line 164
:cond_f
const-string v0, "com.foryou.dvbt.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_10
.line 165
const/16 v0, 0xb
goto/16 :goto_0
.line 166
:cond_10
const-string v0, "com.foryou.dvr.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_11
.line 167
const/16 v0, 0xc
goto/16 :goto_0
.line 168
:cond_11
const-string v0, "com.foryou.auxin1"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_12
.line 169
const/16 v0, 0xd
goto/16 :goto_0
.line 170
:cond_12
const-string v0, "com.foryou.auxin2"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_13
.line 171
const/16 v0, 0xe
goto/16 :goto_0
.line 172
:cond_13
const-string v0, "com.foryou.atv.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_14
.line 173
const/16 v0, 0xf
goto/16 :goto_0
.line 174
:cond_14
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_15
.line 175
const/16 v0, 0x10
goto/16 :goto_0
.line 176
:cond_15
const-string v0, "com.foryou.camera"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_16
.line 177
const/16 v0, 0x11
goto/16 :goto_0
.line 178
:cond_16
const-string v0, "com.foryou.swc.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_17
.line 179
const/16 v0, 0x12
goto/16 :goto_0
.line 180
:cond_17
const-string v0, "com.foryou.eq.activity"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_18
.line 181
const/16 v0, 0x13
goto/16 :goto_0
:cond_18
move v0, v2
.line 183
goto/16 :goto_0
:cond_19
move v0, v2
.line 186
goto/16 :goto_0
.end method
.method public static final isForyouAPP(Lcom/android/launcher2/ApplicationInfo;)Z
.locals 2
.parameter "appInfo"
.prologue
.line 37
invoke-virtual {p0}, Lcom/android/launcher2/ApplicationInfo;->getComponentName()Landroid/content/ComponentName;
move-result-object v1
invoke-virtual {v1}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;
move-result-object v0
.line 38
.local v0, pkgName:Ljava/lang/String;
invoke-static {v0}, Lcom/android/launcher2/foryou/CommUtil;->isForyouAPP(Ljava/lang/String;)Z
move-result v1
return v1
.end method
.method public static final isForyouAPP(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 44
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 45
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 46
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 47
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 48
const-string v0, "cityguide.probki.net"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 49
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 50
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 51
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 52
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 54
:cond_0
const/4 v0, 0x1
.line 56
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isForyouAPP2(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 60
const-string v0, "com.foryou"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 61
const-string v0, "com.android.music"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 62
const-string v0, "com.cooliris.media"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 69
:cond_0
const/4 v0, 0x1
.line 71
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final isNotForyouApps(Ljava/lang/String;)Z
.locals 1
.parameter "packageName"
.prologue
.line 81
const-string v0, "com.navngo.igo"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 82
const-string v0, "cityguide.probki.net.co"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 83
const-string v0, "com.metroview.nav"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 84
const-string v0, "com.navitel"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 85
const-string v0, "com.navcol.quipu"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 86
const-string v0, "com.sygic"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 87
const-string v0, "com.android.APKTools"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 88
const-string v0, "com.android.calendar"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 89
const-string v0, "com.android.deskclock"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 90
const-string v0, "com.android.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 91
const-string v0, "com.foryou.settings"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 92
const-string v0, "com.google.android.apps.maps"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 93
const-string v0, "com.chartcross.gpstestplus"
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
.line 95
:cond_0
const/4 v0, 0x1
.line 97
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public static final scaleBitmap(Landroid/graphics/Bitmap;FF)Landroid/graphics/Bitmap;
.locals 7
.parameter "src"
.parameter "scaleX"
.parameter "scaleY"
.prologue
const/4 v1, 0x0
.line 110
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0}, Landroid/graphics/Matrix;->reset()V
.line 111
sget-object v0, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v0, p1, p2}, Landroid/graphics/Matrix;->postScale(FF)Z
.line 112
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
sget-object v5, Lcom/android/launcher2/foryou/CommUtil;->mMatrix:Landroid/graphics/Matrix;
const/4 v6, 0x1
move-object v0, p0
move v2, v1
invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
move-result-object v0
return-object v0
.end method
.method public static final sendMessageToApp(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.locals 1
.parameter "who"
.parameter "receiver"
.parameter "messageTag"
.parameter "messageValue"
.prologue
.line 123
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 124
.local v0, intent:Landroid/content/Intent;
invoke-virtual {v0, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 125
invoke-virtual {v0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 126
invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 127
return-void
.end method
I hope anyone can help me. I become desperate. :-/
Click to expand...
Click to collapse
I am desperate to know how to connect to this device to fault find, why the android system does not boot up!!
had this device 3 weeks and now no sound cause the android part does not boot so car stereo useless at moment..
Is there anyone who knows how to fix this device???
I do not want to send it back to china to be fixed due to cost and time....
any help would be appreciated...
KR
Flapjack1
flapjack1 said:
I am desperate to know how to connect to this device to fault find, why the android system does not boot up!!
had this device 3 weeks and now no sound cause the android part does not boot so car stereo useless at moment..
Is there anyone who knows how to fix this device???
I do not want to send it back to china to be fixed due to cost and time....
any help would be appreciated...
KR
Flapjack1
Click to expand...
Click to collapse
Have you a full android car Stereo or WinCE with Android Part? Mine is full android. press return, Home and Power Button at the same time and hold it pressed, when a flash Process is starting, i can help you.
Michael,
I have the wince 6 and android version all in a 1 DIN unit.
I called all or most if the car audio repair shops in UK, but they won't touch the unit as its an import. So you help would be fantastic as I searched the web and no info out there yet
KR
Flapjack1
Hi, I also have a Road Veles and am looking for a place to discuss the device.
I would like to work out how to add bluetooth to android. The device has a bluetooth adapter but it is for exclusive use of the winCE functions (Hands free, music from phone etc), Android does not have access to bluetooth so the app that I bought the stereo to run (MSDroid) does not work.
Road Veles comes with a WiFi adapter, I have purchased but am yet to receive a combined WiFi and Bluetooth dongle. I have tried plugging a BT dongle into the USB port that is normally used by the WiFi dongle, the device see the BT adapter inside "USB Device Info" app, but there is no Bluetooth control visible that would normally be located under WiFi inside Settings.
Related
Hi,
i like the MIUI battery top bar but i want also have a percent indicator.
I have no idea how to find the related strings and values... to activate the top bar style and the battery percent style concurrently...
I hope someone of you can help me
Smali code:
Code:
.class public Lcom/android/systemui/statusbar/BatteryStatus;
.super Lcom/android/systemui/statusbar/StatusBarIconView;
.source "BatteryStatus.java"
# static fields
.field private static mBatteryStyle:I
.field static sIconUnit:I
# instance fields
.field private mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.field private mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
.field private mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 153
const/16 v0, 0x26
sput v0, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
.locals 2
.parameter "context"
.parameter "slot"
.prologue
.line 44
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/StatusBarIconView;-><init>(Landroid/content/Context;Ljava/lang/String;)V
.line 46
invoke-direct {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateBatterySettings()V
.line 47
new-instance v0, Lcom/android/systemui/statusbar/BatteryStatus$1;
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus$1;-><init>(Lcom/android/systemui/statusbar/BatteryStatus;Landroid/os/Handler;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
.line 53
return-void
.end method
.method static synthetic access$000(Lcom/android/systemui/statusbar/BatteryStatus;)V
.locals 0
.parameter "x0"
.prologue
.line 36
invoke-direct {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateBatterySettings()V
return-void
.end method
.method private extractDrawable(I)Ljava/util/ArrayList;
.locals 17
.parameter "resId"
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Ljava/util/ArrayList",
"<",
"Landroid/graphics/drawable/Drawable;",
">;"
}
.end annotation
.prologue
.line 155
new-instance v15, Ljava/util/ArrayList;
invoke-direct {v15}, Ljava/util/ArrayList;-><init>()V
.line 157
.local v15, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
move-object v4, v0
invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v14
.line 158
.local v14, res:Landroid/content/res/Resources;
move-object v0, v14
move/from16 v1, p1
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;
move-result-object v4
invoke-static {v4}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;
move-result-object v2
.line 159
.local v2, bm:Landroid/graphics/Bitmap;
if-nez v2, :cond_0
.line 175
:goto_0
return-object v15
.line 163
:cond_0
invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
div-int v16, v4, v5
.line 164
.local v16, rowCount:I
invoke-virtual {v2}, Landroid/graphics/Bitmap;->getWidth()I
move-result v4
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
div-int v10, v4, v5
.line 165
.local v10, columnCount:I
sget v4, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v4, v5
new-array v3, v4, [I
.line 166
.local v3, pixels:[I
const/4 v11, 0x0
.local v11, i:I
:goto_1
move v0, v11
move/from16 v1, v16
if-ge v0, v1, :cond_2
.line 167
const/4 v13, 0x0
.local v13, j:I
:goto_2
if-ge v13, v10, :cond_1
.line 168
const/4 v4, 0x0
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v6, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v6, v13
sget v7, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
mul-int/2addr v7, v11
sget v8, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v9, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
invoke-virtual/range {v2 .. v9}, Landroid/graphics/Bitmap;->getPixels([IIIIIII)V
.line 169
const/4 v4, 0x0
sget v5, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v6, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget v7, Lcom/android/systemui/statusbar/BatteryStatus;->sIconUnit:I
sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
invoke-static/range {v3 .. v8}, Landroid/graphics/Bitmap;->createBitmap([IIIIILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
move-result-object v12
.line 170
.local v12, icon:Landroid/graphics/Bitmap;
new-instance v4, Landroid/graphics/drawable/BitmapDrawable;
invoke-direct {v4, v14, v12}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V
invoke-virtual {v15, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 167
add-int/lit8 v13, v13, 0x1
goto :goto_2
.line 166
.end local v12 #icon:Landroid/graphics/Bitmap;
:cond_1
add-int/lit8 v11, v11, 0x1
goto :goto_1
.line 173
.end local v13 #j:I
:cond_2
invoke-virtual {v2}, Landroid/graphics/Bitmap;->recycle()V
goto :goto_0
.end method
.method private generateAnimation(I)Landroid/graphics/drawable/LevelListDrawable;
.locals 11
.parameter "resId"
.prologue
.line 129
new-instance v7, Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {v7}, Landroid/graphics/drawable/LevelListDrawable;-><init>()V
.line 131
.local v7, result:Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->extractDrawable(I)Ljava/util/ArrayList;
move-result-object v3
.line 132
.local v3, drawables:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v1
.line 133
.local v1, count:I
if-lez v1, :cond_1
.line 135
const v8, 0x3ecccccd
.line 136
.local v8, sum:F
const/high16 v9, 0x42c8
int-to-float v10, v1
div-float v2, v9, v10
.line 137
.local v2, delta:F
const/16 v9, 0x1388
div-int v4, v9, v1
.line 138
.local v4, duration:I
const/4 v5, 0x0
.end local p0
.local v5, i:I
:goto_0
if-ge v5, v1, :cond_1
.line 139
new-instance v0, Landroid/graphics/drawable/AnimationDrawable;
invoke-direct {v0}, Landroid/graphics/drawable/AnimationDrawable;-><init>()V
.line 140
.local v0, animation:Landroid/graphics/drawable/AnimationDrawable;
invoke-virtual {v3, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
add-int/lit16 v9, v4, 0x1f4
invoke-virtual {v0, p0, v9}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V
.line 141
add-int/lit8 v6, v5, 0x1
.local v6, j:I
:goto_1
if-ge v6, v1, :cond_0
.line 142
invoke-virtual {v3, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
invoke-virtual {v0, p0, v4}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V
.line 141
add-int/lit8 v6, v6, 0x1
goto :goto_1
.line 144
:cond_0
const/4 v9, 0x0
invoke-virtual {v0, v9}, Landroid/graphics/drawable/AnimationDrawable;->setOneShot(Z)V
.line 145
float-to-int v9, v8
add-float v10, v8, v2
float-to-int v10, v10
invoke-virtual {v7, v9, v10, v0}, Landroid/graphics/drawable/LevelListDrawable;->addLevel(IILandroid/graphics/drawable/Drawable;)V
.line 146
add-float/2addr v8, v2
.line 138
add-int/lit8 v5, v5, 0x1
goto :goto_0
.line 150
.end local v0 #animation:Landroid/graphics/drawable/AnimationDrawable;
.end local v2 #delta:F
.end local v4 #duration:I
.end local v5 #i:I
.end local v6 #j:I
.end local v8 #sum:F
:cond_1
return-object v7
.end method
.method private generateIcon(I)Landroid/graphics/drawable/LevelListDrawable;
.locals 8
.parameter "resId"
.prologue
.line 111
new-instance v4, Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {v4}, Landroid/graphics/drawable/LevelListDrawable;-><init>()V
.line 113
.local v4, result:Landroid/graphics/drawable/LevelListDrawable;
invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->extractDrawable(I)Ljava/util/ArrayList;
move-result-object v2
.line 114
.local v2, drawables:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Landroid/graphics/drawable/Drawable;>;"
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v0
.line 115
.local v0, count:I
if-lez v0, :cond_0
.line 117
const v5, 0x3ecccccd
.line 118
.local v5, sum:F
const/high16 v6, 0x42c8
int-to-float v7, v0
div-float v1, v6, v7
.line 119
.local v1, delta:F
const/4 v3, 0x0
.end local p0
.local v3, i:I
:goto_0
if-ge v3, v0, :cond_0
.line 120
float-to-int v6, v5
add-float v7, v5, v1
float-to-int v7, v7
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p0
check-cast p0, Landroid/graphics/drawable/Drawable;
invoke-virtual {v4, v6, v7, p0}, Landroid/graphics/drawable/LevelListDrawable;->addLevel(IILandroid/graphics/drawable/Drawable;)V
.line 121
add-float/2addr v5, v1
.line 119
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 125
.end local v1 #delta:F
.end local v3 #i:I
.end local v5 #sum:F
:cond_0
return-object v4
.end method
.method private final updateBatterySettings()V
.locals 4
.prologue
const/4 v3, 0x0
.line 180
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "battery_indicator_style"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
sput v0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
.line 184
iput-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
.line 185
iput-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.line 186
new-instance v0, Lcom/android/systemui/statusbar/BatteryStatus$2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/BatteryStatus$2;-><init>(Lcom/android/systemui/statusbar/BatteryStatus;)V
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/BatteryStatus;->post(Ljava/lang/Runnable;)Z
.line 194
return-void
.end method
# virtual methods
.method protected getIcon(Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
.locals 4
.parameter "icon"
.prologue
const/4 v3, 0x0
.line 82
sget v1, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
const/4 v2, 0x2
if-ne v1, v2, :cond_0
move-object v1, v3
.line 107
:goto_0
return-object v1
.line 86
:cond_0
iget v1, p1, Lcom/android/internal/statusbar/StatusBarIcon;->iconId:I
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
iget-boolean v2, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mEnableAlternative:Z
invoke-static {v1, v2}, Lcom/android/systemui/statusbar/AlternativeIcons;->get(Ljava/lang/Integer;Z)I
move-result v0
.line 87
.local v0, iconId:I
sparse-switch v0, :sswitch_data_0
move-object v1, v3
.line 107
goto :goto_0
.line 89
:sswitch_0
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-static {v1, p1}, Lcom/android/systemui/statusbar/StatusBarIconView;->getIcon(Landroid/content/Context;Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
move-result-object v1
goto :goto_0
.line 92
:sswitch_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
if-nez v1, :cond_1
.line 93
const v1, 0x7f050001
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->generateAnimation(I)Landroid/graphics/drawable/LevelListDrawable;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
.line 95
:cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mAnimation:Landroid/graphics/drawable/LevelListDrawable;
goto :goto_0
.line 98
:sswitch_2
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
if-nez v1, :cond_2
.line 99
sget v1, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyle:I
if-nez v1, :cond_3
const/high16 v1, 0x7f05
:goto_1
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->generateIcon(I)Landroid/graphics/drawable/LevelListDrawable;
move-result-object v1
iput-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
.line 104
:cond_2
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mGraphicIcon:Landroid/graphics/drawable/LevelListDrawable;
goto :goto_0
.line 99
:cond_3
const v1, 0x7f050002
goto :goto_1
.line 87
nop
:sswitch_data_0
.sparse-switch
0x10805cc -> :sswitch_2
0x10805d4 -> :sswitch_1
0x10805db -> :sswitch_0
.end sparse-switch
.end method
.method public onAttachedToWindow()V
.locals 4
.prologue
.line 56
invoke-super {p0}, Lcom/android/systemui/statusbar/StatusBarIconView;->onAttachedToWindow()V
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "battery_indicator_style"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
const/4 v2, 0x0
iget-object v3, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
.line 61
return-void
.end method
.method public onDetachedFromWindow()V
.locals 2
.prologue
.line 64
invoke-super {p0}, Lcom/android/systemui/statusbar/StatusBarIconView;->onDetachedFromWindow()V
.line 65
iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
iget-object v1, p0, Lcom/android/systemui/statusbar/BatteryStatus;->mBatteryStyleChangeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->unregisterContentObserver(Landroid/database/ContentObserver;)V
.line 66
return-void
.end method
.method protected setIcon(Lcom/android/internal/statusbar/StatusBarIcon;)V
.locals 2
.parameter "icon"
.prologue
.line 73
const/4 v1, -0x1
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageLevel(I)V
.line 74
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/BatteryStatus;->getIcon(Lcom/android/internal/statusbar/StatusBarIcon;)Landroid/graphics/drawable/Drawable;
move-result-object v0
.line 75
.local v0, drawable:Landroid/graphics/drawable/Drawable;
if-nez v0, :cond_0
const/4 v1, 0x1
:goto_0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/StatusBarIconView;->mHideForAlternative:Z
.line 76
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BatteryStatus;->updateVisibility()V
.line 77
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 78
iget v1, p1, Lcom/android/internal/statusbar/StatusBarIcon;->iconLevel:I
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/BatteryStatus;->setImageLevel(I)V
.line 79
return-void
.line 75
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method protected updateNumber(Lcom/android/internal/statusbar/StatusBarIcon;)V
.locals 0
.parameter "icon"
.prologue
.line 70
return-void
.end method
thank you
greetz
You are doing way to much work. Just go to the setting menu then battery style and choose the number type there.
Sent from my SAMSUNG-SGH-I777 using Tapatalk
Waddle said:
You are doing way to much work. Just go to the setting menu then battery style and choose the number type there.
Sent from my SAMSUNG-SGH-I777 using Tapatalk
Click to expand...
Click to collapse
hi,
thanks for your answer but you missed my point so here is a photo
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i want to show the green battery indicator AND the percent indicator TOGETHER
hope you understand it and can help me
greetz
it is impossible mate..sometimes we gotta live with limitation..
Sent from my LT18i
good day, I need some help in adding some codes to settings.smali. I want to add a condition to the preferencetreeclick method but I always get a force close error, the condition I'm trying to add would be that if wifi toggle is checked then call wifi_settings subscreen. please help me on this one devs. thanks..
Code:
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
.locals 4
.parameter "preferenceScreen"
.parameter "preference"
.prologue
const-string v3, "com.android.settings"
.line 175
invoke-virtual {p2}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
move-result-object v1
.line 176
.local v1, key:Ljava/lang/String;
const-string v2, "call_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_1
.line 177
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 178
.local v0, intent:Landroid/content/Intent;
const-string v2, "com.android.phone"
const-string v3, "com.android.phone.CallSettings"
invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 179
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
.line 258
.end local v0 #intent:Landroid/content/Intent;
:cond_0
:goto_0
invoke-super {p0, p1, p2}, Landroid/preference/PreferenceActivity;->onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z
move-result v2
return v2
.line 180
:cond_1
const-string v2, "fm_transmitter_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2
.line 181
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 182
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.mediatek.FMTransmitter"
const-string v3, "com.mediatek.FMTransmitter.FMTransmitterActivity"
invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 184
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 185
.end local v0 #intent:Landroid/content/Intent;
:cond_2
const-string v2, "customization_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
.line 186
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 187
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.Customization"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 188
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 189
.end local v0 #intent:Landroid/content/Intent;
:cond_3
const-string v2, "gemini_sim_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_4
.line 190
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 191
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.gemini.SimManagement"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 192
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 193
.end local v0 #intent:Landroid/content/Intent;
:cond_4
const-string v2, "toggle_wifi"
# i don't know if this is the right dalvik code for the condition I want to add..
iget-boolean v2, v3, Lcom/android/settings/Settings;->mWifiEnabler:Lcom/android/settings/wifi/WifiEnabler;
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_5
.line 194
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 195
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.wifi.WifiSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 196
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 197
.end local v0 #intent:Landroid/content/Intent;
:cond_5
const-string v2, "audio_profile_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_6
.line 198
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 199
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.audioprofile.AudioProfileSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 201
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto :goto_0
.line 202
.end local v0 #intent:Landroid/content/Intent;
:cond_6
const-string v2, "display_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_7
.line 203
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 204
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DisplaySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 205
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 206
.end local v0 #intent:Landroid/content/Intent;
:cond_7
const-string v2, "location_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_8
.line 207
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 208
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.LocationSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 209
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 210
.end local v0 #intent:Landroid/content/Intent;
:cond_8
const-string v2, "security_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_9
.line 211
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 212
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.SecuritySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 213
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 214
.end local v0 #intent:Landroid/content/Intent;
:cond_9
const-string v2, "applications_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_a
.line 215
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 216
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.ApplicationSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 217
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 218
.end local v0 #intent:Landroid/content/Intent;
:cond_a
const-string v2, "privacy_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_b
.line 219
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 220
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.PrivacySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 221
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 222
.end local v0 #intent:Landroid/content/Intent;
:cond_b
const-string v2, "storage_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_c
.line 223
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 224
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.deviceinfo.Memory"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 225
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 226
.end local v0 #intent:Landroid/content/Intent;
:cond_c
const-string v2, "language_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_d
.line 227
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 228
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.LanguageSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 229
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 230
.end local v0 #intent:Landroid/content/Intent;
:cond_d
const-string v2, "accessibility_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_e
.line 231
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 232
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.AccessibilitySettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 234
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 235
.end local v0 #intent:Landroid/content/Intent;
:cond_e
const-string v2, "date_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_f
.line 236
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 237
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DateTimeSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 238
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 239
.end local v0 #intent:Landroid/content/Intent;
:cond_f
const-string v2, "power_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_10
.line 240
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 241
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.schpwronoff.AlarmClock"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 243
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 244
.end local v0 #intent:Landroid/content/Intent;
:cond_10
const-string v2, "about_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_11
.line 245
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 246
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DeviceInfoSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 247
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 248
.end local v0 #intent:Landroid/content/Intent;
:cond_11
const-string v2, "voice_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_12
.line 249
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 250
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.VoiceInputOutputSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 252
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.line 253
.end local v0 #intent:Landroid/content/Intent;
:cond_12
const-string v2, "dock_settings"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 254
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 255
.restart local v0 #intent:Landroid/content/Intent;
const-string v2, "com.android.settings"
const-string v2, "com.android.settings.DockSettings"
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 256
invoke-virtual {p2, v0}, Landroid/preference/Preference;->setIntent(Landroid/content/Intent;)V
goto/16 :goto_0
.end method
can anyone please help me?..my phone runs on gingerbread 2.3.6 os version..please help me with the codes..thanks!
help please..still can't find the right dalvik code to use..T_T
help anyone?
Double Tap Statusbar to Sleep​
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
So let's begin
Decompile SystemUI.apk
Open com\android\systemui\statusbar\phone\PhoneStatusBarView.smali
Add following code after #static fields
Code:
.field static c:Landroid/content/Context;
Add this after #instance fields
Code:
.field private mDoubleTapGesture:Landroid/view/GestureDetector;
Now search for .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSetV and delete
Code:
[COLOR="Red"]const/4 v2, 0x0[/COLOR]
which comes in beginning of this method.
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code
Code:
sput-object p1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
new-instance v0, Landroid/view/GestureDetector;
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
invoke-direct {v0, v1, v2}, Landroid/view/GestureDetector;-><init>(Landroid/content/Context;Landroid/view/GestureDetector$OnGestureListener;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mDoubleTapGesture:Landroid/view/GestureDetector;
const/4 v2, 0x0
Now search for .method public onTouchEvent(Landroid/view/MotionEventZ at the starting of this method add
Code:
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mDoubleTapGesture:Landroid/view/GestureDetector;
invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z
Download attached file, extract it & put PhoneStatusBarView$1.smali to com\android\systemui\statusbar\phone
Compile back, it is done...
Click to expand...
Click to collapse
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Updated method. Now there won't be FC (i forget to add one line)
BOOTMGR said:
Updated method. Now there won't be FC (i forget to add one line)
Click to expand...
Click to collapse
Working GR8
Thanx
Can you do one zip file , in which we just to flash this zip to have this mod?
Gesendet von meinem GT-I9070 mit Tapatalk
You are really a great developer... @BOOTMGR
Sent from my GT-I9070 using Tapatalk
Thanks, this works on my device JB 4.1.2. Keep on sharing your mods Sir :good:
BOOTMGR said:
Updated method. Now there won't be FC (i forget to add one line)
Click to expand...
Click to collapse
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
It looked a bit complicated at first, but IT WORKS.
You just saved my power button!
shazzl said:
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
Click to expand...
Click to collapse
If you already have PhoneStatusBarView$1 then don't merge changes. Just rename my file to PhoneStatusBarView$2 & replace all other occurences of PhoneStatusBarView$1 with PhoneStatusBarView$2 apperaring on this tutorial.
Hello BOOTMGR,
I try on 4.2.1 ROM, but my PhoneStatusBarView.smali doesn't have "invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-...". Can you show me how to integrate? My Rom has only PhoneStatusBarView.smali file
Code:
.class public Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.super Lcom/android/systemui/statusbar/phone/PanelBar;
.source "PhoneStatusBarView.java"
# static fields
.field private static final DEBUG:Z = false
.field private static final TAG:Ljava/lang/String; = "PhoneStatusBarView"
# instance fields
.field mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.field mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mFullWidthNotifications:Z
.field mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mScrimColor:I
.field mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mSettingsPanelDragzoneFrac:F
.field mSettingsPanelDragzoneMin:F
.field private mShouldFade:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 7
.parameter "context"
.parameter "attrs"
.prologue
const/4 v3, 0x0
const/4 v6, 0x0
const/4 v2, 0x1
.line 47
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/PanelBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 41
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 42
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 49
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
.line 50
.local v1, res:Landroid/content/res/Resources;
const v3, 0x7f0a0003
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
.line 51
const v3, 0x7f0e003c
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getDimension(I)F
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
.line 53
const v3, 0x7f0e003b
const/4 v4, 0x1
const/4 v5, 0x1
:try_start_0
invoke-virtual {v1, v3, v4, v5}, Landroid/content/res/Resources;->getFraction(III)F
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 57
:goto_0
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
cmpg-float v3, v3, v6
if-gtz v3, :cond_0
:goto_1
iput-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
.line 58
return-void
.line 54
:catch_0
move-exception v0
.line 55
.local v0, ex:Landroid/content/res/Resources$NotFoundException;
iput v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
goto :goto_0
.line 57
.end local v0 #ex:Landroid/content/res/Resources$NotFoundException;
:cond_0
const/4 v2, 0x0
goto :goto_1
.end method
# virtual methods
.method public addPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 2
.parameter "pv"
.prologue
.line 77
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->addPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 78
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getId()I
move-result v0
const v1, 0x7f090042
if-ne v0, v1, :cond_1
.line 79
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 83
:cond_0
:goto_0
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-nez v0, :cond_2
const/4 v0, 0x1
:goto_1
invoke-virtual {p1, v0}, Lcom/android/systemui/statusbar/phone/PanelView;->setRubberbandingEnabled(Z)V
.line 84
return-void
.line 80
:cond_1
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getId()I
move-result v0
const v1, 0x7f090071
if-ne v0, v1, :cond_0
.line 81
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_0
.line 83
:cond_2
const/4 v0, 0x0
goto :goto_1
.end method
.method public hasFullWidthNotifications()Z
.locals 1
.prologue
.line 65
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
return v0
.end method
.method public onAllPanelsCollapsed()V
.locals 2
.prologue
const/4 v1, 0x0
.line 156
invoke-super {p0}, Lcom/android/systemui/statusbar/phone/PanelBar;->onAllPanelsCollapsed()V
.line 158
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->makeExpandedInvisibleSoon()V
.line 159
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 160
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 161
return-void
.end method
.method public onAttachedToWindow()V
.locals 3
.prologue
.line 70
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PanelBar;->mPanels:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/systemui/statusbar/phone/PanelView;
.line 71
.local v1, pv:Lcom/android/systemui/statusbar/phone/PanelView;
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-nez v2, :cond_0
const/4 v2, 0x1
:goto_1
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PanelView;->setRubberbandingEnabled(Z)V
goto :goto_0
:cond_0
const/4 v2, 0x0
goto :goto_1
.line 73
.end local v1 #pv:Lcom/android/systemui/statusbar/phone/PanelView;
:cond_1
return-void
.end method
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 181
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-nez v0, :cond_0
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public onPanelFullyOpened(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 1
.parameter "openPanel"
.prologue
.line 165
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onPanelFullyOpened(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 166
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-eq p1, v0, :cond_0
.line 167
const/16 v0, 0x20
invoke-virtual {p1, v0}, Lcom/android/systemui/statusbar/phone/PanelView;->sendAccessibilityEvent(I)V
.line 169
:cond_0
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 170
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 171
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
.line 172
return-void
.end method
.method public onPanelPeeked()V
.locals 2
.prologue
.line 138
invoke-super {p0}, Lcom/android/systemui/statusbar/phone/PanelBar;->onPanelPeeked()V
.line 139
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->makeExpandedVisible(Z)V
.line 140
return-void
.end method
.method public onRequestSendAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)Z
.locals 2
.parameter "child"
.parameter "event"
.prologue
.line 93
invoke-super {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/PanelBar;->onRequestSendAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)Z
move-result v1
if-eqz v1, :cond_0
.line 97
invoke-static {}, Landroid/view/accessibility/AccessibilityEvent;->obtain()Landroid/view/accessibility/AccessibilityEvent;
move-result-object v0
.line 98
.local v0, record:Landroid/view/accessibility/AccessibilityEvent;
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->onInitializeAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)V
.line 99
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->dispatchPopulateAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)Z
.line 100
invoke-virtual {p2, v0}, Landroid/view/accessibility/AccessibilityEvent;->appendRecord(Landroid/view/accessibility/AccessibilityRecord;)V
.line 101
const/4 v1, 0x1
.line 103
.end local v0 #record:Landroid/view/accessibility/AccessibilityEvent;
:goto_0
return v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 176
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-nez v0, :cond_0
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public panelExpansionChanged(Lcom/android/systemui/statusbar/phone/PanelView;F)V
.locals 17
.parameter "panel"
.parameter "frac"
.prologue
.line 186
invoke-super/range {p0 .. p2}, Lcom/android/systemui/statusbar/phone/PanelBar;->panelExpansionChanged(Lcom/android/systemui/statusbar/phone/PanelView;F)V
.line 192
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
move-object/from16 v0, p1
if-ne v0, v5, :cond_0
move-object/from16 v0, p0
iget v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
if-eqz v5, :cond_0
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v5
if-eqz v5, :cond_0
.line 193
move-object/from16 v0, p0
iget-boolean v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
if-eqz v5, :cond_0
.line 194
move-object/from16 v0, p0
iget v0, v0, Lcom/android/systemui/statusbar/phone/PanelBar;->mPanelExpandedFractionSum:F
move/from16 p2, v0
.line 196
const v5, 0x3f99999a
mul-float v5, v5, p2
const v6, 0x3e4ccccd
sub-float p2, v5, v6
.line 197
const/4 v5, 0x0
cmpg-float v5, p2, v5
if-gtz v5, :cond_3
.line 215
:cond_0
:goto_0
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->getStatusBarHeight()I
move-result v1
.line 216
.local v1, H:I
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v5
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getPaddingBottom()I
move-result v6
int-to-float v6, v6
add-float v4, v5, v6
.line 217
.local v4, ph:F
const/high16 v2, 0x3f80
.line 218
.local v2, alpha:F
mul-int/lit8 v5, v1, 0x2
int-to-float v5, v5
cmpg-float v5, v4, v5
if-gez v5, :cond_1
.line 219
int-to-float v5, v1
cmpg-float v5, v4, v5
if-gez v5, :cond_4
const/4 v2, 0x0
.line 221
:goto_1
mul-float/2addr v2, v2
.line 223
:cond_1
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getAlpha()F
move-result v5
cmpl-float v5, v5, v2
if-eqz v5, :cond_2
.line 224
move-object/from16 v0, p1
invoke-virtual {v0, v2}, Lcom/android/systemui/statusbar/phone/PanelView;->setAlpha(F)V
.line 227
:cond_2
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
const/4 v6, 0x0
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateCarrierLabelVisibility(Z)V
.line 228
return-void
.line 203
.end local v1 #H:I
.end local v2 #alpha:F
.end local v4 #ph:F
:cond_3
const-wide/high16 v5, 0x3ff0
const-wide/high16 v7, 0x3fe0
const-wide/high16 v9, 0x3ff0
const-wide v11, 0x400921fa00000000L
const/high16 v13, 0x3f80
sub-float v13, v13, p2
float-to-double v13, v13
const-wide/high16 v15, 0x4000
invoke-static/range {v13 .. v16}, Ljava/lang/Math;->pow(DD)D
move-result-wide v13
mul-double/2addr v11, v13
invoke-static {v11, v12}, Ljava/lang/Math;->cos(D)D
move-result-wide v11
sub-double/2addr v9, v11
mul-double/2addr v7, v9
sub-double/2addr v5, v7
double-to-float v3, v5
.line 205
.local v3, k:F
move-object/from16 v0, p0
iget v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
ushr-int/lit8 v5, v5, 0x18
int-to-float v5, v5
mul-float/2addr v5, v3
float-to-int v5, v5
shl-int/lit8 v5, v5, 0x18
move-object/from16 v0, p0
iget v6, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
const v7, 0xffffff
and-int/2addr v6, v7
or-int/2addr v5, v6
goto :goto_0
.line 220
.end local v3 #k:F
.restart local v1 #H:I
.restart local v2 #alpha:F
.restart local v4 #ph:F
:cond_4
int-to-float v5, v1
sub-float v5, v4, v5
int-to-float v6, v1
div-float v2, v5, v6
goto :goto_1
.end method
.method public panelsEnabled()Z
.locals 2
.prologue
.line 88
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
iget v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
const/high16 v1, 0x1
and-int/2addr v0, v1
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public selectPanelForTouch(Landroid/view/MotionEvent;)Lcom/android/systemui/statusbar/phone/PanelView;
.locals 6
.parameter "touch"
.prologue
const/4 v4, 0x0
.line 108
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v2
.line 110
.local v2, x:F
iget-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-eqz v3, :cond_2
.line 112
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-nez v3, :cond_0
move v3, v4
:goto_0
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v5
add-float/2addr v3, v5
cmpl-float v3, v3, v4
if-lez v3, :cond_1
const/4 v3, 0x0
.line 133
:goto_1
return-object v3
.line 112
:cond_0
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v3}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v3
goto :goto_0
:cond_1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
.line 122
:cond_2
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getMeasuredWidth()I
move-result v3
int-to-float v1, v3
.line 123
.local v1, w:F
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
mul-float v0, v1, v3
.line 131
.local v0, region:F
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
cmpg-float v3, v0, v3
if-gez v3, :cond_3
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
.line 133
:cond_3
sub-float v3, v1, v2
cmpg-float v3, v3, v0
if-gez v3, :cond_4
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
:cond_4
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
.end method
.method public setBar(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "bar"
.prologue
.line 61
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.line 62
return-void
.end method
.method public startOpeningPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 1
.parameter "panel"
.prologue
.line 144
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->startOpeningPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 147
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PanelView;->isFullyExpanded()Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
.line 151
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 152
return-void
.line 147
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
BOOTMGR said:
Double Tap Statusbar to Sleep​
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Click to expand...
Click to collapse
will this work on stock roms?
yeshwanthvshenoy said:
will this work on stock roms?
Click to expand...
Click to collapse
If you read whole post you will find this at the end:
"I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)..."
shut_down said:
If you read whole post you will find this at the end:
"I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)..."
Click to expand...
Click to collapse
had this doubt thatz why asked coz some stock roms dont support this feature
BOOTMGR said:
Double Tap Statusbar to Sleep​
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Click to expand...
Click to collapse
Sir can you help me im using a dual sim phone and it has no phonestatusbarview.smali and I already have phonestatusbarview1.smali
Hope you can help me in this mod thank you sir
shazzl said:
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
Click to expand...
Click to collapse
Hi sir i have the same problm w/ u Im also using 4.2 and i have already phone status view 1 up to 34 .smali what did you do can you help me? hmmm
Does this still work, or is there any updated guide?
shwise said:
Does this still work, or is there any updated guide?
Click to expand...
Click to collapse
It works (at least on my i9070 running Samsung's 4.1.2 firmware).
I added this to my ROM (about a week ago) and it works just like it should.
There is an alternate guide for this too, but I never tried it..
In case you're interested, here's a link to it.
is there any easiest way to install double tap status bar to sleep for JB 4.1.2
masud0869 said:
is there any easiest way to install double tap status bar to sleep for JB 4.1.2
Click to expand...
Click to collapse
Yes. There is.
You can install this Xposed Module: http://forum.xda-developers.com/xposed/modules/mod-doubletaptosleep-v1-0-t2667177
The only requirement is that you need to have Xposed Installer installed on your phone.
Sami Kabir said:
Yes. There is.
You can install this Xposed Module: http://forum.xda-developers.com/xposed/modules/mod-doubletaptosleep-v1-0-t2667177
The only requirement is that you need to have Xposed Installer installed on your phone.
Click to expand...
Click to collapse
Is there required root first?
Hey guys,
I have modded 2-3 Android Apps for Root check and I was able to use them without problem on my rooted device. However this app is giving me a lot of issues. I believe I have found the 2 smali files that have the root check. Does anyone know what needs to be modded or how it needs to be modded on these 2 smali files to bypass the root detection or to make the app believe the device is not rooted?
AppStartMeasurement.smali
Code:
.class public Lcom/comscore/applications/AppStartMeasurement;
.super Lcom/comscore/applications/ApplicationMeasurement;
# direct methods
.method protected constructor <init>(Lcom/comscore/analytics/Core;Lcom/comscore/applications/EventType;Ljava/lang/String;Z)V
.locals 5
const/4 v4, 0x0
invoke-direct {p0, p1, p2, p3, p4}, Lcom/comscore/applications/ApplicationMeasurement;-><init>(Lcom/comscore/analytics/Core;Lcom/comscore/applications/EventType;Ljava/lang/String;Z)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_gs"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getFirstInstallId()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_install"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getInstallId()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_runs"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getRunsCount()I
move-result v2
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
if-eqz p4, :cond_0
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_csf"
const-string v2, "1"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
:cond_0
const-string v0, "0"
invoke-static {}, Lcom/comscore/utils/RootDetector;->isDeviceRooted()Z
move-result v1
if-eqz v1, :cond_1
const-string v0, "1"
:cond_1
new-instance v1, Lcom/comscore/measurement/Label;
const-string v2, "ns_ap_jb"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v1, v2, v0, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v1}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_lastrun"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getPreviousGenesis()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getPreviousVersion()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_2
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
if-lez v1, :cond_2
new-instance v1, Lcom/comscore/measurement/Label;
const-string v2, "ns_ap_updated"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v1, v2, v0, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v1}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
:cond_2
return-void
.end method
RootDetector.smali
Code:
.class public Lcom/comscore/utils/RootDetector;
.super Ljava/lang/Object;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static a()Z
.locals 2
sget-object v0, Landroid/os/Build;->TAGS:Ljava/lang/String;
if-eqz v0, :cond_0
const-string v1, "test-keys"
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method private static b()Z
.locals 2
:try_start_0
new-instance v0, Ljava/io/File;
const-string v1, "/system/app/Superuser.apk"
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->exists()Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:catch_0
move-exception v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public static isDeviceRooted()Z
.locals 2
const/4 v0, 0x1
invoke-static {}, Lcom/comscore/utils/RootDetector;->a()Z
move-result v1
if-eqz v1, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-static {}, Lcom/comscore/utils/RootDetector;->b()Z
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x0
goto :goto_0
.end method
just change this line:
const-string v1, "/system/app/Superuser.apk"
to this:
const-string v1, "/system/app/GTFOSTUPIDASS.apk"
saulin78 said:
Hey guys,
I have modded 2-3 Android Apps for Root check and I was able to use them without problem on my rooted device. However this app is giving me a lot of issues. I believe I have found the 2 smali files that have the root check. Does anyone know what needs to be modded or how it needs to be modded on these 2 smali files to bypass the root detection or to make the app believe the device is not rooted?
.end method
[/CODE]
Click to expand...
Click to collapse
I'm in the same boat. Narrowed it down to those two files. I've tried several methods but this app keeps detecting root. I'm still trying so I'll let you know if I have any success, did you ever find a solution?
Hi I am trying to change the default language from english to spanish. There are 10 languages in the apk that you can change in settings (radio buttons). This smali file is where I think the change needs to be made. My problem is I can't make a change that will let the apk recompile. Can someone give me a tip? Thanks!
Code:
.class public final Lcom/xtreampro/xtreamproiptv/utils/l;
.super Ljava/lang/Object;
.source ""
# direct methods
.method public static final a(Ljava/lang/String;)Ljava/lang/String;
.locals 2
.param p0 # Ljava/lang/String;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
const-string v0, "code"
invoke-static {p0, v0}, Li/y/c/h;->c(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/lang/String;->hashCode()I
move-result v0
const/16 v1, 0xc31
if-eq v0, v1, :cond_8
const/16 v1, 0xc81
if-eq v0, v1, :cond_7
const/16 v1, 0xcae
if-eq v0, v1, :cond_6
const/16 v1, 0xccc
if-eq v0, v1, :cond_5
const/16 v1, 0xd01
if-eq v0, v1, :cond_4
const/16 v1, 0xd2b
if-eq v0, v1, :cond_3
const/16 v1, 0xe04
if-eq v0, v1, :cond_2
const/16 v1, 0xe3d
if-eq v0, v1, :cond_1
const/16 v1, 0xe7e
if-eq v0, v1, :cond_0
goto/16 :goto_0
:cond_0
const-string v0, "tr"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Turkish"
goto :goto_1
:cond_1
const-string v0, "ro"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Romanian"
goto :goto_1
:cond_2
const-string v0, "pt"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Portuguese"
goto :goto_1
:cond_3
const-string v0, "it"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Italian"
goto :goto_1
:cond_4
const-string v0, "hi"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Hindi"
goto :goto_1
:cond_5
const-string v0, "fr"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "French"
goto :goto_1
:cond_6
const-string v0, "es"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Spanish"
goto :goto_1
:cond_7
const-string v0, "de"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "German"
goto :goto_1
:cond_8
const-string v0, "ar"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Arabic"
goto :goto_1
:cond_9
:goto_0
const-string p0, "English"
:goto_1
return-object p0
.end method
.method public static final b()[Ljava/lang/String;
.locals 10
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
const-string v0, "en"
const-string v1, "ar"
const-string v2, "fr"
const-string v3, "de"
const-string v4, "hi"
const-string v5, "it"
const-string v6, "pt"
const-string v7, "ro"
const-string v8, "es"
const-string v9, "tr"
filled-new-array/range {v0 .. v9}, [Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public static final c(Landroid/content/Context;)V
.locals 5
.param p0 # Landroid/content/Context;
.annotation build Lorg/jetbrains/annotations/Nullable;
.end annotation
.end param
sget-object v0, Le/f/a/d/g;->c:Le/f/a/d/g;
invoke-virtual {v0}, Le/f/a/d/g;->w()Ljava/lang/String;
move-result-object v0
if-eqz p0, :cond_0
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v2
const-string v3, "context.applicationContext"
invoke-static {v2, v3}, Li/y/c/h;->b(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v2
new-instance v3, Ljava/util/Locale;
invoke-direct {v3, v0}, Ljava/util/Locale;-><init>(Ljava/lang/String;)V
invoke-static {v3}, Ljava/util/Locale;->setDefault(Ljava/util/Locale;)V
new-instance v0, Landroid/content/res/Configuration;
invoke-direct {v0}, Landroid/content/res/Configuration;-><init>()V
iput-object v3, v0, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
const-string v4, "resources"
invoke-static {v1, v4}, Li/y/c/h;->b(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v4
invoke-virtual {v1, v0, v4}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v4
invoke-virtual {v2, v0, v4}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V
invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
invoke-virtual {v0, v3}, Landroid/content/res/Configuration;->setLocale(Ljava/util/Locale;)V
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/content/Context;->createConfigurationContext(Landroid/content/res/Configuration;)Landroid/content/Context;
invoke-virtual {p0, v0}, Landroid/content/Context;->createConfigurationContext(Landroid/content/res/Configuration;)Landroid/content/Context;
:cond_0
return-void
.end method