Exploit database

GH-12737d57f49df9711fa1c097c9e9ec1d

nanopathi/framework_base_aosp10_r33_cve-2021-0472

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2021-0472

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files43

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

services/core/java/com/android/server/location/GnssPositionMode.java

Java · 1,536 bytes
package com.android.server.location;

import java.util.Arrays;

/**
 * Represents a GNSS position mode.
 */
public class GnssPositionMode {
    private final int mode;
    private final int recurrence;
    private final int minInterval;
    private final int preferredAccuracy;
    private final int preferredTime;
    private final boolean lowPowerMode;

    public GnssPositionMode(int mode, int recurrence, int minInterval,
            int preferredAccuracy, int preferredTime, boolean lowPowerMode) {
        this.mode = mode;
        this.recurrence = recurrence;
        this.minInterval = minInterval;
        this.preferredAccuracy = preferredAccuracy;
        this.preferredTime = preferredTime;
        this.lowPowerMode = lowPowerMode;
    }

    @Override
    public boolean equals(Object other) {
        if (other instanceof GnssPositionMode) {
            GnssPositionMode that = (GnssPositionMode) other;
            return mode == that.mode && recurrence == that.recurrence
                    && minInterval == that.minInterval
                    && preferredAccuracy == that.preferredAccuracy
                    && preferredTime == that.preferredTime && lowPowerMode == that.lowPowerMode
                    && this.getClass() == that.getClass();
        }

        return false;
    }

    @Override
    public int hashCode() {
        return Arrays.hashCode(
                new Object[]{mode, recurrence, minInterval, preferredAccuracy, preferredTime,
                        lowPowerMode, getClass()});
    }
}