AppIndexingJobService.java
2.14 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
64
65
66
67
68
69
package com.bitstrips.imoji.firebase;
import android.annotation.TargetApi;
import android.app.job.JobParameters;
import android.app.job.JobService;
import android.os.Handler;
import android.os.Handler.Callback;
import android.os.Message;
import android.os.Messenger;
import android.util.Log;
import com.bitstrips.imoji.ImojiApplication;
import com.bitstrips.imoji.manager.AppIndexingManager;
import java.text.MessageFormat;
import javax.inject.Inject;
@TargetApi(21)
public class AppIndexingJobService
extends JobService
implements Handler.Callback
{
public static final int INDEXING_FAILED = 0;
public static final int INDEXING_MESSAGE_TYPE = 100;
public static final int INDEXING_SUCCEEDED = 1;
private static final String LOG_TAG_APP_INDEXING = "AppIndexing";
@Inject
AppIndexingManager mAppIndexingManager;
private Handler mHandler = new Handler(this);
public boolean handleMessage(Message paramMessage)
{
int i = paramMessage.what;
if (i == 100)
{
if (paramMessage.arg1 != 1) {}
for (boolean bool = true;; bool = false)
{
paramMessage = (JobParameters)paramMessage.obj;
MessageFormat.format("Finishing scheduled app indexing job ID: {0}; needs reschedule: {1}", new Object[] { Integer.valueOf(paramMessage.getJobId()), Boolean.valueOf(bool) });
jobFinished(paramMessage, bool);
return true;
}
}
Log.e("AppIndexing", "Unsupported message type: " + i);
return true;
}
public void onCreate()
{
super.onCreate();
((ImojiApplication)getApplication()).inject(this);
}
public boolean onStartJob(JobParameters paramJobParameters)
{
this.mAppIndexingManager.updateIndex(new AppIndexingParams.Builder().setForceRequestAvatarInfo(true).setIndexingReason("scheduled").setMessenger(new Messenger(this.mHandler)).setJobParams(paramJobParameters).build());
return true;
}
public boolean onStopJob(JobParameters paramJobParameters)
{
return true;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/firebase/AppIndexingJobService.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/