Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/app/admin/FreezePeriod#pubctors) \| [Methods](https://developer.android.com/reference/android/app/admin/FreezePeriod#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/admin/FreezePeriod#inhmethods)

# FreezePeriod

*** ** * ** ***


`
public


class
FreezePeriod
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.admin.FreezePeriod |

<br />

*** ** * ** ***

A class that represents one freeze period which repeats *annually* . A freeze period has
two `https://developer.android.com/reference/java/time/MonthDay` values that define the start and end dates of the period, both inclusive. If
the end date is earlier than the start date, the period is considered wrapped around the
year-end. As far as freeze period is concerned, leap year is disregarded and February 29th should
be treated as if it were February 28th: so a freeze starting or ending on February 28th is
identical to a freeze starting or ending on February 29th. When calulating the length of a freeze
or the distance bewteen two freee periods, February 29th is also ignored.
**See also:**

- `https://developer.android.com/reference/android/app/admin/SystemUpdatePolicy#setFreezePeriods(java.util.List<android.app.admin.FreezePeriod>)`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/admin/FreezePeriod#FreezePeriod(java.time.MonthDay,%20java.time.MonthDay)(https://developer.android.com/reference/java/time/MonthDay start, https://developer.android.com/reference/java/time/MonthDay end) ` Creates a freeze period by its start and end dates. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/time/MonthDay` | ` https://developer.android.com/reference/android/app/admin/FreezePeriod#getEnd()() ` Returns the end date (inclusive) of this freeze period. |
| ` https://developer.android.com/reference/java/time/MonthDay` | ` https://developer.android.com/reference/android/app/admin/FreezePeriod#getStart()() ` Returns the start date (inclusive) of this freeze period. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/app/admin/FreezePeriod#toString()() ` Returns a string representation of the object. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public constructors

### FreezePeriod

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public FreezePeriod (MonthDay start, 
                MonthDay end)
```

Creates a freeze period by its start and end dates. If the end date is earlier than the start
date, the freeze period is considered wrapping year-end.

<br />

| Parameters ||
|---|---|
| `start` | `MonthDay` <br /> |
| `end` | `MonthDay` <br /> |

## Public methods

### getEnd

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MonthDay getEnd ()
```

Returns the end date (inclusive) of this freeze period.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/MonthDay` | <br /> |

### getStart

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public MonthDay getStart ()
```

Returns the start date (inclusive) of this freeze period.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/time/MonthDay` | <br /> |

### toString

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |