Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.pm.ActivityInfo;

import java.lang.reflect.Field;

public class Main {
    public static int getScreenOrieLockedValue(Class<ActivityInfo> object) {
        int value = -1;
        try {
            Field field = object.getField("SCREEN_ORIENTATION_LOCKED");
            value = field.getInt(object);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return value;
    }
}