AppIndexingLegacyScheduler.java 1.47 KB
package com.bitstrips.imoji.firebase;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build.VERSION;
import android.os.SystemClock;
import android.util.Log;
import com.bitstrips.imoji.injection.ForApplication;
import java.util.concurrent.TimeUnit;
import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class AppIndexingLegacyScheduler
{
  private static final long a = TimeUnit.HOURS.toMillis(12L);
  private final Context b;
  private final AlarmManager c;
  private boolean d = false;
  
  @Inject
  public AppIndexingLegacyScheduler(@ForApplication Context paramContext, AlarmManager paramAlarmManager)
  {
    this.b = paramContext;
    this.c = paramAlarmManager;
  }
  
  public void start()
  {
    if (Build.VERSION.SDK_INT >= 21) {}
    while (this.d) {
      return;
    }
    Intent localIntent = new Intent(this.b, AppIndexingLegacyWrapperService.class);
    PendingIntent localPendingIntent = PendingIntent.getService(this.b, 0, localIntent, 0);
    Log.i("AppIndexing", "Creating app indexing legacy scheduling..");
    this.c.setRepeating(3, SystemClock.elapsedRealtime() + a, a, localPendingIntent);
    this.b.startService(localIntent);
    this.d = true;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/firebase/AppIndexingLegacyScheduler.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */