SystemUpdatePolicy.SetFreezePeriods(IList<FreezePeriod>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在目前政策之上設定一個凍結期間清單。
[Android.Runtime.Register("setFreezePeriods", "(Ljava/util/List;)Landroid/app/admin/SystemUpdatePolicy;", "GetSetFreezePeriods_Ljava_util_List_Handler", ApiSince=28)]
public virtual Android.App.Admin.SystemUpdatePolicy? SetFreezePeriods(System.Collections.Generic.IList<Android.App.Admin.FreezePeriod>? freezePeriods);
[<Android.Runtime.Register("setFreezePeriods", "(Ljava/util/List;)Landroid/app/admin/SystemUpdatePolicy;", "GetSetFreezePeriods_Ljava_util_List_Handler", ApiSince=28)>]
abstract member SetFreezePeriods : System.Collections.Generic.IList<Android.App.Admin.FreezePeriod> -> Android.App.Admin.SystemUpdatePolicy
override this.SetFreezePeriods : System.Collections.Generic.IList<Android.App.Admin.FreezePeriod> -> Android.App.Admin.SystemUpdatePolicy
參數
- freezePeriods
- IList<FreezePeriod>
凍結期列表
傳回
這個例子
- 屬性
備註
在目前政策之上設定一個凍結期間清單。 當裝置的時鐘處於任何凍結期間時,所有系統更新(包括安全修補程式)都會被封鎖,無法安裝。 當裝置超出凍結期間時,通常的政策行為會適用。
每個凍結期最多允許90天,相鄰的凍結期間至少相隔60天。 此外,凍結期間清單不應有重複或重疊。 若未達成上述任何條件,將擲出 A ValidationFailedException 。
閏年的處理:我們在凍結期計算中忽略閏年,特別是 <ul<>li>。當凍結期被定義時,2月29日會被忽略,因此即使凍結期可以指定為2月29日開始或結束,仍會視為該期間以2月28日開始或結束。</li><li>當對裝置套用凍結期行為時,系統時鐘 2 月 29 日會被視為 2 月 28< 日/li<>>在計算凍結期或兩個凍結期間隔的天數時,2 月 29 日也會被忽略,不算作一天。</li></ul>
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。