1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.service.notification;
18 
19 import android.annotation.FlaggedApi;
20 import android.annotation.IntDef;
21 import android.annotation.NonNull;
22 import android.annotation.Nullable;
23 import android.annotation.TestApi;
24 import android.app.Flags;
25 import android.os.Parcel;
26 import android.os.Parcelable;
27 
28 import java.lang.annotation.Retention;
29 import java.lang.annotation.RetentionPolicy;
30 import java.util.ArrayList;
31 import java.util.Collections;
32 import java.util.HashSet;
33 import java.util.Objects;
34 import java.util.Set;
35 
36 /**
37  * Represents the set of device effects (affecting display and device behavior in general) that
38  * are applied whenever an {@link android.app.AutomaticZenRule} is active.
39  */
40 @FlaggedApi(Flags.FLAG_MODES_API)
41 public final class ZenDeviceEffects implements Parcelable {
42 
43     /**
44      * Enum for the user-modifiable fields in this object.
45      * @hide
46      */
47     @IntDef(flag = true, prefix = { "FIELD_" }, value = {
48             FIELD_GRAYSCALE,
49             FIELD_SUPPRESS_AMBIENT_DISPLAY,
50             FIELD_DIM_WALLPAPER,
51             FIELD_NIGHT_MODE,
52             FIELD_DISABLE_AUTO_BRIGHTNESS,
53             FIELD_DISABLE_TAP_TO_WAKE,
54             FIELD_DISABLE_TILT_TO_WAKE,
55             FIELD_DISABLE_TOUCH,
56             FIELD_MINIMIZE_RADIO_USAGE,
57             FIELD_MAXIMIZE_DOZE,
58             FIELD_EXTRA_EFFECTS
59     })
60     @Retention(RetentionPolicy.SOURCE)
61     public @interface ModifiableField {}
62 
63     /**
64      * @hide
65      */
66     public static final int FIELD_GRAYSCALE = 1 << 0;
67     /**
68      * @hide
69      */
70     public static final int FIELD_SUPPRESS_AMBIENT_DISPLAY = 1 << 1;
71     /**
72      * @hide
73      */
74     public static final int FIELD_DIM_WALLPAPER = 1 << 2;
75     /**
76      * @hide
77      */
78     public static final int FIELD_NIGHT_MODE = 1 << 3;
79     /**
80      * @hide
81      */
82     public static final int FIELD_DISABLE_AUTO_BRIGHTNESS = 1 << 4;
83     /**
84      * @hide
85      */
86     public static final int FIELD_DISABLE_TAP_TO_WAKE = 1 << 5;
87     /**
88      * @hide
89      */
90     public static final int FIELD_DISABLE_TILT_TO_WAKE = 1 << 6;
91     /**
92      * @hide
93      */
94     public static final int FIELD_DISABLE_TOUCH = 1 << 7;
95     /**
96      * @hide
97      */
98     public static final int FIELD_MINIMIZE_RADIO_USAGE = 1 << 8;
99     /**
100      * @hide
101      */
102     public static final int FIELD_MAXIMIZE_DOZE = 1 << 9;
103     /**
104      * @hide
105      */
106     public static final int FIELD_EXTRA_EFFECTS = 1 << 10;
107 
108     private static final int MAX_EFFECTS_LENGTH = 2_000; // characters
109 
110     private final boolean mGrayscale;
111     private final boolean mSuppressAmbientDisplay;
112     private final boolean mDimWallpaper;
113     private final boolean mNightMode;
114 
115     private final boolean mDisableAutoBrightness;
116     private final boolean mDisableTapToWake;
117     private final boolean mDisableTiltToWake;
118     private final boolean mDisableTouch;
119     private final boolean mMinimizeRadioUsage;
120     private final boolean mMaximizeDoze;
121     private final Set<String> mExtraEffects;
122 
ZenDeviceEffects(boolean grayscale, boolean suppressAmbientDisplay, boolean dimWallpaper, boolean nightMode, boolean disableAutoBrightness, boolean disableTapToWake, boolean disableTiltToWake, boolean disableTouch, boolean minimizeRadioUsage, boolean maximizeDoze, Set<String> extraEffects)123     private ZenDeviceEffects(boolean grayscale, boolean suppressAmbientDisplay,
124             boolean dimWallpaper, boolean nightMode, boolean disableAutoBrightness,
125             boolean disableTapToWake, boolean disableTiltToWake, boolean disableTouch,
126             boolean minimizeRadioUsage, boolean maximizeDoze, Set<String> extraEffects) {
127         mGrayscale = grayscale;
128         mSuppressAmbientDisplay = suppressAmbientDisplay;
129         mDimWallpaper = dimWallpaper;
130         mNightMode = nightMode;
131         mDisableAutoBrightness = disableAutoBrightness;
132         mDisableTapToWake = disableTapToWake;
133         mDisableTiltToWake = disableTiltToWake;
134         mDisableTouch = disableTouch;
135         mMinimizeRadioUsage = minimizeRadioUsage;
136         mMaximizeDoze = maximizeDoze;
137         mExtraEffects = Collections.unmodifiableSet(extraEffects);
138     }
139 
140     /** @hide */
141     @FlaggedApi(Flags.FLAG_MODES_API)
validate()142     public void validate() {
143         int extraEffectsLength = 0;
144         for (String extraEffect : mExtraEffects) {
145             extraEffectsLength += extraEffect.length();
146         }
147         if (extraEffectsLength > MAX_EFFECTS_LENGTH) {
148             throw new IllegalArgumentException(
149                     "Total size of extra effects must be at most " + MAX_EFFECTS_LENGTH
150                             + " characters");
151         }
152     }
153 
154     @Override
equals(Object obj)155     public boolean equals(Object obj) {
156         if (!(obj instanceof final ZenDeviceEffects that)) return false;
157         if (obj == this) return true;
158 
159         return this.mGrayscale == that.mGrayscale
160                 && this.mSuppressAmbientDisplay == that.mSuppressAmbientDisplay
161                 && this.mDimWallpaper == that.mDimWallpaper
162                 && this.mNightMode == that.mNightMode
163                 && this.mDisableAutoBrightness == that.mDisableAutoBrightness
164                 && this.mDisableTapToWake == that.mDisableTapToWake
165                 && this.mDisableTiltToWake == that.mDisableTiltToWake
166                 && this.mDisableTouch == that.mDisableTouch
167                 && this.mMinimizeRadioUsage == that.mMinimizeRadioUsage
168                 && this.mMaximizeDoze == that.mMaximizeDoze
169                 && Objects.equals(this.mExtraEffects, that.mExtraEffects);
170     }
171 
172     @Override
hashCode()173     public int hashCode() {
174         return Objects.hash(mGrayscale, mSuppressAmbientDisplay, mDimWallpaper, mNightMode,
175                 mDisableAutoBrightness, mDisableTapToWake, mDisableTiltToWake, mDisableTouch,
176                 mMinimizeRadioUsage, mMaximizeDoze, mExtraEffects);
177     }
178 
179     @Override
toString()180     public String toString() {
181         ArrayList<String> effects = new ArrayList<>(11);
182         if (mGrayscale) effects.add("grayscale");
183         if (mSuppressAmbientDisplay) effects.add("suppressAmbientDisplay");
184         if (mDimWallpaper) effects.add("dimWallpaper");
185         if (mNightMode) effects.add("nightMode");
186         if (mDisableAutoBrightness) effects.add("disableAutoBrightness");
187         if (mDisableTapToWake) effects.add("disableTapToWake");
188         if (mDisableTiltToWake) effects.add("disableTiltToWake");
189         if (mDisableTouch) effects.add("disableTouch");
190         if (mMinimizeRadioUsage) effects.add("minimizeRadioUsage");
191         if (mMaximizeDoze) effects.add("maximizeDoze");
192         if (mExtraEffects.size() > 0) {
193             effects.add("extraEffects=[" + String.join(",", mExtraEffects) + "]");
194         }
195         return "[" + String.join(", ", effects) + "]";
196     }
197 
198     /** @hide */
fieldsToString(@odifiableField int bitmask)199     public static String fieldsToString(@ModifiableField int bitmask) {
200         ArrayList<String> modified = new ArrayList<>();
201         if ((bitmask & FIELD_GRAYSCALE) != 0) {
202             modified.add("FIELD_GRAYSCALE");
203         }
204         if ((bitmask & FIELD_SUPPRESS_AMBIENT_DISPLAY) != 0) {
205             modified.add("FIELD_SUPPRESS_AMBIENT_DISPLAY");
206         }
207         if ((bitmask & FIELD_DIM_WALLPAPER) != 0) {
208             modified.add("FIELD_DIM_WALLPAPER");
209         }
210         if ((bitmask & FIELD_NIGHT_MODE) != 0) {
211             modified.add("FIELD_NIGHT_MODE");
212         }
213         if ((bitmask & FIELD_DISABLE_AUTO_BRIGHTNESS) != 0) {
214             modified.add("FIELD_DISABLE_AUTO_BRIGHTNESS");
215         }
216         if ((bitmask & FIELD_DISABLE_TAP_TO_WAKE) != 0) {
217             modified.add("FIELD_DISABLE_TAP_TO_WAKE");
218         }
219         if ((bitmask & FIELD_DISABLE_TILT_TO_WAKE) != 0) {
220             modified.add("FIELD_DISABLE_TILT_TO_WAKE");
221         }
222         if ((bitmask & FIELD_DISABLE_TOUCH) != 0) {
223             modified.add("FIELD_DISABLE_TOUCH");
224         }
225         if ((bitmask & FIELD_MINIMIZE_RADIO_USAGE) != 0) {
226             modified.add("FIELD_MINIMIZE_RADIO_USAGE");
227         }
228         if ((bitmask & FIELD_MAXIMIZE_DOZE) != 0) {
229             modified.add("FIELD_MAXIMIZE_DOZE");
230         }
231         if ((bitmask & FIELD_EXTRA_EFFECTS) != 0) {
232             modified.add("FIELD_EXTRA_EFFECTS");
233         }
234         return "{" + String.join(",", modified) + "}";
235     }
236 
237     /**
238      * Whether the level of color saturation of the display should be set to minimum, effectively
239      * switching it to grayscale, while the rule is active.
240      */
shouldDisplayGrayscale()241     public boolean shouldDisplayGrayscale() {
242         return mGrayscale;
243     }
244 
245     /**
246      * Whether the ambient (always-on) display feature should be disabled while the rule is active.
247      * This will have no effect if the device doesn't support always-on display or if it's not
248      * generally enabled.
249      */
shouldSuppressAmbientDisplay()250     public boolean shouldSuppressAmbientDisplay() {
251         return mSuppressAmbientDisplay;
252     }
253 
254     /** Whether the wallpaper should be dimmed while the rule is active. */
shouldDimWallpaper()255     public boolean shouldDimWallpaper() {
256         return mDimWallpaper;
257     }
258 
259     /** Whether night mode (aka dark theme) should be applied while the rule is active. */
shouldUseNightMode()260     public boolean shouldUseNightMode() {
261         return mNightMode;
262     }
263 
264     /**
265      * Whether the display's automatic brightness adjustment should be disabled while the rule is
266      * active.
267      * @hide
268      */
shouldDisableAutoBrightness()269     public boolean shouldDisableAutoBrightness() {
270         return mDisableAutoBrightness;
271     }
272 
273     /**
274      * Whether "tap to wake" should be disabled while the rule is active.
275      * @hide
276      */
shouldDisableTapToWake()277     public boolean shouldDisableTapToWake() {
278         return mDisableTapToWake;
279     }
280 
281     /**
282      * Whether "tilt to wake" should be disabled while the rule is active.
283      * @hide
284      */
shouldDisableTiltToWake()285     public boolean shouldDisableTiltToWake() {
286         return mDisableTiltToWake;
287     }
288 
289     /**
290      * Whether touch interactions should be disabled while the rule is active.
291      * @hide
292      */
shouldDisableTouch()293     public boolean shouldDisableTouch() {
294         return mDisableTouch;
295     }
296 
297     /**
298      * Whether radio (wi-fi, LTE, etc) traffic, and its attendant battery consumption, should be
299      * minimized while the rule is active.
300      * @hide
301      */
shouldMinimizeRadioUsage()302     public boolean shouldMinimizeRadioUsage() {
303         return mMinimizeRadioUsage;
304     }
305 
306     /**
307      * Whether Doze should be enhanced (e.g. with more aggressive activation, or less frequent
308      * maintenance windows) while the rule is active.
309      * @hide
310      */
shouldMaximizeDoze()311     public boolean shouldMaximizeDoze() {
312         return mMaximizeDoze;
313     }
314 
315     /**
316      * (Immutable) set of extra effects to be applied while the rule is active. Extra effects are
317      * not used in AOSP, but OEMs may add support for them by providing a custom
318      * {@link DeviceEffectsApplier}.
319      * @hide
320      */
321     @TestApi
322     @NonNull
getExtraEffects()323     public Set<String> getExtraEffects() {
324         return mExtraEffects;
325     }
326 
327     /**
328      * Whether any of the effects are set up.
329      * @hide
330      */
hasEffects()331     public boolean hasEffects() {
332         return mGrayscale || mSuppressAmbientDisplay || mDimWallpaper || mNightMode
333                 || mDisableAutoBrightness || mDisableTapToWake || mDisableTiltToWake
334                 || mDisableTouch || mMinimizeRadioUsage || mMaximizeDoze
335                 || mExtraEffects.size() > 0;
336     }
337 
338     /** {@link Parcelable.Creator} that instantiates {@link ZenDeviceEffects} objects. */
339     @NonNull
340     public static final Creator<ZenDeviceEffects> CREATOR = new Creator<ZenDeviceEffects>() {
341         @Override
342         public ZenDeviceEffects createFromParcel(Parcel in) {
343             return new ZenDeviceEffects(in.readBoolean(),
344                     in.readBoolean(), in.readBoolean(), in.readBoolean(), in.readBoolean(),
345                     in.readBoolean(), in.readBoolean(), in.readBoolean(), in.readBoolean(),
346                     in.readBoolean(),
347                     Set.of(in.readArray(String.class.getClassLoader(), String.class)));
348         }
349 
350         @Override
351         public ZenDeviceEffects[] newArray(int size) {
352             return new ZenDeviceEffects[size];
353         }
354     };
355 
356     @Override
describeContents()357     public int describeContents() {
358         return 0;
359     }
360 
361     @Override
writeToParcel(@onNull Parcel dest, int flags)362     public void writeToParcel(@NonNull Parcel dest, int flags) {
363         dest.writeBoolean(mGrayscale);
364         dest.writeBoolean(mSuppressAmbientDisplay);
365         dest.writeBoolean(mDimWallpaper);
366         dest.writeBoolean(mNightMode);
367         dest.writeBoolean(mDisableAutoBrightness);
368         dest.writeBoolean(mDisableTapToWake);
369         dest.writeBoolean(mDisableTiltToWake);
370         dest.writeBoolean(mDisableTouch);
371         dest.writeBoolean(mMinimizeRadioUsage);
372         dest.writeBoolean(mMaximizeDoze);
373         dest.writeArray(mExtraEffects.toArray(new String[0]));
374     }
375 
376     /** Builder class for {@link ZenDeviceEffects} objects. */
377     @FlaggedApi(Flags.FLAG_MODES_API)
378     public static final class Builder {
379 
380         private boolean mGrayscale;
381         private boolean mSuppressAmbientDisplay;
382         private boolean mDimWallpaper;
383         private boolean mNightMode;
384         private boolean mDisableAutoBrightness;
385         private boolean mDisableTapToWake;
386         private boolean mDisableTiltToWake;
387         private boolean mDisableTouch;
388         private boolean mMinimizeRadioUsage;
389         private boolean mMaximizeDoze;
390         private final HashSet<String> mExtraEffects = new HashSet<>();
391 
392         /**
393          * Instantiates a new {@link ZenPolicy.Builder} with all effects set to default (disabled).
394          */
Builder()395         public Builder() {
396         }
397 
398         /**
399          * Instantiates a new {@link ZenPolicy.Builder} with all effects set to their corresponding
400          * values in the supplied {@link ZenDeviceEffects}.
401          */
Builder(@onNull ZenDeviceEffects zenDeviceEffects)402         public Builder(@NonNull ZenDeviceEffects zenDeviceEffects) {
403             mGrayscale = zenDeviceEffects.shouldDisplayGrayscale();
404             mSuppressAmbientDisplay = zenDeviceEffects.shouldSuppressAmbientDisplay();
405             mDimWallpaper = zenDeviceEffects.shouldDimWallpaper();
406             mNightMode = zenDeviceEffects.shouldUseNightMode();
407             mDisableAutoBrightness = zenDeviceEffects.shouldDisableAutoBrightness();
408             mDisableTapToWake = zenDeviceEffects.shouldDisableTapToWake();
409             mDisableTiltToWake = zenDeviceEffects.shouldDisableTiltToWake();
410             mDisableTouch = zenDeviceEffects.shouldDisableTouch();
411             mMinimizeRadioUsage = zenDeviceEffects.shouldMinimizeRadioUsage();
412             mMaximizeDoze = zenDeviceEffects.shouldMaximizeDoze();
413             mExtraEffects.addAll(zenDeviceEffects.getExtraEffects());
414         }
415 
416         /**
417          * Sets whether the level of color saturation of the display should be set to minimum,
418          * effectively switching it to grayscale, while the rule is active.
419          */
420         @NonNull
setShouldDisplayGrayscale(boolean grayscale)421         public Builder setShouldDisplayGrayscale(boolean grayscale) {
422             mGrayscale = grayscale;
423             return this;
424         }
425 
426         /**
427          * Sets whether the ambient (always-on) display feature should be disabled while the rule
428          * is active. This will have no effect if the device doesn't support always-on display or if
429          * it's not generally enabled.
430          */
431         @NonNull
setShouldSuppressAmbientDisplay(boolean suppressAmbientDisplay)432         public Builder setShouldSuppressAmbientDisplay(boolean suppressAmbientDisplay) {
433             mSuppressAmbientDisplay = suppressAmbientDisplay;
434             return this;
435         }
436 
437         /** Sets whether the wallpaper should be dimmed while the rule is active. */
438         @NonNull
setShouldDimWallpaper(boolean dimWallpaper)439         public Builder setShouldDimWallpaper(boolean dimWallpaper) {
440             mDimWallpaper = dimWallpaper;
441             return this;
442         }
443 
444         /** Sets whether night mode (aka dark theme) should be applied while the rule is active. */
445         @NonNull
setShouldUseNightMode(boolean nightMode)446         public Builder setShouldUseNightMode(boolean nightMode) {
447             mNightMode = nightMode;
448             return this;
449         }
450 
451         /**
452          * Sets whether the display's automatic brightness adjustment should be disabled while the
453          * rule is active.
454          * @hide
455          */
456         @NonNull
setShouldDisableAutoBrightness(boolean disableAutoBrightness)457         public Builder setShouldDisableAutoBrightness(boolean disableAutoBrightness) {
458             mDisableAutoBrightness = disableAutoBrightness;
459             return this;
460         }
461 
462         /**
463          * Sets whether "tap to wake" should be disabled while the rule is active.
464          * @hide
465          */
466         @NonNull
setShouldDisableTapToWake(boolean disableTapToWake)467         public Builder setShouldDisableTapToWake(boolean disableTapToWake) {
468             mDisableTapToWake = disableTapToWake;
469             return this;
470         }
471 
472         /**
473          * Sets whether "tilt to wake" should be disabled while the rule is active.
474          * @hide
475          */
476         @NonNull
setShouldDisableTiltToWake(boolean disableTiltToWake)477         public Builder setShouldDisableTiltToWake(boolean disableTiltToWake) {
478             mDisableTiltToWake = disableTiltToWake;
479             return this;
480         }
481 
482         /**
483          * Sets whether touch interactions should be disabled while the rule is active.
484          * @hide
485          */
486         @NonNull
setShouldDisableTouch(boolean disableTouch)487         public Builder setShouldDisableTouch(boolean disableTouch) {
488             mDisableTouch = disableTouch;
489             return this;
490         }
491 
492         /**
493          * Sets whether radio (wi-fi, LTE, etc) traffic, and its attendant battery consumption,
494          * should be minimized while the rule is active.
495          * @hide
496          */
497         @NonNull
setShouldMinimizeRadioUsage(boolean minimizeRadioUsage)498         public Builder setShouldMinimizeRadioUsage(boolean minimizeRadioUsage) {
499             mMinimizeRadioUsage = minimizeRadioUsage;
500             return this;
501         }
502 
503         /**
504          * Sets whether Doze should be enhanced (e.g. with more aggressive activation, or less
505          * frequent maintenance windows) while the rule is active.
506          * @hide
507          */
508         @NonNull
setShouldMaximizeDoze(boolean maximizeDoze)509         public Builder setShouldMaximizeDoze(boolean maximizeDoze) {
510             mMaximizeDoze = maximizeDoze;
511             return this;
512         }
513 
514         /**
515          * Sets the extra effects to be applied while the rule is active. Extra effects are not
516          * used in AOSP, but OEMs may add support for them by providing a custom
517          * {@link DeviceEffectsApplier}.
518          *
519          * @apiNote The total size of the extra effects (concatenation of strings) is limited.
520          *
521          * @hide
522          */
523         @TestApi
524         @NonNull
setExtraEffects(@onNull Set<String> extraEffects)525         public Builder setExtraEffects(@NonNull Set<String> extraEffects) {
526             Objects.requireNonNull(extraEffects);
527             mExtraEffects.clear();
528             mExtraEffects.addAll(extraEffects);
529             return this;
530         }
531 
532         /**
533          * Adds the supplied extra effects to the set to be applied while the rule is active.
534          * Extra effects are not used in AOSP, but OEMs may add support for them by providing a
535          * custom {@link DeviceEffectsApplier}.
536          *
537          * @apiNote The total size of the extra effects (concatenation of strings) is limited.
538          *
539          * @hide
540          */
541         @NonNull
addExtraEffects(@onNull Set<String> extraEffects)542         public Builder addExtraEffects(@NonNull Set<String> extraEffects) {
543             mExtraEffects.addAll(Objects.requireNonNull(extraEffects));
544             return this;
545         }
546 
547         /**
548          * Adds the supplied extra effect to the set to be applied while the rule is active.
549          * Extra effects are not used in AOSP, but OEMs may add support for them by providing a
550          * custom {@link DeviceEffectsApplier}.
551          *
552          * @apiNote The total size of the extra effects (concatenation of strings) is limited.
553          *
554          * @hide
555          */
556         @NonNull
addExtraEffect(@onNull String extraEffect)557         public Builder addExtraEffect(@NonNull String extraEffect) {
558             mExtraEffects.add(Objects.requireNonNull(extraEffect));
559             return this;
560         }
561 
562         /**
563          * Applies the effects that are {@code true} on the supplied {@link ZenDeviceEffects} to
564          * this builder (essentially logically-ORing the effect set).
565          * @hide
566          */
567         @NonNull
add(@ullable ZenDeviceEffects effects)568         public Builder add(@Nullable ZenDeviceEffects effects) {
569             if (effects == null) return this;
570             if (effects.shouldDisplayGrayscale()) setShouldDisplayGrayscale(true);
571             if (effects.shouldSuppressAmbientDisplay()) setShouldSuppressAmbientDisplay(true);
572             if (effects.shouldDimWallpaper()) setShouldDimWallpaper(true);
573             if (effects.shouldUseNightMode()) setShouldUseNightMode(true);
574             if (effects.shouldDisableAutoBrightness()) setShouldDisableAutoBrightness(true);
575             if (effects.shouldDisableTapToWake()) setShouldDisableTapToWake(true);
576             if (effects.shouldDisableTiltToWake()) setShouldDisableTiltToWake(true);
577             if (effects.shouldDisableTouch()) setShouldDisableTouch(true);
578             if (effects.shouldMinimizeRadioUsage()) setShouldMinimizeRadioUsage(true);
579             if (effects.shouldMaximizeDoze()) setShouldMaximizeDoze(true);
580             addExtraEffects(effects.getExtraEffects());
581             return this;
582         }
583 
584         /** Builds a {@link ZenDeviceEffects} object based on the builder's state. */
585         @NonNull
build()586         public ZenDeviceEffects build() {
587             return new ZenDeviceEffects(mGrayscale,
588                     mSuppressAmbientDisplay, mDimWallpaper, mNightMode, mDisableAutoBrightness,
589                     mDisableTapToWake, mDisableTiltToWake, mDisableTouch, mMinimizeRadioUsage,
590                     mMaximizeDoze, mExtraEffects);
591         }
592     }
593 }
594