Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 80780737 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Fix lint errors

parent f5ad796b
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -134,10 +134,6 @@

        <!-- Location -->

        <activity
            android:name="org.microg.nlp.ui.BackendSettingsActivity"
            android:process=":ui" />

        <activity
            android:name="org.microg.gms.ui.PlacePickerActivity"
            android:exported="true"
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

package org.microg.gms.location.network.wifi

import android.annotation.SuppressLint
import android.content.Context
import android.net.wifi.ScanResult
import android.net.wifi.WifiScanner
@@ -12,6 +13,7 @@ import android.os.WorkSource
import android.util.Log
import org.microg.gms.location.network.TAG

@SuppressLint("WrongConstant")
class WifiScannerSource(private val context: Context, private val callback: WifiDetailsCallback) : WifiDetailsSource {
    override fun startScan(workSource: WorkSource?) {
        val scanner = context.getSystemService("wifiscanner") as WifiScanner
+11 −3
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

package com.google.android.gms.location;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.location.Location;

@@ -48,15 +49,14 @@ public class GeofencingEvent {
     * @param intent the intent to extract the geofencing event data from
     * @return a {@link GeofencingEvent} object or {@code null} if the given intent is {@code null}
     */

    public static GeofencingEvent fromIntent(Intent intent) {
        if (intent == null) {
            return null;
        }
        GeofencingEvent event = new GeofencingEvent();
        event.errorCode = intent.getIntExtra(EXTRA_ERROR_CODE, -1);
        event.geofenceTransition = intent.getIntExtra(EXTRA_TRANSITION, -1);
        if (event.geofenceTransition != 1 && event.geofenceTransition != 2 && event.geofenceTransition != 4)
            event.geofenceTransition = -1;
        event.geofenceTransition = validate(intent.getIntExtra(EXTRA_TRANSITION, -1));
        ArrayList<byte[]> parceledGeofences = (ArrayList<byte[]>) intent.getSerializableExtra(EXTRA_GEOFENCE_LIST);
        if (parceledGeofences != null) {
            event.triggeringGeofences = new ArrayList<Geofence>();
@@ -68,6 +68,14 @@ public class GeofencingEvent {
        return event;
    }

    @SuppressLint("WrongConstant")
    private static @Geofence.GeofenceTransition int validate(@Geofence.GeofenceTransition int geofenceTransition) {
        if (geofenceTransition != Geofence.GEOFENCE_TRANSITION_ENTER && geofenceTransition != Geofence.GEOFENCE_TRANSITION_EXIT && geofenceTransition != Geofence.GEOFENCE_TRANSITION_DWELL) {
            return -1;
        }
        return geofenceTransition;
    }

    /**
     * Returns the error code that explains the error that triggered the intent specified in
     * {@link #fromIntent(Intent)}.
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ import android.os.WorkSource;
 *
 * @hide
 */
@SuppressWarnings("WrongConstant")
public final class LocationRequest implements Parcelable {
    /**
     * Used with {@link #setQuality} to request the most accurate locations available.
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.google.android.gms.nearby.exposurenotification.EXPOSURE_CALLBACK" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

    <application>