diff options
Diffstat (limited to 'app/src/main/java')
3 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/com/clusterrr/sonyheadphonescontrol/MainActivity.java b/app/src/main/java/com/clusterrr/sonyheadphonescontrol/MainActivity.java index 7db990d..eaca5d5 100644 --- a/app/src/main/java/com/clusterrr/sonyheadphonescontrol/MainActivity.java +++ b/app/src/main/java/com/clusterrr/sonyheadphonescontrol/MainActivity.java @@ -74,16 +74,16 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe String blurb = "";
if (((RadioButton) findViewById(R.id.radioButtonDisable)).isChecked()) {
- mode = 0;
+ mode = TaskerFireReceiver.KEY_OFF;
blurb = ((RadioButton) findViewById(R.id.radioButtonDisable)).getText().toString();
} else if (((RadioButton) findViewById(R.id.radioButtonNoiseCancelling)).isChecked()) {
- mode = 1;
+ mode = TaskerFireReceiver.KEY_NOISE_CANCELLING;
blurb = ((RadioButton) findViewById(R.id.radioButtonNoiseCancelling)).getText().toString();
} else if (((RadioButton) findViewById(R.id.radioButtonWindCancelling)).isChecked()) {
- mode = 2;
+ mode = TaskerFireReceiver.KEY_WIND_CANCELLING;
blurb = ((RadioButton) findViewById(R.id.radioButtonWindCancelling)).getText().toString();
} else if (((RadioButton) findViewById(R.id.radioButtonAmbientSound)).isChecked()) {
- mode = 3;
+ mode = TaskerFireReceiver.KEY_AMBIENT_SOUND;
volume = ((SeekBar) findViewById(R.id.seekBarVolume)).getProgress() + 1;
voice = ((Switch) findViewById(R.id.switchVoiceOptimized)).isChecked();
blurb = ((RadioButton) findViewById(R.id.radioButtonAmbientSound)).getText().toString() +
diff --git a/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java b/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java index 95dc41a..9e97f2c 100644 --- a/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java +++ b/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java @@ -165,7 +165,7 @@ public final class TaskerFireReceiver extends BroadcastReceiver { throws IOException, InterruptedException, TimeoutException {
return findByUUIDAndSend(context, HEADSET_UUIDS, COMMAND_SET_MODE,
new byte[]{0x68, 0x02,
- (byte) (enabled ? 0x10 : 0x00), 0x02, (byte) (noiseCancelling), 0x01,
+ (byte) (enabled ? 0x10 : 0x00), 0x02, (byte) noiseCancelling, 0x01,
(byte) (voice ? 1 : 0), (byte) volume});
}
diff --git a/app/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java b/app/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java index fb00be1..822826b 100644 --- a/app/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java +++ b/app/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java @@ -442,7 +442,7 @@ public class TaskerPlugin { if ( ( timeoutMS > REQUESTED_TIMEOUT_MS_MAX ) && ( timeoutMS != REQUESTED_TIMEOUT_MS_NEVER ) - ) { + ) { Log.w( TAG, "requestTimeoutMS: requested timeout " + timeoutMS + " exceeds maximum, setting to max (" + REQUESTED_TIMEOUT_MS_MAX + ")" ); timeoutMS = REQUESTED_TIMEOUT_MS_MAX; } |