Remove hidden API usage in WM Extensions impl
Reference implementation of WM Extensions included a hidden API call, which is prohibited when coming from non-system apps. Bug: 179968070 Test: Build, test on YT and sample apps Change-Id: Ic8b215b811a5e5d6abaacdb8ff0bf82fc3995d99
This commit is contained in:
@@ -72,7 +72,7 @@ class SampleExtensionImpl extends StubExtension implements
|
||||
|
||||
private List<ExtensionDisplayFeature> getDisplayFeatures(@NonNull Activity activity) {
|
||||
List<ExtensionDisplayFeature> features = new ArrayList<>();
|
||||
int displayId = activity.getDisplayId();
|
||||
int displayId = activity.getDisplay().getDisplayId();
|
||||
if (displayId != DEFAULT_DISPLAY) {
|
||||
Log.w(TAG, "This sample doesn't support display features on secondary displays");
|
||||
return features;
|
||||
|
||||
@@ -84,7 +84,7 @@ class SampleSidecarImpl extends StubSidecar implements
|
||||
|
||||
private List<SidecarDisplayFeature> getDisplayFeatures(@NonNull Activity activity) {
|
||||
List<SidecarDisplayFeature> features = new ArrayList<SidecarDisplayFeature>();
|
||||
int displayId = activity.getDisplayId();
|
||||
int displayId = activity.getDisplay().getDisplayId();
|
||||
if (displayId != DEFAULT_DISPLAY) {
|
||||
Log.w(TAG, "This sample doesn't support display features on secondary displays");
|
||||
return features;
|
||||
|
||||
Reference in New Issue
Block a user