Code example for FileReader

Methods: close, read

0
                try { 
                    File f = new File("/sys/devices/soc0/build_id");
                    if (f.exists()) {
                        socinfo_fd = new FileReader("/sys/devices/soc0/build_id");
                    } else { 
                        socinfo_fd = new FileReader("/sys/devices/system/soc/soc0/build_id");
                    } 
                    socinfo_fd.read(socinfo,0,20);
                    socinfo_fd.close();
                } catch(Exception e) {
                    Log.e(TAG,"Exception in FileReader");
                } 
                Log.d(TAG, "socinfo=" +socinfo);
                build_id = new String(socinfo,17,1);
                Log.d(TAG, "build_id=" +build_id);
            } 
            if ((!isFmTransmitterSupported) || (build_id.equals("0"))) {
            PackageManager pManager = context.getPackageManager();
               if (pManager != null) {
                   Log.d(TAG, "disableing the FM Transmitter");
                   ComponentName fmTransmitter = new ComponentName("com.codeaurora.fmradio", "com.codeaurora.fmradio.FMTransmitterActivity");