[Samsung Galaxy Fit GT 5670] zcop:
Improve Sweep to Remove

Original thread

http://xdaforums.com/showthread.php?t=1691397

1. If your rom has Sweep to Remove

Decompile SystemUI.apk

Open /smali/com/android/systemui/statusbar/ExpandedView.smali

add under # instance fields

.field mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

add this method to the end

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"

.prologue
.line 51
iget-object v0, p0, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;->needsInterceptTouch(Landroid/view/MotionEvent;)Z

move-result v0

if-eqz v0, :cond_0

.line 52
const/4 v0, 0x1

.line 54
:goto_0
return v0

:cond_0
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z

move-result v0

goto :goto_0
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 2
.parameter "event"

.prologue
.line 59
iget-object v1, p0, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

invoke-virtual {v1, p1}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;->handleTouchEvent(Landroid/view/MotionEvent;)Z

move-result v0

.line 61
.local v0, handled:Z
invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z

move-result v1

if-eqz v1, :cond_0

.line 62
const/4 v0, 0x1

.line 65
:cond_0
return v0
.end method

Save

Delete LatestItemContainer$1.smali and LatestItemContainer.smali

Download statusbar.rar and extract to /smali/com/android/systemui/statusbar/

Edit StatusBarService.smali

Add under # instance fields

.field mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

In .method private makeStatusBarView

above

const v8, 0x1050005

invoke-virtual {v5, v8}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

add

new-instance v6, Lcom/android/systemui/statusbar/ItemTouchDispatcher;

invoke-direct {v6, p0}, Lcom/android/systemui/statusbar/ItemTouchDispatcher;-><init>(Landroid/content/Context;)V

iput-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

above

const v8, 0x7f030004

invoke-static {p1, v8, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

add

iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

iput-object v6, v2, Lcom/android/systemui/statusbar/ExpandedView;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

Replace method makeNotificationView ( from begin to end)

with modified

.method makeNotificationView(Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup;)[Landroid/view/View;
.locals 19
.parameter "notification"
.parameter "parent"

.prologue
const/4 v4, 0x0

const/4 v5, 0x0

.line 574
move-object/from16 v0, p1

iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->notification:Landroid/app/Notification;

move-object/from16 v16, v0

.line 575
.local v16, n:Landroid/app/Notification;
move-object/from16 v0, v16

iget-object v0, v0, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;

move-object/from16 v17, v0

.line 576
.local v17, remoteViews:Landroid/widget/RemoteViews;
if-nez v17, :cond_0

.line 577
.line 611
:goto_0
return-object v4

.line 581
:cond_0
const-string v4, "layout_inflater"

move-object/from16 v0, p0

move-object v1, v4

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/StatusBarService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v15

check-cast v15, Landroid/view/LayoutInflater;

.line 582
.local v15, inflater:Landroid/view/LayoutInflater;
const v4, 0x7f030008

move-object v0, v15

move v1, v4

move-object/from16 v2, p2

move v3, v5

invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

move-result-object v18

check-cast v18, Lcom/android/systemui/statusbar/LatestItemContainer;

.local v18, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v16

iget v0, v0, Landroid/app/Notification;->flags:I

move v4, v0

and-int/lit8 v4, v4, 0x2

if-nez v4, :cond_1

move-object/from16 v0, v16

iget v0, v0, Landroid/app/Notification;->flags:I

move v4, v0

and-int/lit8 v4, v4, 0x20

if-nez v4, :cond_1

move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->mTouchDispatcher:Lcom/android/systemui/statusbar/ItemTouchDispatcher;

move-object v4, v0

new-instance v5, Lcom/android/systemui/statusbar/StatusBarService$7;

move-object v0, v5

move-object/from16 v1, p0

move-object/from16 v2, p1

invoke-direct {v0, v1, v2}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V

move-object/from16 v0, v18

move-object v1, v4

move-object v2, v5

invoke-virtual {v0, v1, v2}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Lcom/android/systemui/statusbar/ItemTouchDispatcher;Ljava/lang/Runnable;)V

:cond_1
const v4, 0x7f090024

move-object/from16 v0, v18

move v1, v4

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;

move-result-object v10

check-cast v10, Landroid/view/ViewGroup;

.line 586
.local v10, content:Landroid/view/ViewGroup;
const/high16 v4, 0x6

invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setDescendantFocusability(I)V

.line 587
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->mFocusChangeListener:Landroid/view/View$OnFocusChangeListener;

move-object v4, v0

invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V

.line 588
move-object/from16 v0, v16

iget-object v0, v0, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;

move-object v6, v0

.line 589
.local v6, contentIntent:Landroid/app/PendingIntent;
if-eqz v6, :cond_2

.line 590
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$Launcher;

move-object/from16 v0, p1

iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;

move-object v7, v0

move-object/from16 v0, p1

iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->tag:Ljava/lang/String;

move-object v8, v0

move-object/from16 v0, p1

iget v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->id:I

move v9, v0

move-object/from16 v5, p0

invoke-direct/range {v4 .. v9}, Lcom/android/systemui/statusbar/StatusBarService$Launcher;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Landroid/app/PendingIntent;Ljava/lang/String;Ljava/lang/String;I)V

