Loading cmds/incidentd/src/IncidentService.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -554,6 +554,10 @@ status_t IncidentService::command(FILE* in, FILE* out, FILE* err, Vector<String8 return NO_ERROR; } if (!args[0].compare(String8("section"))) { if (argCount == 1) { fprintf(out, "Not enough arguments for section\n"); return NO_ERROR; } int id = atoi(args[1]); int idx = 0; while (SECTION_LIST[idx] != NULL) { Loading core/java/android/app/ActivityView.java +13 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,8 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay) { this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, false); this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, false /* disableSurfaceViewBackgroundLayer */); } /** @hide */ Loading @@ -113,12 +114,22 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean disableSurfaceViewBackgroundLayer) { this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, disableSurfaceViewBackgroundLayer, false /* useTrustedDisplay */); } // TODO(b/162901735): Refactor ActivityView with Builder /** @hide */ public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean disableSurfaceViewBackgroundLayer, boolean useTrustedDisplay) { super(context, attrs, defStyle); if (useTaskOrganizer()) { mTaskEmbedder = new TaskOrganizerTaskEmbedder(context, this); } else { mTaskEmbedder = new VirtualDisplayTaskEmbedder(context, this, singleTaskInstance, usePublicVirtualDisplay); usePublicVirtualDisplay, useTrustedDisplay); } mSurfaceView = new SurfaceView(context, null, 0, 0, disableSurfaceViewBackgroundLayer); // Since ActivityView#getAlpha has been overridden, we should use parent class's alpha Loading core/java/android/inputmethodservice/InputMethodService.java +15 −11 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ package android.inputmethodservice; import static android.graphics.Color.TRANSPARENT; import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static android.view.ViewRootImpl.NEW_INSETS_MODE_NONE; import static android.view.WindowInsets.Type.navigationBars; import static android.view.WindowInsets.Type.statusBars; import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; import static java.lang.annotation.RetentionPolicy.SOURCE; Loading Loading @@ -69,6 +69,7 @@ import android.view.ViewGroup; import android.view.ViewRootImpl; import android.view.ViewTreeObserver; import android.view.Window; import android.view.WindowInsets; import android.view.WindowInsets.Side; import android.view.WindowManager; import android.view.animation.AnimationUtils; Loading Loading @@ -1202,22 +1203,25 @@ public class InputMethodService extends AbstractInputMethodService { Context.LAYOUT_INFLATER_SERVICE); mWindow = new SoftInputWindow(this, "InputMethod", mTheme, null, null, mDispatcherState, WindowManager.LayoutParams.TYPE_INPUT_METHOD, Gravity.BOTTOM, false); mWindow.getWindow().getAttributes().setFitInsetsTypes(navigationBars()); mWindow.getWindow().getAttributes().setFitInsetsTypes(statusBars() | navigationBars()); mWindow.getWindow().getAttributes().setFitInsetsSides(Side.all() & ~Side.BOTTOM); mWindow.getWindow().getAttributes().setFitInsetsIgnoringVisibility(true); // Our window will extend into the status bar area no matter the bar is visible or not. // We don't want the ColorView to be visible when status bar is shown. mWindow.getWindow().setStatusBarColor(TRANSPARENT); // Automotive devices may request the navigation bar to be hidden when the IME shows up // (controlled via config_automotiveHideNavBarForKeyboard) in order to maximize the visible // screen real estate. When this happens, the IME window should animate from the bottom of // the screen to reduce the jank that happens from the lack of synchronization between the // bottom system window and the IME window. // IME layout should always be inset by navigation bar, no matter its current visibility, // unless automotive requests it. Automotive devices may request the navigation bar to be // hidden when the IME shows up (controlled via config_automotiveHideNavBarForKeyboard) // in order to maximize the visible screen real estate. When this happens, the IME window // should animate from the bottom of the screen to reduce the jank that happens from the // lack of synchronization between the bottom system window and the IME window. if (mIsAutomotive && mAutomotiveHideNavBarForKeyboard) { mWindow.getWindow().setDecorFitsSystemWindows(false); } mWindow.getWindow().getDecorView().setOnApplyWindowInsetsListener( (v, insets) -> v.onApplyWindowInsets( new WindowInsets.Builder(insets).setInsets( navigationBars(), insets.getInsetsIgnoringVisibility(navigationBars())) .build())); // For ColorView in DecorView to work, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS needs to be set // by default (but IME developers can opt this out later if they want a new behavior). Loading core/java/android/provider/DocumentsProvider.java +30 −12 Original line number Diff line number Diff line Loading @@ -218,8 +218,15 @@ public abstract class DocumentsProvider extends ContentProvider { } /** {@hide} */ private void enforceTree(Uri documentUri) { if (isTreeUri(documentUri)) { private void enforceTreeForExtraUris(Bundle extras) { enforceTree(extras.getParcelable(DocumentsContract.EXTRA_URI)); enforceTree(extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI)); enforceTree(extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI)); } /** {@hide} */ private void enforceTree(@Nullable Uri documentUri) { if (documentUri != null && isTreeUri(documentUri)) { final String parent = getTreeDocumentId(documentUri); final String child = getDocumentId(documentUri); if (Objects.equals(parent, child)) { Loading @@ -232,6 +239,10 @@ public abstract class DocumentsProvider extends ContentProvider { } } private Uri validateIncomingNullableUri(@Nullable Uri uri) { return uri == null ? null : validateIncomingUri(uri); } /** * Create a new document and return its newly generated * {@link Document#COLUMN_DOCUMENT_ID}. You must allocate a new Loading Loading @@ -1076,11 +1087,21 @@ public abstract class DocumentsProvider extends ContentProvider { final Context context = getContext(); final Bundle out = new Bundle(); // If the URI is a tree URI performs some validation. enforceTreeForExtraUris(extras); final Uri extraUri = validateIncomingNullableUri( extras.getParcelable(DocumentsContract.EXTRA_URI)); final Uri extraTargetUri = validateIncomingNullableUri( extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI)); final Uri extraParentUri = validateIncomingNullableUri( extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI)); if (METHOD_EJECT_ROOT.equals(method)) { // Given that certain system apps can hold MOUNT_UNMOUNT permission, but only apps // signed with platform signature can hold MANAGE_DOCUMENTS, we are going to check for // MANAGE_DOCUMENTS or associated URI permission here instead final Uri rootUri = extras.getParcelable(DocumentsContract.EXTRA_URI); final Uri rootUri = extraUri; enforceWritePermissionInner(rootUri, getCallingPackage(), getCallingAttributionTag(), null); Loading @@ -1090,7 +1111,7 @@ public abstract class DocumentsProvider extends ContentProvider { return out; } final Uri documentUri = extras.getParcelable(DocumentsContract.EXTRA_URI); final Uri documentUri = extraUri; final String authority = documentUri.getAuthority(); final String documentId = DocumentsContract.getDocumentId(documentUri); Loading @@ -1099,14 +1120,11 @@ public abstract class DocumentsProvider extends ContentProvider { "Requested authority " + authority + " doesn't match provider " + mAuthority); } // If the URI is a tree URI performs some validation. enforceTree(documentUri); if (METHOD_IS_CHILD_DOCUMENT.equals(method)) { enforceReadPermissionInner(documentUri, getCallingPackage(), getCallingAttributionTag(), null); final Uri childUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); final Uri childUri = extraTargetUri; final String childAuthority = childUri.getAuthority(); final String childId = DocumentsContract.getDocumentId(childUri); Loading Loading @@ -1173,7 +1191,7 @@ public abstract class DocumentsProvider extends ContentProvider { revokeDocumentPermission(documentId); } else if (METHOD_COPY_DOCUMENT.equals(method)) { final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); final Uri targetUri = extraTargetUri; final String targetId = DocumentsContract.getDocumentId(targetUri); enforceReadPermissionInner(documentUri, getCallingPackage(), Loading @@ -1197,9 +1215,9 @@ public abstract class DocumentsProvider extends ContentProvider { } } else if (METHOD_MOVE_DOCUMENT.equals(method)) { final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI); final Uri parentSourceUri = extraParentUri; final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri); final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); final Uri targetUri = extraTargetUri; final String targetId = DocumentsContract.getDocumentId(targetUri); enforceWritePermissionInner(documentUri, getCallingPackage(), Loading @@ -1225,7 +1243,7 @@ public abstract class DocumentsProvider extends ContentProvider { } } else if (METHOD_REMOVE_DOCUMENT.equals(method)) { final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI); final Uri parentSourceUri = extraParentUri; final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri); enforceReadPermissionInner(parentSourceUri, getCallingPackage(), Loading core/java/android/window/VirtualDisplayTaskEmbedder.java +8 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.window; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_TRUSTED; import static android.view.Display.INVALID_DISPLAY; import android.app.ActivityManager; Loading Loading @@ -63,6 +64,7 @@ public class VirtualDisplayTaskEmbedder extends TaskEmbedder { private int mDisplayDensityDpi; private final boolean mSingleTaskInstance; private final boolean mUsePublicVirtualDisplay; private final boolean mUseTrustedDisplay; private VirtualDisplay mVirtualDisplay; private Insets mForwardedInsets; private DisplayMetrics mTmpDisplayMetrics; Loading @@ -77,10 +79,12 @@ public class VirtualDisplayTaskEmbedder extends TaskEmbedder { * only applicable if virtual displays are used */ public VirtualDisplayTaskEmbedder(Context context, VirtualDisplayTaskEmbedder.Host host, boolean singleTaskInstance, boolean usePublicVirtualDisplay) { boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean useTrustedDisplay) { super(context, host); mSingleTaskInstance = singleTaskInstance; mUsePublicVirtualDisplay = usePublicVirtualDisplay; mUseTrustedDisplay = useTrustedDisplay; } /** Loading @@ -103,6 +107,9 @@ public class VirtualDisplayTaskEmbedder extends TaskEmbedder { if (mUsePublicVirtualDisplay) { virtualDisplayFlags |= VIRTUAL_DISPLAY_FLAG_PUBLIC; } if (mUseTrustedDisplay) { virtualDisplayFlags |= VIRTUAL_DISPLAY_FLAG_TRUSTED; } mVirtualDisplay = displayManager.createVirtualDisplay( DISPLAY_NAME + "@" + System.identityHashCode(this), mHost.getWidth(), Loading Loading
cmds/incidentd/src/IncidentService.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -554,6 +554,10 @@ status_t IncidentService::command(FILE* in, FILE* out, FILE* err, Vector<String8 return NO_ERROR; } if (!args[0].compare(String8("section"))) { if (argCount == 1) { fprintf(out, "Not enough arguments for section\n"); return NO_ERROR; } int id = atoi(args[1]); int idx = 0; while (SECTION_LIST[idx] != NULL) { Loading
core/java/android/app/ActivityView.java +13 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,8 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay) { this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, false); this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, false /* disableSurfaceViewBackgroundLayer */); } /** @hide */ Loading @@ -113,12 +114,22 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean disableSurfaceViewBackgroundLayer) { this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, disableSurfaceViewBackgroundLayer, false /* useTrustedDisplay */); } // TODO(b/162901735): Refactor ActivityView with Builder /** @hide */ public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean disableSurfaceViewBackgroundLayer, boolean useTrustedDisplay) { super(context, attrs, defStyle); if (useTaskOrganizer()) { mTaskEmbedder = new TaskOrganizerTaskEmbedder(context, this); } else { mTaskEmbedder = new VirtualDisplayTaskEmbedder(context, this, singleTaskInstance, usePublicVirtualDisplay); usePublicVirtualDisplay, useTrustedDisplay); } mSurfaceView = new SurfaceView(context, null, 0, 0, disableSurfaceViewBackgroundLayer); // Since ActivityView#getAlpha has been overridden, we should use parent class's alpha Loading
core/java/android/inputmethodservice/InputMethodService.java +15 −11 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ package android.inputmethodservice; import static android.graphics.Color.TRANSPARENT; import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static android.view.ViewRootImpl.NEW_INSETS_MODE_NONE; import static android.view.WindowInsets.Type.navigationBars; import static android.view.WindowInsets.Type.statusBars; import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; import static java.lang.annotation.RetentionPolicy.SOURCE; Loading Loading @@ -69,6 +69,7 @@ import android.view.ViewGroup; import android.view.ViewRootImpl; import android.view.ViewTreeObserver; import android.view.Window; import android.view.WindowInsets; import android.view.WindowInsets.Side; import android.view.WindowManager; import android.view.animation.AnimationUtils; Loading Loading @@ -1202,22 +1203,25 @@ public class InputMethodService extends AbstractInputMethodService { Context.LAYOUT_INFLATER_SERVICE); mWindow = new SoftInputWindow(this, "InputMethod", mTheme, null, null, mDispatcherState, WindowManager.LayoutParams.TYPE_INPUT_METHOD, Gravity.BOTTOM, false); mWindow.getWindow().getAttributes().setFitInsetsTypes(navigationBars()); mWindow.getWindow().getAttributes().setFitInsetsTypes(statusBars() | navigationBars()); mWindow.getWindow().getAttributes().setFitInsetsSides(Side.all() & ~Side.BOTTOM); mWindow.getWindow().getAttributes().setFitInsetsIgnoringVisibility(true); // Our window will extend into the status bar area no matter the bar is visible or not. // We don't want the ColorView to be visible when status bar is shown. mWindow.getWindow().setStatusBarColor(TRANSPARENT); // Automotive devices may request the navigation bar to be hidden when the IME shows up // (controlled via config_automotiveHideNavBarForKeyboard) in order to maximize the visible // screen real estate. When this happens, the IME window should animate from the bottom of // the screen to reduce the jank that happens from the lack of synchronization between the // bottom system window and the IME window. // IME layout should always be inset by navigation bar, no matter its current visibility, // unless automotive requests it. Automotive devices may request the navigation bar to be // hidden when the IME shows up (controlled via config_automotiveHideNavBarForKeyboard) // in order to maximize the visible screen real estate. When this happens, the IME window // should animate from the bottom of the screen to reduce the jank that happens from the // lack of synchronization between the bottom system window and the IME window. if (mIsAutomotive && mAutomotiveHideNavBarForKeyboard) { mWindow.getWindow().setDecorFitsSystemWindows(false); } mWindow.getWindow().getDecorView().setOnApplyWindowInsetsListener( (v, insets) -> v.onApplyWindowInsets( new WindowInsets.Builder(insets).setInsets( navigationBars(), insets.getInsetsIgnoringVisibility(navigationBars())) .build())); // For ColorView in DecorView to work, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS needs to be set // by default (but IME developers can opt this out later if they want a new behavior). Loading
core/java/android/provider/DocumentsProvider.java +30 −12 Original line number Diff line number Diff line Loading @@ -218,8 +218,15 @@ public abstract class DocumentsProvider extends ContentProvider { } /** {@hide} */ private void enforceTree(Uri documentUri) { if (isTreeUri(documentUri)) { private void enforceTreeForExtraUris(Bundle extras) { enforceTree(extras.getParcelable(DocumentsContract.EXTRA_URI)); enforceTree(extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI)); enforceTree(extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI)); } /** {@hide} */ private void enforceTree(@Nullable Uri documentUri) { if (documentUri != null && isTreeUri(documentUri)) { final String parent = getTreeDocumentId(documentUri); final String child = getDocumentId(documentUri); if (Objects.equals(parent, child)) { Loading @@ -232,6 +239,10 @@ public abstract class DocumentsProvider extends ContentProvider { } } private Uri validateIncomingNullableUri(@Nullable Uri uri) { return uri == null ? null : validateIncomingUri(uri); } /** * Create a new document and return its newly generated * {@link Document#COLUMN_DOCUMENT_ID}. You must allocate a new Loading Loading @@ -1076,11 +1087,21 @@ public abstract class DocumentsProvider extends ContentProvider { final Context context = getContext(); final Bundle out = new Bundle(); // If the URI is a tree URI performs some validation. enforceTreeForExtraUris(extras); final Uri extraUri = validateIncomingNullableUri( extras.getParcelable(DocumentsContract.EXTRA_URI)); final Uri extraTargetUri = validateIncomingNullableUri( extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI)); final Uri extraParentUri = validateIncomingNullableUri( extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI)); if (METHOD_EJECT_ROOT.equals(method)) { // Given that certain system apps can hold MOUNT_UNMOUNT permission, but only apps // signed with platform signature can hold MANAGE_DOCUMENTS, we are going to check for // MANAGE_DOCUMENTS or associated URI permission here instead final Uri rootUri = extras.getParcelable(DocumentsContract.EXTRA_URI); final Uri rootUri = extraUri; enforceWritePermissionInner(rootUri, getCallingPackage(), getCallingAttributionTag(), null); Loading @@ -1090,7 +1111,7 @@ public abstract class DocumentsProvider extends ContentProvider { return out; } final Uri documentUri = extras.getParcelable(DocumentsContract.EXTRA_URI); final Uri documentUri = extraUri; final String authority = documentUri.getAuthority(); final String documentId = DocumentsContract.getDocumentId(documentUri); Loading @@ -1099,14 +1120,11 @@ public abstract class DocumentsProvider extends ContentProvider { "Requested authority " + authority + " doesn't match provider " + mAuthority); } // If the URI is a tree URI performs some validation. enforceTree(documentUri); if (METHOD_IS_CHILD_DOCUMENT.equals(method)) { enforceReadPermissionInner(documentUri, getCallingPackage(), getCallingAttributionTag(), null); final Uri childUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); final Uri childUri = extraTargetUri; final String childAuthority = childUri.getAuthority(); final String childId = DocumentsContract.getDocumentId(childUri); Loading Loading @@ -1173,7 +1191,7 @@ public abstract class DocumentsProvider extends ContentProvider { revokeDocumentPermission(documentId); } else if (METHOD_COPY_DOCUMENT.equals(method)) { final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); final Uri targetUri = extraTargetUri; final String targetId = DocumentsContract.getDocumentId(targetUri); enforceReadPermissionInner(documentUri, getCallingPackage(), Loading @@ -1197,9 +1215,9 @@ public abstract class DocumentsProvider extends ContentProvider { } } else if (METHOD_MOVE_DOCUMENT.equals(method)) { final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI); final Uri parentSourceUri = extraParentUri; final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri); final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); final Uri targetUri = extraTargetUri; final String targetId = DocumentsContract.getDocumentId(targetUri); enforceWritePermissionInner(documentUri, getCallingPackage(), Loading @@ -1225,7 +1243,7 @@ public abstract class DocumentsProvider extends ContentProvider { } } else if (METHOD_REMOVE_DOCUMENT.equals(method)) { final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI); final Uri parentSourceUri = extraParentUri; final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri); enforceReadPermissionInner(parentSourceUri, getCallingPackage(), Loading
core/java/android/window/VirtualDisplayTaskEmbedder.java +8 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.window; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC; import static android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_TRUSTED; import static android.view.Display.INVALID_DISPLAY; import android.app.ActivityManager; Loading Loading @@ -63,6 +64,7 @@ public class VirtualDisplayTaskEmbedder extends TaskEmbedder { private int mDisplayDensityDpi; private final boolean mSingleTaskInstance; private final boolean mUsePublicVirtualDisplay; private final boolean mUseTrustedDisplay; private VirtualDisplay mVirtualDisplay; private Insets mForwardedInsets; private DisplayMetrics mTmpDisplayMetrics; Loading @@ -77,10 +79,12 @@ public class VirtualDisplayTaskEmbedder extends TaskEmbedder { * only applicable if virtual displays are used */ public VirtualDisplayTaskEmbedder(Context context, VirtualDisplayTaskEmbedder.Host host, boolean singleTaskInstance, boolean usePublicVirtualDisplay) { boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean useTrustedDisplay) { super(context, host); mSingleTaskInstance = singleTaskInstance; mUsePublicVirtualDisplay = usePublicVirtualDisplay; mUseTrustedDisplay = useTrustedDisplay; } /** Loading @@ -103,6 +107,9 @@ public class VirtualDisplayTaskEmbedder extends TaskEmbedder { if (mUsePublicVirtualDisplay) { virtualDisplayFlags |= VIRTUAL_DISPLAY_FLAG_PUBLIC; } if (mUseTrustedDisplay) { virtualDisplayFlags |= VIRTUAL_DISPLAY_FLAG_TRUSTED; } mVirtualDisplay = displayManager.createVirtualDisplay( DISPLAY_NAME + "@" + System.identityHashCode(this), mHost.getWidth(), Loading