yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Robobob1221:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:id="@id/clock" android:textSize="15.0sp" android:typeface="normal" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout [COLOR="Red"]android:gravity="center"[/COLOR] android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="left" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="right" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
</LinearLayout>

I thought this one referenced the other status bar icons. I thought that was why they might be overlapping. Is that one the clock? My bad:confused:

What happens if you change it to 'centre|left or centre_vertical', does it cause a force close?
[Android Software/Hacking General [Developers Only]] MatZ69:
Nop the date still are behind the clock and the statusbar goes to black...
[Android Software/Hacking General [Developers Only]] Robobob1221:
Hmmm. Could it be your StatusBarService.smali then? Maybe the registers don't match up? Apart from pasting in the changes did you make any other changes?
[Android Software/Hacking General [Developers Only]] MatZ69:
Hummm i copy/past from another samsung StatusBarService.smali...

There is it, can you figure out the problem?

If you have time of course :)
[Android Software/Hacking General [Developers Only]] Robobob1221:
This is your edited version, yes?

Do you have an original copy so I can compare?
[Android Software/Hacking General [Developers Only]] MatZ69:
Yh there is it, the original one... Thanks bro
[Android Software/Hacking General [Developers Only]] Shaaan:
You got it wrong. Android:gravity is persent everywhere. It just helps to arrange things. You can change it to center, left, right, center|left or whatever you want (the sytstem should know the place). So editing android:gravity to right will put that particular objet to the right side. There wont be any fcs..

If your only problem is overlapping date and notification then you need to edit the statusbar.xml file
[Android Software/Hacking General [Developers Only]] Robobob1221:
That's why I thought that particular gravity was calling the other icons to the centre. I'm going off a HTC systemui which seems to contain a lot of differences.
[Android Software/Hacking General [Developers Only]] DocHoliday77:
Sorry I can't look at it for you now, on my phone. When you say you copy/paste from another StatusBarService.smali, did you copy the whole smali file or just the required edits to the code? Since your rom is themed if you copy the smali's from another ROM with a different theme then you will have problems.

Also, did you theme your status bar yourself (either manually or using UOT Kitchen) or was it already themed with the ROM you are using? If you did it yourself it may be easier to apply this mod to the original and then apply your theme, especially if you used UOT.

One other thing, since you copied it from another ROM did you make sure the references to StatusBarService$x are correct?

Did you copy over anything to do with Public.xml?
[Android Software/Hacking General [Developers Only]] DocHoliday77:
Unfortunately I cant look over your logs right now. Im on my phone and its WAAAY to much to look at on this little screen!

Right now the only thing I can think of is one of the edits in framework.jar. Can't remember which smali its in right now but one of the possible edits you MIGHT need to make is to make sure 0xa matches up to onNotificationError in one of the other smali's. So if onNotificationError is 0xb or 0xe or another, you will need to change it in the other smali to match. Make sure you are matching it to onNotificationERROR, not onNotificationCLEAR which you added in.

If you still haven't got it, I will try to look at your Logcat on my computer a bit later.

Looks like you're close though!
[Android Software/Hacking General [Developers Only]] comnam90:
I have matched onnotificationerror in stub proxy. I would love if you could have a quick look for me
[Android Software/Hacking General [Developers Only]] MatZ69:
I did all by myself, except like i said, the code on StatusBarService, because the tutorial is diferent from my device and i couldnt understood what is to change there. In StatusBarService7 i changed the code to be similar in public.xml.

And it works but with this error on statusbar :/
[Android Software/Hacking General [Developers Only]] vikasb32:
Plz help me.i got error 13e is not register.:o
[Android Software/Hacking General [Developers Only]] comnam90:
anyone?
[Android Software/Hacking General [Developers Only]] DocHoliday77:
Hey guys, im sorry for leaving u hanging. had a whole lota stuff happen this week and still dealin w it. Hope u have made some progress. Ill try to help out again tomorow if possible, but i have my daughter this week so it may be late if im able. For now, must try to sleep! Just wanted to let u know i didnt abandon on purpose. I know how frustrating that can be. But i will be back. Maybe someone else has some new ideas for u to try in the meantime? <hint hint>
[Android Software/Hacking General [Developers Only]] comnam90:
Thanks bro, enjoy the time with your daughter :)
[Android Software/Hacking General [Developers Only]] Shaaan:
In step 2.1 you also need to edit this :

.line 39

:sswitch_data_13e

.sparse-switch

0x1 -> :sswitch_f

0x2 -> :sswitch_1c

0x3 -> :sswitch_29

0x4 -> :sswitch_42

0x5 -> :sswitch_5f

0x6 -> :sswitch_7b

0x7 -> :sswitch_8d

0x8 -> :sswitch_c7

0x9 -> :sswitch_d5

0xa -> :sswitch_ef

0xb -> :sswitch_116

