Skip to content

Commit

Permalink
Bump minimum and target API levels + support lib version
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164863447
  • Loading branch information
ojw28 committed Aug 11, 2017
1 parent 1b28d83 commit 40f3495
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 38 deletions.
12 changes: 6 additions & 6 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
project.ext {
// Important: ExoPlayer specifies a minSdkVersion of 9 because various
// Important: ExoPlayer specifies a minSdkVersion of 14 because various
// components provided by the library may be of use on older devices.
// However, please note that the core media playback functionality provided
// by the library requires API level 16 or greater.
minSdkVersion = 9
compileSdkVersion = 25
targetSdkVersion = 25
buildToolsVersion = '25'
minSdkVersion = 14
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = '26'
testSupportLibraryVersion = '0.5'
supportLibraryVersion = '25.4.0'
supportLibraryVersion = '26.0.1'
dexmakerVersion = '1.2'
mockitoVersion = '1.9.5'
releaseVersion = 'r2.5.1'
Expand Down
2 changes: 1 addition & 1 deletion demos/main/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.software.leanback" android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25"/>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"/>

<application
android:label="@string/application_name"
Expand Down
2 changes: 1 addition & 1 deletion extensions/cronet/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer.ext.cronet">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
2 changes: 1 addition & 1 deletion extensions/flac/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.ext.flac.test">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
2 changes: 1 addition & 1 deletion extensions/opus/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.ext.opus.test">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
2 changes: 1 addition & 1 deletion extensions/vp9/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.ext.vp9.test">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
*/
package com.google.android.exoplayer2.ext.vp9;

import android.annotation.TargetApi;
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;

/**
* A GLSurfaceView extension that scales itself to the given aspect ratio.
*/
@TargetApi(11)
public class VpxVideoSurfaceView extends GLSurfaceView implements VpxOutputBufferRenderer {

private final VpxRenderer renderer;
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.core.test">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
2 changes: 1 addition & 1 deletion library/dash/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.source.dash.test">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
2 changes: 1 addition & 1 deletion library/hls/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.source.hls.test">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.google.android.exoplayer2.source.smoothstreaming.test">

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.google.android.exoplayer2.ui;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
Expand Down Expand Up @@ -814,17 +813,8 @@ private void setButtonEnabled(boolean enabled, View view) {
return;
}
view.setEnabled(enabled);
if (Util.SDK_INT >= 11) {
setViewAlphaV11(view, enabled ? 1f : 0.3f);
view.setVisibility(VISIBLE);
} else {
view.setVisibility(enabled ? VISIBLE : INVISIBLE);
}
}

@TargetApi(11)
private void setViewAlphaV11(View view, float alpha) {
view.setAlpha(alpha);
view.setAlpha(enabled ? 1f : 0.3f);
view.setVisibility(VISIBLE);
}

private void previous() {
Expand Down
2 changes: 1 addition & 1 deletion playbacktests/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"/>

<application android:debuggable="true"
android:allowBackup="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import static junit.framework.Assert.fail;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.net.wifi.WifiManager;
Expand All @@ -32,7 +31,6 @@
import android.view.SurfaceView;
import android.view.Window;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.Util;

/**
* A host activity for performing playback tests.
Expand Down Expand Up @@ -164,7 +162,7 @@ public void onCreate(Bundle savedInstanceState) {
public void onStart() {
Context appContext = getApplicationContext();
WifiManager wifiManager = (WifiManager) appContext.getSystemService(Context.WIFI_SERVICE);
wifiLock = wifiManager.createWifiLock(getWifiLockMode(), TAG);
wifiLock = wifiManager.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, TAG);
wifiLock.acquire();
PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);
wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
Expand Down Expand Up @@ -225,9 +223,4 @@ private void maybeStopHostedTest() {
}
}

@SuppressLint("InlinedApi")
private static int getWifiLockMode() {
return Util.SDK_INT < 12 ? WifiManager.WIFI_MODE_FULL : WifiManager.WIFI_MODE_FULL_HIGH_PERF;
}

}

0 comments on commit 40f3495

Please sign in to comment.