Commit a0fc8cf1 authored by Luca Stefani's avatar Luca Stefani Committed by LuK1337

Gallery: Kill media effect dialog on movies

* It doesn't work and we have an external app for that

Change-Id: I90d4f548d76b7e73815bb811de0377de7c23708e
parent ccbf7a79
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/switch_thumb_disabled_holo_dark" />
<item android:state_pressed="true" android:drawable="@drawable/switch_thumb_pressed_holo_dark" />
<item android:state_checked="true" android:drawable="@drawable/switch_thumb_activated_holo_dark" />
<item android:drawable="@drawable/switch_thumb_holo_dark" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2013, 2016, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/org.codeaurora.gallery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp">
<RelativeLayout
android:id="@+id/aEffectsPanel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="10dp"
android:gravity="center_vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_weight="1">
<com.android.gallery3d.ui.Knob
android:id="@+id/bBStrengthKnob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
custom:foreground="@drawable/knob"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@id/bBStrengthKnob"
android:layout_marginTop="12dp"
android:textColor="@android:color/black"
android:text="@string/bass_boost_strength"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_alignParentRight="true"
android:layout_weight="1">
<com.android.gallery3d.ui.Knob
android:id="@+id/vIStrengthKnob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
custom:foreground="@drawable/knob"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/vIStrengthKnob"
android:layout_marginTop="12dp"
android:layout_centerHorizontal="true"
android:textColor="@android:color/black"
android:text="@string/virtualizer_strength"/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2014, 2016, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="left|center_vertical">
<TextView
android:text="@string/audio_effects"
android:gravity="left|center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textColor="@android:color/black"
android:textSize="20dp" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<ToggleButton
android:id="@+id/audio_effects_switch"
android:textOn=""
android:textOff=""
android:background="@null"
android:gravity="center_vertical|right"
android:layout_width="72dp"
android:layout_height="34dp"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2013, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/knob_foreground"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/knob_toggle_on"
android:layout_gravity="center_horizontal|center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/knob_toggle_on"
android:visibility="gone" />
<ImageView
android:id="@+id/knob_toggle_off"
android:layout_gravity="center_horizontal|center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/knob_toggle_off"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:id="@+id/knob_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" />
<TextView
android:id="@+id/knob_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:ellipsize="marquee"
android:visibility="gone" />
</LinearLayout>
</FrameLayout>
......@@ -37,10 +37,6 @@
<attr name="largeIcons" format="reference" />
<attr name="images" format="reference" />
</declare-styleable>
<declare-styleable name="Knob">
<attr name="label" format="string" />
<attr name="foreground" format="integer" />
</declare-styleable>
<declare-styleable name="FillColor">
<attr name="fillColorSelector" format="color" />
</declare-styleable>
......
......@@ -92,17 +92,9 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<item quantity="other">%1$d videos</item>
</plurals>
<!-- The label for the bass boost knob of the audio effects dialog. -->
<string name="bass_boost_strength">Bass boost</string>
<!-- The label for the 3d effect knob of the audio effects dialog. -->
<string name="virtualizer_strength">3D effect</string>
<!-- The label for the audio effects menu. -->
<string name="audio_effects">Audio effects</string>
<!-- Toast if user attempts to control audio effects without headphones plugged in. -->
<string name="headset_plug">Plug in headphones for these effects.</string>
<!-- Toast message for share items -->
<string name="cannot_share_items">Max selected items for share is 300</string>
......
......@@ -311,7 +311,6 @@ public class MoviePlayer implements
mHasPaused = true;
doStartVideo(true, mVideoPosition, mVideoLastDuration,false);
mVideoView.start();
mActivityContext.initEffects(mVideoView.getAudioSessionId());
} else {
mTState = TState.PLAYING;
mFirstBePlayed = true;
......@@ -604,7 +603,6 @@ public class MoviePlayer implements
}
if (start) {
mVideoView.start();
mActivityContext.initEffects(mVideoView.getAudioSessionId());
}
//we may start video from stopVideo,
//this case, we should reset canReplay flag according canReplay and loop
......@@ -1124,7 +1122,6 @@ public class MoviePlayer implements
mVideoView.stopPlayback();
mVideoView.setVisibility(View.INVISIBLE);
clearVideoInfo();
mActivityContext.releaseEffects();
mMovieItem = next;
mActivityContext.refreshMovieInfo(mMovieItem);
doStartVideo(false, 0, 0);
......@@ -1160,7 +1157,6 @@ public class MoviePlayer implements
mVideoView.setResumed(false);
mVideoView.setVisibility(View.INVISIBLE);
clearVideoInfo();
mActivityContext.releaseEffects();
mFirstBePlayed = false;
mController.setCanReplay(true);
mController.showEnded();
......
This diff is collapsed.
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