public static class

Build.LINEAGE_VERSION_CODES

extends Object
java.lang.Object
   ↳ lineageos.os.Build.LINEAGE_VERSION_CODES

Class Overview

Enumeration of the currently known SDK version codes. These are the values that can be found in SDK_INT. Version numbers increment monotonically with each official platform release. To programmatically validate that a given API is available for use on the device, you can quickly check if the SDK_INT from the OS is provided and is greater or equal to the API level that your application is targeting.

Example for validating that Profiles API is available

 private void removeActiveProfile() {
     Make sure we're running on BoysenBerry or higher to use Profiles API
     if (Build.LINEAGE_VERSION.SDK_INT >= Build.LINEAGE_VERSION_CODES.BOYSENBERRY) {
         ProfileManager profileManager = ProfileManager.getInstance(this);
         Profile activeProfile = profileManager.getActiveProfile();
         if (activeProfile != null) {
             profileManager.removeProfile(activeProfile);
         }
     }
 }
 

Summary

Constants
int APRICOT June 2015: The first version of the platform sdk for CyanogenMod
int BOYSENBERRY September 2015: The second version of the platform sdk for CyanogenMod

Applications targeting this or a later release will get these new features:

int CANTALOUPE November - December 2015: The third iteration of the platform sdk for CyanogenMod Transition api level that is mostly 1:1 to BOYSENBERRY
int DRAGON_FRUIT January 2016: The 4th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features:

  • Inclusion of the PerformanceManager interfaces, allowing an application to specify the type of mode to have the device be placed in via PerformanceManager
  • Numerous new "System" settings exposed via the LineageSettings.System interface
int ELDERBERRY April 2016: The 5th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

  • Weather request api to fetch weather data from providers on the device LineageWeatherManager
  • Weather provider api to provide weather data to any listener on the device WeatherProviderService
  • Parceling helper class Concierge to help with parcel headers and protocol revisions
int FIG August 2016: The 6th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

Signing out, Adnan ✌
int GUAVA January 2017: Unreleased preliminary version starting from CM14
int HACKBERRY February 2018: Unreleased preliminary version starting from LineageOS 15.1

Unused APIs have been removed.

int ILAMA March 2018: The 1st iteration of the platform sdk for LineageOS

Applications targeting this or a later version will get access to these new features!

  • Styles API to customize the system and get customized basing on the system style
Public Constructors
Build.LINEAGE_VERSION_CODES()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int APRICOT

added in API level 8

June 2015: The first version of the platform sdk for CyanogenMod

Constant Value: 1 (0x00000001)

public static final int BOYSENBERRY

added in API level 8

September 2015: The second version of the platform sdk for CyanogenMod

Applications targeting this or a later release will get these new features:

Constant Value: 2 (0x00000002)

public static final int CANTALOUPE

added in API level 8

November - December 2015: The third iteration of the platform sdk for CyanogenMod Transition api level that is mostly 1:1 to BOYSENBERRY

Constant Value: 3 (0x00000003)

public static final int DRAGON_FRUIT

added in API level 8

January 2016: The 4th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features:

  • Inclusion of the PerformanceManager interfaces, allowing an application to specify the type of mode to have the device be placed in via PerformanceManager
  • Numerous new "System" settings exposed via the LineageSettings.System interface

Constant Value: 4 (0x00000004)

public static final int ELDERBERRY

added in API level 8

April 2016: The 5th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

  • Weather request api to fetch weather data from providers on the device LineageWeatherManager
  • Weather provider api to provide weather data to any listener on the device WeatherProviderService
  • Parceling helper class Concierge to help with parcel headers and protocol revisions

Constant Value: 5 (0x00000005)

public static final int FIG

added in API level 8

August 2016: The 6th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

Signing out, Adnan ✌

Constant Value: 6 (0x00000006)

public static final int GUAVA

added in API level 8

January 2017: Unreleased preliminary version starting from CM14

Constant Value: 7 (0x00000007)

public static final int HACKBERRY

added in API level 8

February 2018: Unreleased preliminary version starting from LineageOS 15.1

Unused APIs have been removed.

Constant Value: 8 (0x00000008)

public static final int ILAMA

March 2018: The 1st iteration of the platform sdk for LineageOS

Applications targeting this or a later version will get access to these new features!

  • Styles API to customize the system and get customized basing on the system style

Constant Value: 9 (0x00000009)

Public Constructors

public Build.LINEAGE_VERSION_CODES ()

added in API level 8