public boolean onTouch(View view, MotionEvent motionEvent) { if (!Storage.m6942b(this.f3568a.m225h())) { Storage.m6945c(this.f3568a.m225h()); } else if (motionEvent.getAction() == 0) { if (!PermissionUtil.m7044a(PermissionType.microphone)) { PermissionUtil.m7042a(this.f3568a.m227i(), PermissionType.microphone, 5); return true; } else if (!this.f3568a.f3573e.m7111a((int) motionEvent.getX(), (int) motionEvent.getY())) { return true; } else { this.f3568a.f3573e.setInnerCircleColor(this.f3568a.m229j().getColor(2131689521)); this.f3568a.f3573e.m7110a(); this.f3568a.f3573e.setBitmap(2130837779); this.f3568a.f3573e.m7112b(); if (this.f3568a.f3571c == null) { this.f3568a.f3571c = new AudioRecorder(); } this.f3568a.m6161O(); return true; } } else if (motionEvent.getAction() == 1) { if (!this.f3568a.f3573e.m7111a((int) motionEvent.getX(), (int) motionEvent.getY())) { return true; } this.f3568a.f3573e.m7113c(); this.f3568a.f3573e.m7110a(); this.f3568a.f3573e.setInnerCircleColor(this.f3568a.m229j().getColor(2131689536)); this.f3568a.f3573e.setBitmap(2130837778); if (this.f3568a.f3571c != null) { this.f3568a.f3571c.m5698a(); } RecycleMessagingAdapter.m5956b(false); if (this.f3568a.f3573e.getRecordTime() <= 0) { return true; } this.f3568a.f3570b.m5708e(this.f3568a.f3571c.m5700b().getAbsolutePath()); return true; } else if (motionEvent.getAction() == 2 && !this.f3568a.f3573e.m7111a((int) motionEvent.getX(), (int) motionEvent.getY())) { this.f3568a.f3573e.m7113c(); this.f3568a.f3573e.setInnerCircleColor(this.f3568a.m229j().getColor(2131689536)); this.f3568a.f3573e.setBitmap(2130837778); this.f3568a.f3573e.m7110a(); if (this.f3568a.f3571c != null) { this.f3568a.f3571c.m5698a(); } } return false; }
private void m6161O() { Throwable e; AudioPlayer.m3946a().m3953b(); RecycleMessagingAdapter.m5956b(true); ((Vibrator) m227i().getSystemService("vibrator")).vibrate(80); try { String a = StringUtil.m7062a(); if (a.length() > 10) { a = a.substring(0, 9); } this.f3571c.m5699a(new File(Storage.m6948e() + File.separator + a)); } catch (StorageException e2) { e = e2; Main.f1926a.m5680b(e); } catch (IOException e3) { e = e3; Main.f1926a.m5680b(e); } catch (IllegalStateException e4) { e = e4; Main.f1926a.m5680b(e); } }