• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[PIE][PORT][Non-root][PILL] Xperia 10 and 10 plus launcher + Fo Xperia XA2 Pie

Search This thread

user26335377

Member
Jan 13, 2020
30
7
that's why I asked him for help. But if you know where/what needs to be changed, please, let me know.
Hello, and big thanks for your work again!
I don't know, what exactly makes possible to use the new gestures and recent's provider without root, but here the list of changed smali files:
  • /smali/com/android/launcher3/LauncherInitListener.smali:
    Original:
    Code:
    .method public registerAndStartActivity(Landroid/content/Intent;Lcom/android/quickstep/util/RemoteAnimationProvider;Landroid/content/Context;Landroid/os/Handler;J)V
        .locals 2
        .param p1, "intent"    # Landroid/content/Intent;
        .param p2, "animProvider"    # Lcom/android/quickstep/util/RemoteAnimationProvider;
        .param p3, "context"    # Landroid/content/Context;
        .param p4, "handler"    # Landroid/os/Handler;
        .param p5, "duration"    # J
    
        .line 84
        iput-object p2, p0, Lcom/android/launcher3/LauncherInitListener;->mRemoteAnimationProvider:Lcom/android/quickstep/util/RemoteAnimationProvider;
    
        .line 86
        invoke-virtual {p0}, Lcom/android/launcher3/LauncherInitListener;->register()V
    
        .line 88
        invoke-interface {p2, p4, p5, p6}, Lcom/android/quickstep/util/RemoteAnimationProvider;->toActivityOptions(Landroid/os/Handler;J)Landroid/app/ActivityOptions;
    
        move-result-object v0
    
        invoke-virtual {v0}, Landroid/app/ActivityOptions;->toBundle()Landroid/os/Bundle;
    
        move-result-object v0
    
        .line 89
        .local v0, "options":Landroid/os/Bundle;
        new-instance v1, Landroid/content/Intent;
    
        invoke-direct {v1, p1}, Landroid/content/Intent;-><init>(Landroid/content/Intent;)V
    
        invoke-virtual {p0, v1}, Lcom/android/launcher3/LauncherInitListener;->addToIntent(Landroid/content/Intent;)Landroid/content/Intent;
    
        move-result-object v1
    
        invoke-virtual {p3, v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;Landroid/os/Bundle;)V
    
        .line 90
        return-void
    .end method
    Mod:
    Code:
    .method public registerAndStartActivity(Landroid/content/Intent;Lcom/android/quickstep/util/RemoteAnimationProvider;Landroid/content/Context;Landroid/os/Handler;J)V
        .locals 2
        .param p1, "intent"    # Landroid/content/Intent;
        .param p2, "animProvider"    # Lcom/android/quickstep/util/RemoteAnimationProvider;
        .param p3, "context"    # Landroid/content/Context;
        .param p4, "handler"    # Landroid/os/Handler;
        .param p5, "duration"    # J
    
        new-instance v0, Landroid/os/Bundle;
    
        invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
    
        .line 89
        .local v0, "options":Landroid/os/Bundle;
        new-instance v1, Landroid/content/Intent;
    
        invoke-direct {v1, p1}, Landroid/content/Intent;-><init>(Landroid/content/Intent;)V
    
        invoke-virtual {p0, v1}, Lcom/android/launcher3/LauncherInitListener;->addToIntent(Landroid/content/Intent;)Landroid/content/Intent;
    
        move-result-object v1
    
        invoke-virtual {p3, v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;Landroid/os/Bundle;)V
    
        .line 90
        return-void
    .end method
  • /smali/com/android/quickstep/login/UserEventDispatcherExtension.smali:
    Original:
    Code:
    .method public logStateChangeAction(IIIIII)V
        .locals 3
        .param p1, "action"    # I
        .param p2, "dir"    # I
        .param p3, "srcChildTargetType"    # I
        .param p4, "srcParentContainerType"    # I
        .param p5, "dstContainerType"    # I
        .param p6, "pageIndex"    # I
    
        .line 46
        new-instance v0, Lcom/android/systemui/shared/system/MetricsLoggerCompat;
    
        invoke-direct {v0}, Lcom/android/systemui/shared/system/MetricsLoggerCompat;-><init>()V
    
        const/16 v1, 0xc
    
        if-ne p5, v1, :cond_0
    
        const/4 v1, 0x1
    
        goto :goto_0
    
        :cond_0
        const/4 v1, 0x0
    
        :goto_0
        const/16 v2, 0xe0
    
        invoke-virtual {v0, v2, v1}, Lcom/android/systemui/shared/system/MetricsLoggerCompat;->visibility(IZ)V
    
        .line 48
        invoke-super/range {p0 .. p6}, Lcom/android/launcher3/logging/UserEventDispatcher;->logStateChangeAction(IIIIII)V
    
        .line 50
        return-void
    .end method
    Mod:
    Code:
    .method public logStateChangeAction(IIIIII)V
        .locals 0
        .param p1, "action"    # I
        .param p2, "dir"    # I
        .param p3, "srcChildTargetType"    # I
        .param p4, "srcParentContainerType"    # I
        .param p5, "dstContainerType"    # I
        .param p6, "pageIndex"    # I
    
        .line 51
        invoke-super/range {p0 .. p6}, Lcom/android/launcher3/logging/UserEventDispatcher;->logStateChangeAction(IIIIII)V
    
        .line 53
        return-void
    .end method
  • /smali/com/android/quickstep/TaskSystemShortcut$SplitScreen.smali:
    Original:
    Code:
    .method public static synthetic lambda$getOnClickListener$1(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Lcom/android/quickstep/views/TaskView;Lcom/android/quickstep/views/RecentsView;Lcom/android/launcher3/BaseDraggingActivity;ILcom/android/quickstep/views/TaskThumbnailView;Landroid/view/View;)V
        .locals 23
        .param p1, "taskView"    # Lcom/android/quickstep/views/TaskView;
        .param p2, "recentsView"    # Lcom/android/quickstep/views/RecentsView;
        .param p3, "activity"    # Lcom/android/launcher3/BaseDraggingActivity;
        .param p4, "taskId"    # I
        .param p5, "thumbnailView"    # Lcom/android/quickstep/views/TaskThumbnailView;
        .param p6, "v"    # Landroid/view/View;
    
        move-object/from16 v7, p0
    
        move-object/from16 v8, p1
    
        move-object/from16 v9, p2
    
        move-object/from16 v10, p3
    
        move-object/from16 v11, p5
    
        .line 130
        new-instance v0, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$1;
    
        invoke-direct {v0, v7, v8, v9}, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$1;-><init>(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Lcom/android/quickstep/views/TaskView;Lcom/android/quickstep/views/RecentsView;)V
    
        move-object v12, v0
    
        .line 143
        .local v12, "onLayoutChangeListener":Landroid/view/View$OnLayoutChangeListener;
        new-instance v0, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$2;
    
        invoke-direct {v0, v7, v10, v8, v12}, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$2;-><init>(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Lcom/android/launcher3/BaseDraggingActivity;Lcom/android/quickstep/views/TaskView;Landroid/view/View$OnLayoutChangeListener;)V
    
        move-object v13, v0
    
        .line 155
        .local v13, "onDeviceProfileChangeListener":Lcom/android/launcher3/DeviceProfile$OnDeviceProfileChangeListener;
        const/4 v0, 0x1
    
        const/16 v1, 0x18f
    
        invoke-static {v10, v0, v1}, Lcom/android/launcher3/AbstractFloatingView;->closeOpenViews(Lcom/android/launcher3/BaseDraggingActivity;ZI)V
    
        .line 158
        invoke-static {}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->getInstance()Lcom/android/systemui/shared/system/WindowManagerWrapper;
    
        move-result-object v1
    
        invoke-virtual {v1}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->getNavBarPosition()I
    
        move-result v14
    
        .line 159
        .local v14, "navBarPosition":I
        const/4 v1, -0x1
    
        if-ne v14, v1, :cond_0
    
        .line 160
        return-void
    
        .line 162
        :cond_0
        const/4 v1, 0x0
    
        if-eq v14, v0, :cond_1
    
        move v2, v0
    
        goto :goto_0
    
        :cond_1
        move v2, v1
    
        :goto_0
        move v15, v2
    
        .line 163
        .local v15, "dockTopOrLeft":Z
        invoke-static {}, Lcom/android/systemui/shared/system/ActivityManagerWrapper;->getInstance()Lcom/android/systemui/shared/system/ActivityManagerWrapper;
    
        move-result-object v2
    
        .line 164
        invoke-static {v15}, Lcom/android/systemui/shared/system/ActivityOptionsCompat;->makeSplitScreenOptions(Z)Landroid/app/ActivityOptions;
    
        move-result-object v3
    
        .line 163
        move/from16 v6, p4
    
        invoke-virtual {v2, v6, v3}, Lcom/android/systemui/shared/system/ActivityManagerWrapper;->startActivityFromRecents(ILandroid/app/ActivityOptions;)Z
    
        move-result v2
    
        if-eqz v2, :cond_2
    
        .line 165
        invoke-static/range {p3 .. p3}, Lcom/android/quickstep/RecentsModel;->getInstance(Landroid/content/Context;)Lcom/android/quickstep/RecentsModel;
    
        move-result-object v2
    
        invoke-virtual {v2}, Lcom/android/quickstep/RecentsModel;->getSystemUiProxy()Lcom/android/systemui/shared/recents/ISystemUiProxy;
    
        move-result-object v2
    
        move-object v5, v2
    
        .line 167
        .local v5, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        :try_start_0
        invoke-interface {v5}, Lcom/android/systemui/shared/recents/ISystemUiProxy;->onSplitScreenInvoked()V
        :try_end_0
        .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    
        .line 171
        nop
    
        .line 172
        invoke-virtual/range {p3 .. p3}, Lcom/android/launcher3/BaseDraggingActivity;->getUserEventDispatcher()Lcom/android/launcher3/logging/UserEventDispatcher;
    
        move-result-object v2
    
        const/16 v3, 0x10
    
        invoke-virtual {v2, v1, v3}, Lcom/android/launcher3/logging/UserEventDispatcher;->logActionOnControl(II)V
    
        .line 176
        invoke-virtual {v10, v13}, Lcom/android/launcher3/BaseDraggingActivity;->addOnDeviceProfileChangeListener(Lcom/android/launcher3/DeviceProfile$OnDeviceProfileChangeListener;)V
    
        .line 178
        new-instance v4, Lcom/android/quickstep/-$$Lambda$TaskSystemShortcut$SplitScreen$bIIgvqKYPaQItPy-_-PUOmKY14k;
    
        .local v4, "animStartedListener":Ljava/lang/Runnable;
        invoke-direct {v4, v9, v8}, Lcom/android/quickstep/-$$Lambda$TaskSystemShortcut$SplitScreen$bIIgvqKYPaQItPy-_-PUOmKY14k;-><init>(Lcom/android/quickstep/views/RecentsView;Lcom/android/quickstep/views/TaskView;)V
    
        .line 186
        const/4 v2, 0x2
    
        new-array v3, v2, [I
    
        .line 187
        .local v3, "position":[I
        invoke-virtual {v11, v3}, Lcom/android/quickstep/views/TaskThumbnailView;->getLocationOnScreen([I)V
    
        .line 188
        invoke-virtual/range {p5 .. p5}, Lcom/android/quickstep/views/TaskThumbnailView;->getWidth()I
    
        move-result v2
    
        int-to-float v2, v2
    
        invoke-virtual/range {p1 .. p1}, Lcom/android/quickstep/views/TaskView;->getScaleX()F
    
        move-result v16
    
        mul-float v2, v2, v16
    
        float-to-int v2, v2
    
        .line 189
        .local v2, "width":I
        invoke-virtual/range {p5 .. p5}, Lcom/android/quickstep/views/TaskThumbnailView;->getHeight()I
    
        move-result v0
    
        int-to-float v0, v0
    
        invoke-virtual/range {p1 .. p1}, Lcom/android/quickstep/views/TaskView;->getScaleY()F
    
        move-result v16
    
        mul-float v0, v0, v16
    
        float-to-int v0, v0
    
        .line 190
        .local v0, "height":I
        move-object/from16 v17, v4
    
        new-instance v4, Landroid/graphics/Rect;
    
        .end local v4    # "animStartedListener":Ljava/lang/Runnable;
        .local v17, "animStartedListener":Ljava/lang/Runnable;
        move-object/from16 v18, v5
    
        aget v5, v3, v1
    
        .end local v5    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .local v18, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        const/16 v16, 0x1
    
        aget v8, v3, v16
    
        aget v1, v3, v1
    
        add-int/2addr v1, v2
    
        aget v19, v3, v16
    
        move/from16 v20, v2
    
        add-int v2, v19, v0
    
        .end local v2    # "width":I
        .local v20, "width":I
        invoke-direct {v4, v5, v8, v1, v2}, Landroid/graphics/Rect;-><init>(IIII)V
    
        move-object v8, v4
    
        .line 193
        .local v8, "taskBounds":Landroid/graphics/Rect;
        nop
    
        .line 194
        invoke-virtual {v8}, Landroid/graphics/Rect;->width()I
    
        move-result v1
    
        invoke-virtual {v8}, Landroid/graphics/Rect;->height()I
    
        move-result v2
    
        const/high16 v4, 0x3f800000    # 1.0f
    
        const/high16 v5, -0x1000000
    
        .line 193
        invoke-static {v1, v2, v11, v4, v5}, Lcom/android/systemui/shared/recents/view/RecentsTransition;->drawViewIntoHardwareBitmap(IILandroid/view/View;FI)Landroid/graphics/Bitmap;
    
        move-result-object v16
    
        .line 196
        .local v16, "thumbnail":Landroid/graphics/Bitmap;
        new-instance v19, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$3;
    
        iget-object v4, v7, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;->mHandler:Landroid/os/Handler;
    
        move-object/from16 v1, v19
    
        move-object v2, v7
    
        move-object/from16 v21, v3
    
        move-object v3, v4
    
        .end local v3    # "position":[I
        .local v21, "position":[I
        move-object/from16 v5, v17
    
        move v4, v6
    
        .end local v17    # "animStartedListener":Ljava/lang/Runnable;
        .local v5, "animStartedListener":Ljava/lang/Runnable;
        move/from16 v22, v0
    
        move-object v0, v5
    
        move-object/from16 v17, v18
    
        move-object/from16 v5, v16
    
        .end local v5    # "animStartedListener":Ljava/lang/Runnable;
        .end local v18    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .local v0, "animStartedListener":Ljava/lang/Runnable;
        .local v17, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .local v22, "height":I
        move-object v6, v8
    
        invoke-direct/range {v1 .. v6}, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$3;-><init>(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Landroid/os/Handler;ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)V
    
        .line 204
        .local v1, "future":Lcom/android/systemui/shared/recents/view/AppTransitionAnimationSpecsFuture;
        invoke-static {}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->getInstance()Lcom/android/systemui/shared/system/WindowManagerWrapper;
    
        move-result-object v2
    
        iget-object v3, v7, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;->mHandler:Landroid/os/Handler;
    
        const/4 v4, 0x1
    
        invoke-virtual {v2, v1, v0, v3, v4}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->overridePendingAppTransitionMultiThumbFuture(Lcom/android/systemui/shared/recents/view/AppTransitionAnimationSpecsFuture;Ljava/lang/Runnable;Landroid/os/Handler;Z)V
    
        .end local v0    # "animStartedListener":Ljava/lang/Runnable;
        .end local v1    # "future":Lcom/android/systemui/shared/recents/view/AppTransitionAnimationSpecsFuture;
        .end local v8    # "taskBounds":Landroid/graphics/Rect;
        .end local v16    # "thumbnail":Landroid/graphics/Bitmap;
        .end local v17    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .end local v20    # "width":I
        .end local v21    # "position":[I
        .end local v22    # "height":I
        goto :goto_1
    
        .line 168
        .local v5, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        :catch_0
        move-exception v0
    
        move-object/from16 v17, v5
    
        .end local v5    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .restart local v17    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        move-object v1, v0
    
        .line 169
        .local v0, "e":Landroid/os/RemoteException;
        const-string v1, "TaskSystemShortcut"
    
        const-string v2, "Failed to notify SysUI of split screen: "
    
        invoke-static {v1, v2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    
        .line 170
        return-void
    
        .line 207
        .end local v0    # "e":Landroid/os/RemoteException;
        .end local v17    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        :cond_2
        :goto_1
        return-void
    .end method
    Mod:
    Code:
    .method public static synthetic lambda$getOnClickListener$1(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Lcom/android/quickstep/views/TaskView;Lcom/android/quickstep/views/RecentsView;Lcom/android/launcher3/BaseDraggingActivity;ILcom/android/quickstep/views/TaskThumbnailView;Landroid/view/View;)V
        .locals 23
        .param p1, "taskView"    # Lcom/android/quickstep/views/TaskView;
        .param p2, "recentsView"    # Lcom/android/quickstep/views/RecentsView;
        .param p3, "activity"    # Lcom/android/launcher3/BaseDraggingActivity;
        .param p4, "taskId"    # I
        .param p5, "thumbnailView"    # Lcom/android/quickstep/views/TaskThumbnailView;
        .param p6, "v"    # Landroid/view/View;
    
        move-object/from16 v7, p0
    
        move-object/from16 v8, p1
    
        move-object/from16 v9, p2
    
        move-object/from16 v10, p3
    
        move-object/from16 v11, p5
    
        .line 130
        new-instance v0, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$1;
    
        invoke-direct {v0, v7, v8, v9}, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$1;-><init>(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Lcom/android/quickstep/views/TaskView;Lcom/android/quickstep/views/RecentsView;)V
    
        move-object v12, v0
    
        .line 143
        .local v12, "onLayoutChangeListener":Landroid/view/View$OnLayoutChangeListener;
        new-instance v0, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$2;
    
        invoke-direct {v0, v7, v10, v8, v12}, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$2;-><init>(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Lcom/android/launcher3/BaseDraggingActivity;Lcom/android/quickstep/views/TaskView;Landroid/view/View$OnLayoutChangeListener;)V
    
        move-object v13, v0
    
        .line 155
        .local v13, "onDeviceProfileChangeListener":Lcom/android/launcher3/DeviceProfile$OnDeviceProfileChangeListener;
        const/4 v0, 0x1
    
        const/16 v1, 0x18f
    
        invoke-static {v10, v0, v1}, Lcom/android/launcher3/AbstractFloatingView;->closeOpenViews(Lcom/android/launcher3/BaseDraggingActivity;ZI)V
    
        .line 158
        invoke-static {}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->getInstance()Lcom/android/systemui/shared/system/WindowManagerWrapper;
    
        move-result-object v1
    
        invoke-virtual {v1}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->getNavBarPosition()I
    
        move-result v14
    
        .line 159
        .local v14, "navBarPosition":I
        const/4 v1, -0x1
    
        if-ne v14, v1, :cond_0
    
        .line 160
    
        .line 162
        :cond_0
        const/4 v1, 0x0
    
        if-eq v14, v0, :cond_1
    
        move v2, v0
    
        goto :goto_0
    
        :cond_1
        move v2, v1
    
        :goto_0
        move v15, v2
    
        .line 163
        .local v15, "dockTopOrLeft":Z
        invoke-static {}, Lcom/android/systemui/shared/system/ActivityManagerWrapper;->getInstance()Lcom/android/systemui/shared/system/ActivityManagerWrapper;
    
        move-result-object v2
    
        .line 164
        invoke-static {v15}, Lcom/android/systemui/shared/system/ActivityOptionsCompat;->makeSplitScreenOptions(Z)Landroid/app/ActivityOptions;
    
        move-result-object v3
    
        .line 163
        move/from16 v6, p4
    
        invoke-virtual {v2, v6, v3}, Lcom/android/systemui/shared/system/ActivityManagerWrapper;->startActivityFromRecents(ILandroid/app/ActivityOptions;)Z
    
        move-result v2
    
        if-eqz v2, :cond_2
    
        .line 165
        invoke-static/range {p3 .. p3}, Lcom/android/quickstep/RecentsModel;->getInstance(Landroid/content/Context;)Lcom/android/quickstep/RecentsModel;
    
        move-result-object v2
    
        invoke-virtual {v2}, Lcom/android/quickstep/RecentsModel;->getSystemUiProxy()Lcom/android/systemui/shared/recents/ISystemUiProxy;
    
        move-result-object v2
    
        move-object v5, v2
    
        .line 167
        .local v5, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        :try_start_0
        invoke-interface {v5}, Lcom/android/systemui/shared/recents/ISystemUiProxy;->onSplitScreenInvoked()V
        :try_end_0
        .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    
        .line 171
        nop
    
        .line 172
        invoke-virtual/range {p3 .. p3}, Lcom/android/launcher3/BaseDraggingActivity;->getUserEventDispatcher()Lcom/android/launcher3/logging/UserEventDispatcher;
    
        move-result-object v2
    
        const/16 v3, 0x10
    
        invoke-virtual {v2, v1, v3}, Lcom/android/launcher3/logging/UserEventDispatcher;->logActionOnControl(II)V
    
        .line 176
        invoke-virtual {v10, v13}, Lcom/android/launcher3/BaseDraggingActivity;->addOnDeviceProfileChangeListener(Lcom/android/launcher3/DeviceProfile$OnDeviceProfileChangeListener;)V
    
        .line 178
        new-instance v4, Lcom/android/quickstep/-$$Lambda$TaskSystemShortcut$SplitScreen$bIIgvqKYPaQItPy-_-PUOmKY14k;
    
        .local v4, "animStartedListener":Ljava/lang/Runnable;
        invoke-direct {v4, v9, v8}, Lcom/android/quickstep/-$$Lambda$TaskSystemShortcut$SplitScreen$bIIgvqKYPaQItPy-_-PUOmKY14k;-><init>(Lcom/android/quickstep/views/RecentsView;Lcom/android/quickstep/views/TaskView;)V
    
        .line 186
        const/4 v2, 0x2
    
        new-array v3, v2, [I
    
        .line 187
        .local v3, "position":[I
        invoke-virtual {v11, v3}, Lcom/android/quickstep/views/TaskThumbnailView;->getLocationOnScreen([I)V
    
        .line 188
        invoke-virtual/range {p5 .. p5}, Lcom/android/quickstep/views/TaskThumbnailView;->getWidth()I
    
        move-result v2
    
        int-to-float v2, v2
    
        invoke-virtual/range {p1 .. p1}, Lcom/android/quickstep/views/TaskView;->getScaleX()F
    
        move-result v16
    
        mul-float v2, v2, v16
    
        float-to-int v2, v2
    
        .line 189
        .local v2, "width":I
        invoke-virtual/range {p5 .. p5}, Lcom/android/quickstep/views/TaskThumbnailView;->getHeight()I
    
        move-result v0
    
        int-to-float v0, v0
    
        invoke-virtual/range {p1 .. p1}, Lcom/android/quickstep/views/TaskView;->getScaleY()F
    
        move-result v16
    
        mul-float v0, v0, v16
    
        float-to-int v0, v0
    
        .line 190
        .local v0, "height":I
        move-object/from16 v17, v4
    
        new-instance v4, Landroid/graphics/Rect;
    
        .end local v4    # "animStartedListener":Ljava/lang/Runnable;
        .local v17, "animStartedListener":Ljava/lang/Runnable;
        move-object/from16 v18, v5
    
        aget v5, v3, v1
    
        .end local v5    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .local v18, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        const/16 v16, 0x1
    
        aget v8, v3, v16
    
        aget v1, v3, v1
    
        add-int/2addr v1, v2
    
        aget v19, v3, v16
    
        move/from16 v20, v2
    
        add-int v2, v19, v0
    
        .end local v2    # "width":I
        .local v20, "width":I
        invoke-direct {v4, v5, v8, v1, v2}, Landroid/graphics/Rect;-><init>(IIII)V
    
        move-object v8, v4
    
        .line 193
        .local v8, "taskBounds":Landroid/graphics/Rect;
        nop
    
        .line 194
        invoke-virtual {v8}, Landroid/graphics/Rect;->width()I
    
        move-result v1
    
        invoke-virtual {v8}, Landroid/graphics/Rect;->height()I
    
        move-result v2
    
        const/high16 v4, 0x3f800000    # 1.0f
    
        const/high16 v5, -0x1000000
    
        .line 193
        invoke-static {v1, v2, v11, v4, v5}, Lcom/android/systemui/shared/recents/view/RecentsTransition;->drawViewIntoHardwareBitmap(IILandroid/view/View;FI)Landroid/graphics/Bitmap;
    
        move-result-object v16
    
        .line 196
        .local v16, "thumbnail":Landroid/graphics/Bitmap;
        new-instance v19, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$3;
    
        iget-object v4, v7, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;->mHandler:Landroid/os/Handler;
    
        move-object/from16 v1, v19
    
        move-object v2, v7
    
        move-object/from16 v21, v3
    
        move-object v3, v4
    
        .end local v3    # "position":[I
        .local v21, "position":[I
        move-object/from16 v5, v17
    
        move v4, v6
    
        .end local v17    # "animStartedListener":Ljava/lang/Runnable;
        .local v5, "animStartedListener":Ljava/lang/Runnable;
        move/from16 v22, v0
    
        move-object v0, v5
    
        move-object/from16 v17, v18
    
        move-object/from16 v5, v16
    
        .end local v5    # "animStartedListener":Ljava/lang/Runnable;
        .end local v18    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .local v0, "animStartedListener":Ljava/lang/Runnable;
        .local v17, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .local v22, "height":I
        move-object v6, v8
    
        invoke-direct/range {v1 .. v6}, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen$3;-><init>(Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;Landroid/os/Handler;ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)V
    
        .line 204
        .local v1, "future":Lcom/android/systemui/shared/recents/view/AppTransitionAnimationSpecsFuture;
        invoke-static {}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->getInstance()Lcom/android/systemui/shared/system/WindowManagerWrapper;
    
        move-result-object v2
    
        iget-object v3, v7, Lcom/android/quickstep/TaskSystemShortcut$SplitScreen;->mHandler:Landroid/os/Handler;
    
        const/4 v4, 0x1
    
        invoke-virtual {v2, v1, v0, v3, v4}, Lcom/android/systemui/shared/system/WindowManagerWrapper;->overridePendingAppTransitionMultiThumbFuture(Lcom/android/systemui/shared/recents/view/AppTransitionAnimationSpecsFuture;Ljava/lang/Runnable;Landroid/os/Handler;Z)V
    
        .end local v0    # "animStartedListener":Ljava/lang/Runnable;
        .end local v1    # "future":Lcom/android/systemui/shared/recents/view/AppTransitionAnimationSpecsFuture;
        .end local v8    # "taskBounds":Landroid/graphics/Rect;
        .end local v16    # "thumbnail":Landroid/graphics/Bitmap;
        .end local v17    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .end local v20    # "width":I
        .end local v21    # "position":[I
        .end local v22    # "height":I
        goto :goto_1
    
        .line 168
        .local v5, "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        :catch_0
        move-exception v0
    
        move-object/from16 v17, v5
    
        .end local v5    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        .restart local v17    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        move-object v1, v0
    
        .line 169
        .local v0, "e":Landroid/os/RemoteException;
        const-string v1, "TaskSystemShortcut"
    
        const-string v2, "Failed to notify SysUI of split screen: "
    
        invoke-static {v1, v2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    
        .line 170
        return-void
    
        .line 207
        .end local v0    # "e":Landroid/os/RemoteException;
        .end local v17    # "sysUiProxy":Lcom/android/systemui/shared/recents/ISystemUiProxy;
        :cond_2
        :goto_1
        return-void
    .end method
 
  • Like
Reactions: serajr

user26335377

Member
Jan 13, 2020
30
7
Continuation:
  • /smali/com/android/quickstep/WindowTransformSwipeHandler$5.smali:
    Original:
    Code:
    .method public onPostDraw(Landroid/graphics/Canvas;)V
        .locals 2
        .param p1, "canvas"    # Landroid/graphics/Canvas;
    
        .line 789
        .local p0, "this":Lcom/android/quickstep/WindowTransformSwipeHandler$5;, "Lcom/android/quickstep/WindowTransformSwipeHandler$5;"
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler$5;->this$0:Lcom/android/quickstep/WindowTransformSwipeHandler;
    
        const v1, 0x8000
    
        invoke-static {v0, v1}, Lcom/android/quickstep/WindowTransformSwipeHandler;->access$300(Lcom/android/quickstep/WindowTransformSwipeHandler;I)V
    
        .line 790
        invoke-virtual {p0}, Lcom/android/quickstep/WindowTransformSwipeHandler$5;->detach()V
    
        .line 791
        return-void
    .end method
    Mod:
    Code:
    .method public onPostDraw(Landroid/graphics/Canvas;)V
        .locals 2
        .param p1, "canvas"    # Landroid/graphics/Canvas;
    
        .line 789
        .local p0, "this":Lcom/android/quickstep/WindowTransformSwipeHandler$5;, "Lcom/android/quickstep/WindowTransformSwipeHandler$5;"
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler$5;->this$0:Lcom/android/quickstep/WindowTransformSwipeHandler;
    
        const v1, 0x8000
    
        invoke-static {v0, v1}, Lcom/android/quickstep/WindowTransformSwipeHandler;->access$300(Lcom/android/quickstep/WindowTransformSwipeHandler;I)V
    
        .line 791
        return-void
    .end method
  • /smali/com/android/quickstep/WindowTransformSwipeHandler.smali:
    Original:
    Code:
    .method private invalidateHandler()V
        .locals 1
    
        .line 736
        .local p0, "this":Lcom/android/quickstep/WindowTransformSwipeHandler;, "Lcom/android/quickstep/WindowTransformSwipeHandler<TT;>;"
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mCurrentShift:Lcom/android/quickstep/AnimatedFloat;
    
        invoke-virtual {v0}, Lcom/android/quickstep/AnimatedFloat;->finishAnimation()V
    
        .line 738
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mGestureEndCallback:Ljava/lang/Runnable;
    
        if-eqz v0, :cond_0
    
        .line 739
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mGestureEndCallback:Ljava/lang/Runnable;
    
        invoke-interface {v0}, Ljava/lang/Runnable;->run()V
    
        .line 742
        :cond_0
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mActivityInitListener:Lcom/android/quickstep/ActivityControlHelper$ActivityInitListener;
    
        invoke-interface {v0}, Lcom/android/quickstep/ActivityControlHelper$ActivityInitListener;->unregister()V
    
        .line 743
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mInputConsumer:Lcom/android/systemui/shared/system/InputConsumerController;
    
        invoke-virtual {v0}, Lcom/android/systemui/shared/system/InputConsumerController;->unregisterInputConsumer()V
    
        .line 744
        const/4 v0, 0x0
    
        iput-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        .line 745
        return-void
    .end method
    Mod:
    Code:
    .method private invalidateHandler()V
        .locals 1
    
        .line 736
        .local p0, "this":Lcom/android/quickstep/WindowTransformSwipeHandler;, "Lcom/android/quickstep/WindowTransformSwipeHandler<TT;>;"
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mCurrentShift:Lcom/android/quickstep/AnimatedFloat;
    
        invoke-virtual {v0}, Lcom/android/quickstep/AnimatedFloat;->finishAnimation()V
    
        .line 738
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mGestureEndCallback:Ljava/lang/Runnable;
    
        if-eqz v0, :cond_0
    
        .line 739
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mGestureEndCallback:Ljava/lang/Runnable;
    
        invoke-interface {v0}, Ljava/lang/Runnable;->run()V
    
        .line 742
        :cond_0
        iget-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mActivityInitListener:Lcom/android/quickstep/ActivityControlHelper$ActivityInitListener;
    
        invoke-interface {v0}, Lcom/android/quickstep/ActivityControlHelper$ActivityInitListener;->unregister()V
    
        .line 740
        const/4 v0, 0x0
    
        iput-object v0, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        .line 745
        return-void
    .end method

    Original:
    Code:
    .method private switchToScreenshot()V
        .locals 5
    
        .line 773
        .local p0, "this":Lcom/android/quickstep/WindowTransformSwipeHandler;, "Lcom/android/quickstep/WindowTransformSwipeHandler<TT;>;"
        const/4 v0, 0x0
    
        .line 774
        .local v0, "finishTransitionPosted":Z
        iget-object v1, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRecentsAnimationWrapper:Lcom/android/quickstep/RecentsAnimationWrapper;
    
        invoke-virtual {v1}, Lcom/android/quickstep/RecentsAnimationWrapper;->getController()Lcom/android/systemui/shared/system/RecentsAnimationControllerCompat;
    
        move-result-object v1
    
        .line 775
        .local v1, "controller":Lcom/android/systemui/shared/system/RecentsAnimationControllerCompat;
        if-eqz v1, :cond_1
    
        .line 777
        iget-object v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        if-nez v2, :cond_0
    
        .line 778
        iget v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRunningTaskId:I
    
        invoke-virtual {v1, v2}, Lcom/android/systemui/shared/system/RecentsAnimationControllerCompat;->screenshotTask(I)Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        move-result-object v2
    
        iput-object v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        .line 780
        :cond_0
        iget-object v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRecentsView:Lcom/android/quickstep/views/RecentsView;
    
        iget v3, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRunningTaskId:I
    
        iget-object v4, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        invoke-virtual {v2, v3, v4}, Lcom/android/quickstep/views/RecentsView;->updateThumbnail(ILcom/android/systemui/shared/recents/model/ThumbnailData;)Lcom/android/quickstep/views/TaskView;
    
        move-result-object v2
    
        .line 781
        .local v2, "taskView":Lcom/android/quickstep/views/TaskView;
        iget-object v3, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRecentsView:Lcom/android/quickstep/views/RecentsView;
    
        const/4 v4, 0x0
    
        invoke-virtual {v3, v4}, Lcom/android/quickstep/views/RecentsView;->setRunningTaskHidden(Z)V
    
        .line 782
        if-eqz v2, :cond_1
    
        .line 785
        new-instance v3, Lcom/android/quickstep/WindowTransformSwipeHandler$5;
    
        invoke-direct {v3, p0, v2}, Lcom/android/quickstep/WindowTransformSwipeHandler$5;-><init>(Lcom/android/quickstep/WindowTransformSwipeHandler;Landroid/view/View;)V
    
        .line 792
        invoke-virtual {v3}, Lcom/android/quickstep/WindowTransformSwipeHandler$5;->attach()Z
    
        move-result v0
    
        .line 795
        .end local v2    # "taskView":Lcom/android/quickstep/views/TaskView;
        :cond_1
        if-nez v0, :cond_2
    
        .line 797
        const v2, 0x8000
    
        invoke-direct {p0, v2}, Lcom/android/quickstep/WindowTransformSwipeHandler;->setStateOnUiThread(I)V
    
        .line 799
        :cond_2
        return-void
    .end method
    Mod:
    Code:
    .method private switchToScreenshot()V
        .locals 5
    
        .line 773
        .local p0, "this":Lcom/android/quickstep/WindowTransformSwipeHandler;, "Lcom/android/quickstep/WindowTransformSwipeHandler<TT;>;"
        const/4 v0, 0x0
    
        .line 774
        .local v0, "finishTransitionPosted":Z
        iget-object v1, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRecentsAnimationWrapper:Lcom/android/quickstep/RecentsAnimationWrapper;
    
        invoke-virtual {v1}, Lcom/android/quickstep/RecentsAnimationWrapper;->getController()Lcom/android/systemui/shared/system/RecentsAnimationControllerCompat;
    
        move-result-object v1
    
        .line 775
        .local v1, "controller":Lcom/android/systemui/shared/system/RecentsAnimationControllerCompat;
        if-eqz v1, :cond_1
    
        .line 777
        iget-object v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        if-nez v2, :cond_0
    
        .line 778
        iget v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRunningTaskId:I
    
        invoke-virtual {v1, v2}, Lcom/android/systemui/shared/system/RecentsAnimationControllerCompat;->screenshotTask(I)Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        move-result-object v2
    
        iput-object v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        .line 780
        :cond_0
        iget-object v2, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRecentsView:Lcom/android/quickstep/views/RecentsView;
    
        iget v3, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRunningTaskId:I
    
        iget-object v4, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mTaskSnapshot:Lcom/android/systemui/shared/recents/model/ThumbnailData;
    
        invoke-virtual {v2, v3, v4}, Lcom/android/quickstep/views/RecentsView;->updateThumbnail(ILcom/android/systemui/shared/recents/model/ThumbnailData;)Lcom/android/quickstep/views/TaskView;
    
        move-result-object v2
    
        .line 781
        .local v2, "taskView":Lcom/android/quickstep/views/TaskView;
        iget-object v3, p0, Lcom/android/quickstep/WindowTransformSwipeHandler;->mRecentsView:Lcom/android/quickstep/views/RecentsView;
    
        const/4 v4, 0x0
    
        invoke-virtual {v3, v4}, Lcom/android/quickstep/views/RecentsView;->setRunningTaskHidden(Z)V
    
        .line 778
        if-nez v2, :cond_1
    
        .line 785
        new-instance v3, Lcom/android/quickstep/WindowTransformSwipeHandler$5;
    
        invoke-direct {v3, p0, v2}, Lcom/android/quickstep/WindowTransformSwipeHandler$5;-><init>(Lcom/android/quickstep/WindowTransformSwipeHandler;Landroid/view/View;)V
    
        .line 795
        .end local v2    # "taskView":Lcom/android/quickstep/views/TaskView;
        :cond_1
        if-nez v0, :cond_2
    
        .line 797
        const v2, 0x8000
    
        invoke-direct {p0, v2}, Lcom/android/quickstep/WindowTransformSwipeHandler;->setStateOnUiThread(I)V
    
        .line 799
        :cond_2
        return-void
    .end method
  • /smali/com/android/systemui/shared/recents/model/ThumbnailData.smali:
    Original:
    Code:
    .method public constructor <init>(Landroid/app/ActivityManager$TaskSnapshot;)V
        .locals 2
        .param p1, "snapshot"    # Landroid/app/ActivityManager$TaskSnapshot;
    
        .line 53
        invoke-direct {p0}, Ljava/lang/Object;-><init>()V
    
        .line 54
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getSnapshot()Landroid/graphics/GraphicBuffer;
    
        move-result-object v0
    
        invoke-static {v0}, Landroid/graphics/Bitmap;->createHardwareBitmap(Landroid/graphics/GraphicBuffer;)Landroid/graphics/Bitmap;
    
        move-result-object v0
    
        iput-object v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->thumbnail:Landroid/graphics/Bitmap;
    
        .line 55
        new-instance v0, Landroid/graphics/Rect;
    
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getContentInsets()Landroid/graphics/Rect;
    
        move-result-object v1
    
        invoke-direct {v0, v1}, Landroid/graphics/Rect;-><init>(Landroid/graphics/Rect;)V
    
        iput-object v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->insets:Landroid/graphics/Rect;
    
        .line 56
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getOrientation()I
    
        move-result v0
    
        iput v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->orientation:I
    
        .line 57
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->isReducedResolution()Z
    
        move-result v0
    
        iput-boolean v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->reducedResolution:Z
    
        .line 58
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getScale()F
    
        move-result v0
    
        iput v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->scale:F
    
        .line 59
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->isRealSnapshot()Z
    
        move-result v0
    
        iput-boolean v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->isRealSnapshot:Z
    
        .line 60
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->isTranslucent()Z
    
        move-result v0
    
        iput-boolean v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->isTranslucent:Z
    
        .line 61
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getWindowingMode()I
    
        move-result v0
    
        iput v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->windowingMode:I
    
        .line 62
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getSystemUiVisibility()I
    
        move-result v0
    
        iput v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->systemUiVisibility:I
    
        .line 63
        return-void
    .end method
    Mod:
    Code:
    .method public constructor <init>(Landroid/app/ActivityManager$TaskSnapshot;)V
        .locals 2
        .param p1, "snapshot"    # Landroid/app/ActivityManager$TaskSnapshot;
    
        .line 53
        invoke-direct {p0}, Ljava/lang/Object;-><init>()V
    
        .line 54
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getSnapshot()Landroid/graphics/GraphicBuffer;
    
        move-result-object v0
    
        invoke-static {v0}, Landroid/graphics/Bitmap;->createHardwareBitmap(Landroid/graphics/GraphicBuffer;)Landroid/graphics/Bitmap;
    
        move-result-object v0
    
        iput-object v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->thumbnail:Landroid/graphics/Bitmap;
    
        .line 55
        new-instance v0, Landroid/graphics/Rect;
    
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getContentInsets()Landroid/graphics/Rect;
    
        move-result-object v1
    
        invoke-direct {v0, v1}, Landroid/graphics/Rect;-><init>(Landroid/graphics/Rect;)V
    
        iput-object v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->insets:Landroid/graphics/Rect;
    
        .line 56
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getOrientation()I
    
        move-result v0
    
        iput v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->orientation:I
    
        .line 57
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->isReducedResolution()Z
    
        move-result v0
    
        iput-boolean v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->reducedResolution:Z
    
        .line 58
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->getScale()F
    
        move-result v0
    
        iput v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->scale:F
    
        .line 59
        invoke-virtual {p1}, Landroid/app/ActivityManager$TaskSnapshot;->isRealSnapshot()Z
    
        move-result v0
    
        iput-boolean v0, p0, Lcom/android/systemui/shared/recents/model/ThumbnailData;->isRealSnapshot:Z
    
        .line 63
        return-void
    .end method
  • /smali/com/android/systemui/shared/system/InputConsumerController$InputEventReceiver.smali:
    Original:
    Code:
    .method public onInputEvent(Landroid/view/InputEvent;I)V
        .locals 3
        .param p1, "event"    # Landroid/view/InputEvent;
        .param p2, "displayId"    # I
    
        .line 71
        const/4 v0, 0x1
    
        .line 73
        .local v0, "handled":Z
        :try_start_0
        iget-object v1, p0, Lcom/android/systemui/shared/system/InputConsumerController$InputEventReceiver;->this$0:Lcom/android/systemui/shared/system/InputConsumerController;
    
        invoke-static {v1}, Lcom/android/systemui/shared/system/InputConsumerController;->access$000(Lcom/android/systemui/shared/system/InputConsumerController;)Lcom/android/systemui/shared/system/InputConsumerController$TouchListener;
    
        move-result-object v1
    
        if-eqz v1, :cond_0
    
        instance-of v1, p1, Landroid/view/MotionEvent;
    
        if-eqz v1, :cond_0
    
        .line 74
        move-object v1, p1
    
        check-cast v1, Landroid/view/MotionEvent;
    
        .line 75
        .local v1, "ev":Landroid/view/MotionEvent;
        iget-object v2, p0, Lcom/android/systemui/shared/system/InputConsumerController$InputEventReceiver;->this$0:Lcom/android/systemui/shared/system/InputConsumerController;
    
        invoke-static {v2}, Lcom/android/systemui/shared/system/InputConsumerController;->access$000(Lcom/android/systemui/shared/system/InputConsumerController;)Lcom/android/systemui/shared/system/InputConsumerController$TouchListener;
    
        move-result-object v2
    
        invoke-interface {v2, v1}, Lcom/android/systemui/shared/system/InputConsumerController$TouchListener;->onTouchEvent(Landroid/view/MotionEvent;)Z
    
        move-result v2
        :try_end_0
        .catchall {:try_start_0 .. :try_end_0} :catchall_0
    
        move v0, v2
    
        .line 78
        .end local v1    # "ev":Landroid/view/MotionEvent;
        :cond_0
        invoke-virtual {p0, p1, v0}, Lcom/android/systemui/shared/system/InputConsumerController$InputEventReceiver;->finishInputEvent(Landroid/view/InputEvent;Z)V
    
        .line 79
        nop
    
        .line 80
        return-void
    
        .line 78
        :catchall_0
        move-exception v1
    
        invoke-virtual {p0, p1, v0}, Lcom/android/systemui/shared/system/InputConsumerController$InputEventReceiver;->finishInputEvent(Landroid/view/InputEvent;Z)V
    
        throw v1
    .end method
    Mod:
    Code:
    .method public onInputEvent(Landroid/view/InputEvent;I)V
        .locals 3
        .param p1, "event"    # Landroid/view/InputEvent;
        .param p2, "displayId"    # I
    
        .line 71
        const/4 v0, 0x1
    
        .line 73
        .local v0, "handled":Z
        :try_start_0
        iget-object v1, p0, Lcom/android/systemui/shared/system/InputConsumerController$InputEventReceiver;->this$0:Lcom/android/systemui/shared/system/InputConsumerController;
    
        invoke-static {v1}, Lcom/android/systemui/shared/system/InputConsumerController;->access$000(Lcom/android/systemui/shared/system/InputConsumerController;)Lcom/android/systemui/shared/system/InputConsumerController$TouchListener;
    
        move-result-object v1
    
        if-eqz v1, :cond_0
    
        instance-of v1, p1, Landroid/view/MotionEvent;
    
        if-eqz v1, :cond_0
    
        .line 74
        move-object v1, p1
    
        check-cast v1, Landroid/view/MotionEvent;
    
        .line 75
        .local v1, "ev":Landroid/view/MotionEvent;
        iget-object v2, p0, Lcom/android/systemui/shared/system/InputConsumerController$InputEventReceiver;->this$0:Lcom/android/systemui/shared/system/InputConsumerController;
    
        invoke-static {v2}, Lcom/android/systemui/shared/system/InputConsumerController;->access$000(Lcom/android/systemui/shared/system/InputConsumerController;)Lcom/android/systemui/shared/system/InputConsumerController$TouchListener;
    
        move-result-object v2
    
        invoke-interface {v2, v1}, Lcom/android/systemui/shared/system/InputConsumerController$TouchListener;->onTouchEvent(Landroid/view/MotionEvent;)Z
    
        move-result v2
        :try_end_0
        .catchall {:try_start_0 .. :try_end_0} :catchall_0
    
        move v0, v2
    
        .line 78
        .line 79
        .end local v1    # "ev":Landroid/view/MotionEvent;
        :cond_0
        nop
    
        .line 80
        return-void
    
        .line 78
        :catchall_0
        move-exception v1
    
        throw v1
    .end method
  • /smali/com/android/systemui/shared/system/RotationWatcher.smali:
    Original:
    Code:
    .method public enable()V
        .locals 3
    
        .line 48
        iget-boolean v0, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mIsWatching:Z
    
        if-nez v0, :cond_0
    
        .line 50
        :try_start_0
        invoke-static {}, Landroid/view/WindowManagerGlobal;->getWindowManagerService()Landroid/view/IWindowManager;
    
        move-result-object v0
    
        iget-object v1, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mWatcher:Landroid/view/IRotationWatcher;
    
        iget-object v2, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mContext:Landroid/content/Context;
    
        .line 51
        invoke-virtual {v2}, Landroid/content/Context;->getDisplay()Landroid/view/Display;
    
        move-result-object v2
    
        invoke-virtual {v2}, Landroid/view/Display;->getDisplayId()I
    
        move-result v2
    
        .line 50
        invoke-interface {v0, v1, v2}, Landroid/view/IWindowManager;->watchRotation(Landroid/view/IRotationWatcher;I)I
    
        .line 52
        const/4 v0, 0x1
    
        iput-boolean v0, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mIsWatching:Z
        :try_end_0
        .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    
        .line 55
        goto :goto_0
    
        .line 53
        :catch_0
        move-exception v0
    
        .line 54
        .local v0, "e":Landroid/os/RemoteException;
        const-string v1, "RotationWatcher"
    
        const-string v2, "Failed to set rotation watcher"
    
        invoke-static {v1, v2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    
        .line 57
        .end local v0    # "e":Landroid/os/RemoteException;
        :cond_0
        :goto_0
        return-void
    .end method
    Mod:
    Code:
    .method public enable()V
        .locals 3
    
        .line 48
        iget-boolean v0, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mIsWatching:Z
    
        if-nez v0, :cond_0
    
        .line 50
        :try_start_0
        invoke-static {}, Landroid/view/WindowManagerGlobal;->getWindowManagerService()Landroid/view/IWindowManager;
    
        move-result-object v0
    
        iget-object v1, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mWatcher:Landroid/view/IRotationWatcher;
    
        iget-object v2, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mContext:Landroid/content/Context;
    
        .line 51
        invoke-virtual {v2}, Landroid/content/Context;->getDisplay()Landroid/view/Display;
    
        move-result-object v2
    
        invoke-virtual {v2}, Landroid/view/Display;->getDisplayId()I
    
        move-result v2
    
        .line 52
        const/4 v0, 0x1
    
        iput-boolean v0, p0, Lcom/android/systemui/shared/system/RotationWatcher;->mIsWatching:Z
        :try_end_0
        .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    
        .line 55
        goto :goto_0
    
        .line 53
        :catch_0
        move-exception v0
    
        .line 54
        .local v0, "e":Landroid/os/RemoteException;
        const-string v1, "RotationWatcher"
    
        const-string v2, "Failed to set rotation watcher"
    
        invoke-static {v1, v2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    
        .line 57
        .end local v0    # "e":Landroid/os/RemoteException;
        :cond_0
        :goto_0
        return-void
    .end method
  • /smali/com/android/systemui/shared/system/ThreadedRendererCompat.smali:
    Original:
    Code:
    .method public static setContextPriority(I)V
        .locals 0
        .param p0, "priority"    # I
    
        .line 31
        invoke-static {p0}, Landroid/view/ThreadedRenderer;->setContextPriority(I)V
    
        .line 32
        return-void
    .end method
    Mod:
    Code:
    .method public static setContextPriority(I)V
        .locals 0
        .param p0, "priority"    # I
    
        .line 32
        return-void
    .end method
  • /smali/com/android/systemui/shared/system/TransactionCompat.smali:
    Original:
    Code:
    .method public setEarlyWakeup()Lcom/android/systemui/shared/system/TransactionCompat;
        .locals 1
    
        .line 105
        iget-object v0, p0, Lcom/android/systemui/shared/system/TransactionCompat;->mTransaction:Landroid/view/SurfaceControl$Transaction;
    
        invoke-virtual {v0}, Landroid/view/SurfaceControl$Transaction;->setEarlyWakeup()Landroid/view/SurfaceControl$Transaction;
    
        .line 106
        return-object p0
    .end method
    Mod:
    Code:
    .method public setEarlyWakeup()Lcom/android/systemui/shared/system/TransactionCompat;
        .locals 1
    
        .line 106
        return-object p0
    .end method
  • /smali/com/android/systemui/shared/system/WindowManagerWrapper.smali:
    Original:
    Code:
    .method public getNavBarPosition()I
        .locals 3
    
        .line 163
        :try_start_0
        invoke-static {}, Landroid/view/WindowManagerGlobal;->getWindowManagerService()Landroid/view/IWindowManager;
    
        move-result-object v0
    
        invoke-interface {v0}, Landroid/view/IWindowManager;->getNavBarPosition()I
    
        move-result v0
        :try_end_0
        .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    
        return v0
    
        .line 164
        :catch_0
        move-exception v0
    
        .line 165
        .local v0, "e":Landroid/os/RemoteException;
        const-string v1, "WindowManagerWrapper"
    
        const-string v2, "Failed to get nav bar position"
    
        invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    
        .line 167
        .end local v0    # "e":Landroid/os/RemoteException;
        const/4 v0, -0x1
    
        return v0
    .end method
    Mod:
    Code:
    .method public getNavBarPosition()I
        .locals 3
    
        .line 163
        :try_start_0
        invoke-static {}, Landroid/view/WindowManagerGlobal;->getWindowManagerService()Landroid/view/IWindowManager;
    
        move-result-object v0
    
        invoke-interface {v0}, Landroid/view/IWindowManager;->getNavBarPosition()I
    
        move-result v0
        :try_end_0
        .catch Ljava/lang/NoSuchMethodError; {:try_start_0 .. :try_end_0} :catch_0
    
        return v0
    
        .line 164
        :catch_0
        move-exception v0
    
        .line 165
        .local v0, "e":Landroid/os/RemoteException;
        const-string v1, "WindowManagerWrapper"
    
        const-string v2, "Failed to get nav bar position"
    
        invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    
        .line 167
        .end local v0    # "e":Landroid/os/RemoteException;
        const/4 v0, -0x1
    
        return v0
    .end method
I tryed to change something similar in your apk, but in new Xperia 5 Launcher there is so meny differents from Xperia 10 Launcher and I couldn't get a workable version.
I hope, that it can help to get gestures work in your port.
 

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,023
18,620
São Paulo - SP
Hello, and big thanks for your work again!
I don't know, what exactly makes possible to use the new gestures and recent's provider without root, but here the list of changed smali files:
Thank you for this!
I fear that no matter what we mod to try making the gestures work, it may be useless, because of what I stated >> here << (loor for isGestureNavSupportedByDefaultLauncher)
Anyways, gonna check it out!
 

raziel zarafan

Senior Member
Nov 23, 2014
192
51
31
México
Thanks for the log! :good:
Hope it has been fixed now >> #519 << (everyone using it should update, too)!

Thaks bro, still fc and swipe donw to see notification bar and swipe left to see google app doesnt work and when u r on drawer search option is activated by default heres the logcat
 

Attachments

  • newlog.zip
    91.7 KB · Views: 7
Last edited:
  • Like
Reactions: serajr

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,023
18,620
São Paulo - SP
Thaks bro, still fc and swipe donw to see notification bar and swipe left to see google app doesnt work and when u r on drawer search option is activated by default heres the logcat
Thanks again for the log.
Let's try something different this time. Please, run these three adb commands:
Code:
adb shell settings put global hidden_api_policy_pre_p_apps 1
adb shell settings put global hidden_api_policy_p_apps 1
adb shell settings put global hidden_api_policy 1
Ensure commands were successfully received (no errors). I guess the last command is the only one actually needed, but...
Reboot, and let me know if fcs got fixed.
 
Last edited:
  • Like
Reactions: raziel zarafan

Twistabeatz

Member
Jul 18, 2019
14
4
The launcher is working fine. But when I try to activate with adb comands the gestural navigation Everything works except the "home button". After rebooting it turns to the normal 3 button navigation
 

raziel zarafan

Senior Member
Nov 23, 2014
192
51
31
México
Thanks again for the log.
Let's try something different this time. Please, run these three adb commands:
Code:
adb shell settings put global hidden_api_policy_pre_p_apps 1
adb shell settings put global hidden_api_policy_p_apps 1
adb shell settings put global hidden_api_policy 1
Ensure commands were successfully received (no errors). I guess the last command is the only one actually needed, but...
Reboot, and let me know if fcs got fixed.

thanks bro but still fc with the commands heres the logcat
 

Attachments

  • catlog3.zip
    58 KB · Views: 16
  • Like
Reactions: serajr

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,023
18,620
São Paulo - SP
Is the same bro when I restarted the phone installed the home then restarted again entry to an app then go back fc again
Ok, last try >> signed_15 <<
I haven't removed the signed_14 yet, because the signed_15 is a "shot in the dark", so if something goes wrong with the signed_15, go back to signed_14.
I suggest that you uninstall the app again, reboot, and proceed to install the new one.
 
  • Like
Reactions: raziel zarafan

raziel zarafan

Senior Member
Nov 23, 2014
192
51
31
México
Ok, last try >> signed_15 <<
I haven't removed the signed_14 yet, because the signed_15 is a "shot in the dark", so if something goes wrong with the signed_15, go back to signed_14.
I suggest that you uninstall the app again, reboot, and proceed to install the new one.

Thanks mate the app works fine no more fc! Only swipe down and to see notification bar and swipe right to see Google app is not working and search bar on drawer is activated by default when u swipe up on home to see drawer
 
  • Like
Reactions: serajr

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,023
18,620
São Paulo - SP
Thanks mate the app works fine no more fc! Only swipe down and to see notification bar and swipe right to see Google app is not working and search bar on drawer is activated by default when u swipe up on home to see drawer
Thanks for the feedback!
Swipe gestures not working on workspace (aka home screen) may be related to SystemUI restrictions, as I stated before, anyways, I will check that out when I have some spare time.
The visible search bar on top of the drawer is the default design/behavior (not an issue).
 
  • Like
Reactions: icemoon151151

raziel zarafan

Senior Member
Nov 23, 2014
192
51
31
México
Thanks for the feedback!
Swipe gestures not working on workspace (aka home screen) may be related to SystemUI restrictions, as I stated before, anyways, I will check that out when I have some spare time.
The visible search bar on top of the drawer is the default design/behavior (not an issue).

No I mean is like u selected search bar on drawer without touch it

Here's a video that I mean
http://https://youtu.be/5NYpINWpUlg
 
  • Like
Reactions: serajr

Top Liked Posts

  • There are no posts matching your filters.
  • 85
    Xperia finally updated their launcher!

    Hey, so it has been a long long time since I have posted or even ported anything.

    Finally, xperia updated the launcher and it was a must port for me.

    The launcher should theoretically work on all xperia devices with android Pie (and sony software). I have currently tested it on Xperia XZP. You can also activate pill via an adb command.

    Steps

    Simply install the apk and then install the wallpaper apk and then reboot

    If you want pill, you must use adb with your device.
    I will not be explaining how to use adb, there are many guides out there.
    But to activate pill simply use this adb command
    Code:
    adb shell settings put secure swipe_up_to_switch_apps_enabled 1

    p.s the launcher will not override sony's built in launcher. But you cannot use Launcher3(Quickstep launcher) with it. The package name is com.android.launcher3.

    FOR XPERIA XA2

    Devices:
    Working :-
    Xperia XZ1
    Xperia XZP
    Xperia XZ2
    Xperia XZ3

    Not Working :- (Testing needs to be done to get the app working on these, logcats also need to be provided)
    Known bugs :-
    Split screen causes force closeFixed v1.1
    Force Close on rotating Fixed v1.2
    More than 1 page in folder FC on rearrange Fixed v1.5
    App split shortcut not working

    VERSIONS
    v1.3 If you plan on using pill with this launcher, this one might be the most stable option for you. Navbar replacement/shortcut apps should work with this as long as this launcher is the default (App close animation had to be slightly altered).

    v1.4.1 first of all, both have recents working without pill

    v1.4.2 second version has recents working with other launchers, but to do this, i had to remove app opening animation(not the gesture) from the recent, so If this is something you cant live without, go with v1.4.1, but if you wanna use other launchers, then this is the version you want


    Hope you all enjoy it as much as i am.

    Don't forget thanks button and feel free to donate

    Thanks @TakuyaZ for providing the apks from the system dumps (and motivating me ;) )

    Lastly, please do not use or repost my work without authorization, as this port was done for me and for a friend, took me at least 8 hours of constant work to get it to work properly and was not as easy and simple as copying from a system dump and uploading it and simply calling it a port.
    11
    how can i root my xz2?
    1st - https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/
    2nd - https://forum.xda-developers.com/xperia-xz2/how-to/how-to-root-xz2-probably-xz2c-android-10-t4030775
    (android 10)

    here is my logcat bro i hope it helps
    Thank you so much. Ofc it helps (gonna check it out) :good:
    Maybe today I may fresh install my xz2 and keep it unrooted, in order to try fixing all the remaining issues!

    Edit. Got launcher working on my unrooted XZ2. Stay tunned!

    Edit 2. Attached below is the working Xperia 5 Launcher for non-rooted android 10 devices (XZ2/C/P and XZ3 - Sony stock firmware ONLY), as well the proper WallpaperPicker.apk (11/12/13/... in the apk's title means the quantity of fixes I've made on it)!
    But I can't get the two buttons and/or gestural modes working (commands >> here <<)! Maybe someone could help on this.

    If you face any other fc/issue, please, do report with the "how to reproduce the issue" and the proper logcat, otherwise I cannot help out!

    Some reports are welcome, please do that!
    Enjoy it.
    6
    @Sahaab
    I ported the Xperia 5 android Q (10) launcher to work on non-rooted devices, but I couldn't get the gestures (pill) to work. Did you change anything in the sources (smali) to make the pill work?
    In addition, I got the launcher working on my XZ1 running Android Pie (9) - distinct apk version.
    I may share the apks later, if I get everything working.

    With root, it's easy to make it work, as you can see here (My exposed module will be released soon).

    Tia!
    5
    Update
    v1.3

    - Can launch recents via other apps (e.g some shortcut manager or nav bar apps, etc)
    - Recents launch from other launchers does not FC anymore, and it opens up, but clicking on a recent says that App isnt available, so other launcher support still not there
    4
    I myself have noticed the split screen bug, i will fix it tomorrow