0xc -> :sswitch_124

0x5f4e5446 -> :sswitch_8

.end sparse-switch

Hansip has forgot to put the bold tag for it.
[Android Software/Hacking General [Developers Only]] Shaaan:
So what problem do you face now?
[Android Software/Hacking General [Developers Only]] comnam90:
Swiping to clear causes systemui to FC
[Android Software/Hacking General [Developers Only]] Shaaan:
Have you guessed which file might be causing problem?

Or a logcat?
[Android Software/Hacking General [Developers Only]] DocHoliday77:
These are the links that he gave in an earlier post. Its more than ive been able to efficiently look over on just my phone and simply havent had time to do it at my computer. Ill try to look at it a bit tonite, but not sure how much longer ill be able to stay awake, so no promises! Sorry i havent been able to do more yet.
[Android Software/Hacking General [Developers Only]] kane159:
I always get error here when I try to Compile the SystemUI.apk

can anyone helps me?:confused:

I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java:44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2922)
at org.antlr.runtime.CommonTokenStream.getSourceName(CommonTokenStream.j
ava:345)
at org.antlr.runtime.Parser.getSourceName(Parser.java:88)
at org.jf.smali.smaliParser.getErrorHeader(smaliParser.java:358)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecogniz
er.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)

at org.jf.smali.smaliParser.method_name(smaliParser.java:3832)
at org.jf.smali.smaliParser.fully_qualified_method(smaliParser.java:6625
)
at org.jf.smali.smaliParser.instruction(smaliParser.java:11381)
at org.jf.smali.smaliParser.statements_and_directives(smaliParser.java:1
841)
at org.jf.smali.smaliParser.method(smaliParser.java:1609)
at org.jf.smali.smaliParser.smali_file(smaliParser.java:595)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(SmaliMod.java:71)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:43)

at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)

at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)

here's my original files and the edit files

if any one can help me to do this I'll be very thank :o

and heres my framework-res.apk and com.htc.resources.apk

https://dl.dropbox.com/u/28783388/framework.7z

very thanks if some one can help me:o
[Android Software/Hacking General [Developers Only]] comnam90:
Adjust the following in StatusBarService.smali in SystemUI:

if-nez v7, :cond_htc

new-instance v8, Lcom/android/systemui/statusbar/StatusBarService$20;

move-object v7, v8

move-object/from16 v8, p0

move-object/from16 v9, p1

[B]invoke-direct {v7, v8, v9}, Lcom/android/systemui/statusbar/StatusBarService$20;->(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V[/B]

move-object/from16 v8, v25

invoke-virtual {v8, v7}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V

.line 735
:cond_htc

const v4, 0x7f0a005f

To be this:

if-nez v7, :cond_htc

new-instance v8, Lcom/android/systemui/statusbar/StatusBarService$20;

move-object v7, v8

move-object/from16 v8, p0

move-object/from16 v9, p1

[B]invoke-direct {v7, v8, v9}, Lcom/android/systemui/statusbar/StatusBarService$20;->[COLOR="Red"]<init>[/COLOR](Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V[/B]

move-object/from16 v8, v25

invoke-virtual {v8, v7}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V

.line 735
:cond_htc

const v4, 0x7f0a005f

---------- Post added at 09:56 AM ---------- Previous post was at 09:54 AM ----------

All good bro, im still trying to troubleshoot myself but not having much luck sadly
[Android Software/Hacking General [Developers Only]] comnam90:
Issue resolved, mod working now :) thanks heaps guys for the help
[Android Software/Hacking General [Developers Only]] DocHoliday77:
Awesome! Glad to hear u got it going! Out of curiosity, what was your solution?
[Android Software/Hacking General [Developers Only]] comnam90:
Somehow while trying to solve an earlier issue I ended up missing out the onNotificationClear method from stub proxy. So stupid.

Expect to see my ROM round here soon :D
[Android Software/Hacking General [Developers Only]] kane159:
thanks comnam 90 now I have prb in jar, my code is

const/4 v0, 0x1

goto/16 :goto_0

.line 39
:sswitch_data_0
.sparse-switch
0x1 -> :sswitch_1
0x2 -> :sswitch_2
0x3 -> :sswitch_3
0x4 -> :sswitch_4
0x5 -> :sswitch_5
0x6 -> :sswitch_6
0x7 -> :sswitch_7
0x8 -> :sswitch_8
0x9 -> :sswitch_9
0xa -> :sswitch_a
0xb -> :sswitch_b
0xc -> :sswitch_c
0x5f4e5446 -> :sswitch_0
.end sparse-switch
.end method

should I edit it to

const/4 v0, 0x1

goto/16 :[COLOR="Blue"]goto_0[/COLOR]or[COLOR="Red"]goto_7[/COLOR]

.end local v1 #_arg0:Ljava/lang/String;
.end local v2 #_arg1:Ljava/lang/String;
.end local v3 #_arg2:I
:sswitch_124
const-string v0, "com.android.internal.statusbar.IStatusBarService"

invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

.line 177
invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

move-result-object v1

.line 178
.restart local v1 #_arg0:Ljava/lang/String;
invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

move-result-object v2

.line 179
.restart local v2 #_arg1:Ljava/lang/String;
invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

move-result v3

.line 180
.restart local v3 #_arg2:I
invoke-virtual {p0, v1, v2, v3}, Lcom/android/internal/statusbar/IStatusBarService$Stub;->onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V

.line 181
invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

.line 182
const/4 v0, 0x1

goto/16 :[COLOR="Blue"]goto_0[/COLOR]or[COLOR="Red"]goto_7[/COLOR]

.line 39
:sswitch_[COLOR="Red"]data_0[/COLOR]or[COLOR="Blue"]data_13e[/COLOR]
.sparse-switch
0x1 -> :sswitch_1
0x2 -> :sswitch_2
0x3 -> :sswitch_3
0x4 -> :sswitch_4
0x5 -> :sswitch_5
0x6 -> :sswitch_6
0x7 -> :sswitch_7
0x8 -> :sswitch_8
0x9 -> :sswitch_9
0xa -> :sswitch_a
0xb -> :sswitch_b
0xc -> :sswitch_c
[COLOR="Red"] 0xd -> :sswitch_[COLOR="Red"]124[/COLOR]or[COLOR="Blue"]0[/COLOR][/COLOR]
0x5f4e5446 -> :sswitch_0
.end sparse-switch
.end method

i think the blue one is right , right?:confused:

thans again :)

