[MOD] Auto Correct and Uses System Font for Samsung Keyboard

Search This thread

bawffg85

Senior Member
Dec 20, 2012
399
354
广东
Nice Mod!:good:

HOW TO

target following file smali/com/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule.smali

PHP:
     :goto_1
     const/16 v7, 0xa
 
-    if-ne p1, v7, :cond_4
+    if-ne p1, v7, :cond_5
 
     invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->sendEnterKeyHandle()V
 

     goto :goto_0
 
     :cond_3
+    iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
+
+    invoke-virtual {v7}, Ljava/lang/StringBuilder;->length()I
+
+    move-result v7
+
+    if-lez v7, :cond_4
+
+    iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;
+
+    iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
+
+    invoke-interface {v7, v8, v9}, Lcom/diotek/ime/framework/engine/InputEngineManager;->getCharSequence(Ljava/lang/StringBuilder;I)I
+
+    invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->updateSuggestion()V
+
+    invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->setComposingText()V
+
+    :cond_4
+    invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->clearCandidateList()V
+
     iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;
 
     iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mCandidates:Ljava/util/ArrayList;

 
     goto :goto_1
 
-    :cond_4
+    :cond_5
     iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mRepository:Lcom/diotek/ime/framework/repository/Repository;
 
     const-string v8, "IN_MULTITAP"

 
     move-result v5
 
