* Changed provider to scope to all messages. Future update should be able to provide a flag on which scope the user would like to request. All, Sent, Draft, Inbox, Outbox
* Add ability to specify the type of message to query for
If termux-dialog is called while Termux already has a dialog open, the new dialog fails to open and the command will hang until it is manually terminated. This fix allows multiple dialogs to be open at once, ensuring that termux-dialog will not hang.
* AudioAPI: simplify code
* AudioAPI: remove volume info
Redundunt with the introduction of VolumeAPI
* AudioAPI: remove PROPERTY_SUPPORT_AUDIO_SOURCE_UNPROCESSED
It does not seem to have a point for us to get this property as
it is not very clear what it actually reflects.
We have not been getting PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND and
PROPERTY_SUPPORT_SPEAKER_NEAR_ULTRASOUND either.
In fact, properties from getProperty() tend to be rather useless.
PROPERTY_OUTPUT_FRAMES_PER_BUFFER and PROPERTY_OUTPUT_SAMPLE_RATE
are kept only to show that, they should NOT be used to optimize
any player in audio output, as they do not change as per the
current sink, not like the values from the AudioTrack methods do.
* AudioAPI: order output
* AudioAPI: check info in PERFORMANCE_MODE_POWER_SAVING
When setPerformanceMode was introduced in Android O, it was
introduced with three possible modes, namely:
PERFORMANCE_MODE_NONE (default)
PERFORMANCE_MODE_LOW_LATENCY
PERFORMANCE_MODE_POWER_SAVING
While PERFORMANCE_MODE_NONE essentially causes tracks to be routed
to the deep buffer mixer path on my phone (as
PERFORMANCE_MODE_POWER_SAVING does), it may not be the case on
every single device.
Therefore, check info with track in PERFORMANCE_MODE_POWER_SAVING,
compare it against that of the default PERFORMANCE_MODE_NONE, and
print it out if they are not the same.
Note: shouldEnablePowerSaving for PERFORMANCE_MODE_NONE always
returns false for SAMPLE_RATE_UNSPECIFIED as of the current
AudioTrack.java.
* DialogAPI Improvements / Enhancements
* New Widgets: Date, Time, Spinner, Text-To-Speech, Confirmation
* Results are returned as JSON including code of button pressed
* Fix typo
* Add BottomSheet InputMethod type
* Change DialogActivity to AppCompatActivity
* Add support library dependency to gradle
* Change theme to be compatible with AppCompatActivity
* Refactor getSpinnerItems to getInputValues so BottomSheet can use
as well
* Add Radio InputMethod
* Better touch outside dialog cancellation behavior
* Prevent speech InputMethod from being cancelled on touch outside
* Add Counter InputMethod
* Add CheckBox InputMethod
* Change FrameLayout to be NestedScrollView to handle scrolling
large dialogs as necessary
* Add custom range for CounterInputMethod
* Set text for ConfirmInputMethod
* Add numeric option / other minor tweaks
* change password type to a boolean option instead of string
* allow multiline password (text only not numeric)
* Allow text hint to be set for SpeechInputMethod
From Android Studio lint:
On versions prior to Android N (24), initializing the WifiManager via
Context#getSystemService can cause a memory leak if the context is not
the application context.
In many cases, it's not obvious from the code where the Context is coming
from (e.g. it might be a parameter to a method, or a field initialized
from various method calls). It's possible that the context being passed in
is the application context, but to be on the safe side, you should consider
changing context.getSystemService(...) to
context.getApplicationContext().getSystemService(...).
Due to https://issuetracker.google.com/issues/37060483:
WifiManager#getScanResults() returns an empty array list
if GPS is turned off
the user needs to enable Location on the device for termux-wifi-scaninfo
to work. So show "Location needs to be enabled on the device" if necessary.
* MediaPlayerAPI: revert commit 299d557
The error message won't be displayed anyway:
$ touch empty
$ dd if=/dev/urandom of=random count=2048
2048+0 records in
2048+0 records out
1048576 bytes (1.0MB) copied, 0.190185 seconds, 5.3MB/s
$ termux-media-player play empty
setDataSourceFD failed.: status=0x80000000
$ termux-media-player play random
Prepare failed.: status=0x1
$
* MediaPlayerAPI: catch NullPointerException for -a play
* MediaPlayerAPI: use getCanonicalPath() instead
* MediaPlayerAPI: use proper values for setVolume()
* MediaPlayerAPI: fix play and stop from pause
* MediaPlayerAPI: add trackName for info and resume
Suggested by Auxilus (#162)