update glgen to take into account recent changes
- it looks like UserId has been renamed to UserHandle in the framework. - also for some reason I don't understand glgen didn't seem to be up to date with respect to the generated bindings in the tree. It's like the bindings were generated with a more recent version of glgen (maybe it was never checked in). So we fix that here. Change-Id: Ie49522ebf67fcab9213246b4d93500e37a3cbc05
This commit is contained in:
parent
a7121cf44b
commit
54c2818abe
@ -27,7 +27,7 @@ echo "package android.app; import android.content.pm.IPackageManager; public cla
|
||||
echo "package android.content.pm; public class ApplicationInfo {public int targetSdkVersion;}" > out/android/content/pm/ApplicationInfo.java
|
||||
echo "package android.content.pm; public interface IPackageManager {ApplicationInfo getApplicationInfo(java.lang.String packageName, int flags, java.lang.String userId) throws android.os.RemoteException;}" > out/android/content/pm/IPackageManager.java
|
||||
echo "package android.os; public class Build {public static class VERSION_CODES { public static final int CUPCAKE = 3;}; }" > out/android/os/Build.java
|
||||
echo "package android.os; public class UserId {public static String myUserId() { return \"\"; } }" > out/android/os/UserId.java
|
||||
echo "package android.os; public class UserHandle {public static String myUserId() { return \"\"; } }" > out/android/os/UserHandle.java
|
||||
echo "package android.os; public class RemoteException extends Exception {}" > out/android/os/RemoteException.java
|
||||
echo "package android.util; public class Log {public static void w(String a, String b) {} public static void e(String a, String b) {}}" > out/android/util/Log.java
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/*
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -34,7 +34,7 @@ not_valid_surface:
|
||||
goto exit;
|
||||
}
|
||||
|
||||
window = android::android_Surface_getNativeWindow(_env, win);
|
||||
window = android::android_view_Surface_getNativeWindow(_env, win);
|
||||
|
||||
if (window == NULL)
|
||||
goto not_valid_surface;
|
||||
@ -112,7 +112,11 @@ not_valid_surface:
|
||||
goto exit;
|
||||
}
|
||||
glConsumer = android::SurfaceTexture_getSurfaceTexture(_env, win);
|
||||
window = new android::Surface(glConsumer);
|
||||
|
||||
if (glConsumer == NULL)
|
||||
goto not_valid_surface;
|
||||
|
||||
window = new android::Surface(glConsumer->getBufferQueue());
|
||||
|
||||
if (window == NULL)
|
||||
goto not_valid_surface;
|
||||
|
@ -22,7 +22,7 @@ import android.app.AppGlobals;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.IPackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.UserId;
|
||||
import android.os.UserHandle;
|
||||
import android.util.Log;
|
||||
|
||||
import java.nio.Buffer;
|
||||
@ -67,7 +67,7 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack {
|
||||
int version = 0;
|
||||
IPackageManager pm = AppGlobals.getPackageManager();
|
||||
try {
|
||||
ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0, UserId.myUserId());
|
||||
ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0, UserHandle.myUserId());
|
||||
if (applicationInfo != null) {
|
||||
version = applicationInfo.targetSdkVersion;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user