+ File infoFile = new File(mComponentRootPath + SKODA_COMPONENT_INFO_NAME);
+ if (!infoFile.exists()) {
+ Log.e(TAG, "Aditional information file " + infoFile.getAbsolutePath() + " does not exist.");
+ Toast toast = Toast.makeText(getApplicationContext(), "Database not complete", Toast.LENGTH_LONG);
+ toast.show();
+ finish();
+ }
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(infoFile));
+ String compartmentLine = br.readLine();
+ if (compartmentLine != null) {
+ mCompartmentValue.setText(compartmentLine);
+ }
+ else {
+ mCompartmentValue.setText("-");
+ }
+ } catch (FileNotFoundException e) {
+ Log.e(TAG, "Aditional information file " + infoFile.getAbsolutePath() + " does not exist.");
+ Toast toast = Toast.makeText(getApplicationContext(), "Database not complete", Toast.LENGTH_LONG);
+ toast.show();
+ e.printStackTrace();
+ finish();
+ } catch (IOException e) {
+ Log.e(TAG, "Error while reading the aditional information file " + infoFile.getAbsolutePath());
+ Toast toast = Toast.makeText(getApplicationContext(), "Database reading failed", Toast.LENGTH_LONG);
+ toast.show();
+ e.printStackTrace();
+ finish();
+ }
+