[Android General] Abdullaharis:
Final Part

( SystemUI.apk )

1.Decompile SystemUI.apk

2.Download recetsystemui.zip from attachment. extract and copy to your decompiled SystemUI

3.Open SystemUI\res\values\colors.xml and add below code

<color name="gk_recents_color">#ff90A4AE</color>
<color name="gk_recents_icon_color">#ffffffff</color>

4.Open SystemUI\res\values\dimens.xml and add below code

<dimen name="gk_recents_action_button_height">54.0dip</dimen>
<dimen name="gk_recents_action_button_width">54.0dip</dimen>
<dimen name="gk_recents_action_button_translation_z">12.0dip</dimen>
<dimen name="gk_recents_action_button_margin_side">32.0dip</dimen>
<dimen name="gk_recents_action_button_margin_bottom">45.0dip</dimen>

5.Open SystemUI\res\values\ids.xml and add below code

<item type="id" name="gk_recents">false</item>

6.Now Recompile and Decompile SystemUI (For ids)

7.Open SystemUI\smali\com\android\systemui\recents\RecentsActivity.smali and do below edittings.

find below method

.method bindSearchBarAppWidget()V

replace whole method with this

.method bindSearchBarAppWidget()V
.locals 5

.prologue
const/4 v4, 0x0

.line 293
invoke-static {}, Lcom/android/systemui/recents/model/RecentsTaskLoader;->getInstance()Lcom/android/systemui/recents/model/RecentsTaskLoader;

move-result-object v3

invoke-virtual {v3}, Lcom/android/systemui/recents/model/RecentsTaskLoader;->getSystemServicesProxy()Lcom/android/systemui/recents/misc/SystemServicesProxy;

move-result-object v1

.line 296
.local v1, "ssp":Lcom/android/systemui/recents/misc/SystemServicesProxy;
iput-object v4, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetHostView:Landroid/appwidget/AppWidgetHostView;

.line 297
iput-object v4, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;

.line 300
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;

iget v0, v3, Lcom/android/systemui/recents/RecentsConfiguration;->searchBarAppWidgetId:I

.line 301
.local v0, "appWidgetId":I
if-ltz v0, :cond_0

.line 302
invoke-virtual {v1, v0}, Lcom/android/systemui/recents/misc/SystemServicesProxy;->getAppWidgetInfo(I)Landroid/appwidget/AppWidgetProviderInfo;

move-result-object v3

iput-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;

.line 303
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;

if-nez v3, :cond_0

.line 306
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mAppWidgetHost:Lcom/android/systemui/recents/RecentsAppWidgetHost;

invoke-virtual {v1, v3, v0}, Lcom/android/systemui/recents/misc/SystemServicesProxy;->unbindSearchAppWidget(Landroid/appwidget/AppWidgetHost;I)V

.line 307
const/4 v0, -0x1

.line 312
:cond_0
if-gez v0, :cond_1

.line 313
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mAppWidgetHost:Lcom/android/systemui/recents/RecentsAppWidgetHost;

invoke-virtual {v1, v3}, Lcom/android/systemui/recents/misc/SystemServicesProxy;->bindSearchAppWidget(Landroid/appwidget/AppWidgetHost;)Landroid/util/Pair;

move-result-object v2

.line 315
.local v2, "widgetInfo":Landroid/util/Pair;, "Landroid/util/Pair<Ljava/lang/Integer;Landroid/appwidget/AppWidgetProviderInfo;>;"
if-eqz v2, :cond_2

.line 317
iget-object v4, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;

iget-object v3, v2, Landroid/util/Pair;->first:Ljava/lang/Object;

check-cast v3, Ljava/lang/Integer;

invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I

move-result v3

invoke-virtual {v4, p0, v3}, Lcom/android/systemui/recents/RecentsConfiguration;->updateSearchBarAppWidgetId(Landroid/content/Context;I)V

.line 318
iget-object v3, v2, Landroid/util/Pair;->second:Ljava/lang/Object;

