正在查看: Perplexity v2.48.1 应用的 LocationUpdatesReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Perplexity v2.48.1 应用的 LocationUpdatesReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mapbox.common.location;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import java.lang.ref.WeakReference;
import java.util.Iterator;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u0000 \u000f2\u00020\u0001:\u0001\u000fB\u0005¢\u0006\u0002\u0010\u0002J\u001a\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\b\u0010\r\u001a\u0004\u0018\u00010\u000eH\u0016R\u001b\u0010\u0003\u001a\u00020\u00048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0010"}, d2 = {"Lcom/mapbox/common/location/LocationUpdatesReceiver;", "Landroid/content/BroadcastReceiver;", "()V", "service", "Lcom/mapbox/common/location/LocationServiceImpl;", "getService", "()Lcom/mapbox/common/location/LocationServiceImpl;", "service$delegate", "Lkotlin/Lazy;", "onReceive", "", "context", "Landroid/content/Context;", "intent", "Landroid/content/Intent;", "Companion", "common_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class LocationUpdatesReceiver extends BroadcastReceiver {
public static final String ACTION_PROCESS_LOCATION_UPDATES = "com.mapbox.common.location.action.PROCESS_LOCATION_UPDATES";
public static final String TAG = "LUReceiver";
private final Lazy service = LazyKt.a(new Function0<LocationServiceImpl>() {
public final LocationServiceImpl m16invoke() {
LocationService createPlatformLocationService = LocationServiceImpl.INSTANCE.createPlatformLocationService();
Intrinsics.f(createPlatformLocationService, "null cannot be cast to non-null type com.mapbox.common.location.LocationServiceImpl");
return (LocationServiceImpl) createPlatformLocationService;
}
});
private final LocationServiceImpl getService() {
return (LocationServiceImpl) this.service.getValue();
}
@Override
public void onReceive(Context context, Intent intent) {
Intrinsics.h(context, "context");
if (intent != null && Intrinsics.c(intent.getAction(), ACTION_PROCESS_LOCATION_UPDATES)) {
Iterator<T> it = getService().getBackgroundDeviceLocationProviders$common_release().iterator();
while (it.hasNext()) {
BaseDeviceLocationProvider baseDeviceLocationProvider = (BaseDeviceLocationProvider) ((WeakReference) it.next()).get();
if (baseDeviceLocationProvider != null) {
List<Location> extractResult = baseDeviceLocationProvider.extractResult(intent);
if (!extractResult.isEmpty()) {
baseDeviceLocationProvider.notifyLocationUpdate(extractResult);
}
}
}
}
}
}