[Android General] Abdullaharis:
Continued.

Second part

( Telecom.apk )

1.Decompile Telecom.apk

2.Download breathingtelecom.zip from attachment. Extract and copy files to your decompiled Telecom

3.Now Recompile and Decompile Telecom (For id's)

4.Open Telecom\smali\com\android\server\telecom\MissedCallNotifier.smali

find and remove below annotations

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/server/telecom/MissedCallNotifier$MissedCallInfo;
}
.end annotation

find and remove below field

.field private static final TIME_SPAN:Landroid/text/style/RelativeSizeSpan;

find below field

.field private mMissedCalls:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/server/telecom/MissedCallNotifier$MissedCallInfo;",
">;"
}

replace with this field

.field private mMissedCallCount:I

find below method

.method static constructor <clinit>()V

in the same method find and remove below lines

.line 233
new-instance v0, Landroid/text/style/RelativeSizeSpan;

const v1, 0x3f333333 # 0.7f

invoke-direct {v0, v1}, Landroid/text/style/RelativeSizeSpan;-><init>(F)V

sput-object v0, Lcom/android/server/telecom/MissedCallNotifier;->TIME_SPAN:Landroid/text/style/RelativeSizeSpan;

find

.method constructor <init>(Landroid/content/Context;)V

replace whole method with this

.method constructor <init>(Landroid/content/Context;)V
.locals 2

.prologue
.line 82
invoke-direct {p0}, Lcom/android/server/telecom/CallsManagerListenerBase;-><init>()V

.line 80
const/4 v0, 0x0

iput v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

.line 83
iput-object p1, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

.line 84
iget-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

const-string v1, "notification"

invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/app/NotificationManager;

iput-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mNotificationManager:Landroid/app/NotificationManager;

.line 87
invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->updateOnStartup()V

.line 88
return-void
.end method

find

.method private cancelMissedCallNotification()V

replace whole method with this

.method private cancelMissedCallNotification()V
.locals 2

.prologue
.line 209
const/4 v0, 0x0

iput v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

.line 210
iget-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mNotificationManager:Landroid/app/NotificationManager;

const/4 v1, 0x1

invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->cancel(I)V

.line 211
return-void
.end method

find and remove whole method

find

.method showMissedCallNotification(Lcom/android/server/telecom/Call;)V

replace whole method with this

.method showMissedCallNotification(Lcom/android/server/telecom/Call;)V
.locals 10

.prologue
const/4 v2, 0x0

const/high16 v6, 0x7f060000

const/4 v9, 0x0

const/4 v8, 0x1

.line 126
iget v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

add-int/lit8 v0, v0, 0x1

iput v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

.line 134
iget v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

if-ne v0, v8, :cond_2

.line 135
const v1, 0x7f050015

.line 136
invoke-direct {p0, p1}, Lcom/android/server/telecom/MissedCallNotifier;->getNameForCall(Lcom/android/server/telecom/Call;)Ljava/lang/String;

move-result-object v0

.line 144
:goto_0
new-instance v3, Landroid/app/Notification$Builder;

iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

invoke-direct {v3, v4}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V

.line 145
iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v4

const-string v5, "gk_missed_call_breath"

