BannerNotificationFactory.java
2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.arellomobile.android.push.utils.notification;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.widget.RemoteViews;
import com.arellomobile.android.push.preference.SoundType;
import com.arellomobile.android.push.preference.VibrateType;
public class BannerNotificationFactory
extends BaseNotificationFactory
{
public static final String sNotificationLayout = "notification";
public BannerNotificationFactory(Context paramContext, Bundle paramBundle, String paramString1, String paramString2, SoundType paramSoundType, VibrateType paramVibrateType)
{
super(paramContext, paramBundle, paramString1, paramString2, paramSoundType, paramVibrateType);
}
@SuppressLint({"NewApi"})
final Notification a(Context paramContext, Bundle paramBundle, String paramString1, String paramString2, String paramString3)
{
paramContext = new Notification();
int i = getContext().getResources().getIdentifier("notification", "layout", getContext().getPackageName());
if (i == 0) {
throw new IllegalArgumentException();
}
paramBundle = new RemoteViews(getContext().getPackageName(), i);
paramString1 = Helper.tryToGetBitmapFromInternet(getData().getString("b"), getContext(), -1);
if (paramString1 != null)
{
paramBundle.setBitmap(getContext().getResources().getIdentifier("image", "id", getContext().getPackageName()), "setImageBitmap", paramString1);
paramContext.contentView = paramBundle;
if (Build.VERSION.SDK_INT >= 16) {
paramContext.bigContentView = paramBundle;
}
if (Build.VERSION.SDK_INT < 11) {
break label220;
}
paramContext.tickerView = paramBundle;
}
for (;;)
{
paramContext.icon = Helper.tryToGetIconFormStringOrGetFromApplication(getData().getString("i"), getContext());
return paramContext;
paramBundle.setBitmap(getContext().getResources().getIdentifier("image", "id", getContext().getPackageName()), "setImageBitmap", ((BitmapDrawable)getContext().getResources().getDrawable(getContext().getApplicationInfo().icon)).getBitmap());
break;
label220:
paramContext.tickerText = paramString3;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/arellomobile/android/push/utils/notification/BannerNotificationFactory.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/