File tree 1 file changed +6
-0
lines changed
espresso/core/java/androidx/test/espresso/base
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import static java .util .Collections .unmodifiableList ;
20
20
21
+ import android .app .Application ;
21
22
import android .app .Activity ;
22
23
import android .content .Context ;
23
24
import android .os .Build ;
@@ -49,6 +50,11 @@ public static void waitForConfigurationChangesOnActivity(
49
50
if (Build .VERSION .SDK_INT >= 24 && currentActivity .isInMultiWindowMode ()) {
50
51
return ;
51
52
}
53
+ // If the application is running activities in different processes, activities that aren't
54
+ // on the main process may have a different orientation
55
+ if (Build .VERSION .SDK_INT >= 28 && !currentActivity .getApplicationInfo ().processName .equals (Application .getProcessName ())) {
56
+ return ;
57
+ }
52
58
53
59
int applicationOrientation = appContext .getResources ().getConfiguration ().orientation ;
54
60
if (applicationOrientation != currentActivity .getResources ().getConfiguration ().orientation ) {
You can’t perform that action at this time.
0 commit comments