BaseAppIndexingUpdateReceiver.java 1.6 KB
package com.bitstrips.imoji.receivers;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import com.bitstrips.imoji.ImojiApplication;
import com.bitstrips.imoji.firebase.AppIndexingParams;
import com.bitstrips.imoji.manager.AppIndexingManager;
import com.bitstrips.imoji.security.SignatureUtils;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;

public abstract class BaseAppIndexingUpdateReceiver
  extends BroadcastReceiver
{
  @Inject
  AppIndexingManager a;
  @Inject
  @Named("avatarId")
  Provider<String> b;
  
  @NonNull
  protected abstract AppIndexingParams getAppIndexingParams();
  
  @NonNull
  protected abstract String getTrustedFingerprint();
  
  @NonNull
  protected abstract String getTrustedPackageName();
  
  protected boolean onBeforeUpdateIndex(Context paramContext)
  {
    return true;
  }
  
  public final void onReceive(Context paramContext, Intent paramIntent)
  {
    ((ImojiApplication)paramContext.getApplicationContext()).inject(this);
    if (TextUtils.isEmpty((CharSequence)this.b.get())) {}
    while ((!SignatureUtils.isInstalledSignatureTrusted(paramContext, getTrustedPackageName(), getTrustedFingerprint())) || (!onBeforeUpdateIndex(paramContext))) {
      return;
    }
    this.a.updateIndex(getAppIndexingParams());
  }
}


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