[Xposed Framework Modules] R a p h i:
..And also after each disconnected USB Mass Storage on the mobile

(mounting/scanning SD Cards).

I have resolved temporarily this problem by modifying the default starter values.

Thus I can use it with my personal default parameters whatever happens

(reboot, USB Mass Storage deconnexion) but it's not easily customizable :( .

It is just a workaround to use this beautiful module until correction of this bug ;)

( I love it too ! I can't wait ! :love: )

Screenshots of my modifications :

/

'--> Default values on my phone after install (Galaxy W GT-I8150 -

stock ROM GB v2.3.6 - Xposed Framework v2.6.1-gb-p5)

/

'--> My personal values by default (for each reboot)

'--> Modified Values :

Update interval : 500 ms (more reactive)

Font Size : 9.0 px

Font Style : Bold (reduced interline) - Italic

'--> (suite) Font Color : #009AFF

Format : AUTO with "/s" - Always displayed.

How to set the default values ?

I have decompiled the APK and modified some files inside

then I have recompiled and signed it..

(There are full tutorials to do it with some tools

like APK Multi tool, RickyRomKitchen which I've used..).

The modifications :

After decompiling the APK, I have modified the file : Common.smali

which can be found in : /smali/tw/fatminmin/xposed/networkspeedindicator/

I have inserted these lines ( in Green ) :

Common.smali - (Original line starts at 193)

.line 46
new-instance v0, Ljava/util/HashSet;

invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

sput-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_UNIT_FORMAT:Ljava/util/HashSet;

.line 48
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_UNIT_FORMAT:Ljava/util/HashSet;

const-string v1, "Sp"

invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

.line 49
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_UNIT_FORMAT:Ljava/util/HashSet;

const-string v1, "KM"

invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

.line 50
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_UNIT_FORMAT:Ljava/util/HashSet;

const-string v1, "Bb"

invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

-------------- FROM HERE -------------

.line 51
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_UNIT_FORMAT:Ljava/util/HashSet;

const-string v1, "p"

invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

.line 52
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_UNIT_FORMAT:Ljava/util/HashSet;

const-string v1, "s"

invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

-------------- TO HERE -------------

.line 65
new-instance v0, Ljava/util/HashSet;

invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

sput-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_FONT_STYLE:Ljava/util/HashSet;

/

'--> This will add the default display with "/s"

(B/s - KB/s - MB/s -> Auto mode is set by default)

Common.smali - (Original line starts at 221)

.line 65
new-instance v0, Ljava/util/HashSet;

invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

sput-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_FONT_STYLE:Ljava/util/HashSet;

-------------- FROM HERE -------------

.line 66
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_FONT_STYLE:Ljava/util/HashSet;

const-string v1, "B"

invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

.line 67
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->DEF_FONT_STYLE:Ljava/util/HashSet;

const-string v1, "I"

invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

-------------- TO HERE -------------

.line 78
const-string v0, "#33b5e5"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

sput v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->ANDROID_SKY_BLUE:I

return-void
.end method

/

'--> This will make display in Bold and Italic

I have also modified the file : TrafficView.smali

which can be found in :

/smali/tw/fatminmin/xposed/networkspeedindicator/widget/

I have inserted this code ( in Green ) :

TrafficView.smali - (Original line starts at 1644)

.line 96
iget-object v0, p0, Ltw/fatminmin/xposed/networkspeedindicator/widget/TrafficView;->clock:Landroid/view/View;

check-cast v0, Landroid/widget/TextView;

invoke-virtual {v0}, Landroid/widget/TextView;->getCurrentTextColor()I

[FROM HERE] # [TO HERE] move-result v0

-------------- FROM HERE -------------

const v0, 0xff009aff

-------------- TO HERE -------------

invoke-virtual {p0, v0}, Ltw/fatminmin/xposed/networkspeedindicator/widget/TrafficView;->setTextColor(I)V

goto :goto_0

.line 99
:cond_1
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/widget/TrafficView;->TAG:Ljava/lang/String;

const/4 v1, 0x2

new-array v1, v1, [Ljava/lang/Object;

const-string v2, "clock is not a TextView, it is "

aput-object v2, v1, v3

iget-object v2, p0, Ltw/fatminmin/xposed/networkspeedindicator/widget/TrafficView;->clock:Landroid/view/View;

invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

move-result-object v2

invoke-virtual {v2}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

move-result-object v2

aput-object v2, v1, v4

invoke-static {v0, v1}, Ltw/fatminmin/xposed/networkspeedindicator/logger/Log;->w(Ljava/lang/String;[Ljava/lang/Object;)V

.line 100
[FROM HERE] # [TO HERE] sget v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->ANDROID_SKY_BLUE:I

-------------- FROM HERE -------------

const v0, 0xff009aff

-------------- TO HERE -------------

invoke-virtual {p0, v0}, Ltw/fatminmin/xposed/networkspeedindicator/widget/TrafficView;->setTextColor(I)V

goto :goto_0

.line 104
:cond_2
sget-object v0, Ltw/fatminmin/xposed/networkspeedindicator/widget/TrafficView;->TAG:Ljava/lang/String;

new-array v1, v4, [Ljava/lang/Object;

const-string v2, "Gingerbread"

aput-object v2, v1, v3

invoke-static {v0, v1}, Ltw/fatminmin/xposed/networkspeedindicator/logger/Log;->i(Ljava/lang/String;[Ljava/lang/Object;)V

.line 105
[FROM HERE] # [TO HERE] sget v0, Ltw/fatminmin/xposed/networkspeedindicator/Common;->ANDROID_SKY_BLUE:I

-------------- FROM HERE -------------

const v0, 0xff009aff

-------------- TO HERE -------------

invoke-virtual {p0, v0}, Ltw/fatminmin/xposed/networkspeedindicator/widget/TrafficView;->setTextColor(I)V

goto :goto_0
.end method

/

'--> This will modify the Default color at #009AFF (0xff009aff)

To set the default font size at 9.0 px instead of 10.0 px,

I have searched

all

the HEX numbers 0x4120

(which corresponds to 10.0 px in smali code..)

in the file TrafficView.smali and I have replaced this by

the new value 0x4110 (corresponding to 9.0 px).

And finaly to set the default value of the Update Interval,

I have searched

all

the HEX numbers 0x3e8

(1000 ms in decimal) in the file TrafficView.smali and I have replaced this by

the new value 0x1f4 (corresponding to 500 ms).

Now we can enjoy this module and wait patiently for the next version

that will correct this bug ;)

Sorry for my english, i hope it was understandable...