SimpleNotificationFactory.java
2.17 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
package com.arellomobile.android.push.utils.notification;
import android.app.Notification;
import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.text.TextUtils;
import com.arellomobile.android.push.preference.SoundType;
import com.arellomobile.android.push.preference.VibrateType;
import com.pushwoosh.support.v4.app.NotificationCompat.BigTextStyle;
import com.pushwoosh.support.v4.app.NotificationCompat.Builder;
public class SimpleNotificationFactory
extends BaseNotificationFactory
{
public SimpleNotificationFactory(Context paramContext, Bundle paramBundle, String paramString1, String paramString2, SoundType paramSoundType, VibrateType paramVibrateType)
{
super(paramContext, paramBundle, paramString1, paramString2, paramSoundType, paramVibrateType);
}
private static CharSequence a(String paramString)
{
if (TextUtils.isEmpty(paramString)) {
return paramString;
}
return Html.fromHtml(paramString);
}
final Notification a(Context paramContext, Bundle paramBundle, String paramString1, String paramString2, String paramString3)
{
int i = Helper.tryToGetIconFormStringOrGetFromApplication(paramBundle.getString("i"), paramContext);
paramContext.getResources();
Object localObject = null;
String str = paramBundle.getString("ci");
paramBundle = (Bundle)localObject;
if (str != null) {
paramBundle = Helper.tryToGetBitmapFromInternet(str, paramContext, 128);
}
paramContext = new NotificationCompat.Builder(paramContext);
paramContext.setContentTitle(a(paramString1));
paramContext.setContentText(a(paramString2));
paramContext.setTicker(a(paramString3));
paramContext.setWhen(System.currentTimeMillis());
paramContext.setStyle(new NotificationCompat.BigTextStyle().bigText(a(paramString2)));
paramContext.setSmallIcon(i);
if (paramBundle != null) {
paramContext.setLargeIcon(paramBundle);
}
return paramContext.build();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/arellomobile/android/push/utils/notification/SimpleNotificationFactory.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/