invoke-virtual {v10, v4}, Landroid/view/ViewGroup;->setOnClickListener(Landroid/view/View$OnClickListener;)V

.line 594
:cond_2
const/4 v13, 0x0

.line 595
.local v13, expanded:Landroid/view/View;
const/4 v12, 0x0

.line 597
.local v12, exception:Ljava/lang/Exception;
:try_start_0
move-object/from16 v0, v17

move-object/from16 v1, p0

move-object v2, v10

invoke-virtual {v0, v1, v2}, Landroid/widget/RemoteViews;->apply(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0

move-result-object v13

.line 602
:goto_1
if-nez v13, :cond_3

.line 603
new-instance v4, Ljava/lang/StringBuilder;

invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

move-object/from16 v0, p1

iget-object v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->pkg:Ljava/lang/String;

move-object v5, v0

invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v4

const-string v5, "/0x"

invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v4

move-object/from16 v0, p1

iget v0, v0, Lcom/android/internal/statusbar/StatusBarNotification;->id:I

move v5, v0

invoke-static {v5}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

move-result-object v5

invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v4

invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v14

.line 604
.local v14, ident:Ljava/lang/String;
const-string v4, "StatusBarService"

new-instance v5, Ljava/lang/StringBuilder;

invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

const-string v6, "couldn\'t inflate view for notification "

.end local v6 #contentIntent:Landroid/app/PendingIntent;
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

invoke-virtual {v5, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v5

invoke-static {v4, v5, v12}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

.line 605
const/4 v4, 0x0

goto/16 :goto_0

.line 599
.end local v14 #ident:Ljava/lang/String;
.restart local v6 #contentIntent:Landroid/app/PendingIntent;
:catch_0
move-exception v11

.line 600
.local v11, e:Ljava/lang/RuntimeException;
move-object v12, v11

goto :goto_1

.line 607
.end local v11 #e:Ljava/lang/RuntimeException;
:cond_3
invoke-virtual {v10, v13}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

.line 608
const/4 v4, 0x1

move-object/from16 v0, v18

move v1, v4

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setDrawingCacheEnabled(Z)V

.line 611
const/4 v4, 0x3

new-array v4, v4, [Landroid/view/View;

const/4 v5, 0x0

aput-object v18, v4, v5

const/4 v5, 0x1

aput-object v10, v4, v5

const/4 v5, 0x2

aput-object v13, v4, v5

goto/16 :goto_0
.end method

Recompile systemUI.apk

2. If your rom dont have Sweep to Remove

Go here first

http://xdaforums.com/showthread.php?t=1483193 then comeback to this guide