Merge "Fix(?) for some disabled ChooserActivityTest cases" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b2af04737d
@@ -3073,8 +3073,15 @@ public class ChooserActivityTest {
|
|||||||
// framework code on the device is up-to-date.
|
// framework code on the device is up-to-date.
|
||||||
// TODO: is there a better way to do this? (Other than abandoning inheritance-based DI wrapper?)
|
// TODO: is there a better way to do this? (Other than abandoning inheritance-based DI wrapper?)
|
||||||
private int getRuntimeResourceId(String name, String defType) {
|
private int getRuntimeResourceId(String name, String defType) {
|
||||||
int id = mActivityRule.getActivity().getResources().getIdentifier(name, defType, "android");
|
int id = -1;
|
||||||
|
if (ChooserActivityOverrideData.getInstance().resources != null) {
|
||||||
|
id = ChooserActivityOverrideData.getInstance().resources.getIdentifier(
|
||||||
|
name, defType, "android");
|
||||||
|
} else {
|
||||||
|
id = mActivityRule.getActivity().getResources().getIdentifier(name, defType, "android");
|
||||||
|
}
|
||||||
assertThat(id, greaterThan(0));
|
assertThat(id, greaterThan(0));
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user