Related
Decompile "services.jar"
Go to: "\dex\classout\com\android\server" and open "PowerManagerService$ScreenBrightnessAnimator.smali" file.
Go to line: "Landroid/os/Handler;->removeMessages(I)VI" and add the following lines in color blue:
Code:
.line 3064
.end local v0 #delta:I
:cond_60
:goto_60
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7200(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR=Blue]if-eqz p2, :cond_maj
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_maj[/COLOR]
const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
Save changes and recompile.
That's it!
Hello Devs Today I bring a Mod By sir @iian Armas all credit goes to him for this awesome mod
What Is This?
-A mod Which Can Change ur Notification panel into Wp8 Type Launcher
Requirements
-apktool
-notepad++
-brain.jar
-Decompile Ur SystemUI.apk
-Download Attachments from the link & Merge it into ur decompiled folder
Files Required https://www.dropbox.com/s/ui56buimmldfpff/res.zip?dl=0
-open res/layout/tw_status_bar_expanded_dual.xml or status_bar_expandes for diff Phones
-Copy This Lines
Code:
<LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content">
<include android:layout_width="match_parent" android:layout_height="wrap_content" layout="@layout/1lumia_main" />
</LinearLayout>
Paste It anywhere u want its depends on u :fingers-crossed:
-open Values/colors.xml
Copy this Codes paste it before <\resources>
Code:
<color name="lumia">#ff0000ff</color>
<color name="lumia_app_color">#ff0074ff</color>
<color name="lumia_app_color1">#ffff3800</color>
<color name="lumia_app_color2">#ff00aaff</color>
-Open values/dimens.xml
-Copy This Codes & paste it before </resources>
Code:
<dimen name="lumia_text_height">10dp</dimen>
<dimen name="lumia_notif_max_height">162dp</dimen>
-Open Values/styles.xml & paste this codes before & paste there
Code:
<style name="lumiaText">
<item name="android:textColor">#ffffffff</item>
<item name="android:shadowColor">#ff000000</item>
<item name="android:shadowDy">1.5</item>
<item name="android:shadowDx">-1.5</item>
<item name="android:shadowRadius">1.5</item>
</style>
<style name="1lumia.clock" parent="@style/TextAppearance.StatusBar.Expanded">
<item name="android:textSize">25dp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
<style name="1lumia.date" parent="@style/TextAppearance.StatusBar.Expanded">
<item name="android:textSize">10dp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:textAllCaps">false</item>
</style>
-open smali/com/android/systemui/SystemUIService.smali
Copy this codes & paste it to then end of the file
Code:
.method public iian_contacts(Landroid/view/View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 107
const-string v2, "com.android.contacts"
const-string v3, "com.android.contacts.activities.PeopleActivity"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
.method public iian_mms(Landroid/view/View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 107
const-string v2, "com.android.mms"
const-string v3, "com.android.mms.ui.ConversationList"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
.method public iian_camera(Landroid/view/View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 107
const-string v2, "com.android.gallery3d"
const-string v3, "com.android.camera.CameraLauncher"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 1
Save
Recompile
Sign
Push
Reboot
Enjoy
Credits
Iian Armas
Good job for you ....... Excellent job for the owner
What does this mod do?
This mod disables the popup that warns about disabling wifi when you enable the Hotspot feature from the Notification panel quicksetting toggle. The popup normally only occurs when wifi is enabled, so this will prevent that popup.
This does not disable the warning if you enable hotspot from the Settings menu.
What app needs modifying?
SecSettings2.apk - must be deodexed app because we will be editing smali code.
The mod:
Decompile your deodexed SecSettings2.apk
Open smali\com\android\settings\wifi\mobileap\WifiApWarning.smali with a text editor
Search for
Code:
.local v1, "wifiState":I
Enter the following code on a new line just below that line
Code:
goto :cond_5
Save and recompile.
Final code should look like this:
Code:
.local v1, "wifiState":I
[COLOR="Blue"]goto :cond_5[/COLOR]
if-eq v1, v5, :cond_4
if-eqz v1, :cond_4
const/4 v2, 0x4
if-eq v1, v2, :cond_4
.line 786
invoke-direct {p0, v6}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V
goto :goto_0
.line 787
:cond_4
invoke-direct {p0}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->isP2pEnabled()Z
move-result v2
if-eqz v2, :cond_5
.line 788
const-string v2, "WifiApWarning"
const-string v3, "WiFi p2p on. Create dailog"
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 789
invoke-direct {p0, v7}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V
goto :goto_0
.line 791
:cond_5
invoke-direct {p0, v4}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->startProvisioningIfNecessary(I)V
goto :goto_0
.end method
The entire disableWifiDialog method is here:
Code:
.method private disableWifiDialog()V
.locals 8
.prologue
const/16 v7, 0x1f
const/16 v6, 0x1e
const/4 v5, 0x1
const/4 v4, 0x0
.line 771
const-string v2, "TMO"
const-string v3, "VZW"
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_0
const-string v2, "NEWCO"
const-string v3, "VZW"
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
.line 773
:cond_0
iget-object v2, p0, Lcom/android/settings/wifi/mobileap/WifiApWarning;->mConnectivityManager:Landroid/net/ConnectivityManager;
invoke-virtual {v2, v5}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;
move-result-object v0
.line 774
.local v0, "netInfo":Landroid/net/NetworkInfo;
sget-object v2, Landroid/net/NetworkInfo$DetailedState;->CONNECTED:Landroid/net/NetworkInfo$DetailedState;
invoke-virtual {v0}, Landroid/net/NetworkInfo;->getDetailedState()Landroid/net/NetworkInfo$DetailedState;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/net/NetworkInfo$DetailedState;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_1
.line 775
invoke-direct {p0, v6}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V
.line 794
.end local v0 # "netInfo":Landroid/net/NetworkInfo;
:goto_0
return-void
.line 776
.restart local v0 # "netInfo":Landroid/net/NetworkInfo;
:cond_1
invoke-direct {p0}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->isP2pConnected()Z
move-result v2
if-eqz v2, :cond_2
.line 777
const-string v2, "WifiApWarning"
const-string v3, "WiFi p2p is connected. Create dailog"
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 778
invoke-direct {p0, v7}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V
goto :goto_0
.line 780
:cond_2
invoke-direct {p0, v4}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->startProvisioningIfNecessary(I)V
goto :goto_0
.line 783
.end local v0 # "netInfo":Landroid/net/NetworkInfo;
:cond_3
iget-object v2, p0, Lcom/android/settings/wifi/mobileap/WifiApWarning;->mWifiManager:Landroid/net/wifi/WifiManager;
invoke-virtual {v2}, Landroid/net/wifi/WifiManager;->getWifiState()I
move-result v1
.line 784
.local v1, "wifiState":I
[COLOR="Blue"]goto :cond_5[/COLOR]
if-eq v1, v5, :cond_4
if-eqz v1, :cond_4
const/4 v2, 0x4
if-eq v1, v2, :cond_4
.line 786
invoke-direct {p0, v6}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V
goto :goto_0
.line 787
:cond_4
invoke-direct {p0}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->isP2pEnabled()Z
move-result v2
if-eqz v2, :cond_5
.line 788
const-string v2, "WifiApWarning"
const-string v3, "WiFi p2p on. Create dailog"
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 789
invoke-direct {p0, v7}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V
goto :goto_0
.line 791
:cond_5
invoke-direct {p0, v4}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->startProvisioningIfNecessary(I)V
goto :goto_0
.end method
How does this mod work?
When the hotspot is enabled, a check is performed to see if wifi is enabled, and if it is, a popup message is displayed to warn the user that wifi will be disabled while the hotspot is enabled.
By inserting the "goto :cond_5", the comparision checks of "wifiState" are skipped, so the warning does not get created.
Tips:
If you have trouble recompiling the resources after making the mod:
The classes.dex normally get compiled before the resources
Simply find the newly compiled classes.dex in the output folder and copy it back into the old deodexed app (7zip).
Disclaimer:
While there are many other threads about this type of mod for KitKat and earlier versions, I could not find any thread for Lollipop. I am not responsible for any mods that you make to your phone. Always make a backup first.
Would you add more code for this please, especially where cond_5 is called because some smali is going to be different depending on the version of android.
tdunham said:
Would you add more code for this please, especially where cond_5 is called because some smali is going to be different depending on the version of android.
Click to expand...
Click to collapse
Done...more code added. :good:
need help with mod disables the popup that warns about disabling wifi when you enable
Could someone please help us with how to:
SecSettings2.apk -*must be deodexed*app because we will be editing smali code.
The modecompile your deodexed SecSettings2.apkOpen smali\com\android\settings\wifi\mobileap\WifiApWar ning.smali with a text editor
I can root my Samsung s5, flash recovery, but this new, I dont know about SecSetting2.apk how to get it and how to decompile it
Please help
ahmadxbox360 said:
Could someone please help us with how to:
SecSettings2.apk -*must be deodexed*app because we will be editing smali code.
The modecompile your deodexed SecSettings2.apkOpen smali\com\android\settings\wifi\mobileap\WifiApWar ning.smali with a text editor
I can root my Samsung s5, flash recovery, but this new, I dont know about SecSetting2.apk how to get it and how to decompile it
Please help
Click to expand...
Click to collapse
There are plenty of threads containing the tools needed to decompile apks, such as this:
http://forum.xda-developers.com/showthread.php?t=1310151
The apk itself can be pulled from another rom that is compatible for your phone. I suggest taking it from a deodexed stock rom.
Sent from my SM-G920V using Tapatalk
Hello guys
Here is a new guide that help you to add ominiSwitch Recent Panal on your device
Before doing this make sure you have done this.
[This guide is only for Android 5.0+]
Credit:-
KachalkinGeorg (The GK)
Reuirement (Deodexed):-
1.Settings.apk
2.SystemUI.apk
3.framework.jar
4.NotePad++
5.Patience.. if you dont have try to get it
First part ( Settings.apk )
1.Decompile Settings.apk
2.Download ominisettings.zip from attachment. Extract and copy files to your decompiled Settings
3.Open Settings\res\xml\gk_recents_panel.xml
add
Code:
<PreferenceCategory android:title="@string/recents_panel_other">
<PreferenceScreen android:title="@string/omniswitch_settings_title" android:fragment="com.android.settings.gk.RecentsPanel.OmniSwitch" />
</PreferenceCategory>
4.Open Settings\res\values\strings.xml
add
Code:
<string name="recents_panel_other">Other Recents</string>
<string name="omniswitch_settings_title">OmniSwitch</string>
<string name="recents_use_omniswitch_title">Use for recents</string>
<string name="recents_use_omniswitch_summary">Use OmniSwitch instead of default recents view</string>
<string name="omniswitch_start_settings_title">Settings</string>
<string name="omniswitch_start_settings_summary">Open OmniSwitch settings</string>
<string name="omniswitch_first_time_title">Information</string>
<string name="omniswitch_first_time_message">Make sure you have enabled OmniSwitch. You can do this by using \"Settings\" below</string>
5.Recompile and Decompile Settings (For id's)
6.Open Settings\smali\com\android\settings\gk\RecentsPanel\OmniSwitch.smali
find
Code:
0x7f090427
replace with below id
Code:
<public type="string" name="omniswitch_first_time_title"
find
Code:
0x7f090428
replace with below id
Code:
<public type="string" name="omniswitch_first_time_message"
find
Code:
0x7f060067
replace with below id
Code:
<public type="xml" name="gk_recents_omniswitch"
7.Recompile Settings and move to your device
Continued on next post
Continued.
Second Part ( SystemUI.apk )
1.Decompile SystemUI.apk
2.Open SystemUI\smali\com\android\systemui\statusbar\BaseStatusBar.smali
find below method
Code:
.method static sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
After the end of the previous method, add this
Code:
.method private isOmniSwitchEnabled()Z
.locals 6
.prologue
const/4 v1, 0x1
const/4 v2, 0x0
.line 1196
iget-object v3, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "recents_use_omniswitch"
const/4 v5, -0x2
invoke-static {v3, v4, v2, v5}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v0
.line 1199
.local v0, "settingsValue":I
if-ne v0, v1, :cond_0
:goto_0
return v1
:cond_0
move v1, v2
goto :goto_0
.end method
find
Code:
.method protected cancelPreloadingRecents()V
replace whole method with this
Code:
.method protected cancelPreloadingRecents()V
.locals 1
.prologue
.line 1246
invoke-direct {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->isOmniSwitchEnabled()Z
move-result v0
if-nez v0, :cond_0
.line 1247
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
if-eqz v0, :cond_0
.line 1248
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
invoke-interface {v0}, Lcom/android/systemui/RecentsComponent;->cancelPreloadingRecents()V
.line 1251
:cond_0
return-void
.end method
find
Code:
.method protected hideRecents(ZZ)V
replace whole method with this
Code:
.method protected hideRecents(ZZ)V
.locals 3
.param p1, "triggeredFromAltTab" # Z
.param p2, "triggeredFromHomeKey" # Z
.prologue
.line 1215
invoke-direct {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->isOmniSwitchEnabled()Z
move-result v1
if-eqz v1, :cond_1
.line 1216
new-instance v0, Landroid/content/Intent;
const-string v1, "org.omnirom.omniswitch.ACTION_HIDE_OVERLAY"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 1217
.local v0, "showIntent":Landroid/content/Intent;
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
sget-object v2, Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
invoke-virtual {v1, v0, v2}, Landroid/content/Context;->sendBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
.line 1223
.end local v0 # "showIntent":Landroid/content/Intent;
:cond_0
:goto_0
return-void
.line 1219
:cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
if-eqz v1, :cond_0
.line 1220
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
invoke-interface {v1, p1, p2}, Lcom/android/systemui/RecentsComponent;->hideRecents(ZZ)V
goto :goto_0
.end method
find
Code:
.method protected preloadRecents()V
replace whole method
Code:
.method protected preloadRecents()V
.locals 1
.prologue
.line 1238
invoke-direct {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->isOmniSwitchEnabled()Z
move-result v0
if-nez v0, :cond_0
.line 1239
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
if-eqz v0, :cond_0
.line 1240
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
invoke-interface {v0}, Lcom/android/systemui/RecentsComponent;->preloadRecents()V
.line 1243
:cond_0
return-void
.end method
find
Code:
.method protected showRecents(Z)V
replace whole method with this
Code:
.method protected showRecents(Z)V
.locals 3
.param p1, "triggeredFromAltTab" # Z
.prologue
.line 1203
invoke-direct {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->isOmniSwitchEnabled()Z
move-result v1
if-eqz v1, :cond_1
.line 1204
new-instance v0, Landroid/content/Intent;
const-string v1, "org.omnirom.omniswitch.ACTION_SHOW_OVERLAY"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 1205
.local v0, "showIntent":Landroid/content/Intent;
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
sget-object v2, Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
invoke-virtual {v1, v0, v2}, Landroid/content/Context;->sendBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
.line 1212
.end local v0 # "showIntent":Landroid/content/Intent;
:cond_0
:goto_0
return-void
.line 1207
:cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
if-eqz v1, :cond_0
.line 1208
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
const-string v2, "recentapps"
invoke-static {v1, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 1209
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->getStatusBarView()Landroid/view/View;
move-result-object v2
invoke-interface {v1, p1, v2}, Lcom/android/systemui/RecentsComponent;->showRecents(ZLandroid/view/View;)V
goto :goto_0
.end method
find
Code:
.method protected showRecentsNextAffiliatedTask()V
replace whole method with this
Code:
.method protected showRecentsNextAffiliatedTask()V
.locals 1
.prologue
.line 1254
invoke-direct {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->isOmniSwitchEnabled()Z
move-result v0
if-nez v0, :cond_0
.line 1255
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
if-eqz v0, :cond_0
.line 1256
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
invoke-interface {v0}, Lcom/android/systemui/RecentsComponent;->showNextAffiliatedTask()V
.line 1259
:cond_0
return-void
.end method
find
Code:
.method protected showRecentsPreviousAffiliatedTask()V
replace whole method with this
Code:
.method protected showRecentsPreviousAffiliatedTask()V
.locals 1
.prologue
.line 1262
invoke-direct {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->isOmniSwitchEnabled()Z
move-result v0
if-nez v0, :cond_0
.line 1263
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
if-eqz v0, :cond_0
.line 1264
iget-object v0, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
invoke-interface {v0}, Lcom/android/systemui/RecentsComponent;->showPrevAffiliatedTask()V
.line 1267
:cond_0
return-void
.end method
find
Code:
.method protected toggleRecents()V
replace whole method with this
Code:
.method protected toggleRecents()V
.locals 5
.prologue
.line 1226
invoke-direct {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->isOmniSwitchEnabled()Z
move-result v1
if-eqz v1, :cond_1
.line 1227
new-instance v0, Landroid/content/Intent;
const-string v1, "org.omnirom.omniswitch.ACTION_TOGGLE_OVERLAY"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 1228
.local v0, "showIntent":Landroid/content/Intent;
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
sget-object v2, Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
invoke-virtual {v1, v0, v2}, Landroid/content/Context;->sendBroadcastAsUser(Landroid/content/Intent;Landroid/os/UserHandle;)V
.line 1235
.end local v0 # "showIntent":Landroid/content/Intent;
:cond_0
:goto_0
return-void
.line 1230
:cond_1
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
if-eqz v1, :cond_0
.line 1231
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mContext:Landroid/content/Context;
const-string v2, "recentapps"
invoke-static {v1, v2}, Lcom/android/systemui/statusbar/BaseStatusBar;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
.line 1232
iget-object v1, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mRecents:Lcom/android/systemui/RecentsComponent;
iget-object v2, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mDisplay:Landroid/view/Display;
iget v3, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mLayoutDirection:I
invoke-virtual {p0}, Lcom/android/systemui/statusbar/BaseStatusBar;->getStatusBarView()Landroid/view/View;
move-result-object v4
invoke-interface {v1, v2, v3, v4}, Lcom/android/systemui/RecentsComponent;->toggleRecents(Landroid/view/Display;ILandroid/view/View;)V
goto :goto_0
.end method
3.Recompile SystemUI and move to your device
Continued on next post
Continued.
Final part ( framework.jar )
1.Decompile framework.jar
2.Download ominiframework.zip from attachment. Extract and copy files to decompiled framework
3.Open framework.jar\smali\android\provider\Settings$System.smali
find
Code:
.field public static final RECENTS_SHOW_SEARCH_BAR:Ljava/lang/String; = "recents_show_search_bar"
below add a new field
Code:
.field public static final RECENTS_USE_OMNISWITCH:Ljava/lang/String; = "recents_use_omniswitch"
4.Recompile framework and move to your device
Now download Omini_System.zip and flash using any custom recovery.
Enjoy...
Screenshots:-
This mod is an adaptation for ROMs that does not have RomControl. Link of the original topic at the end of the post.
First I made the modification on TouchwizHome this way:
Go to: Touhcwizhome_2016\smali\com\android\launcher2\PagedView.smali
Find this line:
Code:
.method public setDefaultTransitionEffect(Lcom/android/launcher2/PagedView$TransitionEffect;)V
It replaces the complete method with this here:
Code:
.method public setDefaultTransitionEffect(Lcom/android/launcher2/PagedView$TransitionEffect;)V
.locals 4
.param p1, "transitionEffect" # Lcom/android/launcher2/PagedView$TransitionEffect;
.prologue
.line 3487
invoke-virtual {p0}, Lcom/android/launcher2/PagedView;->getContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "tw_page_effect"
const/4 v3, 0x1
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const v2, 0x1
if-eq v1, v2, :cond_0
const v2, 0x2
if-eq v1, v2, :cond_1
const v2, 0x3
if-eq v1, v2, :cond_2
const v2, 0x4
if-eq v1, v2, :cond_3
const v2, 0x5
if-eq v1, v2, :cond_4
const v2, 0x6
if-eq v1, v2, :cond_5
const v2, 0x7
if-eq v1, v2, :cond_6
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->CARD:Lcom/android/launcher2/PagedView$TransitionEffect;
goto :goto_0
:cond_0
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->NONE:Lcom/android/launcher2/PagedView$TransitionEffect;
goto :goto_0
:cond_1
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->CASCADE:Lcom/android/launcher2/PagedView$TransitionEffect;
goto :goto_0
:cond_2
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->OUTERCUBE:Lcom/android/launcher2/PagedView$TransitionEffect;
goto :goto_0
:cond_3
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->INNERCUBE:Lcom/android/launcher2/PagedView$TransitionEffect;
goto :goto_0
:cond_4
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->CAROUSAL:Lcom/android/launcher2/PagedView$TransitionEffect;
goto :goto_0
:cond_5
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->PLAIN:Lcom/android/launcher2/PagedView$TransitionEffect;
goto :goto_0
:cond_6
sget-object v0, Lcom/android/launcher2/PagedView$TransitionEffect;->CONVEYOR:Lcom/android/launcher2/PagedView$TransitionEffect;
:goto_0
iput-object v0, p0, Lcom/android/launcher2/PagedView;->mDefaultTransitionEffect:Lcom/android/launcher2/PagedView$TransitionEffect;
iput-object v0, p0, Lcom/android/launcher2/PagedView;->mCurrentTransitionEffect:Lcom/android/launcher2/PagedView$TransitionEffect;
.line 3488
return-void
.end method
Okay, I've recompiled.
Now I have to make the modification in SecSettings2 (In the original guide, it stays in the RomControl)
Go to: SecSettings\res\values\strings.xml add the text below at the end (before /resources)
Code:
<string-array name="tw_effect_entries">
<item>None</item>
<item>Cascade</item>
<item>Outer cube</item>
<item>Inner Cube</item>
<item>Carousal</item>
<item>Plain</item>
<item>Conveyor</item>
<item>Card</item>
</string-array>
<string-array name="tw_effect_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
</string-array>
Go to: SecSettings\res\xml\display_settings.xml and add this text in the end, before </ PreferenceScreen>:
Code:
ListPreference android:entries="@array/tw_effect_entries" android:title="Touchwiz Transition Effect" android:key="tw_page_effect" android:defaultValue="1" android:entryValues="@array/tw_effect_values" />
After that, I recompiled. The option appears in Settings> Display. But even selecting one of the effects did not work. I need help to finish this mod. Please help me!
Below, the link to the original guide using RomControl. Credits to @tamirda
How to enable Touchwiz Page Transition effects