discord-jadx/app/src/main/java/com/discord/utilities/system/RemoteIntentService$IpcCall...

64 lines
3.0 KiB
Java

package com.discord.utilities.system;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Process;
import c.d.b.a.a;
import com.discord.utilities.logging.Logger;
import com.discord.utilities.logging.LoggingProvider;
import com.discord.utilities.system.RemoteIntentService;
import d0.z.d.m;
import java.util.Objects;
/* compiled from: RemoteIntentService.kt */
public final class RemoteIntentService$IpcCallback$handler$1 implements Handler.Callback {
public final /* synthetic */ RemoteIntentService.IpcCallback this$0;
public RemoteIntentService$IpcCallback$handler$1(RemoteIntentService.IpcCallback ipcCallback) {
this.this$0 = ipcCallback;
}
@Override // android.os.Handler.Callback
public final boolean handleMessage(Message message) {
m.checkNotNullParameter(message, "msg");
Logger logger = LoggingProvider.INSTANCE.get();
if (message.what == 1) {
StringBuilder H = a.H('[');
H.append(RemoteIntentService.IpcCallback.access$getName$p(this.this$0));
H.append("] in IpcCallback: app pid=");
H.append(Process.myPid());
Logger.d$default(logger, "RemoteIntentService", H.toString(), null, 4, null);
Object obj = message.obj;
if (obj instanceof Bundle) {
StringBuilder H2 = a.H('[');
H2.append(RemoteIntentService.IpcCallback.access$getName$p(this.this$0));
H2.append("] success after (");
Logger.d$default(logger, "RemoteIntentService", a.w(H2, message.arg1, " ms)"), null, 4, null);
RemoteIntentService.IpcCallback ipcCallback = this.this$0;
Object obj2 = message.obj;
Objects.requireNonNull(obj2, "null cannot be cast to non-null type android.os.Bundle");
ipcCallback.onSuccess((Bundle) obj2);
return true;
} else if ((obj instanceof Throwable) || obj == null) {
StringBuilder H3 = a.H('[');
H3.append(RemoteIntentService.IpcCallback.access$getName$p(this.this$0));
H3.append("] failure after (");
Logger.d$default(logger, "RemoteIntentService", a.w(H3, message.arg1, " ms)"), null, 4, null);
RemoteIntentService.IpcCallback ipcCallback2 = this.this$0;
Object obj3 = message.obj;
if (!(obj3 instanceof Throwable)) {
obj3 = null;
}
ipcCallback2.onFailure((Throwable) obj3);
return true;
}
}
StringBuilder H4 = a.H('[');
H4.append(RemoteIntentService.IpcCallback.access$getName$p(this.this$0));
H4.append("] unexpected message in handler: ");
H4.append(RemoteIntentService.Companion.access$messageToString(RemoteIntentService.Companion, message));
Logger.w$default(logger, "RemoteIntentService", H4.toString(), null, 4, null);
return false;
}
}