public class

PerformanceProfile

extends Object
implements Parcelable Comparable<PerformanceProfile>
java.lang.Object
   ↳ lineageos.power.PerformanceProfile

Class Overview

Encapsulates information about an available system power/peformance profile, managed by the PerformanceManager.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<PerformanceProfile> CREATOR
Public Constructors
PerformanceProfile(int id, float weight, String name, String description)
Public Methods
int compareTo(PerformanceProfile other)
int describeContents()
boolean equals(Object other)
String getDescription()
A localized description of the profile, suitable for display.
int getId()
Unique identifier for this profile.
String getName()
A localized name for the profile, suitable for display.
float getWeight()
The profile's weight, from 0 to 1, with 0 being lowest (power save), 1 being highest (performance), and 0.5 as the balanced default profile.
int hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface java.lang.Comparable

Fields

public static final Creator<PerformanceProfile> CREATOR

added in API level 8

Public Constructors

public PerformanceProfile (int id, float weight, String name, String description)

added in API level 9

Parameters
id int
weight float
name String
description String

Public Methods

public int compareTo (PerformanceProfile other)

added in API level 8

Parameters
other PerformanceProfile
Returns
int

public int describeContents ()

added in API level 8

Returns
int

public boolean equals (Object other)

Parameters
other Object
Returns
boolean

public String getDescription ()

added in API level 8

A localized description of the profile, suitable for display.

Returns
String description

public int getId ()

added in API level 8

Unique identifier for this profile. Must match values used by the PowerHAL.

Returns
int the id

public String getName ()

added in API level 8

A localized name for the profile, suitable for display.

Returns
String name

public float getWeight ()

added in API level 8

The profile's weight, from 0 to 1, with 0 being lowest (power save), 1 being highest (performance), and 0.5 as the balanced default profile. Other values may be seen, depending on the device. This value can be used for sorting.

Returns
float weight

public int hashCode ()

Returns
int

public String toString ()

Returns
String

public void writeToParcel (Parcel dest, int flags)

added in API level 8

Parameters
dest Parcel
flags int