heres my original IStatusBarService$Stub.smali thx :D
[Android Software/Hacking General [Developers Only]] Shaaan:
Blue one seems right..
[Android Software/Hacking General [Developers Only]] kane159:
thank you all :) it works very very good :D

thanks, very thanks

[YOUTUBE]-q1LTI1ThUc[/YOUTUBE]
[Android Software/Hacking General [Developers Only]] Robobob1221:
Sorry I haven't got back to you. I haven't had time to check through these files properly. Had to troubleshoot my own rom.

The first file seems fine but the second one seems to be missing some line of code. Is this actually from your own rom or did you pull it from another? Also your statusbarservice$x, did you have 7 already or was it added?

Dunno if someone else can take a look as I'm occupied with some of my own stuff! Sorry again

私はローボーボブ。 Haro！！
[Android Software/Hacking General [Developers Only]] renamon:
lol:) thank bro
[Android Software/Hacking General [Developers Only]] Bert.C:
Really hope someone can help me here. Im running a custom moto blur rom and it has the option to clear each notification one by one by pressing a button that is at the side of it.

How easy will it be to replace the button with the slide to remove notification feature?

I was going through the tutorial in OP and found that the code looks very similar to what i already have in my framework.jar etc so i m not quite sure what to add/change.

Im thinking that id just need yo edit the systemui? By adding the anim files and editing the smali to use the anim rather than the button?

Any help would be much appreciated.

Cheers.
[Android Software/Hacking General [Developers Only]] hansip87:
Well, if you already had that feature, Better for you to hide the button (IIRC is a simple XML editing on layout folder -- android:visibility) and then implement this mod thoroughly. But if the code is quite similar, better for you to learn the action of the button first and then try to place the action call at the end of slide motion (which is harder but cleaner method ;) )
[Android Software/Hacking General [Developers Only]] bharat_goku:
In the StatusbarService$Stub.smali all my field static variable are declared on all static values already that is 1-F..

would it be appropriate to declare the onnotification clear to a value of say 10 ?

.field static final TRANSACTION_collapse:I = 0x2

.field static final TRANSACTION_disable:I = 0x3

.field static final TRANSACTION_expand:I = 0x1

.field static final TRANSACTION_grabScreen:I = 0xf

.field static final TRANSACTION_hideCallView:I = 0x8

.field static final TRANSACTION_onClearAllNotifications:I = 0xe

.field static final TRANSACTION_onNotificationClick:I = 0xc

.field static final TRANSACTION_onNotificationError:I = 0xd

.field static final TRANSACTION_onPanelRevealed:I = 0xb

.field static final TRANSACTION_registerStatusBar:I = 0xa

.field static final TRANSACTION_removeIcon:I = 0x6

.field static final TRANSACTION_setIcon:I = 0x4

.field static final TRANSACTION_setIconVisibility:I = 0x5

.field static final TRANSACTION_setIconWithVisible:I = 0x9

.field static final TRANSACTION_showCallView:I = 0x7

like say