check-cast v3, Landroid/appwidget/AppWidgetProviderInfo;

iput-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mSearchAppWidgetInfo:Landroid/appwidget/AppWidgetProviderInfo;

.line 324
.end local v2 # "widgetInfo":Landroid/util/Pair;, "Landroid/util/Pair<Ljava/lang/Integer;Landroid/appwidget/AppWidgetProviderInfo;>;"
:cond_1
:goto_0
return-void

.line 320
.restart local v2 # "widgetInfo":Landroid/util/Pair;, "Landroid/util/Pair<Ljava/lang/Integer;Landroid/appwidget/AppWidgetProviderInfo;>;"
:cond_2
iget-object v3, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;

const/4 v4, -0x1

invoke-virtual {v3, p0, v4}, Lcom/android/systemui/recents/RecentsConfiguration;->updateSearchBarAppWidgetId(Landroid/content/Context;I)V

goto :goto_0
.end method

find below method

.method public onAllTaskViewsDismissed()V

replace whole method with this

.method public onAllTaskViewsDismissed()V
.locals 1

.prologue
.line 663
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mFinishLaunchHomeRunnable:Lcom/android/systemui/recents/RecentsActivity$FinishRecentsRunnable;

invoke-virtual {v0}, Lcom/android/systemui/recents/RecentsActivity$FinishRecentsRunnable;->run()V

.line 664
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V

.line 665
return-void
.end method

find below method

.method public onBackPressed()V

replace whole method with this

.method public onBackPressed()V
.locals 1

.prologue
.line 598
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mConfig:Lcom/android/systemui/recents/RecentsConfiguration;

iget-boolean v0, v0, Lcom/android/systemui/recents/RecentsConfiguration;->debugModeEnabled:Z

if-eqz v0, :cond_0

.line 604
:goto_0
return-void

.line 601
:cond_0
const/4 v0, 0x1

invoke-virtual {p0, v0}, Lcom/android/systemui/recents/RecentsActivity;->dismissRecentsToFocusedTaskOrHome(Z)Z

.line 603
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V

goto :goto_0
.end method

find below method

.method public onEnterAnimationTriggered()V

replace whole method with this

.method public onEnterAnimationTriggered()V
.locals 1

.prologue
.line 633
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mScrimViews:Lcom/android/systemui/recents/views/SystemBarScrimViews;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/SystemBarScrimViews;->startEnterRecentsAnimation()V

.line 634
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->startFABanimation()V

.line 635
return-void
.end method

find below method

.method public onExitToHomeAnimationTriggered()V

replace whole method with this

.method public onExitToHomeAnimationTriggered()V
.locals 1

.prologue
.line 642
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mScrimViews:Lcom/android/systemui/recents/views/SystemBarScrimViews;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/SystemBarScrimViews;->startExitRecentsAnimation()V

.line 643
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V

.line 644
return-void
.end method

find below method

.method public onTaskLaunchFailed()V

replace whole method with this

.method public onTaskLaunchFailed()V
.locals 1

.prologue
.line 657
const/4 v0, 0x1

invoke-virtual {p0, v0}, Lcom/android/systemui/recents/RecentsActivity;->dismissRecentsToHomeRaw(Z)V

.line 658
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V

.line 659
return-void
.end method

find below method

.method public onTaskViewClicked()V

replace whole method with this

.method public onTaskViewClicked()V
.locals 1

.prologue
const/4 v0, 0x0

.line 649
invoke-static {v0}, Lcom/android/systemui/recents/AlternateRecentsComponent;->notifyVisibilityChanged(Z)V

.line 650
iput-boolean v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mVisible:Z

.line 651
iget-object v0, p0, Lcom/android/systemui/recents/RecentsActivity;->mRecentsView:Lcom/android/systemui/recents/views/RecentsView;

invoke-virtual {v0}, Lcom/android/systemui/recents/views/RecentsView;->endFABanimation()V

.line 652
return-void
.end method

Continued in next post