package com.xiaomi.mipush.sdk; import android.content.Context; import android.content.Intent; import android.os.SystemClock; import com.xiaomi.channel.commonutils.logger.b; public class COSPushHelper { private static long a = 0; /* renamed from: a reason: collision with other field name */ private static volatile boolean f6669a = false; public static void convertMessage(Intent intent) { i.a(intent); } public static void doInNetworkChange(Context context) { long elapsedRealtime = SystemClock.elapsedRealtime(); if (getNeedRegister()) { long j = a; if (j <= 0 || j + Constants.ASSEMBLE_PUSH_NETWORK_INTERVAL <= elapsedRealtime) { a = elapsedRealtime; registerCOSAssemblePush(context); } } } public static boolean getNeedRegister() { return f6669a; } public static boolean hasNetwork(Context context) { return i.m9108a(context); } public static void onNotificationMessageCome(Context context, String str) { } public static void onPassThoughMessageCome(Context context, String str) { } public static void registerCOSAssemblePush(Context context) { AbstractPushManager a2 = f.a(context).a(e.ASSEMBLE_PUSH_COS); if (a2 != null) { b.m9051a("ASSEMBLE_PUSH : register cos when network change!"); a2.register(); } } public static synchronized void setNeedRegister(boolean z) { synchronized (COSPushHelper.class) { f6669a = z; } } public static void uploadToken(Context context, String str) { i.m9107a(context, e.ASSEMBLE_PUSH_COS, str); } }