[Galaxy S II Themes and Apps] hpo14:
bring 4-way reboot menu to Multi-language

Below is how i modified with Biftor V9 Rom (4-way reboot menu built-in)

1. Add reboot menu's resources to framework-res.apk

1.a Add this strings below to framework-res/values/string.xml (For default language)

make ur language by changing language directory(the red word).

<string name="reboot">Reboot</string>
<string name="reboot_hotboot">Hot Boot</string>
<string name="reboot_download">Download</string>
<string name="reboot_recovery">Recovery</string>

1.b Add new id strings for above in framework-res/values/public.xml

ps. check the last id for type string. then id+1 for new string, and so on.

for example: the last string id in here is 0x0104077b

<public type="string" name="whateverthelaststring" id="0x0104077b" />
<public type="string" name="reboot" id="[color=blue]0x0104077c[/color]" />
<public type="string" name="reboot_hotboot" id="[color=green]0x0104077d[/color]" />
<public type="string" name="reboot_download" id="[color=orange]0x0104077e[/color]" />
<public type="string" name="reboot_recovery" id="[color=brown]0x0104077f[/color]" />

2. modify android.policy.jar

2.a open smali\com\android\internal\policy\impl\GlobalActions$99.smali

find line contains GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String; and comment it.

.method public onPress()V

....(skip).....

const-string v2, "Biftor Rom Restart Method"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1

[b]sget-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;[/b]

after commentted.

.method public onPress()V

....(skip).....

const-string v2, "Biftor Rom Restart Method"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1

[b][color=red]#[/color][/b] sget-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;

2.b copy the code below and insert before the line u commentted.

const/4 v2, 0x4
new-array v2, v2, [Ljava/lang/String;
const v4, [color=blue]0x104077c[/color] # reboot
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v3
invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
const/4 v4, 0x0
aput-object v3, v2, v4
const v4, [color=green]0x104077d[/color] # Hot Boot
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v3
invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
const/4 v4, 0x1
aput-object v3, v2, v4
const v4, [color=orange]0x104077e[/color] # Download
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v3
invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
const/4 v4, 0x2
aput-object v3, v2, v4
const v4, [color=brown]0x104077f[/color] # Recovery
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v3
invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v3
const/4 v4, 0x3
aput-object v3, v2, v4

2.c this is how it looks like after finished.

.method public onPress()V

....(skip).....

const-string v2, "Biftor Rom Restart Method"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1
######
const/4 v2, 0x4

new-array v2, v2, [Ljava/lang/String;

const v4, [color=blue]0x104077c[/color] # reboot

iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;

invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;

move-result-object v3

invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v3

const/4 v4, 0x0

aput-object v3, v2, v4

const v4, [color=green]0x104077d[/color] # Hot Boot

iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;

invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;

move-result-object v3

invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v3

const/4 v4, 0x1

aput-object v3, v2, v4

const v4, [color=orange]0x104077e[/color] # Download

iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;

invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;

move-result-object v3

invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v3

const/4 v4, 0x2

aput-object v3, v2, v4

const v4, [color=brown]0x104077f[/color] # Recovery

iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;

invoke-static {v3}, Lcom/android/internal/policy/impl/GlobalActions;->access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;

move-result-object v3

invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v3

const/4 v4, 0x3

aput-object v3, v2, v4
######
[b][color=red]#[/color][/b] get-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;

3. recompile framework-res.apk and android.policy.jar then flash into ur system. Good Luck~~~