Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PowerManagment.java « util « mapswithme « com « src « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f4b78ae67f895137af97f2f40548bf792d0c8a7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.mapswithme.util;

import android.support.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);
  }
}