public static int getHeadsetState(Intent paramIntent) { if (paramIntent == null) { logger.d("Defaulting to headset state: 0", new Object[0]); return 0; } int i = paramIntent.getIntExtra("state", 0); FormattingLogger localFormattingLogger = logger; Object[] arrayOfObject = new Object[1]; arrayOfObject[0] = Integer.valueOf(i); localFormattingLogger.d("Determined headset state: %s", arrayOfObject); return i; }
public void writeAudioVolume(int paramInt1, int paramInt2) { FormattingLogger localFormattingLogger = logger; Object[] arrayOfObject = new Object[1]; arrayOfObject[0] = Integer.valueOf(paramInt2); localFormattingLogger.d("Writing volume to HAL: %s", arrayOfObject); this.audioManager.setParameters("earbuds_volume=" + paramInt2); }
public List<T> read() { Assert.assertNotUiThread(); FileInputStream localFileInputStream = null; try { localFileInputStream = this.context.openFileInput(this.path); DataInputStream localDataInputStream = new DataInputStream(new BufferedInputStream(localFileInputStream)); localArrayList = new ArrayList(); int i = 1; while (i != 0) try { localArrayList.add(readProto(localDataInputStream)); } catch (EOFException localEOFException) { i = 0; } logger.i("Read " + localArrayList.size() + " persisted protos.", new Object[0]); if (localArrayList.isEmpty()) this.context.deleteFile(this.path); localArrayList.addAll(this.saveQueue); if (localFileInputStream != null) ; try { localFileInputStream.close(); return localArrayList; } catch (IOException localIOException4) { logger.w("Could not close file after read.", new Object[] {localIOException4}); return localArrayList; } } catch (IOException localIOException2) { ArrayList localArrayList; do { logger.d("Could not read protos from disk.", new Object[] {localIOException2}); this.context.deleteFile(this.path); localArrayList = new ArrayList(this.saveQueue); } while (localFileInputStream == null); try { localFileInputStream.close(); return localArrayList; } catch (IOException localIOException3) { logger.w("Could not close file after read.", new Object[] {localIOException3}); return localArrayList; } } finally { if (localFileInputStream == null) ; } try { localFileInputStream.close(); throw localObject; } catch (IOException localIOException1) { while (true) logger.w("Could not close file after read.", new Object[] {localIOException1}); } }
public int readAudioVolume(int paramInt) { try { int j = Integer.parseInt(this.audioManager.getParameters("earbuds_volume")); FormattingLogger localFormattingLogger2 = logger; Object[] arrayOfObject2 = new Object[1]; arrayOfObject2[0] = Integer.valueOf(j); localFormattingLogger2.d("Read volume from HAL: %s", arrayOfObject2); return j; } catch (NumberFormatException localNumberFormatException) { if (paramInt != 1) ; } for (int i = 9; ; i = 9) { FormattingLogger localFormattingLogger1 = logger; Object[] arrayOfObject1 = new Object[1]; arrayOfObject1[0] = Integer.valueOf(i); localFormattingLogger1.w( localNumberFormatException, "Could not read HAL volume, defaulting to: %s", arrayOfObject1); return i; } }