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

Commit d62f1478 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Additional debug logging"

parents 91ec2ea0 35017cbc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -524,16 +524,18 @@ class LocationProviderManager extends
                }
            }

            if (baseRequest.isLocationSettingsIgnored()) {
            boolean locationSettingsIgnored = baseRequest.isLocationSettingsIgnored();
            if (locationSettingsIgnored) {
                // if we are not currently allowed use location settings ignored, disable it
                if (!mSettingsHelper.getIgnoreSettingsPackageWhitelist().contains(
                        getIdentity().getPackageName()) && !mLocationManagerInternal.isProvider(
                        null, getIdentity())) {
                    builder.setLocationSettingsIgnored(false);
                    locationSettingsIgnored = false;
                }
            }

            if (!baseRequest.isLocationSettingsIgnored() && !isThrottlingExempt()) {
            if (!locationSettingsIgnored && !isThrottlingExempt()) {
                // throttle in the background
                if (!mForeground) {
                    builder.setIntervalMillis(max(baseRequest.getIntervalMillis(),
+11 −0
Original line number Diff line number Diff line
@@ -16,7 +16,13 @@

package com.android.server.location.util;

import static android.os.PowerManager.locationPowerSaveModeToString;

import static com.android.server.location.LocationManagerService.D;
import static com.android.server.location.LocationManagerService.TAG;

import android.os.PowerManager.LocationPowerSaveMode;
import android.util.Log;

import java.util.concurrent.CopyOnWriteArrayList;

@@ -60,7 +66,12 @@ public abstract class LocationPowerSaveModeHelper {

    protected final void notifyLocationPowerSaveModeChanged(
            @LocationPowerSaveMode int locationPowerSaveMode) {
        if (D) {
            Log.d(TAG, "location power save mode is now " + locationPowerSaveModeToString(
                    locationPowerSaveMode));
        }
        mLocationEventLog.logLocationPowerSaveMode(locationPowerSaveMode);

        for (LocationPowerSaveModeChangedListener listener : mListeners) {
            listener.onLocationPowerSaveModeChanged(locationPowerSaveMode);
        }
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,11 @@

package com.android.server.location.util;

import static com.android.server.location.LocationManagerService.D;
import static com.android.server.location.LocationManagerService.TAG;

import android.util.Log;

import java.util.concurrent.CopyOnWriteArrayList;

/**
@@ -55,6 +60,10 @@ public abstract class ScreenInteractiveHelper {
    }

    protected final void notifyScreenInteractiveChanged(boolean interactive) {
        if (D) {
            Log.d(TAG, "screen interactive is now " + interactive);
        }

        for (ScreenInteractiveChangedListener listener : mListeners) {
            listener.onScreenInteractiveChanged(interactive);
        }