| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.service.games; |
| 18 |
|
| 19 |
|
| 20 |
import android.annotation.Hide; |
| 21 |
import android.annotation.NonNull; |
| 22 |
import android.os.Parcel; |
| 23 |
import android.os.Parcelable; |
| 24 |
import android.view.SurfaceControlViewHost; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
@Hide |
| 34 |
public final class CreateGameSessionResult implements Parcelable { |
| 35 |
|
| 36 |
@NonNull |
| 37 |
public static final Parcelable.Creator<CreateGameSessionResult> CREATOR = |
| 38 |
new Parcelable.Creator<CreateGameSessionResult>() { |
| 39 |
@Override |
| 40 |
public CreateGameSessionResult createFromParcel(Parcel source) { |
| 41 |
return new CreateGameSessionResult( |
| 42 |
IGameSession.Stub.asInterface(source.readStrongBinder()), |
| 43 |
source.readParcelable( |
| 44 |
SurfaceControlViewHost.SurfacePackage.class.getClassLoader(), |
| 45 |
SurfaceControlViewHost.SurfacePackage.class)); |
| 46 |
} |
| 47 |
|
| 48 |
@Override |
| 49 |
public CreateGameSessionResult[] newArray(int size) { |
| 50 |
return new CreateGameSessionResult[0]; |
| 51 |
} |
| 52 |
}; |
| 53 |
|
| 54 |
private final IGameSession mGameSession; |
| 55 |
private final SurfaceControlViewHost.SurfacePackage mSurfacePackage; |
| 56 |
|
| 57 |
public CreateGameSessionResult( |
| 58 |
@NonNull IGameSession gameSession, |
| 59 |
@NonNull SurfaceControlViewHost.SurfacePackage surfacePackage) { |
| 60 |
mGameSession = gameSession; |
| 61 |
mSurfacePackage = surfacePackage; |
| 62 |
} |
| 63 |
|
| 64 |
@NonNull |
| 65 |
public IGameSession getGameSession() { |
| 66 |
return mGameSession; |
| 67 |
} |
| 68 |
|
| 69 |
@NonNull |
| 70 |
public SurfaceControlViewHost.SurfacePackage getSurfacePackage() { |
| 71 |
return mSurfacePackage; |
| 72 |
} |
| 73 |
|
| 74 |
@Override |
| 75 |
public int describeContents() { |
| 76 |
return 0; |
| 77 |
} |
| 78 |
|
| 79 |
@Override |
| 80 |
public void writeToParcel(@NonNull Parcel dest, int flags) { |
| 81 |
dest.writeStrongBinder(mGameSession.asBinder()); |
| 82 |
dest.writeParcelable(mSurfacePackage, flags); |
| 83 |
} |
| 84 |
} |