-    if-eqz v5, :cond_5
+    if-eqz v5, :cond_6
 
     invoke-virtual {p0, p1, p2}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->processMultiTapSymbolicKey(I[I)V
 
     goto/16 :goto_0
 
-    :cond_5
+    :cond_6
     iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mAutoSpaceController:Lcom/diotek/ime/framework/input/autospace/AutoSpaceController;
 
     invoke-virtual {v7, p1}, Lcom/diotek/ime/framework/input/autospace/AutoSpaceController;->isEnableAutoSpaceAtSymbol(I)Z
 
     move-result v7
 
-    if-eqz v7, :cond_6
+    if-eqz v7, :cond_7
 
     invoke-virtual {p0, v10}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->finishComposing(Z)V
 

 
     invoke-virtual {p0, v7}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->commitTextAndInitComposing(Ljava/lang/CharSequence;)V
 
-    :cond_6
+    :cond_7
     invoke-virtual {p0, v10}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->finishComposing(Z)V
 
     iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;

 
     move-result v7
 
-    if-eqz v7, :cond_7
+    if-eqz v7, :cond_8
 
     iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
 

 
     invoke-virtual {v7}, Lcom/diotek/ime/framework/input/autospace/AutoSpaceController;->disableSetUpAutoSpace()V
 
-    :cond_7
+    :cond_8
     iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
 
     invoke-virtual {p0, v7}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->commitTextAndInitComposing(Ljava/lang/CharSequence;)V

GGGGreat thanks!!
 

opalelement

Member
May 9, 2011
29
10
How about for Cleanrom 4.0.5 for Verizon? Not sure if one of the previously listed ones will work, and can't try yet since my memory is full so I can't make a backup lol but I will try tonight or tomorrow once I offload some stuff. In the meantime if you already know none of those would work I would appreciate if you could take a look. I would guess based on what you have asked for previously that you will need the linked files.

Thanks!

framework-res.apk https://docs.google.com/file/d/0BwxF14UBxkOwdVRyTnlHSFBralU/edit
SamsungIME.apk https://docs.google.com/file/d/0BwxF14UBxkOwQWlPRllCQjNPVms/edit
 

Arsaw

Inactive Recognized Developer
Dec 31, 2010
4,229
6,003
Kuala Lumpur
Re: [MOD] Auto Correction Feature Added on Samsung Keyboard

How about for Cleanrom 4.0.5 for Verizon? Not sure if one of the previously listed ones will work, and can't try yet since my memory is full so I can't make a backup lol but I will try tonight or tomorrow once I offload some stuff. In the meantime if you already know none of those would work I would appreciate if you could take a look. I would guess based on what you have asked for previously that you will need the linked files.

Thanks!

framework-res.apk https://docs.google.com/file/d/0BwxF14UBxkOwdVRyTnlHSFBralU/edit
SamsungIME.apk https://docs.google.com/file/d/0BwxF14UBxkOwQWlPRllCQjNPVms/edit

I don't think it will works for verizon model. I will try mod the keyboard you provided.

Sent from my GT-N7100 using xda app-developers app
 

Arsaw

Inactive Recognized Developer
Dec 31, 2010
4,229
6,003
Kuala Lumpur
Re: [MOD] Auto Correction Feature Added on Samsung Keyboard

How about for Cleanrom 4.0.5 for Verizon? Not sure if one of the previously listed ones will work, and can't try yet since my memory is full so I can't make a backup lol but I will try tonight or tomorrow once I offload some stuff. In the meantime if you already know none of those would work I would appreciate if you could take a look. I would guess based on what you have asked for previously that you will need the linked files.

Thanks!

Here you go. Try it when you have your backup ready.

Download : http://db.tt/w5gl12gb

Sent from my GT-N7100 using Tapatalk 2
 

lehoi79

Senior Member
Mar 22, 2010
65
6
VA
Re: [MOD] Auto Correction Feature Added on Samsung Keyboard

same thing happened again. after flashing it in recovery (wiping cache, delvik cache), keyboard disappears from the settings.

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
 

opalelement

Member
May 9, 2011
29
10
I see the updater-script just moves the new SamsungIME.apk over and gives it 0644 permissions, and since I'm impatient I tried doing that manually after backing up original APK but it then only uses voice control and says the key oard isnt installed, even after clearing cache and dalvik through recovery. After replacing with the original the keyboard ckmes back.

I noticed the original keyboard was 7.15 mb and the replacent is only 5.83 mb, what changes that caises such a big size difference?
 

Arsaw

Inactive Recognized Developer
Dec 31, 2010
4,229
6,003
Kuala Lumpur
I see the updater-script just moves the new SamsungIME.apk over and gives it 0644 permissions, and since I'm impatient I tried doing that manually after backing up original APK but it then only uses voice control and says the key oard isnt installed, even after clearing cache and dalvik through recovery. After replacing with the original the keyboard ckmes back.

I noticed the original keyboard was 7.15 mb and the replacent is only 5.83 mb, what changes that caises such a big size difference?

Try this and see how.
 

Attachments

  • VzSamsungKeyboard_AutoCorrection.zip
    5 MB · Views: 37

opalelement

Member
May 9, 2011
29
10
That did it, it's about the same size and it's correcting now. Both of the apostrophes in that last sentence were auto corrected, as well as the fact that I have misspelled a lot of these words in this post so far. Thanks you very much for doing that.
 
  • Like
Reactions: Arsaw

Androssama

Senior Member
Nov 13, 2012
112
67
I will need the framework-res.apk from your rom.


Sent from my GT-N7100 using Tapatalk 2

Here you go (ROM : Omega v11 UBDLL3)

SamsungIME: db.tt/Qzmtno03
framework-res.apk: db.tt/p7RwnqvF

I'm a junior member and can't post external links so please add "ht tp : / /" at the beginning.

It would be great to have all the mods in the OP to serve as a repository.
 

dickeplatte

Senior Member
Oct 27, 2009
100
12
Berlin
Hi,

how does this keyboard look like in landscape? The 4.1.2 stock keyboard covers together with the text field the whole screen (not in all apps, but happens in whatsapp for example).
The old keyboard in 4.1.1 did not act like this.

Best
J
 
Last edited:

lehoi79

Senior Member
Mar 22, 2010
65
6
VA
Re: [MOD] Auto Correction Feature Added on Samsung Keyboard

Hi,

how does this keyboard look like in landscape? The 4.1.2 stock keyboard covers together with the text field the whole screen (not in all apps, but happens in whatsapp for example).
The old keyboard in 4.1.1 did not act like this.

Best
J

This is not a new keyboard, it is modified Samsung stock keyboard
it just adds auto correct to stock Samsung keyboard

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
 

dickeplatte

Senior Member
Oct 27, 2009
100
12
Berlin
This is not a new keyboard, it is modified Samsung stock keyboard
it just adds auto correct to stock Samsung keyboard

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2

I know that fact, but since the stock keyboard app acts different in different versions of stock rom this question does still make sence. At least to me ;)

My question is:
Does this keyboard (+text field) cover the whole screen in landscape?

Best
 
Last edited:

Arsaw

Inactive Recognized Developer
Dec 31, 2010
4,229
6,003
Kuala Lumpur
Re: [MOD] Auto Correction Feature Added on Samsung Keyboard

I know that fact, but since the stock keyboard app acts different in different versions of stock rom this question does still make sence. At least to me ;)

My question is:
Does this keyboard (+text field) cover the whole screen in landscape?

Best

I think picture worth a thousand words : :)

qu7eja4a.jpg


Sent from my GT-N7100 using Tapatalk 2
 

dickeplatte

Senior Member
Oct 27, 2009
100
12
Berlin
I think picture worth a thousand words : :)
...2

YEAH! I want to have it like this, so maybe this will be perfect for me. Will try it asap :)
THANKS!

edit:
unfortunately it did not work :( the landscape mode of the keyboard covers everything like here
Imo coz of two possible reasons:
1. i tried the att one since the others did not work, so mb your screenshot was not that version
2. it is somehow related to rom/language or csc. If its related to csc i will have to find out the csc code :)
 
Last edited:

Top Liked Posts