Loading core/java/android/app/Presentation.java +15 −8 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.app; import static android.content.Context.DISPLAY_SERVICE; import static android.content.Context.WINDOW_SERVICE; import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; Loading @@ -26,18 +27,18 @@ import android.content.res.Resources; import android.hardware.display.DisplayManager; import android.hardware.display.DisplayManager.DisplayListener; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import android.view.ContextThemeWrapper; import android.view.Display; import android.view.Gravity; import android.view.Window; import android.view.WindowManager; import android.view.WindowManagerImpl; import android.os.Handler; import android.os.Message; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; /** * Base class for presentations. Loading Loading @@ -116,7 +117,9 @@ import android.util.TypedValue; * The display manager keeps track of all displays in the system. However, not all * displays are appropriate for showing presentations. For example, if an activity * attempted to show a presentation on the main display it might obscure its own content * (it's like opening a dialog on top of your activity). * (it's like opening a dialog on top of your activity). Creating a presentation on the main * display will result in {@link android.view.WindowManager.InvalidDisplayException} being thrown * when invoking {@link #show()}. * </p><p> * Here's how to identify suitable displays for showing presentations using * {@link DisplayManager#getDisplays(String)} and the Loading Loading @@ -189,12 +192,16 @@ public class Presentation extends Dialog { mDisplay = display; mDisplayManager = (DisplayManager)getContext().getSystemService(DISPLAY_SERVICE); final int windowType = (display.getFlags() & Display.FLAG_PRIVATE) != 0 ? TYPE_PRIVATE_PRESENTATION : TYPE_PRESENTATION; final Window w = getWindow(); final WindowManager.LayoutParams attr = w.getAttributes(); attr.token = mToken; w.setAttributes(attr); w.setGravity(Gravity.FILL); w.setType(TYPE_PRESENTATION); w.setType(windowType); setCanceledOnTouchOutside(false); } Loading Loading @@ -243,7 +250,7 @@ public class Presentation extends Dialog { /** * Inherited from {@link Dialog#show}. Will throw * {@link android.view.WindowManager.InvalidDisplayException} if the specified secondary * {@link Display} can't be found. * {@link Display} can't be found or if it does not have {@link Display#FLAG_PRESENTATION} set. */ @Override public void show() { Loading core/java/android/os/AppZygote.java +2 −3 Original line number Diff line number Diff line Loading @@ -92,10 +92,9 @@ public class AppZygote { @GuardedBy("mLock") private void stopZygoteLocked() { if (mZygote != null) { // Close the connection and kill the zygote process. This will not cause // child processes to be killed by itself. mZygote.close(); Process.killProcess(mZygote.getPid()); // use killProcessGroup() here, so we kill all untracked children as well. Process.killProcessGroup(mZygoteUid, mZygote.getPid()); mZygote = null; } } Loading core/java/android/provider/DocumentsProvider.java +1 −0 Original line number Diff line number Diff line Loading @@ -1260,6 +1260,7 @@ public abstract class DocumentsProvider extends ContentProvider { out.putParcelable(DocumentsContract.EXTRA_RESULT, path); } else if (METHOD_GET_DOCUMENT_METADATA.equals(method)) { enforceReadPermissionInner(documentUri, getCallingPackage(), null); return getDocumentMetadata(documentId); } else { throw new UnsupportedOperationException("Method not supported " + method); Loading core/jni/com_android_internal_os_Zygote.cpp +10 −2 Original line number Diff line number Diff line Loading @@ -507,8 +507,16 @@ static void UnsetChldSignalHandler() { // Calls POSIX setgroups() using the int[] object as an argument. // A nullptr argument is tolerated. static void SetGids(JNIEnv* env, jintArray managed_gids, fail_fn_t fail_fn) { static void SetGids(JNIEnv* env, jintArray managed_gids, jboolean is_child_zygote, fail_fn_t fail_fn) { if (managed_gids == nullptr) { if (is_child_zygote) { // For child zygotes like webview and app zygote, we want to clear out // any supplemental groups the parent zygote had. if (setgroups(0, NULL) == -1) { fail_fn(CREATE_ERROR("Failed to remove supplementary groups for child zygote")); } } return; } Loading Loading @@ -1163,7 +1171,7 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, } } SetGids(env, gids, fail_fn); SetGids(env, gids, is_child_zygote, fail_fn); SetRLimits(env, rlimits, fail_fn); if (need_pre_initialize_native_bridge) { Loading packages/SystemUI/src/com/android/systemui/glwallpaper/ImageGLWallpaper.java +15 −11 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ class ImageGLWallpaper { private void setupTexture(Bitmap bitmap) { final int[] tids = new int[1]; if (bitmap == null) { if (bitmap == null || bitmap.isRecycled()) { Log.w(TAG, "setupTexture: invalid bitmap"); return; } Loading @@ -179,16 +179,20 @@ class ImageGLWallpaper { return; } try { // Bind a named texture to a target. glBindTexture(GL_TEXTURE_2D, tids[0]); // Load the bitmap data and copy it over into the texture object that is currently bound. // Load the bitmap data and copy it over into the texture object // that is currently bound. GLUtils.texImage2D(GL_TEXTURE_2D, 0, bitmap, 0); // Use bilinear texture filtering when minification. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Use bilinear texture filtering when magnification. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); mTextureId = tids[0]; } catch (IllegalArgumentException e) { Log.w(TAG, "Failed uploading texture: " + e.getLocalizedMessage()); } } void useTexture() { Loading Loading
core/java/android/app/Presentation.java +15 −8 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.app; import static android.content.Context.DISPLAY_SERVICE; import static android.content.Context.WINDOW_SERVICE; import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; Loading @@ -26,18 +27,18 @@ import android.content.res.Resources; import android.hardware.display.DisplayManager; import android.hardware.display.DisplayManager.DisplayListener; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import android.view.ContextThemeWrapper; import android.view.Display; import android.view.Gravity; import android.view.Window; import android.view.WindowManager; import android.view.WindowManagerImpl; import android.os.Handler; import android.os.Message; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; /** * Base class for presentations. Loading Loading @@ -116,7 +117,9 @@ import android.util.TypedValue; * The display manager keeps track of all displays in the system. However, not all * displays are appropriate for showing presentations. For example, if an activity * attempted to show a presentation on the main display it might obscure its own content * (it's like opening a dialog on top of your activity). * (it's like opening a dialog on top of your activity). Creating a presentation on the main * display will result in {@link android.view.WindowManager.InvalidDisplayException} being thrown * when invoking {@link #show()}. * </p><p> * Here's how to identify suitable displays for showing presentations using * {@link DisplayManager#getDisplays(String)} and the Loading Loading @@ -189,12 +192,16 @@ public class Presentation extends Dialog { mDisplay = display; mDisplayManager = (DisplayManager)getContext().getSystemService(DISPLAY_SERVICE); final int windowType = (display.getFlags() & Display.FLAG_PRIVATE) != 0 ? TYPE_PRIVATE_PRESENTATION : TYPE_PRESENTATION; final Window w = getWindow(); final WindowManager.LayoutParams attr = w.getAttributes(); attr.token = mToken; w.setAttributes(attr); w.setGravity(Gravity.FILL); w.setType(TYPE_PRESENTATION); w.setType(windowType); setCanceledOnTouchOutside(false); } Loading Loading @@ -243,7 +250,7 @@ public class Presentation extends Dialog { /** * Inherited from {@link Dialog#show}. Will throw * {@link android.view.WindowManager.InvalidDisplayException} if the specified secondary * {@link Display} can't be found. * {@link Display} can't be found or if it does not have {@link Display#FLAG_PRESENTATION} set. */ @Override public void show() { Loading
core/java/android/os/AppZygote.java +2 −3 Original line number Diff line number Diff line Loading @@ -92,10 +92,9 @@ public class AppZygote { @GuardedBy("mLock") private void stopZygoteLocked() { if (mZygote != null) { // Close the connection and kill the zygote process. This will not cause // child processes to be killed by itself. mZygote.close(); Process.killProcess(mZygote.getPid()); // use killProcessGroup() here, so we kill all untracked children as well. Process.killProcessGroup(mZygoteUid, mZygote.getPid()); mZygote = null; } } Loading
core/java/android/provider/DocumentsProvider.java +1 −0 Original line number Diff line number Diff line Loading @@ -1260,6 +1260,7 @@ public abstract class DocumentsProvider extends ContentProvider { out.putParcelable(DocumentsContract.EXTRA_RESULT, path); } else if (METHOD_GET_DOCUMENT_METADATA.equals(method)) { enforceReadPermissionInner(documentUri, getCallingPackage(), null); return getDocumentMetadata(documentId); } else { throw new UnsupportedOperationException("Method not supported " + method); Loading
core/jni/com_android_internal_os_Zygote.cpp +10 −2 Original line number Diff line number Diff line Loading @@ -507,8 +507,16 @@ static void UnsetChldSignalHandler() { // Calls POSIX setgroups() using the int[] object as an argument. // A nullptr argument is tolerated. static void SetGids(JNIEnv* env, jintArray managed_gids, fail_fn_t fail_fn) { static void SetGids(JNIEnv* env, jintArray managed_gids, jboolean is_child_zygote, fail_fn_t fail_fn) { if (managed_gids == nullptr) { if (is_child_zygote) { // For child zygotes like webview and app zygote, we want to clear out // any supplemental groups the parent zygote had. if (setgroups(0, NULL) == -1) { fail_fn(CREATE_ERROR("Failed to remove supplementary groups for child zygote")); } } return; } Loading Loading @@ -1163,7 +1171,7 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, } } SetGids(env, gids, fail_fn); SetGids(env, gids, is_child_zygote, fail_fn); SetRLimits(env, rlimits, fail_fn); if (need_pre_initialize_native_bridge) { Loading
packages/SystemUI/src/com/android/systemui/glwallpaper/ImageGLWallpaper.java +15 −11 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ class ImageGLWallpaper { private void setupTexture(Bitmap bitmap) { final int[] tids = new int[1]; if (bitmap == null) { if (bitmap == null || bitmap.isRecycled()) { Log.w(TAG, "setupTexture: invalid bitmap"); return; } Loading @@ -179,16 +179,20 @@ class ImageGLWallpaper { return; } try { // Bind a named texture to a target. glBindTexture(GL_TEXTURE_2D, tids[0]); // Load the bitmap data and copy it over into the texture object that is currently bound. // Load the bitmap data and copy it over into the texture object // that is currently bound. GLUtils.texImage2D(GL_TEXTURE_2D, 0, bitmap, 0); // Use bilinear texture filtering when minification. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Use bilinear texture filtering when magnification. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); mTextureId = tids[0]; } catch (IllegalArgumentException e) { Log.w(TAG, "Failed uploading texture: " + e.getLocalizedMessage()); } } void useTexture() { Loading