Skip to content

Commit

Permalink
Remove OmRecorder (Voice/Audio recording feature), library outdated a…
Browse files Browse the repository at this point in the history
…nd download broken. (PR #2468)
  • Loading branch information
gsantner authored Nov 4, 2024
1 parent 38a0394 commit f1451a4
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 247 deletions.
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ dependencies {
// UI libs
implementation 'com.github.Pixplicity:gene-rate:v1.1.8'
implementation 'com.github.AppIntro:AppIntro:6.2.0'
implementation 'com.github.kailash09dabhi:OmRecorder:1.1.5'
implementation 'com.github.mertakdut:EpubParser:1.0.95'
implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0'

Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

<uses-permission
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import net.gsantner.markor.model.AppSettings;
import net.gsantner.markor.util.MarkorContextUtils;
import net.gsantner.opoc.format.GsTextUtils;
import net.gsantner.opoc.frontend.GsAudioRecordOmDialog;
import net.gsantner.opoc.frontend.filebrowser.GsFileBrowserOptions;
import net.gsantner.opoc.util.GsFileUtils;
import net.gsantner.opoc.wrapper.GsCallback;
Expand Down Expand Up @@ -99,7 +98,6 @@ public static void showInsertImageOrLinkDialog(
final Button buttonPictureGallery = view.findViewById(R.id.ui__select_path_dialog__gallery_picture);
final Button buttonPictureCamera = view.findViewById(R.id.ui__select_path_dialog__camera_picture);
final Button buttonPictureEdit = view.findViewById(R.id.ui__select_path_dialog__edit_picture);
final Button buttonAudioRecord = view.findViewById(R.id.ui__select_path_dialog__record_audio);

// Extract filepath if using Markdown
if (textFormatId == FormatRegistry.FORMAT_MARKDOWN) {
Expand Down Expand Up @@ -135,11 +133,6 @@ public static void showInsertImageOrLinkDialog(
dialog.setTitle(R.string.insert_image);
browseType = InsertType.IMAGE_BROWSE;
okType = InsertType.IMAGE_DIALOG;
} else if (action == AUDIO_ACTION) {
dialog.setTitle(R.string.audio);
buttonAudioRecord.setVisibility(View.VISIBLE);
browseType = InsertType.AUDIO_BROWSE;
okType = InsertType.AUDIO_DIALOG;
} else {
dialog.setTitle(R.string.insert_link);
buttonSelectSpecial.setVisibility(View.VISIBLE);
Expand All @@ -155,7 +148,6 @@ public static void showInsertImageOrLinkDialog(
buttonSearch.setOnClickListener(v -> _insertItem.callback(InsertType.LINK_SEARCH));
buttonPictureCamera.setOnClickListener(b -> _insertItem.callback(InsertType.IMAGE_CAMERA));
buttonPictureGallery.setOnClickListener(v -> _insertItem.callback(InsertType.IMAGE_GALLERY));
buttonAudioRecord.setOnClickListener(v -> _insertItem.callback(InsertType.AUDIO_RECORDING));
buttonPictureEdit.setOnClickListener(v -> _insertItem.callback(InsertType.IMAGE_EDIT));

dialog.show();
Expand Down Expand Up @@ -368,7 +360,7 @@ private static void insertItem(
if (GsTextUtils.isNullOrEmpty(nameEdit.getText())) {
nameEdit.setText(pathEdit.getText());
}
} else {
} else {
if (pathEdit != null) {
pathEdit.setText(GsFileUtils.relativePath(currentFile, file));
}
Expand Down Expand Up @@ -408,7 +400,7 @@ private static void insertItem(
}
case AUDIO_RECORDING: {
if (!cu.requestAudioRecording(activity, insertFileLink)) {
GsAudioRecordOmDialog.showAudioRecordDialog(activity, R.string.record_audio, insertFileLink);
// noop, OM library is outdated and so voice recording feature removed
}
break;
}
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions app/src/main/res/layout/select_path_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,6 @@
android:drawableLeft="@drawable/ic_crop_black_24dp"
android:visibility="gone"
android:text="@string/edit_picture" />

<Button
android:id="@+id/ui__select_path_dialog__record_audio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_keyboard_voice_black_24dp"
android:drawableLeft="@drawable/ic_keyboard_voice_black_24dp"
android:visibility="gone"
android:text="@string/record_audio" />
</LinearLayout>

</ScrollView>

0 comments on commit f1451a4

Please sign in to comment.