Commit 5bc5d0ab authored by Geoffrey Métais's avatar Geoffrey Métais

Hide sleep setting on non TSP devices

parent c51ee4c2
......@@ -113,6 +113,7 @@
<!-- Sleep Timer -->
<LinearLayout
android:id="@+id/sleep_timer_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
......
......@@ -44,6 +44,7 @@ import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.gui.PickTimeFragment;
import org.videolan.vlc.gui.TimePickerDialogFragment;
import org.videolan.vlc.util.AndroidDevices;
import org.videolan.vlc.util.Strings;
import java.util.Calendar;
......@@ -104,10 +105,14 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
mSleepTime = (TextView) root.findViewById(R.id.sleep_timer_value);
mSleepCancel = (TextView) root.findViewById(R.id.sleep_timer_cancel);
mSleepIcon.setOnClickListener(this);
mSleepTitle.setOnClickListener(this);
mSleepTime.setOnClickListener(this);
mSleepCancel.setOnClickListener(this);
if (AndroidDevices.hasTsp()) {
mSleepIcon.setOnClickListener(this);
mSleepTitle.setOnClickListener(this);
mSleepTime.setOnClickListener(this);
mSleepCancel.setOnClickListener(this);
} else {
root.findViewById(R.id.sleep_timer_container).setVisibility(View.GONE);
}
mJumpIcon = (ImageView) root.findViewById(R.id.jump_icon);
mJumpTitle = (TextView) root.findViewById(R.id.jump_title);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment