导航菜单

页面标题

页面副标题

Aplazo v2.4.68 - GeolocatorLocationService.java 源代码

正在查看: Aplazo v2.4.68 应用的 GeolocatorLocationService.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.baseflow.geolocator;

import C8.P;
import android.app.Service;
import android.content.Intent;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.IBinder;
import android.os.PowerManager;
import android.util.Log;
import androidx.fragment.app.L;
import c5.BinderC1393b;
import e5.C1685a;
import e5.e;
import e5.i;
import java.util.concurrent.CopyOnWriteArrayList;

public class GeolocatorLocationService extends Service {

    public static final int f21049m = 0;

    public i f21056i;

    public final BinderC1393b f21050c = new BinderC1393b(this);

    public boolean f21051d = false;

    public int f21052e = 0;

    public int f21053f = 0;

    public L f21054g = null;

    public e f21055h = null;

    public PowerManager.WakeLock f21057j = null;
    public WifiManager.WifiLock k = null;

    public C1685a f21058l = null;

    public final void a(P p3) {
        WifiManager wifiManager;
        PowerManager powerManager;
        b();
        if (p3.f2048d && (powerManager = (PowerManager) getApplicationContext().getSystemService("power")) != null) {
            PowerManager.WakeLock newWakeLock = powerManager.newWakeLock(1, "GeolocatorLocationService:Wakelock");
            this.f21057j = newWakeLock;
            newWakeLock.setReferenceCounted(false);
            this.f21057j.acquire();
        }
        if (!p3.f2047c || (wifiManager = (WifiManager) getApplicationContext().getSystemService("wifi")) == null) {
            return;
        }
        WifiManager.WifiLock createWifiLock = wifiManager.createWifiLock(Build.VERSION.SDK_INT < 29 ? 3 : 4, "GeolocatorLocationService:WifiLock");
        this.k = createWifiLock;
        createWifiLock.setReferenceCounted(false);
        this.k.acquire();
    }

    public final void b() {
        PowerManager.WakeLock wakeLock = this.f21057j;
        if (wakeLock != null && wakeLock.isHeld()) {
            this.f21057j.release();
            this.f21057j = null;
        }
        WifiManager.WifiLock wifiLock = this.k;
        if (wifiLock == null || !wifiLock.isHeld()) {
            return;
        }
        this.k.release();
        this.k = null;
    }

    @Override
    public final IBinder onBind(Intent intent) {
        Log.d("FlutterGeolocator", "Binding to location service.");
        return this.f21050c;
    }

    @Override
    public final void onCreate() {
        super.onCreate();
        Log.d("FlutterGeolocator", "Creating service.");
    }

    @Override
    public final void onDestroy() {
        e eVar;
        Log.d("FlutterGeolocator", "Destroying location service.");
        this.f21053f--;
        Log.d("FlutterGeolocator", "Stopping location service.");
        i iVar = this.f21056i;
        if (iVar != null && (eVar = this.f21055h) != null) {
            ((CopyOnWriteArrayList) eVar.f24141d).remove(iVar);
            iVar.e();
        }
        if (this.f21051d) {
            Log.d("FlutterGeolocator", "Stop service in foreground.");
            stopForeground(1);
            b();
            this.f21051d = false;
            this.f21058l = null;
        }
        this.f21055h = null;
        this.f21058l = null;
        Log.d("FlutterGeolocator", "Destroyed location service.");
        super.onDestroy();
    }

    @Override
    public final int onStartCommand(Intent intent, int i10, int i11) {
        return 1;
    }

    @Override
    public final boolean onUnbind(Intent intent) {
        Log.d("FlutterGeolocator", "Unbinding from location service.");
        return super.onUnbind(intent);
    }
}