I worked with apktulzoy 2.0, so 152 may not be suitable
that would not add yourself complexities, the easiest way to edit the method that hides the clock on the lock screen, it is small, to make a mistake in it ... I would like to write here is difficult, but he made a mistake a few times)), to make a mistake on this it is easy to pay attention
file: SystemUI \ smali \ com \ android \ systemui \ statusbar \ phone \ PhoneStatusBar.smali
Method: showClock (Z) V
original form:
.method public showClock (Z) V
.locals 2
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;
const v1, 0x7f0e0029 #id clock
invoke-virtual {v0, v1}, Lcom / android / systemui / statusbar / phone / PhoneStatusBarView; ->findViewById (I) Landroid / view / View;
move-result-object v1
if-eqz v1,: cond_0
if-eqz p1,: cond_1
const / 4 v0, 0x0
: goto_0
invoke-virtual {v1, v0}, Landroid / view / View; ->setVisibility (I) V
: cond_0
return-void
: cond_1
const / 16 v0, 0x8
goto: goto_0
.end method
it did not seem difficult to understand, if that
herehe analyzed in detail
add your own code, you must first find a damper on the id, for this copy
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;
const v1, 0x7f0e0029 # id = clock
invoke-virtual {v0, v1}, Lcom / android / systemui / statusbar / phone / PhoneStatusBarView; ->findViewById (I) Landroid / view / View;
move-result-object v1
and paste directly behind
change it registers, so as not to overwrite the previous Old and your id, we get this:
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;
const v1, 0x7f0e0029 # id = clock
invoke-virtual {v0, v1}, Lcom / android / systemui / statusbar / phone / PhoneStatusBarView; ->findViewById (I) Landroid / view / View;
move-result-object v1
iget-object v2, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;
const v3, 0x7f0e00a6 #id dampers, in my case SigStr
invoke-virtual {v2, v3}, Lcom / android / systemui / statusbar / phone / PhoneStatusBarView; ->findViewById (I) Landroid / view / View;
move-result-object v3
the element of id found, you now need to make so that it hides the clock signal level increased (size teksat not force)), for this purpose there is a method
setScaleY (F) V Because it must be carried out at the time to hide or show hours, then add it after
setVisibility (I) V We get this:
invoke-virtual {v1, v0}, Landroid / view / View; ->setVisibility (I) V
invoke-virtual {v3, v2}, Landroid / view / View; ->setScaleY (F) V
And now the very conditions when the clock shows it's this piece of code:
if-eqz v1,: cond_0
if-eqz p1,: cond_1
const / 4 v0, 0x0
after adding SCALE 1 why 1 instead of 0 because a damper 0 disappear, this float value will look like this:
if-eqz v1,: cond_0
if-eqz p1,: cond_1
const / 4 v0, 0x0 # watch shows
const / high16 v2, 0x3f800000
when hidden Watch adds SCALE 2, ie, increased 2 times we get this:
return-void
: cond_1
const / 16 v0, 0x8 # hidden clock
const / high16 v2, 0x40000000
apparently this is possible and finish, but due to the specific deployment of the resource (they are placed one on top of one, this would have to register damper Gravity, hours android: gravity = "top", and the signal android: gravity = "bottom" ) Now the network level is shown in the same place, only increased by 2 times and thus cut off the bottom and the top of the empty space, so you have to play with the padding, of course, it would be much more convenient to set the Gravity center, but only in the reel there is no method for at least I have not found
so go on, we need a method
setPadding (IIII) V His 4 peremennye- is indented with 4 sides, as indent will vary only from below, the rear 3- indents 0
To do this at the beginning of the method prescribe a new constant
method itself prescribe the method after
setScaleY (F) V Because and an offset will change with the change of the elements on the screen, we get a
invoke-virtual {v1, v0}, Landroid / view / View; ->setVisibility (I) V
invoke-virtual {v3, v2}, Landroid / view / View; ->setScaleY (F) V
invoke-virtual {v3, v4, v4, v4, v5}, Landroid / view / View; ->setPadding (IIII) V
when the clock visible indentation 0, "and write down" (c)
if-eqz v1,: cond_0
if-eqz p1,: cond_1
const / 4 v0, 0x0
const / high16 v2, 0x3f800000
const / 4 v5, 0x0
when hidden indent:
return-void
: cond_1
const / 16 v0, 0x8
const / high16 v2, 0x40000000
const / 16 v5, 0x8
few words about the indent is specified in pixels, so you may have to pick up yourself, if you decide to do
Makar same can be assigned and an increase in the X-axis, I did not do, and so I have not a lot of space)
I almost forgot, after revisions believe the number of registers and the change at the beginning of
Well, according to tradition, after the method:
.method public showClock (Z) V
.locals 6
.prologue
const / 4 v4, 0x0
iget-object v0, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;
const v1, 0x7f0e0029
invoke-virtual {v0, v1}, Lcom / android / systemui / statusbar / phone / PhoneStatusBarView; ->findViewById (I) Landroid / view / View;
move-result-object v1
.line 1
iget-object v2, p0, Lcom / android / systemui / statusbar / phone / PhoneStatusBar; ->mStatusBarView: Lcom / android / systemui / statusbar / phone / PhoneStatusBarView;
const v3, 0x7f0e00a6
invoke-virtual {v2, v3}, Lcom / android / systemui / statusbar / phone / PhoneStatusBarView; ->findViewById (I) Landroid / view / View;
move-result-object v3
if-eqz v1,: cond_0
if-eqz p1,: cond_1
const / 4 v0, 0x0
const / high16 v2, 0x3f800000
const / 4 v5, 0x0
: goto_0
invoke-virtual {v1, v0}, Landroid / view / View; ->setVisibility (I) V
invoke-virtual {v3, v2}, Landroid / view / View; ->setScaleY (F) V
invoke-virtual {v3, v4, v4, v4, v5}, Landroid / view / View; ->setPadding (IIII) V
: cond_0
return-void
: cond_1
const / 16 v0, 0x8
const / high16 v2, 0x40000000
const / 16 v5, 0x8
goto: goto_0
.end method
in fact nothing complicated about how to play the violin)