invoke-static {v4, v5, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v4

if-ne v4, v8, :cond_3

.line 147
const v4, 0x7f02001f

invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;

move-result-object v4

iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v5

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

move-result v5

invoke-virtual {v4, v5}, Landroid/app/Notification$Builder;->setColor(I)Landroid/app/Notification$Builder;

move-result-object v4

invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getCreationTimeMillis()J

move-result-wide v6

invoke-virtual {v4, v6, v7}, Landroid/app/Notification$Builder;->setWhen(J)Landroid/app/Notification$Builder;

move-result-object v4

iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

invoke-virtual {v5, v1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

move-result-object v1

invoke-virtual {v4, v1}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

move-result-object v1

invoke-virtual {v1, v0}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

move-result-object v0

invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createCallLogPendingIntent()Landroid/app/PendingIntent;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

move-result-object v0

invoke-virtual {v0, v8}, Landroid/app/Notification$Builder;->setAutoCancel(Z)Landroid/app/Notification$Builder;

move-result-object v0

invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createClearMissedCallsPendingIntent()Landroid/app/PendingIntent;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

.line 166
:goto_1
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getHandle()Landroid/net/Uri;

move-result-object v1

.line 167
if-nez v1, :cond_4

move-object v0, v2

.line 170
:goto_2
iget v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

if-ne v4, v8, :cond_6

.line 171
const-string v4, "Add actions with number %s."

new-array v5, v8, [Ljava/lang/Object;

invoke-static {v0}, Lcom/android/server/telecom/Log;->piiHandle(Ljava/lang/Object;)Ljava/lang/String;

move-result-object v6

aput-object v6, v5, v9

invoke-static {p0, v4, v5}, Lcom/android/server/telecom/Log;->d(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V

.line 173
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

move-result v4

if-nez v4, :cond_0

iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

const v5, 0x7f050034

invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v4

invoke-static {v0, v4}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z

move-result v0

if-nez v0, :cond_0

.line 175
const v0, 0x7f020020

iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

const v5, 0x7f050019

invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v4

invoke-direct {p0, v1}, Lcom/android/server/telecom/MissedCallNotifier;->createCallBackPendingIntent(Landroid/net/Uri;)Landroid/app/PendingIntent;

move-result-object v5

invoke-virtual {v3, v0, v4, v5}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

.line 179
const v0, 0x7f020006

iget-object v4, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

const v5, 0x7f05001a

invoke-virtual {v4, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;

move-result-object v4

invoke-direct {p0, v1}, Lcom/android/server/telecom/MissedCallNotifier;->createSendSmsFromNotificationPendingIntent(Landroid/net/Uri;)Landroid/app/PendingIntent;

move-result-object v1

invoke-virtual {v3, v0, v4, v1}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

.line 184
:cond_0
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getPhotoIcon()Landroid/graphics/Bitmap;

move-result-object v0

.line 185
if-eqz v0, :cond_5

.line 186
invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$Builder;

.line 198
:cond_1
:goto_3
invoke-virtual {v3}, Landroid/app/Notification$Builder;->build()Landroid/app/Notification;

move-result-object v0

.line 199
iget-object v1, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

invoke-static {v1, v0}, Lcom/android/server/telecom/MissedCallNotifier;->configureLedOnNotification(Landroid/content/Context;Landroid/app/Notification;)V

.line 201
const-string v1, "Adding missed call notification for %s."

new-array v3, v8, [Ljava/lang/Object;

aput-object p1, v3, v9

invoke-static {p0, v1, v3}, Lcom/android/server/telecom/Log;->i(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V

.line 202
iget-object v1, p0, Lcom/android/server/telecom/MissedCallNotifier;->mNotificationManager:Landroid/app/NotificationManager;

sget-object v3, Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;

invoke-virtual {v1, v2, v8, v0, v3}, Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V

.line 204
return-void

.line 138
:cond_2
const v1, 0x7f050016

.line 139
iget-object v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

const v3, 0x7f050017

new-array v4, v8, [Ljava/lang/Object;

iget v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

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

move-result-object v5

aput-object v5, v4, v9

invoke-virtual {v0, v3, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v0

goto/16 :goto_0

.line 156
:cond_3
const v4, 0x108007f

invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;

move-result-object v4

iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v5

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

move-result v5

invoke-virtual {v4, v5}, Landroid/app/Notification$Builder;->setColor(I)Landroid/app/Notification$Builder;

move-result-object v4

invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getCreationTimeMillis()J

move-result-wide v6

invoke-virtual {v4, v6, v7}, Landroid/app/Notification$Builder;->setWhen(J)Landroid/app/Notification$Builder;

move-result-object v4

iget-object v5, p0, Lcom/android/server/telecom/MissedCallNotifier;->mContext:Landroid/content/Context;

invoke-virtual {v5, v1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

move-result-object v1

invoke-virtual {v4, v1}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

move-result-object v1

invoke-virtual {v1, v0}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

move-result-object v0

invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createCallLogPendingIntent()Landroid/app/PendingIntent;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

move-result-object v0

invoke-virtual {v0, v8}, Landroid/app/Notification$Builder;->setAutoCancel(Z)Landroid/app/Notification$Builder;

move-result-object v0

invoke-direct {p0}, Lcom/android/server/telecom/MissedCallNotifier;->createClearMissedCallsPendingIntent()Landroid/app/PendingIntent;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/app/Notification$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

goto/16 :goto_1

.line 167
:cond_4
invoke-virtual {v1}, Landroid/net/Uri;->getSchemeSpecificPart()Ljava/lang/String;

move-result-object v0

goto/16 :goto_2

.line 188
:cond_5
invoke-virtual {p1}, Lcom/android/server/telecom/Call;->getPhoto()Landroid/graphics/drawable/Drawable;

move-result-object v0

.line 189
if-eqz v0, :cond_1

instance-of v1, v0, Landroid/graphics/drawable/BitmapDrawable;

if-eqz v1, :cond_1

.line 190
check-cast v0, Landroid/graphics/drawable/BitmapDrawable;

invoke-virtual {v0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

move-result-object v0

invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$Builder;

goto/16 :goto_3

.line 194
:cond_6
const-string v1, "Suppress actions. handle: %s, missedCalls: %d."

const/4 v4, 0x2

new-array v4, v4, [Ljava/lang/Object;

invoke-static {v0}, Lcom/android/server/telecom/Log;->piiHandle(Ljava/lang/Object;)Ljava/lang/String;

move-result-object v0

aput-object v0, v4, v9

iget v0, p0, Lcom/android/server/telecom/MissedCallNotifier;->mMissedCallCount:I

invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

move-result-object v0

aput-object v0, v4, v8

invoke-static {p0, v1, v4}, Lcom/android/server/telecom/Log;->d(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V

goto/16 :goto_3
.end method

find and replace id's

5.Compile Telecom and move to your device

Continued on next post