# CarPowerPolicyFilter

Summary: [Nested Classes](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#nestedclasses) \| [Inherited Constants](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#inhconstants) \| [Fields](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#lfields) \| [Methods](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#inhmethods)  

# CarPowerPolicyFilter


`
public

final

class
CarPowerPolicyFilter
`


`

extends Object


`

`


implements

Parcelable


`

|---|-------------------------------------------------|
| java.lang.Object                                   ||
| ↳ | android.car.hardware.power.CarPowerPolicyFilter |

<br />

*** ** * ** ***

Filter to receive power policy changes that a listener is interested in.

For the record: When running codegen, auto-generated constructor of [Builder](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter.Builder) which takes
one argument should be removed manually, so that we can use the default constructor.

## Summary

|                                                                                                                           ### Nested classes                                                                                                                            ||
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [CarPowerPolicyFilter.Builder](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter.Builder) A builder for [CarPowerPolicyFilter](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter) |

|                                                                                                                                            ### Inherited constants                                                                                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface `android.os.Parcelable` |-------|---------------------------------| | `int` | `CONTENTS_FILE_DESCRIPTOR`      | | `int` | `PARCELABLE_ELIDE_DUPLICATES`   | | `int` | `PARCELABLE_STABILITY_LOCAL`    | | `int` | `PARCELABLE_STABILITY_VINTF`    | | `int` | `PARCELABLE_WRITE_RETURN_VALUE` | |

|                                                                                                                          ### Fields                                                                                                                           ||
|---------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
| ` public static final Creator<`[CarPowerPolicyFilter](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter)`>` | [CREATOR](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#CREATOR) |

|                                                                                    ### Public methods                                                                                    ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`   | ` `[describeContents](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#describeContents())`() `                                         |
| ` int[]` | ` `[getComponents](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#getComponents())`() ` List of components of interest.               |
| ` void`  | ` `[writeToParcel](https://developer.android.com/reference/android/car/hardware/power/CarPowerPolicyFilter#writeToParcel(android.os.Parcel,%20int))`(Parcel dest, int flags) ` |

| ### Inherited methods |
|-----------------------|---|
| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| From interface ` android.os.Parcelable ` |------------------|------------------------------------------| | ` abstract int`  | ` describeContents() `                   | | ` default int`   | ` getStability() `                       | | ` abstract void` | ` writeToParcel(Parcel arg0, int arg1) ` | ||

## Fields

### CREATOR

```
public static final Creator<CarPowerPolicyFilter> CREATOR
```

<br />

<br />

## Public methods

### describeContents

```
public int describeContents ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getComponents

```
public int[] getComponents ()
```

List of components of interest. Components are one of
`android.frameworks.automotive.powerpolicy.PowerComponent`.

<br />

|     Returns     ||
|---------|--------|
| `int[]` | <br /> |

### writeToParcel

```
public void writeToParcel (Parcel dest, 
                int flags)
```

<br />

<br />

|        Parameters        ||
|---------|-----------------|
| `dest`  | `Parcel` <br /> |
| `flags` | `int` <br />    |