import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Build;
import c.i.b.g;
import c.i.b.h;
import com.ertunga.wifihotspot.R;
import com.ertunga.wifihotspot.oreosupport.HotSpotIntentService;
import d.b.c.o.b;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.Objects;
public class c implements InvocationHandler {
public final /* synthetic */ b a;
public c(d dVar, b bVar) {
this.a = bVar;
}
public Object invoke(Object obj, Method method, Object[] objArr) {
String name = method.getName();
name.hashCode();
if (name.equals("onTetheringStarted")) {
HotSpotIntentService hotSpotIntentService = ((a) this.a).a;
int i2 = HotSpotIntentService.s;
Objects.requireNonNull(hotSpotIntentService);
int i3 = Build.VERSION.SDK_INT;
if (i3 >= 26) {
NotificationManager notificationManager = (NotificationManager) hotSpotIntentService.getSystemService("notification");
if (notificationManager.getNotificationChannel("control_app") == null) {
NotificationChannel notificationChannel = new NotificationChannel("control_app", hotSpotIntentService.getString(R.string.app_name), 2);
notificationChannel.enableLights(false);
notificationChannel.enableVibration(false);
notificationManager.createNotificationChannel(notificationChannel);
}
}
Intent intent = new Intent(hotSpotIntentService, HotSpotIntentService.class);
intent.setAction(hotSpotIntentService.getString(R.string.intent_action_turnoff));
PendingIntent service = i3 >= 31 ? PendingIntent.getService(hotSpotIntentService, 0, intent, 33554432) : PendingIntent.getService(hotSpotIntentService, 0, intent, 0);
h hVar = new h(hotSpotIntentService, "control_app");
hVar.e(2, true);
hVar.d("WifiHotSpot is On");
hVar.f891b.add(new g(R.drawable.icon_wifi, "TURN OFF HOTSPOT", service));
hVar.f897h = -1;
hVar.f899j = "service";
hVar.n.icon = R.drawable.hotspot;
hotSpotIntentService.startForeground(1338, hVar.a());
return null;
} else if (!name.equals("onTetheringFailed")) {
Map<b.C0064b<?>, Class<?>> map = b.f2178h;
try {
obj.getClass().getMethod(b.c(method), method.getParameterTypes()).invoke(obj, objArr);
return null;
} catch (InvocationTargetException e2) {
throw e2.getCause();
}
} else {
Objects.requireNonNull((a) this.a);
return null;
}
}
}