summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2014-11-06 16:01:35 -0800
committerRoman Birg <roman@cyngn.com>2014-11-10 15:30:53 -0800
commit820b76ca7981b34f7fc0f4516683d9f587719985 (patch)
treecff55756d6734e2c319434cd43a6aa32aa9d12dd
parent17621385e64356783b9abe0e10a4d2b244e2fee9 (diff)
downloadandroid_packages_apps_SoundRecorder-820b76ca7981b34f7fc0f4516683d9f587719985.tar.gz
android_packages_apps_SoundRecorder-820b76ca7981b34f7fc0f4516683d9f587719985.tar.bz2
android_packages_apps_SoundRecorder-820b76ca7981b34f7fc0f4516683d9f587719985.zip
SoundRecorder: add option menu to view recordings
Opens up the current recordings folder in CMFileManager. Change-Id: I1a3d0f2ffdec9d34fc00b4658ccb0b00b278faf9 Signed-off-by: Roman Birg <roman@cyngn.com>
-rw-r--r--res/menu/main_menu.xml3
-rw-r--r--res/values/cm_strings.xml1
-rw-r--r--src/com/android/soundrecorder/SoundRecorder.java11
3 files changed, 15 insertions, 0 deletions
diff --git a/res/menu/main_menu.xml b/res/menu/main_menu.xml
index 1b94361..4dd2e18 100644
--- a/res/menu/main_menu.xml
+++ b/res/menu/main_menu.xml
@@ -35,6 +35,9 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
android:id="@+id/menu_item_storage"
android:title="@string/storage_setting"/>
<item
+ android:id="@+id/menu_item_view_recordings"
+ android:title="@string/view_recordings"/>
+ <item
android:id="@+id/menu_item_keyboard"
android:title="@string/keyboard"/>
</menu>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index d912676..0312d1f 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -46,4 +46,5 @@
<!-- shown as the message in a dialog when the app encountered an internal error while trying to start recording -->
<string name="error_app_internal_recorder">Internal application error.\n\nMicrophone may already be active.</string>
+ <string name="view_recordings">View recordings</string>
</resources>
diff --git a/src/com/android/soundrecorder/SoundRecorder.java b/src/com/android/soundrecorder/SoundRecorder.java
index a969982..7f0168b 100644
--- a/src/com/android/soundrecorder/SoundRecorder.java
+++ b/src/com/android/soundrecorder/SoundRecorder.java
@@ -861,6 +861,17 @@ public class SoundRecorder extends Activity
openOptionDialog(SETTING_TYPE_STORAGE_LOCATION);
}
break;
+ case R.id.menu_item_view_recordings:
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setClassName("com.cyanogenmod.filemanager",
+ "com.cyanogenmod.filemanager.activities.ShortcutActivity");
+ intent.putExtra("extra_shortcut_type", "navigate");
+ intent.putExtra("extra_shortcut_fso", mStoragePath);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
+ startActivity(intent);
+ break;
}
return super.onOptionsItemSelected(item);
}