Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteTransactionListener;

import android.os.Build;

public class Main {
    public static void beginTransactionNonExclusive(SQLiteDatabase db) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            db.beginTransactionNonExclusive();
        } else {
            db.beginTransaction();
        }
    }

    public static void beginTransactionNonExclusive(SQLiteDatabase db,
            SQLiteTransactionListener transactionListener) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            db.beginTransactionWithListenerNonExclusive(transactionListener);
        } else {
            db.beginTransactionWithListener(transactionListener);
        }
    }
}