diff options
| author | Igor Murashkin <iam@google.com> | 2013-08-30 12:58:36 -0700 |
|---|---|---|
| committer | Igor Murashkin <iam@google.com> | 2013-09-09 21:53:59 -0700 |
| commit | a86ab640f7bb0bf3cb4eaed80473ca8c5d131903 (patch) | |
| tree | 472883eaf9edff25136902d4976f275c56218b41 /core/java/android/view/SurfaceControl.java | |
| parent | ff44ed58a1e38ff830e74b0d73549ff01725852d (diff) | |
Surface: Change OutOfResourcesException to be a runtime exception
- Deprecates SurfaceTexture.OutOfResourcesException, it wasn't used
- Make all JNI code throw only Surface.OutOfResourcesException
- Get rid of redundant SurfaceControl.OutOfResourcesException
Bug: 10566539
Change-Id: I58126260771b9ccff6a69c672ce7719b9f98138d
Diffstat (limited to 'core/java/android/view/SurfaceControl.java')
| -rw-r--r-- | core/java/android/view/SurfaceControl.java | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index dc31e0b91342..b22d5cf32af5 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -24,6 +24,7 @@ import android.view.Surface; import android.os.IBinder; import android.os.SystemProperties; import android.util.Log; +import android.view.Surface.OutOfResourcesException; /** * SurfaceControl @@ -75,23 +76,12 @@ public class SurfaceControl { private final CloseGuard mCloseGuard = CloseGuard.get(); - private String mName; + private final String mName; int mNativeObject; // package visibility only for Surface.java access private static final boolean HEADLESS = "1".equals( SystemProperties.get("ro.config.headless", "0")); - /** - * Exception thrown when a surface couldn't be created or resized. - */ - public static class OutOfResourcesException extends Exception { - public OutOfResourcesException() { - } - public OutOfResourcesException(String name) { - super(name); - } - } - /* flags used in constructor (keep in sync with ISurfaceComposerClient.h) */ /** @@ -220,6 +210,8 @@ public class SurfaceControl { * @param h The surface initial height. * @param flags The surface creation flags. Should always include {@link #HIDDEN} * in the creation flags. + * + * @throws throws OutOfResourcesException If the SurfaceControl cannot be created. */ public SurfaceControl(SurfaceSession session, String name, int w, int h, int format, int flags) |
