/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
android/src/com/mapswithme/util/PowerManagment.java
36 строк
868 B
Александр Зацепин
[android] Migrated code to Android X
22 окт 2019, 15:11
22 окт 2019, 15:11
f2dd324
Код
Авторство
О чём код?
package com.mapswithme.util; import androidx.annotation.IntDef; import com.mapswithme.maps.Framework; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public final class PowerManagment { // It should consider to power_managment::Scheme from // map/power_management/power_management_schemas.hpp public static final int NONE = 0; public static final int NORMAL = 1; public static final int MEDIUM = 2; public static final int HIGH = 3; public static final int AUTO = 4; @Retention(RetentionPolicy.SOURCE) @IntDef({ NONE, NORMAL, MEDIUM, HIGH, AUTO }) public @interface SchemeType { } @SchemeType public static int getScheme() { return Framework.nativeGetPowerManagerScheme(); } public static void setScheme(@SchemeType int value) { Framework.nativeSetPowerManagerScheme(value); } }