refactor video qualtiy selector; less technical descriptions; code cleanup
This commit is contained in:
parent
84f7aeaea0
commit
3dceb9d3ad
|
@ -40,7 +40,7 @@ public class AttachFileToConversationRunnable implements Runnable, MediaTranscod
|
||||||
private final long originalFileSize;
|
private final long originalFileSize;
|
||||||
private int currentProgress = -1;
|
private int currentProgress = -1;
|
||||||
|
|
||||||
public AttachFileToConversationRunnable(XmppConnectionService xmppConnectionService, Uri uri, String type, Message message, UiCallback<Message> callback) {
|
AttachFileToConversationRunnable(XmppConnectionService xmppConnectionService, Uri uri, String type, Message message, UiCallback<Message> callback) {
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.mXmppConnectionService = xmppConnectionService;
|
this.mXmppConnectionService = xmppConnectionService;
|
||||||
|
@ -52,7 +52,7 @@ public class AttachFileToConversationRunnable implements Runnable, MediaTranscod
|
||||||
this.isVideoMessage = (mimeType != null && mimeType.startsWith("video/")) && originalFileSize > autoAcceptFileSize;
|
this.isVideoMessage = (mimeType != null && mimeType.startsWith("video/")) && originalFileSize > autoAcceptFileSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVideoMessage() {
|
boolean isVideoMessage() {
|
||||||
return this.isVideoMessage;
|
return this.isVideoMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,11 +169,8 @@ public class AttachFileToConversationRunnable implements Runnable, MediaTranscod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getVideoCompression() {
|
private String getVideoCompression() {
|
||||||
return getPreferences().getString("video_compression", mXmppConnectionService.getResources().getString(R.string.video_compression));
|
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mXmppConnectionService);
|
||||||
}
|
return preferences.getString("video_compression", mXmppConnectionService.getResources().getString(R.string.video_compression));
|
||||||
|
|
||||||
protected SharedPreferences getPreferences() {
|
|
||||||
return PreferenceManager.getDefaultSharedPreferences(mXmppConnectionService.getApplicationContext());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -493,8 +493,8 @@
|
||||||
<string name="notify_only_when_highlighted">Notify only when mentioned</string>
|
<string name="notify_only_when_highlighted">Notify only when mentioned</string>
|
||||||
<string name="notify_never">Notifications disabled</string>
|
<string name="notify_never">Notifications disabled</string>
|
||||||
<string name="notify_paused">Notifications paused</string>
|
<string name="notify_paused">Notifications paused</string>
|
||||||
<string name="pref_picture_compression">Compress Pictures</string>
|
<string name="pref_picture_compression">Image Compression</string>
|
||||||
<string name="pref_picture_compression_summary">Resize and compress pictures</string>
|
<string name="pref_picture_compression_summary">Resize and compress images</string>
|
||||||
<string name="always">Always</string>
|
<string name="always">Always</string>
|
||||||
<string name="automatically">Automatically</string>
|
<string name="automatically">Automatically</string>
|
||||||
<string name="battery_optimizations_enabled">Battery optimizations enabled</string>
|
<string name="battery_optimizations_enabled">Battery optimizations enabled</string>
|
||||||
|
@ -740,8 +740,8 @@
|
||||||
<string name="media_browser">Media browser</string>
|
<string name="media_browser">Media browser</string>
|
||||||
<string name="export_channel_name">History export</string>
|
<string name="export_channel_name">History export</string>
|
||||||
<string name="security_violation_not_attaching_file">File omitted due to security violation.</string>
|
<string name="security_violation_not_attaching_file">File omitted due to security violation.</string>
|
||||||
<string name="pref_video_compression">Compress Videos</string>
|
<string name="pref_video_compression">Video Quality</string>
|
||||||
<string name="pref_video_compression_summary">Resize and compress videos</string>
|
<string name="pref_video_compression_summary">Lower quality means smaller files</string>
|
||||||
<string name="video_360p">SD (360p)</string>
|
<string name="video_360p">Medium (360p)</string>
|
||||||
<string name="video_720p">HD (720p)</string>
|
<string name="video_720p">High (720p)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue