OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 package org.chromium.media; | |
6 | |
7 import android.content.Context; | |
8 import android.os.Build; | |
9 | |
10 import org.chromium.base.CalledByNative; | |
11 import org.chromium.base.JNINamespace; | |
12 | |
13 @JNINamespace("media") | |
14 @SuppressWarnings("deprecation") | |
15 class ScreenCaptureFactory { | |
16 | |
17 private static final String TAG = "ScreenCaptureAndroid"; | |
18 | |
19 private static boolean isLReleaseOrLater() { | |
20 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; | |
miu
2015/05/20 03:33:27
nit: This expression doesn't need its own method.
| |
21 } | |
22 | |
23 // Factory methods. | |
24 @CalledByNative | |
25 static ScreenCapture createScreenCapture(Context context, long nativeScreenC apturerAndroid) { | |
26 if (isLReleaseOrLater()) { | |
27 return new ScreenCapture(context, nativeScreenCapturerAndroid); | |
28 } | |
29 return null; | |
30 } | |
31 } | |
OLD | NEW |