53 lines
1.9 KiB
Java
53 lines
1.9 KiB
Java
package com.tencent.mm.opensdk.channel.a;
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import com.tencent.mm.opensdk.constants.ConstantsAPI;
|
|
import com.tencent.mm.opensdk.utils.Log;
|
|
import com.tencent.mm.opensdk.utils.d;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class a {
|
|
|
|
/* renamed from: com.tencent.mm.opensdk.channel.a.a$a, reason: collision with other inner class name */
|
|
public static class C0015a {
|
|
public String W;
|
|
public long X;
|
|
public String action;
|
|
public Bundle bundle;
|
|
public String content;
|
|
}
|
|
|
|
public static boolean a(Context context, C0015a c0015a) {
|
|
String str;
|
|
if (context == null) {
|
|
str = "send fail, invalid argument";
|
|
} else {
|
|
if (!d.h(c0015a.action)) {
|
|
String str2 = null;
|
|
if (!d.h(c0015a.W)) {
|
|
str2 = c0015a.W + ".permission.MM_MESSAGE";
|
|
}
|
|
Intent intent = new Intent(c0015a.action);
|
|
Bundle bundle = c0015a.bundle;
|
|
if (bundle != null) {
|
|
intent.putExtras(bundle);
|
|
}
|
|
String packageName = context.getPackageName();
|
|
intent.putExtra(ConstantsAPI.SDK_VERSION, 620756998);
|
|
intent.putExtra(ConstantsAPI.APP_PACKAGE, packageName);
|
|
intent.putExtra(ConstantsAPI.CONTENT, c0015a.content);
|
|
intent.putExtra(ConstantsAPI.APP_SUPORT_CONTENT_TYPE, c0015a.X);
|
|
intent.putExtra(ConstantsAPI.CHECK_SUM, b.a(c0015a.content, 620756998, packageName));
|
|
context.sendBroadcast(intent, str2);
|
|
Log.d("MicroMsg.SDK.MMessage", "send mm message, intent=" + intent + ", perm=" + str2);
|
|
return true;
|
|
}
|
|
str = "send fail, action is null";
|
|
}
|
|
Log.e("MicroMsg.SDK.MMessage", str);
|
|
return false;
|
|
}
|
|
}
|