.field static final TRANSACTION_onNotificationClear:I = 0x10
[Android Software/Hacking General [Developers Only]] hansip87:
yup
[Android Software/Hacking General [Developers Only]] chrystal0925:
im trying to implement this to samsung conquer but i think my error is in status bar sevice. just get fc.. i attached unmodified system ui
[Android Software/Hacking General [Developers Only]] Shaaan:
Instead you can give a logcat.
[Android Software/Hacking General [Developers Only]] chrystal0925:
http://db.tt/t9M0Ewzh
[Android Software/Hacking General [Developers Only]] chrystal0925:
Any ideas?? This phone has same similar to op not Samsung but any status bar edits causes fc.. it has tw framework and jar but I don't see much of what it does if anyone has any ideas please
[Android Software/Hacking General [Developers Only]] mjckey:
Status bar ForceClose

my status bar will force close when i swipe a notification.. Can anyone tell me how to fix it ?? :(
[Android Software/Hacking General [Developers Only]] essi_baba:
senior hansip87

thanks for your learning ,

please add this code to my file ,thanks man :good:
[Android Software/Hacking General [Developers Only]] comnam90:
What does dumpstate and logcat tell you?
[Android Software/Hacking General [Developers Only]] mjckey:
Have fixed

I've fixed it :).. (Wrong at Step 2.1- the "0xc" is already used on another static value)
[Android Software/Hacking General [Developers Only]] essi_baba:
yessssssssssssssssssssssssssssss

finaly after 7 hour work on this mod ,

i add it to my file :D:cowboy:
[Android Software/Hacking General [Developers Only]] Dr.Alexander_Breen:
Problem with finger position

Everything works fine. Except one thing.

When you're trying to remove notification, your finger should be EXACTLY on the notification.

1) You put your finger on the notification

2) You start dragging it left or right

3) If your finger stays on the notification rectangle, it's all okay, the notification goes away.

4) But if you get your finger OUT of notification box, it jumps back.

So, here's in the pictures that I mean: (red dot is the position of my finger, arrow is the direction of pulling the notification)

Here I'm starting to pull:

Here I drag it to the left:

Oops! Finger got out of box and it returned back:

HOW IT SHOULD BE!

Different colors show the different positions of the finger.

The idea how to fix it is to IGNORE the Y-coordinate of finger position after notification started moving. But how? Which changes in the smali I need to do?

Cyanogen doesn't have this problem, ICS too.

I'm using Xperia Ray with Gingerbread 2.3.4 build something.62.
[Android Software/Hacking General [Developers Only]] ISF:
I got stucked at RECOMPILING SystemUI.apk. It shows me an error : ''An error occured, please check the log '' . What to do?
[Android Software/Hacking General [Developers Only]] coccolino_dbro:
To improve the swipe gesture on a Samsung phone I used this guide: http://xdaforums.com/showpost.php?p=28689643&postcount=5. It worked real fine, now the swipe motion is exactly as in Cyanogen roms.
[Android Software/Hacking General [Developers Only]] hell_lock:
I edited both the files but I get errors while compiling. Please help me! I know I edited all the things as instructed. The files are attached in zip format, I really need to learn how to get this working.
[Android Software/Hacking General [Developers Only]] lo2ay:
Will this work on htc devices like the wildfire??
[Android Software/Hacking General [Developers Only]] Robobob1221:
It should. It works on the OG Evo. There is a link in the op a what is needed to make it work on htc devices
[Android Software/Hacking General [Developers Only]] Dr.Alexander_Breen:
I followed the instruction, but the only thing I've got is force close of SystemUI.apk. I suppose it's because it was meant for Samsung, heh.
[Android Software/Hacking General [Developers Only]] coccolino_dbro:
I think it might be possible to make it work on other devices; maybe the OP (I think he has the knowledge) could take a look and see what's going on in those files.
[Android Software/Hacking General [Developers Only]] Qeemi:
I can't compile apk,apk manager returns a lot of errors with public.xml file.

Someone can help me?
[Android Software/Hacking General [Developers Only]] Ticklefish:
What errors are you getting?
[Android Software/Hacking General [Developers Only]] _FroX_:
Help please :)

Solved: Mod running on StockLite v7.1
[Android Software/Hacking General [Developers Only]] shoutokuyaki:
Bro....I try to re-compile framework.jar with apktool but, in apktool say 'could not smali file'

I'm just follow ur tutorial
[Android Software/Hacking General [Developers Only]] alkhafaf:
Hello

why i get this error in the log when compiling SystemUI.apk after adding this MOD ?
[Android Software/Hacking General [Developers Only]] sheraro:
I guess everyone is busy with editing their own files but can someone take a look at those ones :

its from Xperia Play R800i 2.3.4 and it's mooded with notification toogles from Colored SystemUI by Overdose1986 (GB version here)

I don't have sufficient knowledge to do it myself and my phone is not getting ICS :crying:

EDIT : Overdose1986 kindly did it for me , here is the files if anyone want it