We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a203ac commit b2f96c7Copy full SHA for b2f96c7
app/src/main/java/io/appium/settings/Settings.java
@@ -108,10 +108,14 @@ && isHigherThanP()) {
108
final MediaProjectionManager manager
109
= (MediaProjectionManager) getSystemService(
110
Context.MEDIA_PROJECTION_SERVICE);
111
- final Intent permissionIntent = manager.createScreenCaptureIntent();
+ if (manager != null) {
112
+ final Intent permissionIntent = manager.createScreenCaptureIntent();
113
- startActivityForResult(permissionIntent,
114
- RecorderService.REQUEST_CODE_SCREEN_CAPTURE);
+ startActivityForResult(permissionIntent,
115
+ RecorderService.REQUEST_CODE_SCREEN_CAPTURE);
116
+ } else {
117
+ Log.e(TAG, "manager(MediaProjectionManager) null");
118
+ }
119
} else {
120
finishActivity();
121
}
0 commit comments