public static int getDefaultPageSize() {
        synchronized (sLock) {
            if (sDefaultPageSize == 0) {
                try {
                    Class clazz = Class.forName("android.os.StatFs");
                    Method m = clazz.getMethod("getBlockSize");
                    Object statFsObj = clazz.getConstructor(String.class).newInstance("/data");
                    Integer value = (Integer) m.invoke(statFsObj, (Object[])null);
                    if (value != null)
                        return value.intValue();
                } catch (Exception e) { }
            }
            if (sDefaultPageSize == 0)
                sDefaultPageSize = 1024;
            return sDefaultPageSize;
        }
    }
public static int getDefaultPageSize ( ) { synchronized ( sLock ) { if ( sDefaultPageSize == 0 ) { try { Class clazz = Class . forName ( "android.os.StatFs" ) ; Method m = clazz . getMethod ( "getBlockSize" ) ; Object statFsObj = clazz . getConstructor ( String . class ) . newInstance ( "/data" ) ; Integer value = ( Integer ) m . invoke ( statFsObj , ( Object [ ] ) null ) ; if ( value != null ) return value . intValue ( ) ; } catch ( Exception e ) { } } if ( sDefaultPageSize == 0 ) sDefaultPageSize = 1024 ; return sDefaultPageSize ; } }
Gets the default page size to use when creating a database.