Remove checks for SDK <= 21
WebRTC’s minSdk is 21, so all those checks are dead code. Change-Id: I26497fd92259b66d9e5ac6afbb393adf4d904c77 Bug: webrtc:13780 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253124 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Linus Nilsson <lnilsson@webrtc.org> Commit-Queue: Xavier Lepaul <xalep@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36140}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
7befe8e5e4
commit
0f50cc2849
@ -149,16 +149,10 @@ public class AppRTCProximitySensor implements SensorEventListener {
|
||||
info.append(", resolution: ").append(proximitySensor.getResolution());
|
||||
info.append(", max range: ").append(proximitySensor.getMaximumRange());
|
||||
info.append(", min delay: ").append(proximitySensor.getMinDelay());
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {
|
||||
// Added in API level 20.
|
||||
info.append(", type: ").append(proximitySensor.getStringType());
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// Added in API level 21.
|
||||
info.append(", max delay: ").append(proximitySensor.getMaxDelay());
|
||||
info.append(", reporting mode: ").append(proximitySensor.getReportingMode());
|
||||
info.append(", isWakeUpSensor: ").append(proximitySensor.isWakeUpSensor());
|
||||
}
|
||||
info.append(", type: ").append(proximitySensor.getStringType());
|
||||
info.append(", max delay: ").append(proximitySensor.getMaxDelay());
|
||||
info.append(", reporting mode: ").append(proximitySensor.getReportingMode());
|
||||
info.append(", isWakeUpSensor: ").append(proximitySensor.isWakeUpSensor());
|
||||
Log.d(TAG, info.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -384,7 +384,6 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(17)
|
||||
private DisplayMetrics getDisplayMetrics() {
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
WindowManager windowManager =
|
||||
@ -393,16 +392,11 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
|
||||
return displayMetrics;
|
||||
}
|
||||
|
||||
@TargetApi(19)
|
||||
private static int getSystemUiVisibility() {
|
||||
int flags = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
flags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||
}
|
||||
return flags;
|
||||
return View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
private void startScreenCapture() {
|
||||
MediaProjectionManager mediaProjectionManager =
|
||||
(MediaProjectionManager) getApplication().getSystemService(
|
||||
@ -460,7 +454,6 @@ public class CallActivity extends Activity implements AppRTCClient.SignalingEven
|
||||
return null;
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
private @Nullable VideoCapturer createScreenCapturer() {
|
||||
if (mediaProjectionPermissionResultCode != Activity.RESULT_OK) {
|
||||
reportError("User didn't give permission to capture the screen.");
|
||||
|
||||
@ -73,7 +73,6 @@ import java.util.concurrent.TimeUnit;
|
||||
* correct value, and then returns to back to correct reading. Both when
|
||||
* jumping up and back down we might create faulty CPU load readings.
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
||||
class CpuMonitor {
|
||||
private static final String TAG = "CpuMonitor";
|
||||
private static final int MOVING_AVERAGE_SAMPLES = 5;
|
||||
@ -159,8 +158,7 @@ class CpuMonitor {
|
||||
}
|
||||
|
||||
public static boolean isSupported() {
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT
|
||||
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.N;
|
||||
return Build.VERSION.SDK_INT < Build.VERSION_CODES.N;
|
||||
}
|
||||
|
||||
public CpuMonitor(Context context) {
|
||||
|
||||
Reference in New Issue
Block a user