diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-04-22 17:12:34 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-04-22 17:12:34 -0700 |
commit | 74008f608af0c567456d37e63d48643689388c74 (patch) | |
tree | 02354593bed51d5c4bb0ac5f9b44032034cbbaaf | |
parent | 6fc52c4928ec8a658d7eb0b7881fcbc879aeb18c (diff) | |
parent | 644cf62660c87a9b8d5bcb22412cc2ad2aeea291 (diff) | |
download | frameworks_base-74008f608af0c567456d37e63d48643689388c74.zip frameworks_base-74008f608af0c567456d37e63d48643689388c74.tar.gz frameworks_base-74008f608af0c567456d37e63d48643689388c74.tar.bz2 |
Merge donut into master
108 files changed, 4807 insertions, 16639 deletions
@@ -114,6 +114,7 @@ LOCAL_SRC_FILES += \ core/java/com/android/internal/view/IInputMethodManager.aidl \ core/java/com/android/internal/view/IInputMethodSession.aidl \ im/java/android/im/IImPlugin.aidl \ + location/java/android/location/IGeocodeProvider.aidl \ location/java/android/location/IGpsStatusListener.aidl \ location/java/android/location/ILocationCollector.aidl \ location/java/android/location/ILocationListener.aidl \ diff --git a/api/current.xml b/api/current.xml index 9125da5..66128c5 100644 --- a/api/current.xml +++ b/api/current.xml @@ -1549,17 +1549,6 @@ visibility="public" > </field> -<field name="accountType" - type="int" - transient="false" - volatile="false" - value="16843372" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="action" type="int" transient="false" @@ -12535,2225 +12524,6 @@ </constructor> </class> </package> -<package name="android.accounts" -> -<class name="AbstractAccountAuthenticator" - extends="java.lang.Object" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="AbstractAccountAuthenticator" - type="android.accounts.AbstractAccountAuthenticator" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="addAccount" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.AccountAuthenticatorResponse"> -</parameter> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="requiredFeatures" type="java.lang.String[]"> -</parameter> -<parameter name="options" type="android.os.Bundle"> -</parameter> -<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException"> -</exception> -</method> -<method name="confirmCredentials" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.AccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -</method> -<method name="confirmPassword" - return="boolean" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.AccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="password" type="java.lang.String"> -</parameter> -<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException"> -</exception> -</method> -<method name="editProperties" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.AccountAuthenticatorResponse"> -</parameter> -<parameter name="accountType" type="java.lang.String"> -</parameter> -</method> -<method name="getAuthToken" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.AccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="loginOptions" type="android.os.Bundle"> -</parameter> -<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException"> -</exception> -</method> -<method name="getIAccountAuthenticator" - return="android.accounts.IAccountAuthenticator" - abstract="false" - native="false" - synchronized="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="hasFeatures" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.AccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="features" type="java.lang.String[]"> -</parameter> -<exception name="NetworkErrorException" type="android.accounts.NetworkErrorException"> -</exception> -</method> -<method name="updateCredentials" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.AccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="loginOptions" type="android.os.Bundle"> -</parameter> -</method> -</class> -<class name="Account" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.os.Parcelable"> -</implements> -<constructor name="Account" - type="android.accounts.Account" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="name" type="java.lang.String"> -</parameter> -<parameter name="type" type="java.lang.String"> -</parameter> -</constructor> -<constructor name="Account" - type="android.accounts.Account" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="in" type="android.os.Parcel"> -</parameter> -</constructor> -<method name="describeContents" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="writeToParcel" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="dest" type="android.os.Parcel"> -</parameter> -<parameter name="flags" type="int"> -</parameter> -</method> -<field name="CREATOR" - type="android.os.Parcelable.Creator" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="mName" - type="java.lang.String" - transient="false" - volatile="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="mType" - type="java.lang.String" - transient="false" - volatile="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<class name="AccountAuthenticatorActivity" - extends="android.app.Activity" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="AccountAuthenticatorActivity" - type="android.accounts.AccountAuthenticatorActivity" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="setAccountAuthenticatorResult" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -<parameter name="result" type="android.os.Bundle"> -</parameter> -</method> -</class> -<class name="AccountAuthenticatorCache" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="AccountAuthenticatorCache" - type="android.accounts.AccountAuthenticatorCache" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -</constructor> -<method name="close" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="dump" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -<parameter name="fd" type="java.io.FileDescriptor"> -</parameter> -<parameter name="fout" type="java.io.PrintWriter"> -</parameter> -<parameter name="args" type="java.lang.String[]"> -</parameter> -</method> -<method name="getAllAuthenticators" - return="java.util.Collection<android.accounts.AccountAuthenticatorCache.AuthenticatorInfo>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getAuthenticatorInfo" - return="android.accounts.AccountAuthenticatorCache.AuthenticatorInfo" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="type" type="java.lang.String"> -</parameter> -</method> -<method name="parseAuthenticatorInfo" - return="android.accounts.AccountAuthenticatorCache.AuthenticatorInfo" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="service" type="android.content.pm.ResolveInfo"> -</parameter> -<exception name="IOException" type="java.io.IOException"> -</exception> -<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException"> -</exception> -</method> -</class> -<class name="AccountAuthenticatorCache.AuthenticatorInfo" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<field name="mComponentName" - type="android.content.ComponentName" - transient="false" - volatile="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="mType" - type="java.lang.String" - transient="false" - volatile="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<class name="AccountAuthenticatorResponse" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.os.Parcelable"> -</implements> -<constructor name="AccountAuthenticatorResponse" - type="android.accounts.AccountAuthenticatorResponse" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -</constructor> -<constructor name="AccountAuthenticatorResponse" - type="android.accounts.AccountAuthenticatorResponse" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="parcel" type="android.os.Parcel"> -</parameter> -</constructor> -<method name="describeContents" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="onError" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="errorCode" type="int"> -</parameter> -<parameter name="errorMessage" type="java.lang.String"> -</parameter> -</method> -<method name="onRequestContinued" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="onResult" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="result" type="android.os.Bundle"> -</parameter> -</method> -<method name="writeToParcel" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="dest" type="android.os.Parcel"> -</parameter> -<parameter name="flags" type="int"> -</parameter> -</method> -<field name="CREATOR" - type="android.os.Parcelable.Creator" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<class name="AccountManager" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="addAccount" - return="android.accounts.Future2" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="requiredFeatures" type="java.lang.String[]"> -</parameter> -<parameter name="addAccountOptions" type="android.os.Bundle"> -</parameter> -<parameter name="activity" type="android.app.Activity"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="addAccountExplicitly" - return="android.accounts.Future1<java.lang.Boolean>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Boolean>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="password" type="java.lang.String"> -</parameter> -<parameter name="extras" type="android.os.Bundle"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="blockingAddAccountExplicitly" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="password" type="java.lang.String"> -</parameter> -<parameter name="extras" type="android.os.Bundle"> -</parameter> -</method> -<method name="blockingClearPassword" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -</method> -<method name="blockingGetAccounts" - return="android.accounts.Account[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="blockingGetAccountsByType" - return="android.accounts.Account[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="accountType" type="java.lang.String"> -</parameter> -</method> -<method name="blockingGetAccountsWithTypeAndFeatures" - return="android.accounts.Account[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="type" type="java.lang.String"> -</parameter> -<parameter name="features" type="java.lang.String[]"> -</parameter> -<exception name="AuthenticatorException" type="android.accounts.AuthenticatorException"> -</exception> -<exception name="IOException" type="java.io.IOException"> -</exception> -<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException"> -</exception> -</method> -<method name="blockingGetAuthToken" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="notifyAuthFailure" type="boolean"> -</parameter> -<exception name="AuthenticatorException" type="android.accounts.AuthenticatorException"> -</exception> -<exception name="IOException" type="java.io.IOException"> -</exception> -<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException"> -</exception> -</method> -<method name="blockingGetAuthenticatorTypes" - return="java.lang.String[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="blockingGetPassword" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -</method> -<method name="blockingGetUserData" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="key" type="java.lang.String"> -</parameter> -</method> -<method name="blockingInvalidateAuthToken" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<parameter name="authToken" type="java.lang.String"> -</parameter> -</method> -<method name="blockingPeekAuthToken" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -</method> -<method name="blockingRemoveAccount" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -</method> -<method name="blockingSetAuthToken" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="authToken" type="java.lang.String"> -</parameter> -</method> -<method name="blockingSetPassword" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="password" type="java.lang.String"> -</parameter> -</method> -<method name="blockingSetUserData" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="key" type="java.lang.String"> -</parameter> -<parameter name="value" type="java.lang.String"> -</parameter> -</method> -<method name="clearPassword" - return="android.accounts.Future1<java.lang.Void>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Void>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="confirmCredentials" - return="android.accounts.Future2" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="activity" type="android.app.Activity"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="confirmPassword" - return="android.accounts.Future1<java.lang.Boolean>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="password" type="java.lang.String"> -</parameter> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Boolean>"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="editProperties" - return="android.accounts.Future2" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<parameter name="activity" type="android.app.Activity"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="get" - return="android.accounts.AccountManager" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -</method> -<method name="getAccounts" - return="android.accounts.Future1<android.accounts.Account[]>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<android.accounts.Account[]>"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getAccountsByType" - return="android.accounts.Future1<android.accounts.Account[]>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<android.accounts.Account[]>"> -</parameter> -<parameter name="type" type="java.lang.String"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getAccountsWithTypeAndFeatures" - return="android.accounts.Future2" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="type" type="java.lang.String"> -</parameter> -<parameter name="features" type="java.lang.String[]"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getAuthToken" - return="android.accounts.Future2" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="loginOptions" type="android.os.Bundle"> -</parameter> -<parameter name="activity" type="android.app.Activity"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getAuthToken" - return="android.accounts.Future2" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="notifyAuthFailure" type="boolean"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getAuthTokenByFeatures" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="features" type="java.lang.String[]"> -</parameter> -<parameter name="activityForPrompting" type="android.app.Activity"> -</parameter> -<parameter name="addAccountOptions" type="android.os.Bundle"> -</parameter> -<parameter name="loginOptions" type="android.os.Bundle"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getAuthenticatorTypes" - return="android.accounts.Future1<java.lang.String[]>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.String[]>"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getPassword" - return="android.accounts.Future1<java.lang.String>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.String>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="getUserData" - return="android.accounts.Future1<java.lang.String>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.String>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="key" type="java.lang.String"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="invalidateAuthToken" - return="android.accounts.Future1<java.lang.Void>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Void>"> -</parameter> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<parameter name="authToken" type="java.lang.String"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="peekAuthToken" - return="android.accounts.Future1<java.lang.String>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.String>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="removeAccount" - return="android.accounts.Future1<java.lang.Void>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Void>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="setAuthToken" - return="android.accounts.Future1<java.lang.Void>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Void>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="authToken" type="java.lang.String"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="setPassword" - return="android.accounts.Future1<java.lang.Void>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Void>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="password" type="java.lang.String"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="setUserData" - return="android.accounts.Future1<java.lang.Void>" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callback" type="android.accounts.Future1Callback<java.lang.Void>"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="key" type="java.lang.String"> -</parameter> -<parameter name="value" type="java.lang.String"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -<method name="updateCredentials" - return="android.accounts.Future2" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="loginOptions" type="android.os.Bundle"> -</parameter> -<parameter name="activity" type="android.app.Activity"> -</parameter> -<parameter name="callback" type="android.accounts.Future2Callback"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -</method> -</class> -<class name="AccountMonitor" - extends="android.content.BroadcastReceiver" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="AccountMonitor" - type="android.accounts.AccountMonitor" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="listener" type="android.accounts.AccountMonitorListener"> -</parameter> -</constructor> -<method name="close" - return="void" - abstract="false" - native="false" - synchronized="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="onReceive" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="intent" type="android.content.Intent"> -</parameter> -</method> -</class> -<interface name="AccountMonitorListener" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="onAccountsUpdated" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="currentAccounts" type="java.lang.String[]"> -</parameter> -</method> -</interface> -<class name="AuthenticatorBindHelper" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="AuthenticatorBindHelper" - type="android.accounts.AuthenticatorBindHelper" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="authenticatorCache" type="android.accounts.AccountAuthenticatorCache"> -</parameter> -<parameter name="handler" type="android.os.Handler"> -</parameter> -<parameter name="messageWhatConnected" type="int"> -</parameter> -<parameter name="messageWhatDisconnected" type="int"> -</parameter> -</constructor> -<method name="bind" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="authenticatorType" type="java.lang.String"> -</parameter> -<parameter name="callback" type="android.accounts.AuthenticatorBindHelper.Callback"> -</parameter> -</method> -<method name="unbind" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="callbackToUnbind" type="android.accounts.AuthenticatorBindHelper.Callback"> -</parameter> -</method> -</class> -<interface name="AuthenticatorBindHelper.Callback" - abstract="true" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="onConnected" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="service" type="android.os.IBinder"> -</parameter> -</method> -<method name="onDisconnected" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -</interface> -<class name="AuthenticatorException" - extends="java.lang.Exception" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="AuthenticatorException" - type="android.accounts.AuthenticatorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<constructor name="AuthenticatorException" - type="android.accounts.AuthenticatorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="java.lang.String"> -</parameter> -</constructor> -<constructor name="AuthenticatorException" - type="android.accounts.AuthenticatorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="java.lang.String"> -</parameter> -<parameter name="cause" type="java.lang.Throwable"> -</parameter> -</constructor> -<constructor name="AuthenticatorException" - type="android.accounts.AuthenticatorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cause" type="java.lang.Throwable"> -</parameter> -</constructor> -</class> -<class name="ChooseAccountActivity" - extends="android.app.ListActivity" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="ChooseAccountActivity" - type="android.accounts.ChooseAccountActivity" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="onCreate" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="savedInstanceState" type="android.os.Bundle"> -</parameter> -</method> -</class> -<class name="Constants" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<field name="ACCOUNTS_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""accounts"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ACCOUNT_AUTHENTICATOR_RESPONSE_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""accountAuthenticatorResponse"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ACCOUNT_MANAGER_RESPONSE_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""accountManagerResponse"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ACCOUNT_NAME_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""authAccount"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ACCOUNT_TYPE_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""accountType"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="AUTHENTICATOR_TYPES_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""authenticator_types"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="AUTHTOKEN_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""authtoken"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="AUTH_FAILED_MESSAGE_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""authFailedMessage"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="BOOLEAN_RESULT_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""booleanResult"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_CODE_BAD_ARGUMENTS" - type="int" - transient="false" - volatile="false" - value="7" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_CODE_CANCELED" - type="int" - transient="false" - volatile="false" - value="4" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_CODE_INVALID_RESPONSE" - type="int" - transient="false" - volatile="false" - value="5" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_CODE_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""errorCode"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_CODE_NETWORK_ERROR" - type="int" - transient="false" - volatile="false" - value="3" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_CODE_REMOTE_EXCEPTION" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_CODE_UNSUPPORTED_OPERATION" - type="int" - transient="false" - volatile="false" - value="6" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ERROR_MESSAGE_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""errorMessage"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="INTENT_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""intent"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="LOGIN_ACCOUNTS_CHANGED_ACTION" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.accounts.LOGIN_ACCOUNTS_CHANGED"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="PASSWORD_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""password"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="USERDATA_KEY" - type="java.lang.String" - transient="false" - volatile="false" - value=""userdata"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<interface name="Future1" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="java.util.concurrent.Future"> -</implements> -<method name="getResult" - return="V" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException"> -</exception> -</method> -<method name="getResult" - return="V" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="timeout" type="long"> -</parameter> -<parameter name="unit" type="java.util.concurrent.TimeUnit"> -</parameter> -<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException"> -</exception> -</method> -</interface> -<interface name="Future1Callback" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="run" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="future" type="android.accounts.Future1<V>"> -</parameter> -</method> -</interface> -<interface name="Future2" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="java.util.concurrent.Future"> -</implements> -<method name="getResult" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<exception name="AuthenticatorException" type="android.accounts.AuthenticatorException"> -</exception> -<exception name="IOException" type="java.io.IOException"> -</exception> -<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException"> -</exception> -</method> -<method name="getResult" - return="android.os.Bundle" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="timeout" type="long"> -</parameter> -<parameter name="unit" type="java.util.concurrent.TimeUnit"> -</parameter> -<exception name="AuthenticatorException" type="android.accounts.AuthenticatorException"> -</exception> -<exception name="IOException" type="java.io.IOException"> -</exception> -<exception name="OperationCanceledException" type="android.accounts.OperationCanceledException"> -</exception> -</method> -</interface> -<interface name="Future2Callback" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="run" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="future" type="android.accounts.Future2"> -</parameter> -</method> -</interface> -<interface name="IAccountAuthenticator" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.os.IInterface"> -</implements> -<method name="addAccount" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="requiredFeatures" type="java.lang.String[]"> -</parameter> -<parameter name="options" type="android.os.Bundle"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="confirmCredentials" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="confirmPassword" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="password" type="java.lang.String"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="editProperties" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -<parameter name="accountType" type="java.lang.String"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="getAuthToken" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="options" type="android.os.Bundle"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="hasFeatures" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="features" type="java.lang.String[]"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="updateCredentials" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> -</parameter> -<parameter name="account" type="android.accounts.Account"> -</parameter> -<parameter name="authTokenType" type="java.lang.String"> -</parameter> -<parameter name="options" type="android.os.Bundle"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -</interface> -<class name="IAccountAuthenticator.Stub" - extends="android.os.Binder" - abstract="true" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.accounts.IAccountAuthenticator"> -</implements> -<constructor name="IAccountAuthenticator.Stub" - type="android.accounts.IAccountAuthenticator.Stub" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="asBinder" - return="android.os.IBinder" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="asInterface" - return="android.accounts.IAccountAuthenticator" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="obj" type="android.os.IBinder"> -</parameter> -</method> -<method name="onTransact" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="code" type="int"> -</parameter> -<parameter name="data" type="android.os.Parcel"> -</parameter> -<parameter name="reply" type="android.os.Parcel"> -</parameter> -<parameter name="flags" type="int"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -</class> -<interface name="IAccountAuthenticatorResponse" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.os.IInterface"> -</implements> -<method name="onError" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="errorCode" type="int"> -</parameter> -<parameter name="errorMessage" type="java.lang.String"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="onRequestContinued" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -<method name="onResult" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="value" type="android.os.Bundle"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -</interface> -<class name="IAccountAuthenticatorResponse.Stub" - extends="android.os.Binder" - abstract="true" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.accounts.IAccountAuthenticatorResponse"> -</implements> -<constructor name="IAccountAuthenticatorResponse.Stub" - type="android.accounts.IAccountAuthenticatorResponse.Stub" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="asBinder" - return="android.os.IBinder" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="asInterface" - return="android.accounts.IAccountAuthenticatorResponse" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="obj" type="android.os.IBinder"> -</parameter> -</method> -<method name="onTransact" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="code" type="int"> -</parameter> -<parameter name="data" type="android.os.Parcel"> -</parameter> -<parameter name="reply" type="android.os.Parcel"> -</parameter> -<parameter name="flags" type="int"> -</parameter> -<exception name="RemoteException" type="android.os.RemoteException"> -</exception> -</method> -</class> -<class name="NetworkErrorException" - extends="java.lang.Exception" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="NetworkErrorException" - type="android.accounts.NetworkErrorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<constructor name="NetworkErrorException" - type="android.accounts.NetworkErrorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="java.lang.String"> -</parameter> -</constructor> -<constructor name="NetworkErrorException" - type="android.accounts.NetworkErrorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="java.lang.String"> -</parameter> -<parameter name="cause" type="java.lang.Throwable"> -</parameter> -</constructor> -<constructor name="NetworkErrorException" - type="android.accounts.NetworkErrorException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cause" type="java.lang.Throwable"> -</parameter> -</constructor> -</class> -<class name="OperationCanceledException" - extends="java.lang.Exception" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="OperationCanceledException" - type="android.accounts.OperationCanceledException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<constructor name="OperationCanceledException" - type="android.accounts.OperationCanceledException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="java.lang.String"> -</parameter> -</constructor> -<constructor name="OperationCanceledException" - type="android.accounts.OperationCanceledException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="message" type="java.lang.String"> -</parameter> -<parameter name="cause" type="java.lang.Throwable"> -</parameter> -</constructor> -<constructor name="OperationCanceledException" - type="android.accounts.OperationCanceledException" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cause" type="java.lang.Throwable"> -</parameter> -</constructor> -</class> -</package> <package name="android.app" > <class name="Activity" @@ -27057,17 +24827,6 @@ <parameter name="receiver" type="android.content.BroadcastReceiver"> </parameter> </method> -<field name="ACCOUNT_SERVICE" - type="java.lang.String" - transient="false" - volatile="false" - value=""account"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="ACTIVITY_SERVICE" type="java.lang.String" transient="false" @@ -30279,17 +28038,6 @@ visibility="public" > </field> -<field name="ACTION_INPUT_METHOD_CHANGED" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.intent.action.INPUT_METHOD_CHANGED"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="ACTION_INSERT" type="java.lang.String" transient="false" @@ -30587,28 +28335,6 @@ visibility="public" > </field> -<field name="ACTION_POWER_CONNECTED" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.intent.action.POWER_CONNECTED"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="ACTION_POWER_DISCONNECTED" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.intent.action.POWER_DISCONNECTED"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="ACTION_PROVIDER_CHANGED" type="java.lang.String" transient="false" @@ -39024,23 +36750,6 @@ <exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException"> </exception> </method> -<method name="openRawResource" - return="java.io.InputStream" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="id" type="int"> -</parameter> -<parameter name="value" type="android.util.TypedValue"> -</parameter> -<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException"> -</exception> -</method> <method name="openRawResourceFd" return="android.content.res.AssetFileDescriptor" abstract="false" @@ -62934,17 +60643,6 @@ visibility="public" > </method> -<method name="isProximityCorrectionEnabled" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="isShifted" return="boolean" abstract="false" @@ -63107,19 +60805,6 @@ <parameter name="previewEnabled" type="boolean"> </parameter> </method> -<method name="setProximityCorrectionEnabled" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="enabled" type="boolean"> -</parameter> -</method> <method name="setShifted" return="boolean" abstract="false" @@ -69880,17 +67565,6 @@ <parameter name="context" type="android.content.Context"> </parameter> </method> -<method name="inferStreamType" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="isDefault" return="boolean" abstract="false" @@ -71834,6 +69508,16 @@ > <implements name="android.os.Parcelable"> </implements> +<constructor name="NetworkInfo" + type="android.net.NetworkInfo" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="type" type="int"> +</parameter> +</constructor> <method name="describeContents" return="int" abstract="false" @@ -71889,28 +69573,6 @@ visibility="public" > </method> -<method name="getSubtype" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getSubtypeName" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="getType" return="int" abstract="false" @@ -71977,17 +69639,6 @@ visibility="public" > </method> -<method name="isRoaming" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="writeToParcel" return="void" abstract="false" @@ -74843,21 +72494,6 @@ deprecated="not deprecated" visibility="public" > -<parameter name="lockType" type="int"> -</parameter> -<parameter name="tag" type="java.lang.String"> -</parameter> -</method> -<method name="createWifiLock" - return="android.net.wifi.WifiManager.WifiLock" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> <parameter name="tag" type="java.lang.String"> </parameter> </method> @@ -75236,28 +72872,6 @@ visibility="public" > </field> -<field name="WIFI_MODE_FULL" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="WIFI_MODE_SCAN_ONLY" - type="int" - transient="false" - volatile="false" - value="2" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="WIFI_STATE_CHANGED_ACTION" type="java.lang.String" transient="false" @@ -75478,10425 +73092,6 @@ > </field> </class> -<class name="GLES10" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="GLES10" - type="android.opengl.GLES10" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="_glGetString" - return="java.lang.String" - abstract="false" - native="true" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="name" type="int"> -</parameter> -</method> -<method name="glActiveTexture" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="texture" type="int"> -</parameter> -</method> -<method name="glAlphaFunc" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="func" type="int"> -</parameter> -<parameter name="ref" type="float"> -</parameter> -</method> -<method name="glAlphaFuncx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="func" type="int"> -</parameter> -<parameter name="ref" type="int"> -</parameter> -</method> -<method name="glBindTexture" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="texture" type="int"> -</parameter> -</method> -<method name="glBlendFunc" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="sfactor" type="int"> -</parameter> -<parameter name="dfactor" type="int"> -</parameter> -</method> -<method name="glClear" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mask" type="int"> -</parameter> -</method> -<method name="glClearColor" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="float"> -</parameter> -<parameter name="green" type="float"> -</parameter> -<parameter name="blue" type="float"> -</parameter> -<parameter name="alpha" type="float"> -</parameter> -</method> -<method name="glClearColorx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="int"> -</parameter> -<parameter name="green" type="int"> -</parameter> -<parameter name="blue" type="int"> -</parameter> -<parameter name="alpha" type="int"> -</parameter> -</method> -<method name="glClearDepthf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="depth" type="float"> -</parameter> -</method> -<method name="glClearDepthx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="depth" type="int"> -</parameter> -</method> -<method name="glClearStencil" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="s" type="int"> -</parameter> -</method> -<method name="glClientActiveTexture" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="texture" type="int"> -</parameter> -</method> -<method name="glColor4f" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="float"> -</parameter> -<parameter name="green" type="float"> -</parameter> -<parameter name="blue" type="float"> -</parameter> -<parameter name="alpha" type="float"> -</parameter> -</method> -<method name="glColor4x" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="int"> -</parameter> -<parameter name="green" type="int"> -</parameter> -<parameter name="blue" type="int"> -</parameter> -<parameter name="alpha" type="int"> -</parameter> -</method> -<method name="glColorMask" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="boolean"> -</parameter> -<parameter name="green" type="boolean"> -</parameter> -<parameter name="blue" type="boolean"> -</parameter> -<parameter name="alpha" type="boolean"> -</parameter> -</method> -<method name="glColorPointer" - return="void" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="pointer" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glCompressedTexImage2D" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="level" type="int"> -</parameter> -<parameter name="internalformat" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -<parameter name="border" type="int"> -</parameter> -<parameter name="imageSize" type="int"> -</parameter> -<parameter name="data" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glCompressedTexSubImage2D" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="level" type="int"> -</parameter> -<parameter name="xoffset" type="int"> -</parameter> -<parameter name="yoffset" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -<parameter name="format" type="int"> -</parameter> -<parameter name="imageSize" type="int"> -</parameter> -<parameter name="data" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glCopyTexImage2D" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="level" type="int"> -</parameter> -<parameter name="internalformat" type="int"> -</parameter> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -<parameter name="border" type="int"> -</parameter> -</method> -<method name="glCopyTexSubImage2D" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="level" type="int"> -</parameter> -<parameter name="xoffset" type="int"> -</parameter> -<parameter name="yoffset" type="int"> -</parameter> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -</method> -<method name="glCullFace" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -</method> -<method name="glDeleteTextures" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="textures" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDeleteTextures" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="textures" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glDepthFunc" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="func" type="int"> -</parameter> -</method> -<method name="glDepthMask" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="flag" type="boolean"> -</parameter> -</method> -<method name="glDepthRangef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="zNear" type="float"> -</parameter> -<parameter name="zFar" type="float"> -</parameter> -</method> -<method name="glDepthRangex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="zNear" type="int"> -</parameter> -<parameter name="zFar" type="int"> -</parameter> -</method> -<method name="glDisable" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cap" type="int"> -</parameter> -</method> -<method name="glDisableClientState" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="array" type="int"> -</parameter> -</method> -<method name="glDrawArrays" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -<parameter name="first" type="int"> -</parameter> -<parameter name="count" type="int"> -</parameter> -</method> -<method name="glDrawElements" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -<parameter name="count" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="indices" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glEnable" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cap" type="int"> -</parameter> -</method> -<method name="glEnableClientState" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="array" type="int"> -</parameter> -</method> -<method name="glFinish" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="glFlush" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="glFogf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glFogfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glFogfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glFogx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glFogxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glFogxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glFrontFace" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -</method> -<method name="glFrustumf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="float"> -</parameter> -<parameter name="right" type="float"> -</parameter> -<parameter name="bottom" type="float"> -</parameter> -<parameter name="top" type="float"> -</parameter> -<parameter name="zNear" type="float"> -</parameter> -<parameter name="zFar" type="float"> -</parameter> -</method> -<method name="glFrustumx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="int"> -</parameter> -<parameter name="right" type="int"> -</parameter> -<parameter name="bottom" type="int"> -</parameter> -<parameter name="top" type="int"> -</parameter> -<parameter name="zNear" type="int"> -</parameter> -<parameter name="zFar" type="int"> -</parameter> -</method> -<method name="glGenTextures" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="textures" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGenTextures" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="textures" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetError" - return="int" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="glGetIntegerv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetIntegerv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetString" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="name" type="int"> -</parameter> -</method> -<method name="glHint" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="mode" type="int"> -</parameter> -</method> -<method name="glLightModelf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glLightModelfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLightModelfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glLightModelx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glLightModelxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLightModelxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glLightf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glLightfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLightfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glLightx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glLightxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLightxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glLineWidth" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="width" type="float"> -</parameter> -</method> -<method name="glLineWidthx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="width" type="int"> -</parameter> -</method> -<method name="glLoadIdentity" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="glLoadMatrixf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLoadMatrixf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glLoadMatrixx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLoadMatrixx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glLogicOp" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="opcode" type="int"> -</parameter> -</method> -<method name="glMaterialf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glMaterialfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glMaterialfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glMaterialx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glMaterialxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glMaterialxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glMatrixMode" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -</method> -<method name="glMultMatrixf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glMultMatrixf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glMultMatrixx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glMultMatrixx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glMultiTexCoord4f" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="s" type="float"> -</parameter> -<parameter name="t" type="float"> -</parameter> -<parameter name="r" type="float"> -</parameter> -<parameter name="q" type="float"> -</parameter> -</method> -<method name="glMultiTexCoord4x" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="s" type="int"> -</parameter> -<parameter name="t" type="int"> -</parameter> -<parameter name="r" type="int"> -</parameter> -<parameter name="q" type="int"> -</parameter> -</method> -<method name="glNormal3f" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="nx" type="float"> -</parameter> -<parameter name="ny" type="float"> -</parameter> -<parameter name="nz" type="float"> -</parameter> -</method> -<method name="glNormal3x" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="nx" type="int"> -</parameter> -<parameter name="ny" type="int"> -</parameter> -<parameter name="nz" type="int"> -</parameter> -</method> -<method name="glNormalPointer" - return="void" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="pointer" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glOrthof" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="float"> -</parameter> -<parameter name="right" type="float"> -</parameter> -<parameter name="bottom" type="float"> -</parameter> -<parameter name="top" type="float"> -</parameter> -<parameter name="zNear" type="float"> -</parameter> -<parameter name="zFar" type="float"> -</parameter> -</method> -<method name="glOrthox" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="int"> -</parameter> -<parameter name="right" type="int"> -</parameter> -<parameter name="bottom" type="int"> -</parameter> -<parameter name="top" type="int"> -</parameter> -<parameter name="zNear" type="int"> -</parameter> -<parameter name="zFar" type="int"> -</parameter> -</method> -<method name="glPixelStorei" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glPointSize" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="float"> -</parameter> -</method> -<method name="glPointSizex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -</method> -<method name="glPolygonOffset" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="factor" type="float"> -</parameter> -<parameter name="units" type="float"> -</parameter> -</method> -<method name="glPolygonOffsetx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="factor" type="int"> -</parameter> -<parameter name="units" type="int"> -</parameter> -</method> -<method name="glPopMatrix" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="glPushMatrix" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="glReadPixels" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -<parameter name="format" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="pixels" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glRotatef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="angle" type="float"> -</parameter> -<parameter name="x" type="float"> -</parameter> -<parameter name="y" type="float"> -</parameter> -<parameter name="z" type="float"> -</parameter> -</method> -<method name="glRotatex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="angle" type="int"> -</parameter> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -</method> -<method name="glSampleCoverage" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="value" type="float"> -</parameter> -<parameter name="invert" type="boolean"> -</parameter> -</method> -<method name="glSampleCoveragex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="value" type="int"> -</parameter> -<parameter name="invert" type="boolean"> -</parameter> -</method> -<method name="glScalef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="float"> -</parameter> -<parameter name="y" type="float"> -</parameter> -<parameter name="z" type="float"> -</parameter> -</method> -<method name="glScalex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -</method> -<method name="glScissor" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -</method> -<method name="glShadeModel" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -</method> -<method name="glStencilFunc" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="func" type="int"> -</parameter> -<parameter name="ref" type="int"> -</parameter> -<parameter name="mask" type="int"> -</parameter> -</method> -<method name="glStencilMask" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mask" type="int"> -</parameter> -</method> -<method name="glStencilOp" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="fail" type="int"> -</parameter> -<parameter name="zfail" type="int"> -</parameter> -<parameter name="zpass" type="int"> -</parameter> -</method> -<method name="glTexCoordPointer" - return="void" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="pointer" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glTexEnvf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glTexEnvfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexEnvfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glTexEnvx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexEnvxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexEnvxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glTexImage2D" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="level" type="int"> -</parameter> -<parameter name="internalformat" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -<parameter name="border" type="int"> -</parameter> -<parameter name="format" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="pixels" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glTexParameterf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glTexParameterx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexSubImage2D" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="level" type="int"> -</parameter> -<parameter name="xoffset" type="int"> -</parameter> -<parameter name="yoffset" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -<parameter name="format" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="pixels" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glTranslatef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="float"> -</parameter> -<parameter name="y" type="float"> -</parameter> -<parameter name="z" type="float"> -</parameter> -</method> -<method name="glTranslatex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -</method> -<method name="glVertexPointer" - return="void" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="pointer" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glViewport" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -</method> -<field name="GL_ADD" - type="int" - transient="false" - volatile="false" - value="260" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALIASED_LINE_WIDTH_RANGE" - type="int" - transient="false" - volatile="false" - value="33902" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALIASED_POINT_SIZE_RANGE" - type="int" - transient="false" - volatile="false" - value="33901" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALPHA" - type="int" - transient="false" - volatile="false" - value="6406" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALPHA_BITS" - type="int" - transient="false" - volatile="false" - value="3413" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALPHA_TEST" - type="int" - transient="false" - volatile="false" - value="3008" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALWAYS" - type="int" - transient="false" - volatile="false" - value="519" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_AMBIENT" - type="int" - transient="false" - volatile="false" - value="4608" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_AMBIENT_AND_DIFFUSE" - type="int" - transient="false" - volatile="false" - value="5634" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_AND" - type="int" - transient="false" - volatile="false" - value="5377" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_AND_INVERTED" - type="int" - transient="false" - volatile="false" - value="5380" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_AND_REVERSE" - type="int" - transient="false" - volatile="false" - value="5378" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BACK" - type="int" - transient="false" - volatile="false" - value="1029" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND" - type="int" - transient="false" - volatile="false" - value="3042" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLUE_BITS" - type="int" - transient="false" - volatile="false" - value="3412" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BYTE" - type="int" - transient="false" - volatile="false" - value="5120" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CCW" - type="int" - transient="false" - volatile="false" - value="2305" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLAMP_TO_EDGE" - type="int" - transient="false" - volatile="false" - value="33071" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLEAR" - type="int" - transient="false" - volatile="false" - value="5376" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_ARRAY" - type="int" - transient="false" - volatile="false" - value="32886" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_BUFFER_BIT" - type="int" - transient="false" - volatile="false" - value="16384" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_LOGIC_OP" - type="int" - transient="false" - volatile="false" - value="3058" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_MATERIAL" - type="int" - transient="false" - volatile="false" - value="2903" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COMPRESSED_TEXTURE_FORMATS" - type="int" - transient="false" - volatile="false" - value="34467" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CONSTANT_ATTENUATION" - type="int" - transient="false" - volatile="false" - value="4615" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COPY" - type="int" - transient="false" - volatile="false" - value="5379" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COPY_INVERTED" - type="int" - transient="false" - volatile="false" - value="5388" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CULL_FACE" - type="int" - transient="false" - volatile="false" - value="2884" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CW" - type="int" - transient="false" - volatile="false" - value="2304" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DECAL" - type="int" - transient="false" - volatile="false" - value="8449" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DECR" - type="int" - transient="false" - volatile="false" - value="7683" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_BITS" - type="int" - transient="false" - volatile="false" - value="3414" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_BUFFER_BIT" - type="int" - transient="false" - volatile="false" - value="256" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_TEST" - type="int" - transient="false" - volatile="false" - value="2929" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DIFFUSE" - type="int" - transient="false" - volatile="false" - value="4609" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DITHER" - type="int" - transient="false" - volatile="false" - value="3024" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DONT_CARE" - type="int" - transient="false" - volatile="false" - value="4352" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DST_ALPHA" - type="int" - transient="false" - volatile="false" - value="772" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DST_COLOR" - type="int" - transient="false" - volatile="false" - value="774" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_EMISSION" - type="int" - transient="false" - volatile="false" - value="5632" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_EQUAL" - type="int" - transient="false" - volatile="false" - value="514" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_EQUIV" - type="int" - transient="false" - volatile="false" - value="5385" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_EXP" - type="int" - transient="false" - volatile="false" - value="2048" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_EXP2" - type="int" - transient="false" - volatile="false" - value="2049" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_EXTENSIONS" - type="int" - transient="false" - volatile="false" - value="7939" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FALSE" - type="int" - transient="false" - volatile="false" - value="0" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FASTEST" - type="int" - transient="false" - volatile="false" - value="4353" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FIXED" - type="int" - transient="false" - volatile="false" - value="5132" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FLAT" - type="int" - transient="false" - volatile="false" - value="7424" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FLOAT" - type="int" - transient="false" - volatile="false" - value="5126" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FOG" - type="int" - transient="false" - volatile="false" - value="2912" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FOG_COLOR" - type="int" - transient="false" - volatile="false" - value="2918" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FOG_DENSITY" - type="int" - transient="false" - volatile="false" - value="2914" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FOG_END" - type="int" - transient="false" - volatile="false" - value="2916" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FOG_HINT" - type="int" - transient="false" - volatile="false" - value="3156" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FOG_MODE" - type="int" - transient="false" - volatile="false" - value="2917" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FOG_START" - type="int" - transient="false" - volatile="false" - value="2915" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRONT" - type="int" - transient="false" - volatile="false" - value="1028" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRONT_AND_BACK" - type="int" - transient="false" - volatile="false" - value="1032" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_GEQUAL" - type="int" - transient="false" - volatile="false" - value="518" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_GREATER" - type="int" - transient="false" - volatile="false" - value="516" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_GREEN_BITS" - type="int" - transient="false" - volatile="false" - value="3411" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES" - type="int" - transient="false" - volatile="false" - value="35739" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_IMPLEMENTATION_COLOR_READ_TYPE_OES" - type="int" - transient="false" - volatile="false" - value="35738" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INCR" - type="int" - transient="false" - volatile="false" - value="7682" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INVALID_ENUM" - type="int" - transient="false" - volatile="false" - value="1280" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INVALID_OPERATION" - type="int" - transient="false" - volatile="false" - value="1282" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INVALID_VALUE" - type="int" - transient="false" - volatile="false" - value="1281" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INVERT" - type="int" - transient="false" - volatile="false" - value="5386" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_KEEP" - type="int" - transient="false" - volatile="false" - value="7680" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LEQUAL" - type="int" - transient="false" - volatile="false" - value="515" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LESS" - type="int" - transient="false" - volatile="false" - value="513" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT0" - type="int" - transient="false" - volatile="false" - value="16384" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT1" - type="int" - transient="false" - volatile="false" - value="16385" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT2" - type="int" - transient="false" - volatile="false" - value="16386" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT3" - type="int" - transient="false" - volatile="false" - value="16387" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT4" - type="int" - transient="false" - volatile="false" - value="16388" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT5" - type="int" - transient="false" - volatile="false" - value="16389" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT6" - type="int" - transient="false" - volatile="false" - value="16390" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT7" - type="int" - transient="false" - volatile="false" - value="16391" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHTING" - type="int" - transient="false" - volatile="false" - value="2896" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT_MODEL_AMBIENT" - type="int" - transient="false" - volatile="false" - value="2899" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LIGHT_MODEL_TWO_SIDE" - type="int" - transient="false" - volatile="false" - value="2898" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINEAR" - type="int" - transient="false" - volatile="false" - value="9729" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINEAR_ATTENUATION" - type="int" - transient="false" - volatile="false" - value="4616" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINEAR_MIPMAP_LINEAR" - type="int" - transient="false" - volatile="false" - value="9987" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINEAR_MIPMAP_NEAREST" - type="int" - transient="false" - volatile="false" - value="9985" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINES" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINE_LOOP" - type="int" - transient="false" - volatile="false" - value="2" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINE_SMOOTH" - type="int" - transient="false" - volatile="false" - value="2848" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINE_SMOOTH_HINT" - type="int" - transient="false" - volatile="false" - value="3154" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINE_STRIP" - type="int" - transient="false" - volatile="false" - value="3" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LUMINANCE" - type="int" - transient="false" - volatile="false" - value="6409" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LUMINANCE_ALPHA" - type="int" - transient="false" - volatile="false" - value="6410" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_ELEMENTS_INDICES" - type="int" - transient="false" - volatile="false" - value="33001" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_ELEMENTS_VERTICES" - type="int" - transient="false" - volatile="false" - value="33000" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_LIGHTS" - type="int" - transient="false" - volatile="false" - value="3377" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_MODELVIEW_STACK_DEPTH" - type="int" - transient="false" - volatile="false" - value="3382" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_PROJECTION_STACK_DEPTH" - type="int" - transient="false" - volatile="false" - value="3384" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_TEXTURE_SIZE" - type="int" - transient="false" - volatile="false" - value="3379" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_TEXTURE_STACK_DEPTH" - type="int" - transient="false" - volatile="false" - value="3385" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_TEXTURE_UNITS" - type="int" - transient="false" - volatile="false" - value="34018" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_VIEWPORT_DIMS" - type="int" - transient="false" - volatile="false" - value="3386" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MODELVIEW" - type="int" - transient="false" - volatile="false" - value="5888" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MODULATE" - type="int" - transient="false" - volatile="false" - value="8448" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MULTISAMPLE" - type="int" - transient="false" - volatile="false" - value="32925" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NAND" - type="int" - transient="false" - volatile="false" - value="5390" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NEAREST" - type="int" - transient="false" - volatile="false" - value="9728" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NEAREST_MIPMAP_LINEAR" - type="int" - transient="false" - volatile="false" - value="9986" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NEAREST_MIPMAP_NEAREST" - type="int" - transient="false" - volatile="false" - value="9984" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NEVER" - type="int" - transient="false" - volatile="false" - value="512" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NICEST" - type="int" - transient="false" - volatile="false" - value="4354" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NOOP" - type="int" - transient="false" - volatile="false" - value="5381" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NOR" - type="int" - transient="false" - volatile="false" - value="5384" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NORMALIZE" - type="int" - transient="false" - volatile="false" - value="2977" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NORMAL_ARRAY" - type="int" - transient="false" - volatile="false" - value="32885" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NOTEQUAL" - type="int" - transient="false" - volatile="false" - value="517" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NO_ERROR" - type="int" - transient="false" - volatile="false" - value="0" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NUM_COMPRESSED_TEXTURE_FORMATS" - type="int" - transient="false" - volatile="false" - value="34466" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ONE" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ONE_MINUS_DST_ALPHA" - type="int" - transient="false" - volatile="false" - value="773" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ONE_MINUS_DST_COLOR" - type="int" - transient="false" - volatile="false" - value="775" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ONE_MINUS_SRC_ALPHA" - type="int" - transient="false" - volatile="false" - value="771" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ONE_MINUS_SRC_COLOR" - type="int" - transient="false" - volatile="false" - value="769" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OR" - type="int" - transient="false" - volatile="false" - value="5383" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OR_INVERTED" - type="int" - transient="false" - volatile="false" - value="5389" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OR_REVERSE" - type="int" - transient="false" - volatile="false" - value="5387" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OUT_OF_MEMORY" - type="int" - transient="false" - volatile="false" - value="1285" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PACK_ALIGNMENT" - type="int" - transient="false" - volatile="false" - value="3333" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE4_R5_G6_B5_OES" - type="int" - transient="false" - volatile="false" - value="35730" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE4_RGB5_A1_OES" - type="int" - transient="false" - volatile="false" - value="35732" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE4_RGB8_OES" - type="int" - transient="false" - volatile="false" - value="35728" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE4_RGBA4_OES" - type="int" - transient="false" - volatile="false" - value="35731" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE4_RGBA8_OES" - type="int" - transient="false" - volatile="false" - value="35729" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE8_R5_G6_B5_OES" - type="int" - transient="false" - volatile="false" - value="35735" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE8_RGB5_A1_OES" - type="int" - transient="false" - volatile="false" - value="35737" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE8_RGB8_OES" - type="int" - transient="false" - volatile="false" - value="35733" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE8_RGBA4_OES" - type="int" - transient="false" - volatile="false" - value="35736" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PALETTE8_RGBA8_OES" - type="int" - transient="false" - volatile="false" - value="35734" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PERSPECTIVE_CORRECTION_HINT" - type="int" - transient="false" - volatile="false" - value="3152" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINTS" - type="int" - transient="false" - volatile="false" - value="0" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_FADE_THRESHOLD_SIZE" - type="int" - transient="false" - volatile="false" - value="33064" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE" - type="int" - transient="false" - volatile="false" - value="2833" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SMOOTH" - type="int" - transient="false" - volatile="false" - value="2832" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SMOOTH_HINT" - type="int" - transient="false" - volatile="false" - value="3153" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POLYGON_OFFSET_FILL" - type="int" - transient="false" - volatile="false" - value="32823" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POLYGON_SMOOTH_HINT" - type="int" - transient="false" - volatile="false" - value="3155" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POSITION" - type="int" - transient="false" - volatile="false" - value="4611" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PROJECTION" - type="int" - transient="false" - volatile="false" - value="5889" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_QUADRATIC_ATTENUATION" - type="int" - transient="false" - volatile="false" - value="4617" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RED_BITS" - type="int" - transient="false" - volatile="false" - value="3410" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERER" - type="int" - transient="false" - volatile="false" - value="7937" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_REPEAT" - type="int" - transient="false" - volatile="false" - value="10497" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_REPLACE" - type="int" - transient="false" - volatile="false" - value="7681" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RESCALE_NORMAL" - type="int" - transient="false" - volatile="false" - value="32826" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGB" - type="int" - transient="false" - volatile="false" - value="6407" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGBA" - type="int" - transient="false" - volatile="false" - value="6408" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SAMPLE_ALPHA_TO_COVERAGE" - type="int" - transient="false" - volatile="false" - value="32926" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SAMPLE_ALPHA_TO_ONE" - type="int" - transient="false" - volatile="false" - value="32927" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SAMPLE_COVERAGE" - type="int" - transient="false" - volatile="false" - value="32928" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SCISSOR_TEST" - type="int" - transient="false" - volatile="false" - value="3089" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SET" - type="int" - transient="false" - volatile="false" - value="5391" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SHININESS" - type="int" - transient="false" - volatile="false" - value="5633" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SHORT" - type="int" - transient="false" - volatile="false" - value="5122" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SMOOTH" - type="int" - transient="false" - volatile="false" - value="7425" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SMOOTH_LINE_WIDTH_RANGE" - type="int" - transient="false" - volatile="false" - value="2850" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SMOOTH_POINT_SIZE_RANGE" - type="int" - transient="false" - volatile="false" - value="2834" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SPECULAR" - type="int" - transient="false" - volatile="false" - value="4610" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SPOT_CUTOFF" - type="int" - transient="false" - volatile="false" - value="4614" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SPOT_DIRECTION" - type="int" - transient="false" - volatile="false" - value="4612" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SPOT_EXPONENT" - type="int" - transient="false" - volatile="false" - value="4613" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC_ALPHA" - type="int" - transient="false" - volatile="false" - value="770" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC_ALPHA_SATURATE" - type="int" - transient="false" - volatile="false" - value="776" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC_COLOR" - type="int" - transient="false" - volatile="false" - value="768" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STACK_OVERFLOW" - type="int" - transient="false" - volatile="false" - value="1283" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STACK_UNDERFLOW" - type="int" - transient="false" - volatile="false" - value="1284" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_BITS" - type="int" - transient="false" - volatile="false" - value="3415" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_BUFFER_BIT" - type="int" - transient="false" - volatile="false" - value="1024" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_TEST" - type="int" - transient="false" - volatile="false" - value="2960" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SUBPIXEL_BITS" - type="int" - transient="false" - volatile="false" - value="3408" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE" - type="int" - transient="false" - volatile="false" - value="5890" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE0" - type="int" - transient="false" - volatile="false" - value="33984" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE1" - type="int" - transient="false" - volatile="false" - value="33985" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE10" - type="int" - transient="false" - volatile="false" - value="33994" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE11" - type="int" - transient="false" - volatile="false" - value="33995" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE12" - type="int" - transient="false" - volatile="false" - value="33996" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE13" - type="int" - transient="false" - volatile="false" - value="33997" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE14" - type="int" - transient="false" - volatile="false" - value="33998" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE15" - type="int" - transient="false" - volatile="false" - value="33999" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE16" - type="int" - transient="false" - volatile="false" - value="34000" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE17" - type="int" - transient="false" - volatile="false" - value="34001" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE18" - type="int" - transient="false" - volatile="false" - value="34002" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE19" - type="int" - transient="false" - volatile="false" - value="34003" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE2" - type="int" - transient="false" - volatile="false" - value="33986" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE20" - type="int" - transient="false" - volatile="false" - value="34004" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE21" - type="int" - transient="false" - volatile="false" - value="34005" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE22" - type="int" - transient="false" - volatile="false" - value="34006" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE23" - type="int" - transient="false" - volatile="false" - value="34007" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE24" - type="int" - transient="false" - volatile="false" - value="34008" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE25" - type="int" - transient="false" - volatile="false" - value="34009" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE26" - type="int" - transient="false" - volatile="false" - value="34010" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE27" - type="int" - transient="false" - volatile="false" - value="34011" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE28" - type="int" - transient="false" - volatile="false" - value="34012" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE29" - type="int" - transient="false" - volatile="false" - value="34013" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE3" - type="int" - transient="false" - volatile="false" - value="33987" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE30" - type="int" - transient="false" - volatile="false" - value="34014" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE31" - type="int" - transient="false" - volatile="false" - value="34015" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE4" - type="int" - transient="false" - volatile="false" - value="33988" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE5" - type="int" - transient="false" - volatile="false" - value="33989" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE6" - type="int" - transient="false" - volatile="false" - value="33990" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE7" - type="int" - transient="false" - volatile="false" - value="33991" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE8" - type="int" - transient="false" - volatile="false" - value="33992" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE9" - type="int" - transient="false" - volatile="false" - value="33993" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_2D" - type="int" - transient="false" - volatile="false" - value="3553" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_COORD_ARRAY" - type="int" - transient="false" - volatile="false" - value="32888" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_ENV" - type="int" - transient="false" - volatile="false" - value="8960" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_ENV_COLOR" - type="int" - transient="false" - volatile="false" - value="8705" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_ENV_MODE" - type="int" - transient="false" - volatile="false" - value="8704" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_MAG_FILTER" - type="int" - transient="false" - volatile="false" - value="10240" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_MIN_FILTER" - type="int" - transient="false" - volatile="false" - value="10241" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_WRAP_S" - type="int" - transient="false" - volatile="false" - value="10242" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_WRAP_T" - type="int" - transient="false" - volatile="false" - value="10243" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TRIANGLES" - type="int" - transient="false" - volatile="false" - value="4" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TRIANGLE_FAN" - type="int" - transient="false" - volatile="false" - value="6" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TRIANGLE_STRIP" - type="int" - transient="false" - volatile="false" - value="5" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TRUE" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_UNPACK_ALIGNMENT" - type="int" - transient="false" - volatile="false" - value="3317" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_UNSIGNED_BYTE" - type="int" - transient="false" - volatile="false" - value="5121" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_UNSIGNED_SHORT" - type="int" - transient="false" - volatile="false" - value="5123" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_UNSIGNED_SHORT_4_4_4_4" - type="int" - transient="false" - volatile="false" - value="32819" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_UNSIGNED_SHORT_5_5_5_1" - type="int" - transient="false" - volatile="false" - value="32820" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_UNSIGNED_SHORT_5_6_5" - type="int" - transient="false" - volatile="false" - value="33635" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VENDOR" - type="int" - transient="false" - volatile="false" - value="7936" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VERSION" - type="int" - transient="false" - volatile="false" - value="7938" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VERTEX_ARRAY" - type="int" - transient="false" - volatile="false" - value="32884" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_XOR" - type="int" - transient="false" - volatile="false" - value="5382" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ZERO" - type="int" - transient="false" - volatile="false" - value="0" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<class name="GLES10Ext" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="GLES10Ext" - type="android.opengl.GLES10Ext" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="glQueryMatrixxOES" - return="int" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mantissa" type="int[]"> -</parameter> -<parameter name="mantissaOffset" type="int"> -</parameter> -<parameter name="exponent" type="int[]"> -</parameter> -<parameter name="exponentOffset" type="int"> -</parameter> -</method> -<method name="glQueryMatrixxOES" - return="int" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mantissa" type="java.nio.IntBuffer"> -</parameter> -<parameter name="exponent" type="java.nio.IntBuffer"> -</parameter> -</method> -</class> -<class name="GLES11" - extends="android.opengl.GLES10" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="GLES11" - type="android.opengl.GLES11" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="glBindBuffer" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="buffer" type="int"> -</parameter> -</method> -<method name="glBufferData" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="size" type="int"> -</parameter> -<parameter name="data" type="java.nio.Buffer"> -</parameter> -<parameter name="usage" type="int"> -</parameter> -</method> -<method name="glBufferSubData" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -<parameter name="size" type="int"> -</parameter> -<parameter name="data" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glClipPlanef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glClipPlanef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glClipPlanex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glClipPlanex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glColor4ub" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="byte"> -</parameter> -<parameter name="green" type="byte"> -</parameter> -<parameter name="blue" type="byte"> -</parameter> -<parameter name="alpha" type="byte"> -</parameter> -</method> -<method name="glColorPointer" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDeleteBuffers" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="buffers" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDeleteBuffers" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="buffers" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glDrawElements" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -<parameter name="count" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGenBuffers" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="buffers" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGenBuffers" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="buffers" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetBooleanv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="boolean[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetBooleanv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetBufferParameteriv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetBufferParameteriv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetClipPlanef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetClipPlanef" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetClipPlanex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetClipPlanex" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetFixedv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetFixedv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetFloatv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetFloatv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetLightfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetLightfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetLightxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetLightxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetMaterialfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetMaterialfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetMaterialxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetMaterialxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexEnvfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexEnvfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetTexEnviv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexEnviv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexEnvxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexEnvxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexParameterfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexParameterfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetTexParameteriv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexParameteriv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexParameterxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexParameterxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glIsBuffer" - return="boolean" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="buffer" type="int"> -</parameter> -</method> -<method name="glIsEnabled" - return="boolean" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cap" type="int"> -</parameter> -</method> -<method name="glIsTexture" - return="boolean" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="texture" type="int"> -</parameter> -</method> -<method name="glNormalPointer" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glPointParameterf" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glPointParameterfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glPointParameterfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glPointParameterx" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glPointParameterxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glPointParameterxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glPointSizePointerOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="pointer" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glTexCoordPointer" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexEnvi" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexEnviv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexEnviv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glTexParameterfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexParameterfv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glTexParameteri" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexParameteriv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexParameteriv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glTexParameterxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexParameterxv" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glVertexPointer" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<field name="GL_ACTIVE_TEXTURE" - type="int" - transient="false" - volatile="false" - value="34016" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ADD_SIGNED" - type="int" - transient="false" - volatile="false" - value="34164" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALPHA_SCALE" - type="int" - transient="false" - volatile="false" - value="3356" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALPHA_TEST_FUNC" - type="int" - transient="false" - volatile="false" - value="3009" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ALPHA_TEST_REF" - type="int" - transient="false" - volatile="false" - value="3010" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ARRAY_BUFFER" - type="int" - transient="false" - volatile="false" - value="34962" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ARRAY_BUFFER_BINDING" - type="int" - transient="false" - volatile="false" - value="34964" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_DST" - type="int" - transient="false" - volatile="false" - value="3040" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_SRC" - type="int" - transient="false" - volatile="false" - value="3041" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BUFFER_ACCESS" - type="int" - transient="false" - volatile="false" - value="35003" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BUFFER_SIZE" - type="int" - transient="false" - volatile="false" - value="34660" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BUFFER_USAGE" - type="int" - transient="false" - volatile="false" - value="34661" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLIENT_ACTIVE_TEXTURE" - type="int" - transient="false" - volatile="false" - value="34017" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLIP_PLANE0" - type="int" - transient="false" - volatile="false" - value="12288" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLIP_PLANE1" - type="int" - transient="false" - volatile="false" - value="12289" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLIP_PLANE2" - type="int" - transient="false" - volatile="false" - value="12290" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLIP_PLANE3" - type="int" - transient="false" - volatile="false" - value="12291" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLIP_PLANE4" - type="int" - transient="false" - volatile="false" - value="12292" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CLIP_PLANE5" - type="int" - transient="false" - volatile="false" - value="12293" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_ARRAY_BUFFER_BINDING" - type="int" - transient="false" - volatile="false" - value="34968" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_ARRAY_POINTER" - type="int" - transient="false" - volatile="false" - value="32912" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_ARRAY_SIZE" - type="int" - transient="false" - volatile="false" - value="32897" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_ARRAY_STRIDE" - type="int" - transient="false" - volatile="false" - value="32899" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_ARRAY_TYPE" - type="int" - transient="false" - volatile="false" - value="32898" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_CLEAR_VALUE" - type="int" - transient="false" - volatile="false" - value="3106" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_WRITEMASK" - type="int" - transient="false" - volatile="false" - value="3107" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COMBINE" - type="int" - transient="false" - volatile="false" - value="34160" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COMBINE_ALPHA" - type="int" - transient="false" - volatile="false" - value="34162" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COMBINE_RGB" - type="int" - transient="false" - volatile="false" - value="34161" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CONSTANT" - type="int" - transient="false" - volatile="false" - value="34166" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COORD_REPLACE_OES" - type="int" - transient="false" - volatile="false" - value="34914" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CULL_FACE_MODE" - type="int" - transient="false" - volatile="false" - value="2885" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CURRENT_COLOR" - type="int" - transient="false" - volatile="false" - value="2816" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CURRENT_NORMAL" - type="int" - transient="false" - volatile="false" - value="2818" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CURRENT_TEXTURE_COORDS" - type="int" - transient="false" - volatile="false" - value="2819" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_CLEAR_VALUE" - type="int" - transient="false" - volatile="false" - value="2931" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_FUNC" - type="int" - transient="false" - volatile="false" - value="2932" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_RANGE" - type="int" - transient="false" - volatile="false" - value="2928" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_WRITEMASK" - type="int" - transient="false" - volatile="false" - value="2930" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DOT3_RGB" - type="int" - transient="false" - volatile="false" - value="34478" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DOT3_RGBA" - type="int" - transient="false" - volatile="false" - value="34479" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DYNAMIC_DRAW" - type="int" - transient="false" - volatile="false" - value="35048" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ELEMENT_ARRAY_BUFFER" - type="int" - transient="false" - volatile="false" - value="34963" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ELEMENT_ARRAY_BUFFER_BINDING" - type="int" - transient="false" - volatile="false" - value="34965" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRONT_FACE" - type="int" - transient="false" - volatile="false" - value="2886" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_GENERATE_MIPMAP" - type="int" - transient="false" - volatile="false" - value="33169" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_GENERATE_MIPMAP_HINT" - type="int" - transient="false" - volatile="false" - value="33170" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INTERPOLATE" - type="int" - transient="false" - volatile="false" - value="34165" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LINE_WIDTH" - type="int" - transient="false" - volatile="false" - value="2849" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_LOGIC_OP_MODE" - type="int" - transient="false" - volatile="false" - value="3056" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_MODE" - type="int" - transient="false" - volatile="false" - value="2976" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_CLIP_PLANES" - type="int" - transient="false" - volatile="false" - value="3378" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MODELVIEW_MATRIX" - type="int" - transient="false" - volatile="false" - value="2982" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES" - type="int" - transient="false" - volatile="false" - value="35213" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MODELVIEW_STACK_DEPTH" - type="int" - transient="false" - volatile="false" - value="2979" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NORMAL_ARRAY_BUFFER_BINDING" - type="int" - transient="false" - volatile="false" - value="34967" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NORMAL_ARRAY_POINTER" - type="int" - transient="false" - volatile="false" - value="32911" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NORMAL_ARRAY_STRIDE" - type="int" - transient="false" - volatile="false" - value="32895" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NORMAL_ARRAY_TYPE" - type="int" - transient="false" - volatile="false" - value="32894" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OPERAND0_ALPHA" - type="int" - transient="false" - volatile="false" - value="34200" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OPERAND0_RGB" - type="int" - transient="false" - volatile="false" - value="34192" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OPERAND1_ALPHA" - type="int" - transient="false" - volatile="false" - value="34201" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OPERAND1_RGB" - type="int" - transient="false" - volatile="false" - value="34193" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OPERAND2_ALPHA" - type="int" - transient="false" - volatile="false" - value="34202" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_OPERAND2_RGB" - type="int" - transient="false" - volatile="false" - value="34194" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_DISTANCE_ATTENUATION" - type="int" - transient="false" - volatile="false" - value="33065" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_FADE_THRESHOLD_SIZE" - type="int" - transient="false" - volatile="false" - value="33064" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE" - type="int" - transient="false" - volatile="false" - value="2833" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES" - type="int" - transient="false" - volatile="false" - value="35743" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE_ARRAY_OES" - type="int" - transient="false" - volatile="false" - value="35740" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE_ARRAY_POINTER_OES" - type="int" - transient="false" - volatile="false" - value="35212" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE_ARRAY_STRIDE_OES" - type="int" - transient="false" - volatile="false" - value="35211" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE_ARRAY_TYPE_OES" - type="int" - transient="false" - volatile="false" - value="35210" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE_MAX" - type="int" - transient="false" - volatile="false" - value="33063" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SIZE_MIN" - type="int" - transient="false" - volatile="false" - value="33062" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POINT_SPRITE_OES" - type="int" - transient="false" - volatile="false" - value="34913" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POLYGON_OFFSET_FACTOR" - type="int" - transient="false" - volatile="false" - value="32824" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_POLYGON_OFFSET_UNITS" - type="int" - transient="false" - volatile="false" - value="10752" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PREVIOUS" - type="int" - transient="false" - volatile="false" - value="34168" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PRIMARY_COLOR" - type="int" - transient="false" - volatile="false" - value="34167" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PROJECTION_MATRIX" - type="int" - transient="false" - volatile="false" - value="2983" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES" - type="int" - transient="false" - volatile="false" - value="35214" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PROJECTION_STACK_DEPTH" - type="int" - transient="false" - volatile="false" - value="2980" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGB_SCALE" - type="int" - transient="false" - volatile="false" - value="34163" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SAMPLES" - type="int" - transient="false" - volatile="false" - value="32937" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SAMPLE_BUFFERS" - type="int" - transient="false" - volatile="false" - value="32936" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SAMPLE_COVERAGE_INVERT" - type="int" - transient="false" - volatile="false" - value="32939" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SAMPLE_COVERAGE_VALUE" - type="int" - transient="false" - volatile="false" - value="32938" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SCISSOR_BOX" - type="int" - transient="false" - volatile="false" - value="3088" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SHADE_MODEL" - type="int" - transient="false" - volatile="false" - value="2900" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC0_ALPHA" - type="int" - transient="false" - volatile="false" - value="34184" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC0_RGB" - type="int" - transient="false" - volatile="false" - value="34176" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC1_ALPHA" - type="int" - transient="false" - volatile="false" - value="34185" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC1_RGB" - type="int" - transient="false" - volatile="false" - value="34177" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC2_ALPHA" - type="int" - transient="false" - volatile="false" - value="34186" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SRC2_RGB" - type="int" - transient="false" - volatile="false" - value="34178" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STATIC_DRAW" - type="int" - transient="false" - volatile="false" - value="35044" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_CLEAR_VALUE" - type="int" - transient="false" - volatile="false" - value="2961" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_FAIL" - type="int" - transient="false" - volatile="false" - value="2964" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_FUNC" - type="int" - transient="false" - volatile="false" - value="2962" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_PASS_DEPTH_FAIL" - type="int" - transient="false" - volatile="false" - value="2965" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_PASS_DEPTH_PASS" - type="int" - transient="false" - volatile="false" - value="2966" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_REF" - type="int" - transient="false" - volatile="false" - value="2967" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_VALUE_MASK" - type="int" - transient="false" - volatile="false" - value="2963" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_WRITEMASK" - type="int" - transient="false" - volatile="false" - value="2968" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_SUBTRACT" - type="int" - transient="false" - volatile="false" - value="34023" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_BINDING_2D" - type="int" - transient="false" - volatile="false" - value="32873" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING" - type="int" - transient="false" - volatile="false" - value="34970" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_COORD_ARRAY_POINTER" - type="int" - transient="false" - volatile="false" - value="32914" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_COORD_ARRAY_SIZE" - type="int" - transient="false" - volatile="false" - value="32904" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_COORD_ARRAY_STRIDE" - type="int" - transient="false" - volatile="false" - value="32906" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_COORD_ARRAY_TYPE" - type="int" - transient="false" - volatile="false" - value="32905" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_MATRIX" - type="int" - transient="false" - volatile="false" - value="2984" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES" - type="int" - transient="false" - volatile="false" - value="35215" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_STACK_DEPTH" - type="int" - transient="false" - volatile="false" - value="2981" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VERTEX_ARRAY_BUFFER_BINDING" - type="int" - transient="false" - volatile="false" - value="34966" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VERTEX_ARRAY_POINTER" - type="int" - transient="false" - volatile="false" - value="32910" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VERTEX_ARRAY_SIZE" - type="int" - transient="false" - volatile="false" - value="32890" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VERTEX_ARRAY_STRIDE" - type="int" - transient="false" - volatile="false" - value="32892" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VERTEX_ARRAY_TYPE" - type="int" - transient="false" - volatile="false" - value="32891" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_VIEWPORT" - type="int" - transient="false" - volatile="false" - value="2978" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WRITE_ONLY" - type="int" - transient="false" - volatile="false" - value="35001" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> -<class name="GLES11Ext" - extends="java.lang.Object" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="GLES11Ext" - type="android.opengl.GLES11Ext" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</constructor> -<method name="glAlphaFuncxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="func" type="int"> -</parameter> -<parameter name="ref" type="int"> -</parameter> -</method> -<method name="glBindFramebufferOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="framebuffer" type="int"> -</parameter> -</method> -<method name="glBindRenderbufferOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="renderbuffer" type="int"> -</parameter> -</method> -<method name="glBlendEquationOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="mode" type="int"> -</parameter> -</method> -<method name="glBlendEquationSeparateOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="modeRGB" type="int"> -</parameter> -<parameter name="modeAlpha" type="int"> -</parameter> -</method> -<method name="glBlendFuncSeparateOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="srcRGB" type="int"> -</parameter> -<parameter name="dstRGB" type="int"> -</parameter> -<parameter name="srcAlpha" type="int"> -</parameter> -<parameter name="dstAlpha" type="int"> -</parameter> -</method> -<method name="glCheckFramebufferStatusOES" - return="int" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -</method> -<method name="glClearColorxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="int"> -</parameter> -<parameter name="green" type="int"> -</parameter> -<parameter name="blue" type="int"> -</parameter> -<parameter name="alpha" type="int"> -</parameter> -</method> -<method name="glClearDepthfOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="depth" type="float"> -</parameter> -</method> -<method name="glClearDepthxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="depth" type="int"> -</parameter> -</method> -<method name="glClipPlanefOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glClipPlanefOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glClipPlanexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glClipPlanexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="plane" type="int"> -</parameter> -<parameter name="equation" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glColor4xOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="red" type="int"> -</parameter> -<parameter name="green" type="int"> -</parameter> -<parameter name="blue" type="int"> -</parameter> -<parameter name="alpha" type="int"> -</parameter> -</method> -<method name="glCurrentPaletteMatrixOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="matrixpaletteindex" type="int"> -</parameter> -</method> -<method name="glDeleteFramebuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="framebuffers" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDeleteFramebuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="framebuffers" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glDeleteRenderbuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="renderbuffers" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDeleteRenderbuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="renderbuffers" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glDepthRangefOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="zNear" type="float"> -</parameter> -<parameter name="zFar" type="float"> -</parameter> -</method> -<method name="glDepthRangexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="zNear" type="int"> -</parameter> -<parameter name="zFar" type="int"> -</parameter> -</method> -<method name="glDrawTexfOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="float"> -</parameter> -<parameter name="y" type="float"> -</parameter> -<parameter name="z" type="float"> -</parameter> -<parameter name="width" type="float"> -</parameter> -<parameter name="height" type="float"> -</parameter> -</method> -<method name="glDrawTexfvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDrawTexfvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glDrawTexiOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -</method> -<method name="glDrawTexivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDrawTexivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glDrawTexsOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="short"> -</parameter> -<parameter name="y" type="short"> -</parameter> -<parameter name="z" type="short"> -</parameter> -<parameter name="width" type="short"> -</parameter> -<parameter name="height" type="short"> -</parameter> -</method> -<method name="glDrawTexsvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="short[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDrawTexsvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="java.nio.ShortBuffer"> -</parameter> -</method> -<method name="glDrawTexxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -</method> -<method name="glDrawTexxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glDrawTexxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coords" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glEGLImageTargetRenderbufferStorageOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="image" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glEGLImageTargetTexture2DOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="image" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glFogxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glFogxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glFogxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glFramebufferRenderbufferOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="attachment" type="int"> -</parameter> -<parameter name="renderbuffertarget" type="int"> -</parameter> -<parameter name="renderbuffer" type="int"> -</parameter> -</method> -<method name="glFramebufferTexture2DOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="attachment" type="int"> -</parameter> -<parameter name="textarget" type="int"> -</parameter> -<parameter name="texture" type="int"> -</parameter> -<parameter name="level" type="int"> -</parameter> -</method> -<method name="glFrustumfOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="float"> -</parameter> -<parameter name="right" type="float"> -</parameter> -<parameter name="bottom" type="float"> -</parameter> -<parameter name="top" type="float"> -</parameter> -<parameter name="zNear" type="float"> -</parameter> -<parameter name="zFar" type="float"> -</parameter> -</method> -<method name="glFrustumxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="int"> -</parameter> -<parameter name="right" type="int"> -</parameter> -<parameter name="bottom" type="int"> -</parameter> -<parameter name="top" type="int"> -</parameter> -<parameter name="zNear" type="int"> -</parameter> -<parameter name="zFar" type="int"> -</parameter> -</method> -<method name="glGenFramebuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="framebuffers" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGenFramebuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="framebuffers" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGenRenderbuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="renderbuffers" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGenRenderbuffersOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="n" type="int"> -</parameter> -<parameter name="renderbuffers" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGenerateMipmapOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -</method> -<method name="glGetClipPlanefOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetClipPlanefOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetClipPlanexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetClipPlanexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="eqn" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetFixedvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetFixedvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetFramebufferAttachmentParameterivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="attachment" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetFramebufferAttachmentParameterivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="attachment" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetLightxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetLightxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetMaterialxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetMaterialxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetRenderbufferParameterivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetRenderbufferParameterivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexEnvxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexEnvxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="env" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexGenfvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexGenfvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glGetTexGenivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexGenivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexGenxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexGenxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glGetTexParameterxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glGetTexParameterxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glIsFramebufferOES" - return="boolean" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="framebuffer" type="int"> -</parameter> -</method> -<method name="glIsRenderbufferOES" - return="boolean" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="renderbuffer" type="int"> -</parameter> -</method> -<method name="glLightModelxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glLightModelxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLightModelxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glLightxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glLightxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLightxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="light" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glLineWidthxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="width" type="int"> -</parameter> -</method> -<method name="glLoadMatrixxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glLoadMatrixxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glLoadPaletteFromModelViewMatrixOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="glMaterialxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glMaterialxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glMaterialxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="face" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glMatrixIndexPointerOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="pointer" type="java.nio.Buffer"> -</parameter> -</method> -<method name="glMultMatrixxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glMultMatrixxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="m" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glMultiTexCoord4xOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="s" type="int"> -</parameter> -<parameter name="t" type="int"> -</parameter> -<parameter name="r" type="int"> -</parameter> -<parameter name="q" type="int"> -</parameter> -</method> -<method name="glNormal3xOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="nx" type="int"> -</parameter> -<parameter name="ny" type="int"> -</parameter> -<parameter name="nz" type="int"> -</parameter> -</method> -<method name="glOrthofOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="float"> -</parameter> -<parameter name="right" type="float"> -</parameter> -<parameter name="bottom" type="float"> -</parameter> -<parameter name="top" type="float"> -</parameter> -<parameter name="zNear" type="float"> -</parameter> -<parameter name="zFar" type="float"> -</parameter> -</method> -<method name="glOrthoxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="left" type="int"> -</parameter> -<parameter name="right" type="int"> -</parameter> -<parameter name="bottom" type="int"> -</parameter> -<parameter name="top" type="int"> -</parameter> -<parameter name="zNear" type="int"> -</parameter> -<parameter name="zFar" type="int"> -</parameter> -</method> -<method name="glPointParameterxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glPointParameterxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glPointParameterxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glPointSizexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -</method> -<method name="glPolygonOffsetxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="factor" type="int"> -</parameter> -<parameter name="units" type="int"> -</parameter> -</method> -<method name="glRenderbufferStorageOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="internalformat" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -</method> -<method name="glRotatexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="angle" type="int"> -</parameter> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -</method> -<method name="glSampleCoveragexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="value" type="int"> -</parameter> -<parameter name="invert" type="boolean"> -</parameter> -</method> -<method name="glScalexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -</method> -<method name="glTexEnvxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexEnvxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexEnvxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glTexGenfOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="float"> -</parameter> -</method> -<method name="glTexGenfvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="float[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexGenfvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.FloatBuffer"> -</parameter> -</method> -<method name="glTexGeniOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexGenivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexGenivOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glTexGenxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexGenxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexGenxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="coord" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glTexParameterxOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="param" type="int"> -</parameter> -</method> -<method name="glTexParameterxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="int[]"> -</parameter> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="glTexParameterxvOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="target" type="int"> -</parameter> -<parameter name="pname" type="int"> -</parameter> -<parameter name="params" type="java.nio.IntBuffer"> -</parameter> -</method> -<method name="glTranslatexOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="z" type="int"> -</parameter> -</method> -<method name="glWeightPointerOES" - return="void" - abstract="false" - native="true" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="size" type="int"> -</parameter> -<parameter name="type" type="int"> -</parameter> -<parameter name="stride" type="int"> -</parameter> -<parameter name="pointer" type="java.nio.Buffer"> -</parameter> -</method> -<field name="GL_3DC_XY_AMD" - type="int" - transient="false" - volatile="false" - value="34810" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_3DC_X_AMD" - type="int" - transient="false" - volatile="false" - value="34809" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD" - type="int" - transient="false" - volatile="false" - value="35987" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD" - type="int" - transient="false" - volatile="false" - value="34798" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ATC_RGB_AMD" - type="int" - transient="false" - volatile="false" - value="35986" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BGRA" - type="int" - transient="false" - volatile="false" - value="32993" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_DST_ALPHA_OES" - type="int" - transient="false" - volatile="false" - value="32970" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_DST_RGB_OES" - type="int" - transient="false" - volatile="false" - value="32968" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_EQUATION_ALPHA_OES" - type="int" - transient="false" - volatile="false" - value="34877" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_EQUATION_OES" - type="int" - transient="false" - volatile="false" - value="32777" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_EQUATION_RGB_OES" - type="int" - transient="false" - volatile="false" - value="32777" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_SRC_ALPHA_OES" - type="int" - transient="false" - volatile="false" - value="32971" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BLEND_SRC_RGB_OES" - type="int" - transient="false" - volatile="false" - value="32969" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BUFFER_ACCESS_OES" - type="int" - transient="false" - volatile="false" - value="35003" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BUFFER_MAPPED_OES" - type="int" - transient="false" - volatile="false" - value="35004" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_BUFFER_MAP_POINTER_OES" - type="int" - transient="false" - volatile="false" - value="35005" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_COLOR_ATTACHMENT0_OES" - type="int" - transient="false" - volatile="false" - value="36064" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_CURRENT_PALETTE_MATRIX_OES" - type="int" - transient="false" - volatile="false" - value="34883" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DECR_WRAP_OES" - type="int" - transient="false" - volatile="false" - value="34056" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH24_STENCIL8_OES" - type="int" - transient="false" - volatile="false" - value="35056" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_ATTACHMENT_OES" - type="int" - transient="false" - volatile="false" - value="36096" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_COMPONENT16_OES" - type="int" - transient="false" - volatile="false" - value="33189" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_COMPONENT24_OES" - type="int" - transient="false" - volatile="false" - value="33190" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_COMPONENT32_OES" - type="int" - transient="false" - volatile="false" - value="33191" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_DEPTH_STENCIL_OES" - type="int" - transient="false" - volatile="false" - value="34041" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_ETC1_RGB8_OES" - type="int" - transient="false" - volatile="false" - value="36196" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FIXED_OES" - type="int" - transient="false" - volatile="false" - value="5132" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES" - type="int" - transient="false" - volatile="false" - value="36049" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES" - type="int" - transient="false" - volatile="false" - value="36048" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES" - type="int" - transient="false" - volatile="false" - value="36051" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES" - type="int" - transient="false" - volatile="false" - value="36050" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_BINDING_OES" - type="int" - transient="false" - volatile="false" - value="36006" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_COMPLETE_OES" - type="int" - transient="false" - volatile="false" - value="36053" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES" - type="int" - transient="false" - volatile="false" - value="36054" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES" - type="int" - transient="false" - volatile="false" - value="36057" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES" - type="int" - transient="false" - volatile="false" - value="36058" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES" - type="int" - transient="false" - volatile="false" - value="36055" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_OES" - type="int" - transient="false" - volatile="false" - value="36160" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FRAMEBUFFER_UNSUPPORTED_OES" - type="int" - transient="false" - volatile="false" - value="36061" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FUNC_ADD_OES" - type="int" - transient="false" - volatile="false" - value="32774" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FUNC_REVERSE_SUBTRACT_OES" - type="int" - transient="false" - volatile="false" - value="32779" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_FUNC_SUBTRACT_OES" - type="int" - transient="false" - volatile="false" - value="32778" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INCR_WRAP_OES" - type="int" - transient="false" - volatile="false" - value="34055" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_INVALID_FRAMEBUFFER_OPERATION_OES" - type="int" - transient="false" - volatile="false" - value="1286" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES" - type="int" - transient="false" - volatile="false" - value="35742" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_INDEX_ARRAY_OES" - type="int" - transient="false" - volatile="false" - value="34884" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_INDEX_ARRAY_POINTER_OES" - type="int" - transient="false" - volatile="false" - value="34889" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_INDEX_ARRAY_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="34886" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_INDEX_ARRAY_STRIDE_OES" - type="int" - transient="false" - volatile="false" - value="34888" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_INDEX_ARRAY_TYPE_OES" - type="int" - transient="false" - volatile="false" - value="34887" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MATRIX_PALETTE_OES" - type="int" - transient="false" - volatile="false" - value="34880" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="34076" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_PALETTE_MATRICES_OES" - type="int" - transient="false" - volatile="false" - value="34882" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_RENDERBUFFER_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="34024" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT" - type="int" - transient="false" - volatile="false" - value="34047" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MAX_VERTEX_UNITS_OES" - type="int" - transient="false" - volatile="false" - value="34468" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MIRRORED_REPEAT_OES" - type="int" - transient="false" - volatile="false" - value="33648" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES" - type="int" - transient="false" - volatile="false" - value="35213" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NONE_OES" - type="int" - transient="false" - volatile="false" - value="0" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_NORMAL_MAP_OES" - type="int" - transient="false" - volatile="false" - value="34065" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES" - type="int" - transient="false" - volatile="false" - value="35214" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_REFLECTION_MAP_OES" - type="int" - transient="false" - volatile="false" - value="34066" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_ALPHA_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="36179" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_BINDING_OES" - type="int" - transient="false" - volatile="false" - value="36007" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_BLUE_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="36178" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_DEPTH_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="36180" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_GREEN_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="36177" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_HEIGHT_OES" - type="int" - transient="false" - volatile="false" - value="36163" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES" - type="int" - transient="false" - volatile="false" - value="36164" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_OES" - type="int" - transient="false" - volatile="false" - value="36161" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_RED_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="36176" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_STENCIL_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="36181" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RENDERBUFFER_WIDTH_OES" - type="int" - transient="false" - volatile="false" - value="36162" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGB565_OES" - type="int" - transient="false" - volatile="false" - value="36194" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGB5_A1_OES" - type="int" - transient="false" - volatile="false" - value="32855" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGB8_OES" - type="int" - transient="false" - volatile="false" - value="32849" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGBA4_OES" - type="int" - transient="false" - volatile="false" - value="32854" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_RGBA8_OES" - type="int" - transient="false" - volatile="false" - value="32856" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_ATTACHMENT_OES" - type="int" - transient="false" - volatile="false" - value="36128" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_INDEX1_OES" - type="int" - transient="false" - volatile="false" - value="36166" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_INDEX4_OES" - type="int" - transient="false" - volatile="false" - value="36167" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_STENCIL_INDEX8_OES" - type="int" - transient="false" - volatile="false" - value="36168" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_BINDING_CUBE_MAP_OES" - type="int" - transient="false" - volatile="false" - value="34068" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CROP_RECT_OES" - type="int" - transient="false" - volatile="false" - value="35741" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" - type="int" - transient="false" - volatile="false" - value="34070" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" - type="int" - transient="false" - volatile="false" - value="34072" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" - type="int" - transient="false" - volatile="false" - value="34074" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CUBE_MAP_OES" - type="int" - transient="false" - volatile="false" - value="34067" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" - type="int" - transient="false" - volatile="false" - value="34069" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" - type="int" - transient="false" - volatile="false" - value="34071" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" - type="int" - transient="false" - volatile="false" - value="34073" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_GEN_MODE_OES" - type="int" - transient="false" - volatile="false" - value="9472" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_GEN_STR_OES" - type="int" - transient="false" - volatile="false" - value="36192" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES" - type="int" - transient="false" - volatile="false" - value="35215" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_TEXTURE_MAX_ANISOTROPY_EXT" - type="int" - transient="false" - volatile="false" - value="34046" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_UNSIGNED_INT_24_8_OES" - type="int" - transient="false" - volatile="false" - value="34042" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WEIGHT_ARRAY_BUFFER_BINDING_OES" - type="int" - transient="false" - volatile="false" - value="34974" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WEIGHT_ARRAY_OES" - type="int" - transient="false" - volatile="false" - value="34477" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WEIGHT_ARRAY_POINTER_OES" - type="int" - transient="false" - volatile="false" - value="34476" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WEIGHT_ARRAY_SIZE_OES" - type="int" - transient="false" - volatile="false" - value="34475" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WEIGHT_ARRAY_STRIDE_OES" - type="int" - transient="false" - volatile="false" - value="34474" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WEIGHT_ARRAY_TYPE_OES" - type="int" - transient="false" - volatile="false" - value="34473" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="GL_WRITE_ONLY_OES" - type="int" - transient="false" - volatile="false" - value="35001" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -</class> <class name="GLException" extends="java.lang.RuntimeException" abstract="false" @@ -86196,7 +73391,7 @@ visibility="public" > </field> -<field name="RENDERMODE_CONTINUOUSLY" +<field name="RENDERMODE_CONTUOUSLY" type="int" transient="false" volatile="false" @@ -91273,17 +78468,6 @@ visibility="public" > </method> -<method name="getThread" - return="java.lang.Thread" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="loop" return="void" abstract="false" @@ -101427,17 +88611,6 @@ visibility="public" > </field> -<field name="NUMBER_OF_SONGS_FOR_ARTIST" - type="java.lang.String" - transient="false" - volatile="false" - value=""numsongs_by_artist"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> </interface> <class name="MediaStore.Audio.Albums" extends="java.lang.Object" @@ -104120,17 +91293,6 @@ visibility="public" > </field> -<field name="BACKGROUND_DATA" - type="java.lang.String" - transient="false" - volatile="false" - value=""background_data"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="BLUETOOTH_ON" type="java.lang.String" transient="false" @@ -104328,28 +91490,6 @@ visibility="public" > </field> -<field name="WIFI_MAX_DHCP_RETRY_COUNT" - type="java.lang.String" - transient="false" - volatile="false" - value=""wifi_max_dhcp_retry_count"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS" - type="java.lang.String" - transient="false" - volatile="false" - value=""wifi_mobile_data_transition_wakelock_timeout_ms"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON" type="java.lang.String" transient="false" @@ -104515,17 +91655,6 @@ visibility="public" > </field> -<field name="WIFI_WATCHDOG_WATCH_LIST" - type="java.lang.String" - transient="false" - volatile="false" - value=""wifi_watchdog_watch_list"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> </class> <class name="Settings.SettingNotFoundException" extends="android.util.AndroidException" @@ -104862,17 +91991,6 @@ visibility="public" > </field> -<field name="ALARM_ALERT" - type="java.lang.String" - transient="false" - volatile="false" - value=""alarm_alert"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="ALWAYS_FINISH_ACTIVITIES" type="java.lang.String" transient="false" @@ -104993,16 +92111,6 @@ visibility="public" > </field> -<field name="DEFAULT_ALARM_ALERT_URI" - type="android.net.Uri" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="DEFAULT_NOTIFICATION_URI" type="android.net.Uri" transient="false" @@ -105672,50 +92780,6 @@ visibility="public" > </field> -<field name="WIFI_SLEEP_POLICY" - type="java.lang.String" - transient="false" - volatile="false" - value=""wifi_sleep_policy"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="WIFI_SLEEP_POLICY_DEFAULT" - type="int" - transient="false" - volatile="false" - value="0" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="WIFI_SLEEP_POLICY_NEVER" - type="int" - transient="false" - volatile="false" - value="2" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED" - type="int" - transient="false" - volatile="false" - value="1" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="WIFI_STATIC_DNS1" type="java.lang.String" transient="false" @@ -108079,17 +95143,6 @@ <parameter name="events" type="int"> </parameter> </method> -<field name="ACTION_PHONE_STATE_CHANGED" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.intent.action.PHONE_STATE"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="CALL_STATE_IDLE" type="int" transient="false" @@ -108211,58 +95264,6 @@ visibility="public" > </field> -<field name="EXTRA_INCOMING_NUMBER" - type="java.lang.String" - transient="false" - volatile="false" - value=""incoming_number"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="EXTRA_STATE" - type="java.lang.String" - transient="false" - volatile="false" - value=""state"" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="EXTRA_STATE_IDLE" - type="java.lang.String" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="EXTRA_STATE_OFFHOOK" - type="java.lang.String" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="EXTRA_STATE_RINGING" - type="java.lang.String" - transient="false" - volatile="false" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="NETWORK_TYPE_EDGE" type="int" transient="false" @@ -111083,89 +98084,6 @@ </exception> </method> </class> -<class name="ProviderTestCase2" - extends="android.test.AndroidTestCase" - abstract="true" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<constructor name="ProviderTestCase2" - type="android.test.ProviderTestCase2" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="providerClass" type="java.lang.Class<T>"> -</parameter> -<parameter name="providerAuthority" type="java.lang.String"> -</parameter> -</constructor> -<method name="getMockContentResolver" - return="android.test.mock.MockContentResolver" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getMockContext" - return="android.test.IsolatedContext" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getProvider" - return="T" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="newResolverWithContentProviderFromSql" - return="android.content.ContentResolver" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="targetContext" type="android.content.Context"> -</parameter> -<parameter name="filenamePrefix" type="java.lang.String"> -</parameter> -<parameter name="providerClass" type="java.lang.Class<T>"> -</parameter> -<parameter name="authority" type="java.lang.String"> -</parameter> -<parameter name="databaseName" type="java.lang.String"> -</parameter> -<parameter name="databaseVersion" type="int"> -</parameter> -<parameter name="sql" type="java.lang.String"> -</parameter> -<exception name="IllegalAccessException" type="java.lang.IllegalAccessException"> -</exception> -<exception name="InstantiationException" type="java.lang.InstantiationException"> -</exception> -</method> -</class> <class name="RenamingDelegatingContext" extends="android.content.ContextWrapper" abstract="false" @@ -132960,6 +119878,17 @@ visibility="public" > </field> +<field name="KEYCODE_FORWARD" + type="int" + transient="false" + volatile="false" + value="90" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="KEYCODE_G" type="int" transient="false" @@ -133081,220 +120010,198 @@ visibility="public" > </field> -<field name="KEYCODE_MEDIA_FAST_FORWARD" - type="int" - transient="false" - volatile="false" - value="90" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="KEYCODE_MEDIA_NEXT" - type="int" - transient="false" - volatile="false" - value="87" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> -<field name="KEYCODE_MEDIA_PLAY_PAUSE" +<field name="KEYCODE_MENU" type="int" transient="false" volatile="false" - value="85" + value="82" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_MEDIA_PREVIOUS" +<field name="KEYCODE_MINUS" type="int" transient="false" volatile="false" - value="88" + value="69" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_MEDIA_REWIND" +<field name="KEYCODE_MUTE" type="int" transient="false" volatile="false" - value="89" + value="91" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_MEDIA_STOP" +<field name="KEYCODE_N" type="int" transient="false" volatile="false" - value="86" + value="42" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_MENU" +<field name="KEYCODE_NEXTSONG" type="int" transient="false" volatile="false" - value="82" + value="87" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_MINUS" +<field name="KEYCODE_NOTIFICATION" type="int" transient="false" volatile="false" - value="69" + value="83" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_MUTE" +<field name="KEYCODE_NUM" type="int" transient="false" volatile="false" - value="91" + value="78" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_N" +<field name="KEYCODE_O" type="int" transient="false" volatile="false" - value="42" + value="43" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_NOTIFICATION" +<field name="KEYCODE_P" type="int" transient="false" volatile="false" - value="83" + value="44" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_NUM" +<field name="KEYCODE_PERIOD" type="int" transient="false" volatile="false" - value="78" + value="56" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_O" +<field name="KEYCODE_PLAYPAUSE" type="int" transient="false" volatile="false" - value="43" + value="85" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_P" +<field name="KEYCODE_PLUS" type="int" transient="false" volatile="false" - value="44" + value="81" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_PERIOD" +<field name="KEYCODE_POUND" type="int" transient="false" volatile="false" - value="56" + value="18" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_PLUS" +<field name="KEYCODE_POWER" type="int" transient="false" volatile="false" - value="81" + value="26" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_POUND" +<field name="KEYCODE_PREVIOUSSONG" type="int" transient="false" volatile="false" - value="18" + value="88" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_POWER" +<field name="KEYCODE_Q" type="int" transient="false" volatile="false" - value="26" + value="45" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_Q" +<field name="KEYCODE_R" type="int" transient="false" volatile="false" - value="45" + value="46" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="KEYCODE_R" +<field name="KEYCODE_REWIND" type="int" transient="false" volatile="false" - value="46" + value="89" static="true" final="true" deprecated="not deprecated" @@ -133422,6 +120329,17 @@ visibility="public" > </field> +<field name="KEYCODE_STOP" + type="int" + transient="false" + volatile="false" + value="86" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="KEYCODE_SYM" type="int" transient="false" @@ -140949,17 +127867,6 @@ <parameter name="context" type="android.content.Context"> </parameter> </method> -<method name="getDoubleTapTimeout" - return="int" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="getEdgeSlop" return="int" abstract="false" @@ -141048,17 +127955,6 @@ visibility="public" > </method> -<method name="getScaledDoubleTapSlop" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="getScaledEdgeSlop" return="int" abstract="false" @@ -141219,21 +128115,6 @@ visibility="public" > </constructor> -<method name="dumpCapturedView" - return="void" - abstract="false" - native="false" - synchronized="false" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="tag" type="java.lang.String"> -</parameter> -<parameter name="view" type="java.lang.Object"> -</parameter> -</method> <method name="startHierarchyTracing" return="void" abstract="false" @@ -141341,17 +128222,6 @@ > </field> </class> -<class name="ViewDebug.CapturedViewProperty" - extends="java.lang.Object" - abstract="true" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="java.lang.annotation.Annotation"> -</implements> -</class> <class name="ViewDebug.ExportedProperty" extends="java.lang.Object" abstract="true" @@ -143545,19 +130415,6 @@ <parameter name="listener" type="android.view.ViewTreeObserver.OnPreDrawListener"> </parameter> </method> -<method name="addOnScrollChangedListener" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="listener" type="android.view.ViewTreeObserver.OnScrollChangedListener"> -</parameter> -</method> <method name="addOnTouchModeChangeListener" return="void" abstract="false" @@ -143643,19 +130500,6 @@ <parameter name="victim" type="android.view.ViewTreeObserver.OnPreDrawListener"> </parameter> </method> -<method name="removeOnScrollChangedListener" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="victim" type="android.view.ViewTreeObserver.OnScrollChangedListener"> -</parameter> -</method> <method name="removeOnTouchModeChangeListener" return="void" abstract="false" @@ -143731,25 +130575,6 @@ > </method> </interface> -<interface name="ViewTreeObserver.OnScrollChangedListener" - abstract="true" - static="true" - final="false" - deprecated="not deprecated" - visibility="public" -> -<method name="onScrollChanged" - return="void" - abstract="true" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -</interface> <interface name="ViewTreeObserver.OnTouchModeChangeListener" abstract="true" static="true" @@ -153665,17 +140490,6 @@ visibility="public" > </method> -<method name="getOriginalUrl" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="getTitle" return="java.lang.String" abstract="false" @@ -154119,7 +140933,7 @@ synchronized="true" static="false" final="false" - deprecated="deprecated" + deprecated="not deprecated" visibility="public" > </method> @@ -154553,7 +141367,7 @@ synchronized="true" static="false" final="false" - deprecated="deprecated" + deprecated="not deprecated" visibility="public" > <parameter name="use" type="boolean"> @@ -155253,17 +142067,6 @@ <parameter name="realm" type="java.lang.String"> </parameter> </method> -<method name="getOriginalUrl" - return="java.lang.String" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="getPluginList" return="android.webkit.PluginList" abstract="false" @@ -155760,19 +142563,6 @@ <parameter name="setMap" type="boolean"> </parameter> </method> -<method name="setNetworkAvailable" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="networkUp" type="boolean"> -</parameter> -</method> <method name="setPictureListener" return="void" abstract="false" @@ -156586,17 +143376,6 @@ visibility="public" > </method> -<method name="getTextFilter" - return="java.lang.CharSequence" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="getTranscriptMode" return="int" abstract="false" @@ -158305,126 +145084,6 @@ </parameter> </method> </interface> -<class name="AlphabetIndexer" - extends="android.database.DataSetObserver" - abstract="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.widget.SectionIndexer"> -</implements> -<constructor name="AlphabetIndexer" - type="android.widget.AlphabetIndexer" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cursor" type="android.database.Cursor"> -</parameter> -<parameter name="sortedColumnIndex" type="int"> -</parameter> -<parameter name="alphabet" type="java.lang.CharSequence"> -</parameter> -</constructor> -<method name="compare" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -<parameter name="word" type="java.lang.String"> -</parameter> -<parameter name="letter" type="java.lang.String"> -</parameter> -</method> -<method name="getPositionForSection" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="sectionIndex" type="int"> -</parameter> -</method> -<method name="getSectionForPosition" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="position" type="int"> -</parameter> -</method> -<method name="getSections" - return="java.lang.Object[]" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="setCursor" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="cursor" type="android.database.Cursor"> -</parameter> -</method> -<field name="mAlphabet" - type="java.lang.CharSequence" - transient="false" - volatile="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -</field> -<field name="mColumnIndex" - type="int" - transient="false" - volatile="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -</field> -<field name="mDataCursor" - type="android.database.Cursor" - transient="false" - volatile="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -</field> -</class> <class name="AnalogClock" extends="android.view.View" abstract="false" @@ -158878,39 +145537,6 @@ visibility="public" > </method> -<method name="getDropDownBackground" - return="android.graphics.drawable.Drawable" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getDropDownHorizontalOffset" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getDropDownVerticalOffset" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="getDropDownWidth" return="int" abstract="false" @@ -159134,58 +145760,6 @@ <parameter name="id" type="int"> </parameter> </method> -<method name="setDropDownBackgroundDrawable" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="d" type="android.graphics.drawable.Drawable"> -</parameter> -</method> -<method name="setDropDownBackgroundResource" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="id" type="int"> -</parameter> -</method> -<method name="setDropDownHorizontalOffset" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="offset" type="int"> -</parameter> -</method> -<method name="setDropDownVerticalOffset" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="offset" type="int"> -</parameter> -</method> <method name="setDropDownWidth" return="void" abstract="false" @@ -159966,6 +146540,19 @@ <parameter name="listener" type="android.widget.Chronometer.OnChronometerTickListener"> </parameter> </method> +<method name="setStarted" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="started" type="boolean"> +</parameter> +</method> <method name="start" return="void" abstract="false" @@ -160371,17 +146958,6 @@ <parameter name="parent" type="android.view.ViewGroup"> </parameter> </method> -<method name="onContentChanged" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="protected" -> -</method> <method name="runQueryOnBackgroundThread" return="android.database.Cursor" abstract="false" @@ -165766,27 +152342,6 @@ deprecated="not deprecated" visibility="public" > -<parameter name="x" type="int"> -</parameter> -<parameter name="y" type="int"> -</parameter> -<parameter name="width" type="int"> -</parameter> -<parameter name="height" type="int"> -</parameter> -<parameter name="force" type="boolean"> -</parameter> -</method> -<method name="update" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> <parameter name="anchor" type="android.view.View"> </parameter> <parameter name="width" type="int"> @@ -167515,22 +154070,6 @@ <parameter name="c" type="android.database.Cursor"> </parameter> </constructor> -<constructor name="ResourceCursorAdapter" - type="android.widget.ResourceCursorAdapter" - static="false" - final="false" - deprecated="not deprecated" - visibility="public" -> -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="layout" type="int"> -</parameter> -<parameter name="c" type="android.database.Cursor"> -</parameter> -<parameter name="autoRequery" type="boolean"> -</parameter> -</constructor> <method name="newView" return="android.view.View" abstract="false" @@ -168048,28 +154587,6 @@ visibility="public" > </method> -<method name="getStartX" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -</method> -<method name="getStartY" - return="int" - abstract="false" - native="false" - synchronized="false" - static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -</method> <method name="isFinished" return="boolean" abstract="false" diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp index cb8ab58..96ee502 100644 --- a/camera/libcameraservice/CameraService.cpp +++ b/camera/libcameraservice/CameraService.cpp @@ -217,7 +217,13 @@ status_t CameraService::Client::unlock() // allow anyone to use camera LOGV("unlock (%p)", getCameraClient()->asBinder().get()); status_t result = checkPid(); - if (result == NO_ERROR) mClientPid = 0; + if (result == NO_ERROR) { + mClientPid = 0; + + // we need to remove the reference so that when app goes + // away, the reference count goes to 0. + mCameraClient.clear(); + } return result; } @@ -894,8 +900,6 @@ status_t CameraService::Client::setParameters(const String8& params) // get preview/capture parameters - key/value pairs String8 CameraService::Client::getParameters() const { - LOGD("getParameters"); - Mutex::Autolock lock(mLock); if (mHardware == 0) { @@ -903,7 +907,9 @@ String8 CameraService::Client::getParameters() const return String8(); } - return mHardware->getParameters().flatten(); + String8 params(mHardware->getParameters().flatten()); + LOGD("getParameters(%s)", params.string()); + return params; } void CameraService::Client::postAutoFocus(bool focused) diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 849a37d..9b1f0f9 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -611,7 +611,7 @@ public class Activity extends ContextThemeWrapper private IBinder mToken; /*package*/ String mEmbeddedID; private Application mApplication; - private Intent mIntent; + /*package*/ Intent mIntent; private ComponentName mComponent; /*package*/ ActivityInfo mActivityInfo; /*package*/ ActivityThread mMainThread; diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index d816193..09862d2 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -1689,7 +1689,7 @@ public final class ActivityThread { r.packageInfo = getPackageInfoNoCheck( r.activityInfo.applicationInfo); - handleLaunchActivity(r); + handleLaunchActivity(r, null); } break; case RELAUNCH_ACTIVITY: { ActivityRecord r = (ActivityRecord)msg.obj; @@ -2109,7 +2109,7 @@ public final class ActivityThread { + ", comp=" + name + ", token=" + token); } - return performLaunchActivity(r); + return performLaunchActivity(r, null); } public final Activity getActivity(IBinder token) { @@ -2159,7 +2159,7 @@ public final class ActivityThread { queueOrSendMessage(H.CLEAN_UP_CONTEXT, cci); } - private final Activity performLaunchActivity(ActivityRecord r) { + private final Activity performLaunchActivity(ActivityRecord r, Intent customIntent) { // System.out.println("##### [" + System.currentTimeMillis() + "] ActivityThread.performLaunchActivity(" + r + ")"); ActivityInfo aInfo = r.activityInfo; @@ -2219,6 +2219,9 @@ public final class ActivityThread { r.lastNonConfigurationInstance, r.lastNonConfigurationChildInstances, config); + if (customIntent != null) { + activity.mIntent = customIntent; + } r.lastNonConfigurationInstance = null; r.lastNonConfigurationChildInstances = null; activity.mStartedActivity = false; @@ -2274,14 +2277,14 @@ public final class ActivityThread { return activity; } - private final void handleLaunchActivity(ActivityRecord r) { + private final void handleLaunchActivity(ActivityRecord r, Intent customIntent) { // If we are getting ready to gc after going to the background, well // we are back active so skip it. unscheduleGcIdler(); if (localLOGV) Log.v( TAG, "Handling launch of " + r); - Activity a = performLaunchActivity(r); + Activity a = performLaunchActivity(r, customIntent); if (a != null) { handleResumeActivity(r.token, false, r.isForward); @@ -3243,6 +3246,7 @@ public final class ActivityThread { } r.activity.mConfigChangeFlags |= configChanges; + Intent currentIntent = r.activity.mIntent; Bundle savedState = null; if (!r.paused) { @@ -3275,7 +3279,7 @@ public final class ActivityThread { r.state = savedState; } - handleLaunchActivity(r); + handleLaunchActivity(r, currentIntent); } private final void handleRequestThumbnail(IBinder token) { diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 106c920..ca579b6 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -405,8 +405,6 @@ public class Camera { * @param params the Parameters to use for this Camera service */ public void setParameters(Parameters params) { - Log.e(TAG, "setParameters()"); - //params.dump(); native_setParameters(params.flatten()); } @@ -416,7 +414,6 @@ public class Camera { public Parameters getParameters() { Parameters p = new Parameters(); String s = native_getParameters(); - Log.e(TAG, "_getParameters: " + s); p.unflatten(s); return p; } diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index ed7c056..1064fb6 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -354,9 +354,10 @@ public class MobileDataStateTracker extends NetworkStateTracker { /** * Tells the phone sub-system that the caller wants to - * begin using the named feature. The only supported feature at - * this time is {@code Phone.FEATURE_ENABLE_MMS}, which allows an application - * to specify that it wants to send and/or receive MMS data. + * begin using the named feature. The only supported features at + * this time are {@code Phone.FEATURE_ENABLE_MMS}, which allows an application + * to specify that it wants to send and/or receive MMS data, and + * {@code Phone.FEATURE_ENABLE_SUPL}, which is used for Assisted GPS. * @param feature the name of the feature to be used * @param callingPid the process ID of the process that is issuing this request * @param callingUid the user ID of the process that is issuing this request @@ -376,6 +377,8 @@ public class MobileDataStateTracker extends NetworkStateTracker { if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) { mLastCallingPid = callingPid; return setEnableApn(Phone.APN_TYPE_MMS, true); + } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) { + return setEnableApn(Phone.APN_TYPE_SUPL, true); } else { return -1; } @@ -396,6 +399,8 @@ public class MobileDataStateTracker extends NetworkStateTracker { public int stopUsingNetworkFeature(String feature, int callingPid, int callingUid) { if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) { return setEnableApn(Phone.APN_TYPE_MMS, false); + } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) { + return setEnableApn(Phone.APN_TYPE_SUPL, false); } else { return -1; } diff --git a/core/java/android/net/Proxy.java b/core/java/android/net/Proxy.java index 9f07c0a..66eefb2 100644 --- a/core/java/android/net/Proxy.java +++ b/core/java/android/net/Proxy.java @@ -30,6 +30,9 @@ import junit.framework.Assert; */ final public class Proxy { + // Set to true to enable extra debugging. + static final private boolean DEBUG = false; + static final public String PROXY_CHANGE_ACTION = "android.intent.action.PROXY_CHANGE"; @@ -49,7 +52,7 @@ final public class Proxy { if (host != null) { int i = host.indexOf(':'); if (i == -1) { - if (android.util.Config.DEBUG) { + if (DEBUG) { Assert.assertTrue(host.length() == 0); } return null; @@ -73,12 +76,12 @@ final public class Proxy { if (host != null) { int i = host.indexOf(':'); if (i == -1) { - if (android.util.Config.DEBUG) { + if (DEBUG) { Assert.assertTrue(host.length() == 0); } return -1; } - if (android.util.Config.DEBUG) { + if (DEBUG) { Assert.assertTrue(i < host.length()); } return Integer.parseInt(host.substring(i+1)); diff --git a/core/java/android/provider/Gmail.java b/core/java/android/provider/Gmail.java index cc03968..c4b29ae 100644 --- a/core/java/android/provider/Gmail.java +++ b/core/java/android/provider/Gmail.java @@ -38,7 +38,6 @@ import android.text.TextUtils; import android.text.TextUtils.SimpleStringSplitter; import android.text.style.CharacterStyle; import android.text.util.Regex; -import android.util.Config; import android.util.Log; import java.io.UnsupportedEncodingException; @@ -61,6 +60,9 @@ import java.util.regex.Pattern; * @hide */ public final class Gmail { + // Set to true to enable extra debugging. + private static final boolean DEBUG = false; + public static final String GMAIL_AUTH_SERVICE = "mail"; // These constants come from google3/java/com/google/caribou/backend/MailLabel.java. public static final String LABEL_SENT = "^f"; @@ -1195,7 +1197,7 @@ public final class Gmail { @Override public void onChange(boolean selfChange) { - if (Config.DEBUG) { + if (DEBUG) { Log.d(TAG, "MailCursor is notifying " + mObservers.size() + " observers"); } for (MailCursorObserver o: mObservers) { diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java index a6ed922..29dc2ea 100644 --- a/core/java/android/text/Layout.java +++ b/core/java/android/text/Layout.java @@ -24,7 +24,6 @@ import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Path; import com.android.internal.util.ArrayUtils; -import android.util.Config; import junit.framework.Assert; import android.text.style.*; @@ -39,6 +38,8 @@ import android.view.KeyEvent; * For text that will not change, use a {@link StaticLayout}. */ public abstract class Layout { + private static final boolean DEBUG = false; + /* package */ static final EmojiFactory EMOJI_FACTORY = EmojiFactory.newAvailableInstance(); /* package */ static final int MIN_EMOJI, MAX_EMOJI; @@ -330,7 +331,7 @@ public abstract class Layout { boolean hasTab = getLineContainsTab(i); if (directions == DIRS_ALL_LEFT_TO_RIGHT && !spannedText && !hasTab) { - if (Config.DEBUG) { + if (DEBUG) { Assert.assertTrue(dir == DIR_LEFT_TO_RIGHT); Assert.assertNotNull(c); } @@ -797,7 +798,7 @@ public abstract class Layout { } private int getLineVisibleEnd(int line, int start, int end) { - if (Config.DEBUG) { + if (DEBUG) { Assert.assertTrue(getLineStart(line) == start && getLineStart(line+1) == end); } @@ -1340,7 +1341,7 @@ public abstract class Layout { char[] buf; if (!hasTabs) { if (directions == DIRS_ALL_LEFT_TO_RIGHT) { - if (Config.DEBUG) { + if (DEBUG) { Assert.assertTrue(DIR_LEFT_TO_RIGHT == dir); } Styled.drawText(canvas, text, start, end, dir, false, x, top, y, bottom, paint, workPaint, false); diff --git a/core/java/android/util/DebugUtils.java b/core/java/android/util/DebugUtils.java index 1c5d669..56f389c 100644 --- a/core/java/android/util/DebugUtils.java +++ b/core/java/android/util/DebugUtils.java @@ -43,8 +43,8 @@ public class DebugUtils { * * <p>This class is useful for debugging and logging purpose:</p> * <pre> - * if (Config.DEBUG) { - * if (DebugUtils.isObjectSelected(childView) && Config.LOGV) { + * if (DEBUG) { + * if (DebugUtils.isObjectSelected(childView) && LOGV_ENABLED) { * Log.v(TAG, "Object " + childView + " logged!"); * } * } diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java index 5401a6e..ba3f78c 100644 --- a/core/java/android/webkit/BrowserFrame.java +++ b/core/java/android/webkit/BrowserFrame.java @@ -24,7 +24,6 @@ import android.net.WebAddress; import android.net.http.SslCertificate; import android.os.Handler; import android.os.Message; -import android.util.Config; import android.util.Log; import android.util.TypedValue; @@ -120,7 +119,7 @@ class BrowserFrame extends Handler { mDatabase = WebViewDatabase.getInstance(context); mWebViewCore = w; - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "BrowserFrame constructor: this=" + this); } } @@ -331,7 +330,7 @@ class BrowserFrame extends Handler { switch (msg.what) { case FRAME_COMPLETED: { if (mSettings.getSavePassword() && hasPasswordField()) { - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertNotNull(mCallbackProxy.getBackForwardList() .getCurrentItem()); } @@ -480,7 +479,7 @@ class BrowserFrame extends Handler { } if (mSettings.getSavePassword() && hasPasswordField()) { try { - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertNotNull(mCallbackProxy.getBackForwardList() .getCurrentItem()); } @@ -528,7 +527,7 @@ class BrowserFrame extends Handler { // is this resource the main-frame top-level page? boolean isMainFramePage = mIsMainFrame; - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "startLoadingResource: url=" + url + ", method=" + method + ", postData=" + postData + ", isHighPriority=" + isHighPriority + ", isMainFramePage=" + isMainFramePage); diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java index 65a017d..0095b91 100644 --- a/core/java/android/webkit/CacheManager.java +++ b/core/java/android/webkit/CacheManager.java @@ -19,7 +19,6 @@ package android.webkit; import android.content.Context; import android.net.http.Headers; import android.os.FileUtils; -import android.util.Config; import android.util.Log; import java.io.File; import java.io.FileInputStream; @@ -321,7 +320,7 @@ public final class CacheManager { } } - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "getCacheFile for url " + url); } @@ -423,7 +422,7 @@ public final class CacheManager { mDataBase.addCache(url, cacheRet); - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "saveCacheFile for url " + url); } } diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java index 0f9f29c..5f8acc8 100644 --- a/core/java/android/webkit/CallbackProxy.java +++ b/core/java/android/webkit/CallbackProxy.java @@ -30,7 +30,6 @@ import android.os.Handler; import android.os.Message; import android.os.SystemClock; import android.provider.Browser; -import android.util.Config; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; @@ -822,7 +821,7 @@ class CallbackProxy extends Handler { String password, Message resumeMsg) { // resumeMsg should be null at this point because we want to create it // within the CallbackProxy. - if (Config.DEBUG) { + if (WebView.DEBUG) { junit.framework.Assert.assertNull(resumeMsg); } resumeMsg = obtainMessage(NOTIFY); diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java index d90a2fd..c0c6775 100644 --- a/core/java/android/webkit/CookieManager.java +++ b/core/java/android/webkit/CookieManager.java @@ -18,7 +18,6 @@ package android.webkit; import android.net.ParseException; import android.net.WebAddress; -import android.util.Config; import android.util.Log; import java.util.ArrayList; @@ -263,7 +262,7 @@ public final class CookieManager { if (!mAcceptCookie || uri == null) { return; } - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "setCookie: uri: " + uri + " value: " + value); } @@ -428,12 +427,12 @@ public final class CookieManager { } } if (ret.length() > 0) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "getCookie: uri: " + uri + " value: " + ret); } return ret.toString(); } else { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "getCookie: uri: " + uri + " But can't find cookie."); } @@ -589,7 +588,7 @@ public final class CookieManager { Iterator<ArrayList<Cookie>> listIter = cookieLists.iterator(); while (listIter.hasNext() && count < MAX_RAM_COOKIES_COUNT) { ArrayList<Cookie> list = listIter.next(); - if (Config.DEBUG) { + if (WebView.DEBUG) { Iterator<Cookie> iter = list.iterator(); while (iter.hasNext() && count < MAX_RAM_COOKIES_COUNT) { Cookie cookie = iter.next(); @@ -609,7 +608,7 @@ public final class CookieManager { ArrayList<Cookie> retlist = new ArrayList<Cookie>(); if (mapSize >= MAX_RAM_DOMAIN_COUNT || count >= MAX_RAM_COOKIES_COUNT) { - if (Config.DEBUG) { + if (WebView.DEBUG) { Log.v(LOGTAG, count + " cookies used " + byteCount + " bytes with " + mapSize + " domains"); } @@ -617,7 +616,7 @@ public final class CookieManager { int toGo = mapSize / 10 + 1; while (toGo-- > 0){ String domain = domains[toGo].toString(); - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "delete domain: " + domain + " from RAM cache"); } diff --git a/core/java/android/webkit/CookieSyncManager.java b/core/java/android/webkit/CookieSyncManager.java index e37dc56..aa6c76b 100644 --- a/core/java/android/webkit/CookieSyncManager.java +++ b/core/java/android/webkit/CookieSyncManager.java @@ -17,7 +17,6 @@ package android.webkit; import android.content.Context; -import android.util.Config; import android.util.Log; import android.webkit.CookieManager.Cookie; @@ -171,7 +170,7 @@ public final class CookieSyncManager extends WebSyncManager { } protected void syncFromRamToFlash() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash STARTS"); } @@ -188,7 +187,7 @@ public final class CookieSyncManager extends WebSyncManager { CookieManager.getInstance().deleteLRUDomain(); syncFromRamToFlash(lruList); - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash DONE"); } } diff --git a/core/java/android/webkit/FrameLoader.java b/core/java/android/webkit/FrameLoader.java index 42d03f0..6f1b160 100644 --- a/core/java/android/webkit/FrameLoader.java +++ b/core/java/android/webkit/FrameLoader.java @@ -18,7 +18,6 @@ package android.webkit; import android.net.http.EventHandler; import android.net.http.RequestHandle; -import android.util.Config; import android.util.Log; import android.webkit.CacheManager.CacheResult; @@ -121,7 +120,7 @@ class FrameLoader { } else if (handleLocalFile(url, mListener, mSettings)) { return true; } - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "FrameLoader.executeLoad: url protocol not supported:" + mListener.url()); } @@ -181,7 +180,7 @@ class FrameLoader { return true; } - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "FrameLoader: http " + mMethod + " load for: " + mListener.url()); } @@ -212,7 +211,7 @@ class FrameLoader { * setup a load from the byte stream in a CacheResult. */ private void startCacheLoad(CacheResult result) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "FrameLoader: loading from cache: " + mListener.url()); } @@ -286,7 +285,7 @@ class FrameLoader { // of it's state. If it is not in the cache, then go to the // network. case WebSettings.LOAD_CACHE_ELSE_NETWORK: { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "FrameLoader: checking cache: " + mListener.url()); } diff --git a/core/java/android/webkit/JWebCoreJavaBridge.java b/core/java/android/webkit/JWebCoreJavaBridge.java index 361091f..1831c92 100644 --- a/core/java/android/webkit/JWebCoreJavaBridge.java +++ b/core/java/android/webkit/JWebCoreJavaBridge.java @@ -18,7 +18,6 @@ package android.webkit; import android.os.Handler; import android.os.Message; -import android.util.Config; import android.util.Log; final class JWebCoreJavaBridge extends Handler { @@ -176,7 +175,7 @@ final class JWebCoreJavaBridge extends Handler { * @param timemillis The relative time when the timer should fire */ private void setSharedTimer(long timemillis) { - if (Config.LOGV) Log.v(LOGTAG, "setSharedTimer " + timemillis); + if (WebView.LOGV_ENABLED) Log.v(LOGTAG, "setSharedTimer " + timemillis); if (timemillis <= 0) { // we don't accumulate the sharedTimer unless it is a delayed @@ -200,7 +199,7 @@ final class JWebCoreJavaBridge extends Handler { * Stop the shared timer. */ private void stopSharedTimer() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "stopSharedTimer removing all timers"); } removeMessages(TIMER_MESSAGE); diff --git a/core/java/android/webkit/LoadListener.java b/core/java/android/webkit/LoadListener.java index e0a9d31..716d504 100644 --- a/core/java/android/webkit/LoadListener.java +++ b/core/java/android/webkit/LoadListener.java @@ -29,7 +29,6 @@ import android.net.http.SslCertificate; import android.os.Handler; import android.os.Message; -import android.util.Config; import android.util.Log; import android.webkit.CacheManager.CacheResult; @@ -134,7 +133,7 @@ class LoadListener extends Handler implements EventHandler { LoadListener(Context context, BrowserFrame frame, String url, int nativeLoader, boolean synchronous, boolean isMainPageLoader) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener constructor url=" + url); } mContext = context; @@ -285,7 +284,7 @@ class LoadListener extends Handler implements EventHandler { * directly */ public void headers(Headers headers) { - if (Config.LOGV) Log.v(LOGTAG, "LoadListener.headers"); + if (WebView.LOGV_ENABLED) Log.v(LOGTAG, "LoadListener.headers"); sendMessageInternal(obtainMessage(MSG_CONTENT_HEADERS, headers)); } @@ -432,7 +431,7 @@ class LoadListener extends Handler implements EventHandler { */ public void status(int majorVersion, int minorVersion, int code, /* Status-Code value */ String reasonPhrase) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener: from: " + mUrl + " major: " + majorVersion + " minor: " + minorVersion @@ -489,7 +488,7 @@ class LoadListener extends Handler implements EventHandler { * directly */ public void error(int id, String description) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.error url:" + url() + " id:" + id + " description:" + description); } @@ -517,7 +516,7 @@ class LoadListener extends Handler implements EventHandler { * mDataBuilder is a thread-safe structure. */ public void data(byte[] data, int length) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.data(): url: " + url()); } @@ -555,7 +554,7 @@ class LoadListener extends Handler implements EventHandler { * directly */ public void endData() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.endData(): url: " + url()); } sendMessageInternal(obtainMessage(MSG_CONTENT_FINISHED)); @@ -608,7 +607,7 @@ class LoadListener extends Handler implements EventHandler { // before calling it. if (mCacheLoader != null) { mCacheLoader.load(); - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener cache load url=" + url()); } return; @@ -658,7 +657,7 @@ class LoadListener extends Handler implements EventHandler { CacheManager.HEADER_KEY_IFNONEMATCH) && !headers.containsKey( CacheManager.HEADER_KEY_IFMODIFIEDSINCE)) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "FrameLoader: HTTP URL in cache " + "and usable: " + url()); } @@ -677,7 +676,7 @@ class LoadListener extends Handler implements EventHandler { * directly */ public void handleSslErrorRequest(SslError error) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.handleSslErrorRequest(): url:" + url() + " primary error: " + error.getPrimaryError() + @@ -743,7 +742,7 @@ class LoadListener extends Handler implements EventHandler { * are null, cancel the request. */ void handleAuthResponse(String username, String password) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.handleAuthResponse: url: " + mUrl + " username: " + username + " password: " + password); @@ -840,7 +839,7 @@ class LoadListener extends Handler implements EventHandler { } void attachRequestHandle(RequestHandle requestHandle) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.attachRequestHandle(): " + "requestHandle: " + requestHandle); } @@ -848,7 +847,7 @@ class LoadListener extends Handler implements EventHandler { } void detachRequestHandle() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.detachRequestHandle(): " + "requestHandle: " + mRequestHandle); } @@ -887,7 +886,7 @@ class LoadListener extends Handler implements EventHandler { */ static boolean willLoadFromCache(String url) { boolean inCache = CacheManager.getCacheFile(url, null) != null; - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "willLoadFromCache: " + url + " in cache: " + inCache); } @@ -1057,7 +1056,7 @@ class LoadListener extends Handler implements EventHandler { * EventHandler's method call. */ public void cancel() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { if (mRequestHandle == null) { Log.v(LOGTAG, "LoadListener.cancel(): no requestHandle"); } else { @@ -1189,7 +1188,7 @@ class LoadListener extends Handler implements EventHandler { tearDown(); } - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.onRedirect(): redirect to: " + redirectTo); } @@ -1203,7 +1202,7 @@ class LoadListener extends Handler implements EventHandler { Pattern.compile("^((?:[xX]-)?[a-zA-Z\\*]+/[\\w\\+\\*-]+[\\.[\\w\\+-]+]*)$"); private void parseContentTypeHeader(String contentType) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "LoadListener.parseContentTypeHeader: " + "contentType: " + contentType); } @@ -1393,7 +1392,7 @@ class LoadListener extends Handler implements EventHandler { */ private String guessMimeTypeFromExtension() { // PENDING: need to normalize url - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "guessMimeTypeFromExtension: mURL = " + mUrl); } @@ -1428,7 +1427,7 @@ class LoadListener extends Handler implements EventHandler { * Cycle through our messages for synchronous loads. */ /* package */ void loadSynchronousMessages() { - if (Config.DEBUG && !mSynchronous) { + if (WebView.DEBUG && !mSynchronous) { throw new AssertionError(); } // Note: this can be called twice if it is a synchronous network load, diff --git a/core/java/android/webkit/Network.java b/core/java/android/webkit/Network.java index 6fa0775..c9b80ce 100644 --- a/core/java/android/webkit/Network.java +++ b/core/java/android/webkit/Network.java @@ -20,7 +20,6 @@ import android.content.Context; import android.net.http.*; import android.os.*; import android.util.Log; -import android.util.Config; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -133,7 +132,7 @@ class Network { * XXX: Must be created in the same thread as WebCore!!!!! */ private Network(Context context) { - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertTrue(Thread.currentThread(). getName().equals(WebViewCore.THREAD_NAME)); } @@ -233,7 +232,7 @@ class Network { * connecting through the proxy. */ public synchronized void setProxyUsername(String proxyUsername) { - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertTrue(isValidProxySet()); } @@ -253,7 +252,7 @@ class Network { * connecting through the proxy. */ public synchronized void setProxyPassword(String proxyPassword) { - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertTrue(isValidProxySet()); } @@ -267,7 +266,7 @@ class Network { * @return True iff succeeds. */ public boolean saveState(Bundle outState) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "Network.saveState()"); } @@ -281,7 +280,7 @@ class Network { * @return True iff succeeds. */ public boolean restoreState(Bundle inState) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "Network.restoreState()"); } @@ -301,7 +300,7 @@ class Network { * @param loader The loader that resulted in SSL errors. */ public void handleSslErrorRequest(LoadListener loader) { - if (Config.DEBUG) Assert.assertNotNull(loader); + if (WebView.DEBUG) Assert.assertNotNull(loader); if (loader != null) { mSslErrorHandler.handleSslErrorRequest(loader); } @@ -314,7 +313,7 @@ class Network { * authentication request. */ public void handleAuthRequest(LoadListener loader) { - if (Config.DEBUG) Assert.assertNotNull(loader); + if (WebView.DEBUG) Assert.assertNotNull(loader); if (loader != null) { mHttpAuthHandler.handleAuthRequest(loader); } diff --git a/core/java/android/webkit/SslErrorHandler.java b/core/java/android/webkit/SslErrorHandler.java index 2e2fa12..5f84bbe 100644 --- a/core/java/android/webkit/SslErrorHandler.java +++ b/core/java/android/webkit/SslErrorHandler.java @@ -22,7 +22,6 @@ import android.net.http.SslError; import android.os.Bundle; import android.os.Handler; import android.os.Message; -import android.util.Config; import android.util.Log; import java.util.LinkedList; @@ -121,7 +120,7 @@ public class SslErrorHandler extends Handler { * Handles SSL error(s) on the way up to the user. */ /* package */ synchronized void handleSslErrorRequest(LoadListener loader) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "SslErrorHandler.handleSslErrorRequest(): " + "url=" + loader.url()); } @@ -158,14 +157,14 @@ public class SslErrorHandler extends Handler { SslError error = loader.sslError(); - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertNotNull(error); } int primary = error.getPrimaryError(); String host = loader.host(); - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertTrue(host != null && primary != 0); } @@ -206,11 +205,11 @@ public class SslErrorHandler extends Handler { */ /* package */ synchronized void handleSslErrorResponse(boolean proceed) { LoadListener loader = mLoaderQueue.poll(); - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertNotNull(loader); } - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "SslErrorHandler.handleSslErrorResponse():" + " proceed: " + proceed + " url:" + loader.url()); @@ -222,7 +221,7 @@ public class SslErrorHandler extends Handler { int primary = loader.sslError().getPrimaryError(); String host = loader.host(); - if (Config.DEBUG) { + if (WebView.DEBUG) { Assert.assertTrue(host != null && primary != 0); } boolean hasKey = mSslPrefTable.containsKey(host); diff --git a/core/java/android/webkit/StreamLoader.java b/core/java/android/webkit/StreamLoader.java index 9098307..705157c 100644 --- a/core/java/android/webkit/StreamLoader.java +++ b/core/java/android/webkit/StreamLoader.java @@ -20,7 +20,6 @@ import android.net.http.EventHandler; import android.net.http.Headers; import android.os.Handler; import android.os.Message; -import android.util.Config; import java.io.IOException; import java.io.InputStream; @@ -114,7 +113,7 @@ abstract class StreamLoader extends Handler { * @see android.os.Handler#handleMessage(android.os.Message) */ public void handleMessage(Message msg) { - if (Config.DEBUG && mHandler.isSynchronous()) { + if (WebView.DEBUG && mHandler.isSynchronous()) { throw new AssertionError(); } switch(msg.what) { diff --git a/core/java/android/webkit/URLUtil.java b/core/java/android/webkit/URLUtil.java index 0e8144e..d6ac3e9 100644 --- a/core/java/android/webkit/URLUtil.java +++ b/core/java/android/webkit/URLUtil.java @@ -23,7 +23,6 @@ import java.util.regex.Pattern; import android.net.Uri; import android.net.ParseException; import android.net.WebAddress; -import android.util.Config; import android.util.Log; public final class URLUtil { @@ -62,7 +61,7 @@ public final class URLUtil { webAddress = new WebAddress(inUrl); } catch (ParseException ex) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "smartUrlFilter: failed to parse url = " + inUrl); } return retVal; diff --git a/core/java/android/webkit/WebBackForwardList.java b/core/java/android/webkit/WebBackForwardList.java index 9dea5ec..ffd6a11 100644 --- a/core/java/android/webkit/WebBackForwardList.java +++ b/core/java/android/webkit/WebBackForwardList.java @@ -16,7 +16,6 @@ package android.webkit; -import android.util.Config; import java.io.Serializable; import java.util.ArrayList; @@ -138,7 +137,7 @@ public class WebBackForwardList implements Cloneable, Serializable { // when removing the first item, we can assert that the index is 0. // This lets us change the current index without having to query the // native BackForwardList. - if (Config.DEBUG && (index != 0)) { + if (WebView.DEBUG && (index != 0)) { throw new AssertionError(); } final WebHistoryItem h = mArray.remove(index); diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index c18f157..98e66b6 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -1130,7 +1130,7 @@ public class WebSettings { /*package*/ synchronized void syncSettingsAndCreateHandler(BrowserFrame frame) { mBrowserFrame = frame; - if (android.util.Config.DEBUG) { + if (WebView.DEBUG) { junit.framework.Assert.assertTrue(frame.mNativeFrame != 0); } nativeSync(frame.mNativeFrame); diff --git a/core/java/android/webkit/WebSyncManager.java b/core/java/android/webkit/WebSyncManager.java index e6e9994..ded17ed 100644 --- a/core/java/android/webkit/WebSyncManager.java +++ b/core/java/android/webkit/WebSyncManager.java @@ -21,7 +21,6 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.Process; -import android.util.Config; import android.util.Log; abstract class WebSyncManager implements Runnable { @@ -48,7 +47,7 @@ abstract class WebSyncManager implements Runnable { @Override public void handleMessage(Message msg) { if (msg.what == SYNC_MESSAGE) { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "*** WebSyncManager sync ***"); } syncFromRamToFlash(); @@ -95,7 +94,7 @@ abstract class WebSyncManager implements Runnable { * sync() forces sync manager to sync now */ public void sync() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "*** WebSyncManager sync ***"); } if (mHandler == null) { @@ -110,7 +109,7 @@ abstract class WebSyncManager implements Runnable { * resetSync() resets sync manager's timer */ public void resetSync() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "*** WebSyncManager resetSync ***"); } if (mHandler == null) { @@ -125,7 +124,7 @@ abstract class WebSyncManager implements Runnable { * startSync() requests sync manager to start sync */ public void startSync() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "*** WebSyncManager startSync ***, Ref count:" + mStartSyncRefCount); } @@ -143,7 +142,7 @@ abstract class WebSyncManager implements Runnable { * the queue to break the sync loop */ public void stopSync() { - if (Config.LOGV) { + if (WebView.LOGV_ENABLED) { Log.v(LOGTAG, "*** WebSyncManager stopSync ***, Ref count:" + mStartSyncRefCount); } diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 34709aa..3eb1dd7 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -42,7 +42,6 @@ import android.text.IClipboard; import android.text.Selection; import android.text.Spannable; import android.util.AttributeSet; -import android.util.Config; import android.util.EventLog; import android.util.Log; import android.view.Gravity; @@ -207,7 +206,7 @@ public class WebView extends AbsoluteLayout // keep debugging parameters near the top of the file static final String LOGTAG = "webview"; static final boolean DEBUG = false; - static final boolean LOGV_ENABLED = DEBUG ? Config.LOGD : Config.LOGV; + static final boolean LOGV_ENABLED = DEBUG; private class ExtendedZoomControls extends FrameLayout { public ExtendedZoomControls(Context context, AttributeSet attrs) { diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index 302bc1a..fe185e3 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -29,7 +29,6 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.Process; -import android.util.Config; import android.util.Log; import android.util.SparseBooleanArray; import android.view.KeyEvent; @@ -43,7 +42,7 @@ final class WebViewCore { private static final String LOGTAG = "webcore"; static final boolean DEBUG = false; - static final boolean LOGV_ENABLED = DEBUG ? Config.LOGD : Config.LOGV; + static final boolean LOGV_ENABLED = DEBUG; static { // Load libwebcore during static initialization. This happens in the diff --git a/core/java/android/webkit/gears/AndroidWifiDataProvider.java b/core/java/android/webkit/gears/AndroidWifiDataProvider.java index 7379f59..d2850b0 100644 --- a/core/java/android/webkit/gears/AndroidWifiDataProvider.java +++ b/core/java/android/webkit/gears/AndroidWifiDataProvider.java @@ -33,7 +33,6 @@ import android.net.wifi.ScanResult; import android.net.wifi.WifiManager; import android.os.Handler; import android.os.Looper; -import android.util.Config; import android.util.Log; import android.webkit.WebView; import java.util.List; @@ -48,6 +47,11 @@ public final class AndroidWifiDataProvider extends BroadcastReceiver { */ private static final String TAG = "Gears-J-WifiProvider"; /** + * Flag for guarding Log.v() calls. + * Set to true to enable extra debug logging. + */ + private static final boolean LOGV_ENABLED = false; + /** * Our Wifi manager instance. */ private WifiManager mWifiManager; @@ -104,7 +108,7 @@ public final class AndroidWifiDataProvider extends BroadcastReceiver { */ public void shutdown() { mContext.unregisterReceiver(this); - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.v(TAG, "Wifi provider closed."); } } @@ -118,7 +122,7 @@ public final class AndroidWifiDataProvider extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { if (intent.getAction().equals( mWifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.v(TAG, "Wifi scan resulst available"); } onUpdateAvailable(mWifiManager.getScanResults(), mNativeObject); diff --git a/core/java/android/webkit/gears/ApacheHttpRequestAndroid.java b/core/java/android/webkit/gears/ApacheHttpRequestAndroid.java index 529e666..74d27ed 100644 --- a/core/java/android/webkit/gears/ApacheHttpRequestAndroid.java +++ b/core/java/android/webkit/gears/ApacheHttpRequestAndroid.java @@ -29,7 +29,6 @@ import android.net.http.Headers; import android.os.Handler; import android.os.Looper; import android.os.Message; -import android.util.Config; import android.util.Log; import android.webkit.CacheManager; import android.webkit.CacheManager.CacheResult; @@ -88,6 +87,8 @@ import java.util.concurrent.locks.ReentrantLock; public final class ApacheHttpRequestAndroid { /** Debug logging tag. */ private static final String LOG_TAG = "Gears-J"; + /** Flag for guarding Log.v() calls. */ + private static final boolean LOGV_ENABLED = false; /** HTTP response header line endings are CR-LF style. */ private static final String HTTP_LINE_ENDING = "\r\n"; /** Safe MIME type to use whenever it isn't specified. */ @@ -173,18 +174,18 @@ public final class ApacheHttpRequestAndroid { public void run() { boolean problem = false; try { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "REQUEST : " + mMethod.getRequestLine()); } mResponse = mClient.execute(mMethod); if (mResponse != null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "response (status line): " + mResponse.getStatusLine()); } mResponseLine = "" + mResponse.getStatusLine(); } else { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "problem, response == null"); } problem = true; @@ -198,7 +199,7 @@ public final class ApacheHttpRequestAndroid { } if (!problem) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Request complete (" + mMethod.getRequestLine() + ")"); } @@ -206,7 +207,7 @@ public final class ApacheHttpRequestAndroid { mConnectionFailedLock.lock(); mConnectionFailed = true; mConnectionFailedLock.unlock(); - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Request FAILED (" + mMethod.getRequestLine() + ")"); } @@ -233,7 +234,7 @@ public final class ApacheHttpRequestAndroid { try { wait(); } catch (InterruptedException e) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "InterruptedException while putting " + "a DataPacket in the Buffer: " + e); } @@ -248,7 +249,7 @@ public final class ApacheHttpRequestAndroid { try { wait(); } catch (InterruptedException e) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "InterruptedException while getting " + "a DataPacket in the Buffer: " + e); } @@ -271,7 +272,7 @@ public final class ApacheHttpRequestAndroid { try { wait(); } catch (InterruptedException e) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "InterruptedException while waiting " + "until a DataPacket is consumed: " + e); } @@ -285,7 +286,7 @@ public final class ApacheHttpRequestAndroid { try { wait(); } catch (InterruptedException e) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "InterruptedException while indicating " + "that the DataPacket has been consumed: " + e); } @@ -373,14 +374,14 @@ public final class ApacheHttpRequestAndroid { mSignal.packetConsumed(); mConnectionFailedLock.lock(); if (mConnectionFailed) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "stopping loop on error"); } finished = true; } mConnectionFailedLock.unlock(); } - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "flushing the outputstream..."); } mOutputStream.flush(); @@ -399,7 +400,7 @@ public final class ApacheHttpRequestAndroid { private void write(DataPacket packet) { try { if (mOutputStream == null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "NO OUTPUT STREAM !!!"); } return; @@ -407,7 +408,7 @@ public final class ApacheHttpRequestAndroid { mOutputStream.write(packet.getBytes(), 0, packet.getLength()); mOutputStream.flush(); } catch (IOException e) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "exc: " + e); } mConnectionFailedLock.lock(); @@ -423,7 +424,7 @@ public final class ApacheHttpRequestAndroid { mStreamingReady.await(); } } catch (InterruptedException e) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "InterruptedException in " + "StreamEntity::isReady() : ", e); } @@ -468,7 +469,7 @@ public final class ApacheHttpRequestAndroid { * False on failure. */ public synchronized boolean open(String method, String url) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "open " + method + " " + url); } // Create the client @@ -502,7 +503,7 @@ public final class ApacheHttpRequestAndroid { } else if ("DELETE".equalsIgnoreCase(method)) { mMethod = new HttpDelete(url); } else { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Method " + method + " not supported"); } return false; @@ -549,7 +550,7 @@ public final class ApacheHttpRequestAndroid { * (unless already finished) */ private void waitUntilConnectionFinished() { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "waitUntilConnectionFinished(" + mConnectionFinished + ")"); } @@ -558,11 +559,11 @@ public final class ApacheHttpRequestAndroid { try { mHttpThread.join(); mConnectionFinished = true; - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "http thread joined"); } } catch (InterruptedException e) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "interrupted: " + e); } } @@ -596,7 +597,7 @@ public final class ApacheHttpRequestAndroid { Header[] headers = mResponse.getAllHeaders(); for (int i = 0; i < headers.length; i++) { Header header = headers[i]; - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "header " + header.getName() + " -> " + header.getValue()); } @@ -615,7 +616,7 @@ public final class ApacheHttpRequestAndroid { */ public synchronized void setRequestHeader(String name, String value) { String[] mapValue = { name, value }; - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "setRequestHeader: " + name + " => " + value); } if (name.equalsIgnoreCase(KEY_CONTENT_LENGTH)) { @@ -647,7 +648,7 @@ public final class ApacheHttpRequestAndroid { while (it.hasNext()) { // Set the key case-sensitive. String[] entry = it.next(); - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "apply header " + entry[HEADERS_MAP_INDEX_KEY] + " => " + entry[HEADERS_MAP_INDEX_VALUE]); } @@ -671,7 +672,7 @@ public final class ApacheHttpRequestAndroid { return null; } } else { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "getResponseHeader() called but " + "response not received"); } @@ -687,7 +688,7 @@ public final class ApacheHttpRequestAndroid { */ public synchronized String getAllResponseHeaders() { if (mResponseHeaders == null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "getAllResponseHeaders() called but " + "response not received"); } @@ -715,7 +716,7 @@ public final class ApacheHttpRequestAndroid { * @param value The associated value. */ private void setResponseHeader(String name, String value) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Set response header " + name + ": " + value); } String mapValue[] = { name, value }; @@ -766,7 +767,7 @@ public final class ApacheHttpRequestAndroid { UrlInterceptHandlerGears.ServiceResponse serviceResponse = handler.getServiceResponse(url, mRequestHeaders); if (serviceResponse == null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "No response in LocalServer"); } return false; @@ -776,7 +777,7 @@ public final class ApacheHttpRequestAndroid { mBodyInputStream = serviceResponse.getInputStream(); mResponseLine = serviceResponse.getStatusLine(); mResponseHeaders = serviceResponse.getResponseHeaders(); - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Got response from LocalServer: " + mResponseLine); } return true; @@ -803,19 +804,19 @@ public final class ApacheHttpRequestAndroid { CacheResult mCacheResult = CacheManager.getCacheFile(url, cacheRequestHeaders); if (mCacheResult == null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "No CacheResult for " + url); } return false; } - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Got CacheResult from browser cache"); } // Check for expiry. -1 is "never", otherwise milliseconds since 1970. // Can be compared to System.currentTimeMillis(). long expires = mCacheResult.getExpires(); if (expires >= 0 && System.currentTimeMillis() >= expires) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "CacheResult expired " + (System.currentTimeMillis() - expires) + " milliseconds ago"); @@ -827,7 +828,7 @@ public final class ApacheHttpRequestAndroid { mBodyInputStream = mCacheResult.getInputStream(); if (mBodyInputStream == null) { // Cache result may have gone away. - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "No mBodyInputStream for CacheResult " + url); } return false; @@ -855,7 +856,7 @@ public final class ApacheHttpRequestAndroid { } // Synthesize the response line. mResponseLine = "HTTP/1.1 " + statusCode + " " + statusMessage; - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Synthesized " + mResponseLine); } // Synthesize the returned headers from cache. @@ -914,7 +915,7 @@ public final class ApacheHttpRequestAndroid { */ public synchronized boolean createCacheResult( String url, int responseCode, String mimeType, String encoding) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Making cache entry for " + url); } // Take the headers and parse them into a format needed by @@ -935,14 +936,14 @@ public final class ApacheHttpRequestAndroid { mCacheResult = CacheManager.createCacheFile( url, responseCode, cacheHeaders, mimeType, true); if (mCacheResult != null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Saving into cache"); } mCacheResult.setEncoding(encoding); mCacheResultUrl = url; return true; } else { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Couldn't create mCacheResult"); } return false; @@ -960,7 +961,7 @@ public final class ApacheHttpRequestAndroid { */ public synchronized boolean appendCacheResult(byte[] data, int bytes) { if (mCacheResult == null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "appendCacheResult() called without a " + "CacheResult initialized"); } @@ -969,7 +970,7 @@ public final class ApacheHttpRequestAndroid { try { mCacheResult.getOutputStream().write(data, 0, bytes); } catch (IOException ex) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Got IOException writing cache data: " + ex); } return false; @@ -984,14 +985,14 @@ public final class ApacheHttpRequestAndroid { */ public synchronized boolean saveCacheResult() { if (mCacheResult == null || mCacheResultUrl == null) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Tried to save cache result but " + "createCacheResult not called"); } return false; } - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Saving cache result"); } CacheManager.saveCacheFile(mCacheResultUrl, mCacheResult); @@ -1006,7 +1007,7 @@ public final class ApacheHttpRequestAndroid { * ability to receive a null packet for sendPostData(). */ public synchronized void abort() { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "ABORT CALLED"); } if (mMethod != null) { @@ -1019,7 +1020,7 @@ public final class ApacheHttpRequestAndroid { * thread to complete. */ public synchronized void interrupt() { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "INTERRUPT CALLED"); } mConnectionFailedLock.lock(); @@ -1053,7 +1054,7 @@ public final class ApacheHttpRequestAndroid { mBodyInputStream = entity.getContent(); } } catch (IOException inputException) { - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Failed to connect InputStream: " + inputException); } @@ -1062,7 +1063,7 @@ public final class ApacheHttpRequestAndroid { } if (mBodyInputStream == null) { // No error stream either. Treat as a 0 byte response. - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "No InputStream"); } return 0; // EOF. @@ -1081,7 +1082,7 @@ public final class ApacheHttpRequestAndroid { } } catch (IOException e) { // An abort() interrupts us by calling close() on our stream. - if (Config.LOGV) { + if (LOGV_ENABLED) { Log.i(LOG_TAG, "Got IOException in mBodyInputStream.read(): ", e); } ret = -1; diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java index b162a0e..0c9d980 100644 --- a/core/java/android/widget/MediaController.java +++ b/core/java/android/widget/MediaController.java @@ -444,27 +444,55 @@ public class MediaController extends FrameLayout { updatePausePlay(); } + // There are two scenarios that can trigger the seekbar listener to trigger: + // + // The first is the user using the touchpad to adjust the posititon of the + // seekbar's thumb. In this case onStartTrackingTouch is called followed by + // a number of onProgressChanged notifications, concluded by onStopTrackingTouch. + // We're setting the field "mDragging" to true for the duration of the dragging + // session to avoid jumps in the position in case of ongoing playback. + // + // The second scenario involves the user operating the scroll ball, in this + // case there WON'T BE onStartTrackingTouch/onStopTrackingTouch notifications, + // we will simply apply the updated position without suspending regular updates. private OnSeekBarChangeListener mSeekListener = new OnSeekBarChangeListener() { - long duration; public void onStartTrackingTouch(SeekBar bar) { show(3600000); - duration = mPlayer.getDuration(); - } - public void onProgressChanged(SeekBar bar, int progress, boolean fromtouch) { - if (fromtouch) { - mDragging = true; - duration = mPlayer.getDuration(); - long newposition = (duration * progress) / 1000L; - mPlayer.seekTo( (int) newposition); - if (mCurrentTime != null) - mCurrentTime.setText(stringForTime( (int) newposition)); + + mDragging = true; + + // By removing these pending progress messages we make sure + // that a) we won't update the progress while the user adjusts + // the seekbar and b) once the user is done dragging the thumb + // we will post one of these messages to the queue again and + // this ensures that there will be exactly one message queued up. + mHandler.removeMessages(SHOW_PROGRESS); + } + + public void onProgressChanged(SeekBar bar, int progress, boolean fromuser) { + if (!fromuser) { + // We're not interested in programmatically generated changes to + // the progress bar's position. + return; } + + long duration = mPlayer.getDuration(); + long newposition = (duration * progress) / 1000L; + mPlayer.seekTo( (int) newposition); + if (mCurrentTime != null) + mCurrentTime.setText(stringForTime( (int) newposition)); } + public void onStopTrackingTouch(SeekBar bar) { mDragging = false; setProgress(); updatePausePlay(); show(sDefaultTimeout); + + // Ensure that progress is properly updated in the future, + // the call to show() does not guarantee this because it is a + // no-op if we are already showing. + mHandler.sendEmptyMessage(SHOW_PROGRESS); } }; diff --git a/core/java/com/android/internal/app/IUsageStats.aidl b/core/java/com/android/internal/app/IUsageStats.aidl index 6b053d5..1ea7409 100755 --- a/core/java/com/android/internal/app/IUsageStats.aidl +++ b/core/java/com/android/internal/app/IUsageStats.aidl @@ -22,6 +22,7 @@ import com.android.internal.os.PkgUsageStats; interface IUsageStats { void noteResumeComponent(in ComponentName componentName); void notePauseComponent(in ComponentName componentName); + void noteLaunchTime(in ComponentName componentName, int millis); PkgUsageStats getPkgUsageStats(in ComponentName componentName); PkgUsageStats[] getAllPkgUsageStats(); } diff --git a/core/java/com/android/internal/util/BitwiseInputStream.java b/core/java/com/android/internal/util/BitwiseInputStream.java new file mode 100644 index 0000000..4757919 --- /dev/null +++ b/core/java/com/android/internal/util/BitwiseInputStream.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util; + +/** + * An object that provides bitwise incremental read access to a byte array. + * + * This is useful, for example, when accessing a series of fields that + * may not be aligned on byte boundaries. + * + * NOTE -- This class is not threadsafe. + */ +public class BitwiseInputStream { + + // The byte array being read from. + private byte[] mBuf; + + // The current position offset, in bits, from the msb in byte 0. + private int mPos; + + // The last valid bit offset. + private int mEnd; + + /** + * An exception to report access problems. + */ + public static class AccessException extends Exception { + public AccessException(String s) { + super("BitwiseInputStream access failed: " + s); + } + } + + /** + * Create object from byte array. + * + * @param buf a byte array containing data + */ + public BitwiseInputStream(byte buf[]) { + mBuf = buf; + mEnd = buf.length << 3; + mPos = 0; + } + + /** + * Return the number of bit still available for reading. + */ + public int available() { + return mEnd - mPos; + } + + /** + * Read some data and increment the current position. + * + * @param bits the amount of data to read (gte 0, lte 8) + * + * @return byte of read data (possibly partially filled, from lsb) + */ + public byte read(int bits) throws AccessException { + int index = mPos >>> 3; + int offset = 16 - (mPos & 0x07) - bits; // &7==%8 + if ((bits < 0) || (bits > 8) || ((mPos + bits) > mEnd)) { + throw new AccessException("illegal read " + + "(pos " + mPos + ", end " + mEnd + ", bits " + bits + ")"); + } + int data = (mBuf[index] & 0x00FF) << 8; + if (offset < 8) data |= (mBuf[index + 1] & 0xFF); + data >>>= offset; + data &= (-1 >>> (32 - bits)); + mPos += bits; + return (byte)data; + } + + /** + * Read data in bulk into a byte array and increment the current position. + * + * @param bits the amount of data to read + * + * @return newly allocated byte array of read data + */ + public byte[] readByteArray(int bits) throws AccessException { + int bytes = (bits >>> 3) + ((bits & 0x07) > 0 ? 1 : 0); // &7==%8 + byte[] arr = new byte[bytes]; + for (int i = 0; i < bytes; i++) { + int increment = Math.min(8, bits - (i << 3)); + arr[i] = (byte)(read(increment) << (8 - increment)); + } + return arr; + } + + /** + * Increment the current position and ignore contained data. + * + * @param bits the amount by which to increment the position + */ + public void skip(int bits) throws AccessException { + if ((mPos + bits) > mEnd) { + throw new AccessException("illegal skip " + + "(pos " + mPos + ", end " + mEnd + ", bits " + bits + ")"); + } + mPos += bits; + } +} diff --git a/core/java/com/android/internal/util/BitwiseOutputStream.java b/core/java/com/android/internal/util/BitwiseOutputStream.java new file mode 100644 index 0000000..17f5c7c --- /dev/null +++ b/core/java/com/android/internal/util/BitwiseOutputStream.java @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.util; + +/** + * An object that rovides bitwise incremental write access to a byte array. + * + * This is useful, for example, when writing a series of fields that + * may not be aligned on byte boundaries. + * + * NOTE -- This class is not threadsafe. + */ +public class BitwiseOutputStream { + + // The byte array being written to, which will be grown as needed. + private byte[] mBuf; + + // The current position offset, in bits, from the msb in byte 0. + private int mPos; + + // The last bit offset, given the current buf length. + private int mEnd; + + /** + * An exception to report access problems. + */ + public static class AccessException extends Exception { + public AccessException(String s) { + super("BitwiseOutputStream access failed: " + s); + } + } + + /** + * Create object from hint at desired size. + * + * @param startingLength initial internal byte array length in bytes + */ + public BitwiseOutputStream(int startingLength) { + mBuf = new byte[startingLength]; + mEnd = startingLength << 3; + mPos = 0; + } + + /** + * Return byte array containing accumulated data, sized to just fit. + * + * @return newly allocated byte array + */ + public byte[] toByteArray() { + int len = (mPos >>> 3) + ((mPos & 0x07) > 0 ? 1 : 0); // &7==%8 + byte[] newBuf = new byte[len]; + System.arraycopy(mBuf, 0, newBuf, 0, len); + return newBuf; + } + + /** + * Allocate a new internal buffer, if needed. + * + * @param bits additional bits to be accommodated + */ + private void possExpand(int bits) { + if ((mPos + bits) < mEnd) return; + byte[] newBuf = new byte[(mPos + bits) >>> 2]; + System.arraycopy(mBuf, 0, newBuf, 0, mEnd >>> 3); + mBuf = newBuf; + } + + /** + * Write some data and increment the current position. + * + * @param bits the amount of data to write (gte 0, lte 8) + * @param data to write, will be masked to expose only bits param from lsb + */ + public void write(int bits, int data) throws AccessException { + if ((bits < 0) || (bits > 8)) { + throw new AccessException("illegal write (" + bits + " bits)"); + } + possExpand(bits); + data &= (-1 >>> (32 - bits)); + int index = mPos >>> 3; + int offset = 16 - (mPos & 0x07) - bits; // &7==%8 + data <<= offset; + mPos += bits; + mBuf[index] |= (data >>> 8); + if (offset < 8) mBuf[index + 1] |= (data & 0x00FF); + } + + /** + * Write data in bulk from a byte array and increment the current position. + * + * @param bits the amount of data to write + * @param arr the byte array containing data to be written + */ + public void writeByteArray(int bits, byte[] arr) throws AccessException { + for (int i = 0; i < arr.length; i++) { + int increment = Math.min(8, bits - (i << 3)); + if (increment > 0) { + write(increment, (byte)(arr[i] >>> (8 - increment))); + } + } + } + + /** + * Increment the current position, implicitly writing zeros. + * + * @param bits the amount by which to increment the position + */ + public void skip(int bits) { + possExpand(bits); + mPos += bits; + } +} diff --git a/core/jni/android_location_GpsLocationProvider.cpp b/core/jni/android_location_GpsLocationProvider.cpp index f0b35e9..bbde8d5 100644 --- a/core/jni/android_location_GpsLocationProvider.cpp +++ b/core/jni/android_location_GpsLocationProvider.cpp @@ -31,6 +31,7 @@ static pthread_cond_t sEventCond = PTHREAD_COND_INITIALIZER; static jmethodID method_reportLocation; static jmethodID method_reportStatus; static jmethodID method_reportSvStatus; +static jmethodID method_reportSuplStatus; static jmethodID method_xtraDownloadRequest; static const GpsInterface* sGpsInterface = NULL; @@ -41,19 +42,22 @@ static const GpsSuplInterface* sGpsSuplInterface = NULL; static GpsLocation sGpsLocation; static GpsStatus sGpsStatus; static GpsSvStatus sGpsSvStatus; +static GpsSuplStatus sGpsSuplStatus; // a copy of the data shared by android_location_GpsLocationProvider_wait_for_event // and android_location_GpsLocationProvider_read_status static GpsLocation sGpsLocationCopy; static GpsStatus sGpsStatusCopy; static GpsSvStatus sGpsSvStatusCopy; +static GpsSuplStatus sGpsSuplStatusCopy; enum CallbackType { kLocation = 1, kStatus = 2, kSvStatus = 4, - kXtraDownloadRequest = 8, - kDisableRequest = 16, + kSuplStatus = 8, + kXtraDownloadRequest = 16, + kDisableRequest = 32, }; static int sPendingCallbacks; @@ -92,6 +96,17 @@ static void sv_status_callback(GpsSvStatus* sv_status) pthread_mutex_unlock(&sEventMutex); } +static void supl_status_callback(GpsSuplStatus* supl_status) +{ + pthread_mutex_lock(&sEventMutex); + + sPendingCallbacks |= kSuplStatus; + memcpy(&sGpsSuplStatus, supl_status, sizeof(GpsSuplStatus)); + + pthread_cond_signal(&sEventCond); + pthread_mutex_unlock(&sEventMutex); +} + GpsCallbacks sGpsCallbacks = { location_callback, status_callback, @@ -111,11 +126,15 @@ GpsXtraCallbacks sGpsXtraCallbacks = { download_request_callback, }; +GpsSuplCallbacks sGpsSuplCallbacks = { + supl_status_callback, +}; static void android_location_GpsLocationProvider_class_init_native(JNIEnv* env, jclass clazz) { method_reportLocation = env->GetMethodID(clazz, "reportLocation", "(IDDDFFFJ)V"); method_reportStatus = env->GetMethodID(clazz, "reportStatus", "(I)V"); method_reportSvStatus = env->GetMethodID(clazz, "reportSvStatus", "()V"); + method_reportSuplStatus = env->GetMethodID(clazz, "reportSuplStatus", "(I)V"); method_xtraDownloadRequest = env->GetMethodID(clazz, "xtraDownloadRequest", "()V"); } @@ -129,7 +148,13 @@ static jboolean android_location_GpsLocationProvider_init(JNIEnv* env, jobject o { if (!sGpsInterface) sGpsInterface = gps_get_interface(); - return (sGpsInterface && sGpsInterface->init(&sGpsCallbacks) == 0); + if (!sGpsInterface || sGpsInterface->init(&sGpsCallbacks) != 0) + return false; + + if (!sGpsSuplInterface) + sGpsSuplInterface = (const GpsSuplInterface*)sGpsInterface->get_extension(GPS_SUPL_INTERFACE); + if (sGpsSuplInterface) + sGpsSuplInterface->init(&sGpsSuplCallbacks); } static void android_location_GpsLocationProvider_disable(JNIEnv* env, jobject obj) @@ -186,6 +211,7 @@ static void android_location_GpsLocationProvider_wait_for_event(JNIEnv* env, job memcpy(&sGpsLocationCopy, &sGpsLocation, sizeof(sGpsLocationCopy)); memcpy(&sGpsStatusCopy, &sGpsStatus, sizeof(sGpsStatusCopy)); memcpy(&sGpsSvStatusCopy, &sGpsSvStatus, sizeof(sGpsSvStatusCopy)); + memcpy(&sGpsSuplStatusCopy, &sGpsSuplStatus, sizeof(sGpsSuplStatusCopy)); pthread_mutex_unlock(&sEventMutex); if (pendingCallbacks & kLocation) { @@ -201,6 +227,9 @@ static void android_location_GpsLocationProvider_wait_for_event(JNIEnv* env, job if (pendingCallbacks & kSvStatus) { env->CallVoidMethod(obj, method_reportSvStatus); } + if (pendingCallbacks & kSuplStatus) { + env->CallVoidMethod(obj, method_reportSuplStatus, sGpsSuplStatusCopy.status); + } if (pendingCallbacks & kXtraDownloadRequest) { env->CallVoidMethod(obj, method_xtraDownloadRequest); } @@ -269,30 +298,50 @@ static void android_location_GpsLocationProvider_inject_xtra_data(JNIEnv* env, j env->ReleaseByteArrayElements(data, bytes, 0); } -static void android_location_GpsLocationProvider_set_supl_server(JNIEnv* env, jobject obj, - jint addr, jint port) +static void android_location_GpsLocationProvider_supl_data_conn_open(JNIEnv* env, jobject obj, jstring apn) { if (!sGpsSuplInterface) { sGpsSuplInterface = (const GpsSuplInterface*)sGpsInterface->get_extension(GPS_SUPL_INTERFACE); } if (sGpsSuplInterface) { - sGpsSuplInterface->set_server(addr, port); + if (apn == NULL) { + jniThrowException(env, "java/lang/IllegalArgumentException", NULL); + return; + } + const char *apnStr = env->GetStringUTFChars(apn, NULL); + sGpsSuplInterface->data_conn_open(apnStr); + env->ReleaseStringUTFChars(apn, apnStr); } } -static void android_location_GpsLocationProvider_set_supl_apn(JNIEnv* env, jobject obj, jstring apn) +static void android_location_GpsLocationProvider_supl_data_conn_closed(JNIEnv* env, jobject obj) { if (!sGpsSuplInterface) { sGpsSuplInterface = (const GpsSuplInterface*)sGpsInterface->get_extension(GPS_SUPL_INTERFACE); } if (sGpsSuplInterface) { - if (apn == NULL) { - jniThrowException(env, "java/lang/IllegalArgumentException", NULL); - return; - } - const char *apnStr = env->GetStringUTFChars(apn, NULL); - sGpsSuplInterface->set_apn(apnStr); - env->ReleaseStringUTFChars(apn, apnStr); + sGpsSuplInterface->data_conn_closed(); + } +} + +static void android_location_GpsLocationProvider_supl_data_conn_failed(JNIEnv* env, jobject obj) +{ + if (!sGpsSuplInterface) { + sGpsSuplInterface = (const GpsSuplInterface*)sGpsInterface->get_extension(GPS_SUPL_INTERFACE); + } + if (sGpsSuplInterface) { + sGpsSuplInterface->data_conn_failed(); + } +} + +static void android_location_GpsLocationProvider_set_supl_server(JNIEnv* env, jobject obj, + jint addr, jint port) +{ + if (!sGpsSuplInterface) { + sGpsSuplInterface = (const GpsSuplInterface*)sGpsInterface->get_extension(GPS_SUPL_INTERFACE); + } + if (sGpsSuplInterface) { + sGpsSuplInterface->set_server(addr, port); } } @@ -312,8 +361,10 @@ static JNINativeMethod sMethods[] = { {"native_inject_time", "(JJI)V", (void*)android_location_GpsLocationProvider_inject_time}, {"native_supports_xtra", "()Z", (void*)android_location_GpsLocationProvider_supports_xtra}, {"native_inject_xtra_data", "([BI)V", (void*)android_location_GpsLocationProvider_inject_xtra_data}, + {"native_supl_data_conn_open", "(Ljava/lang/String;)V", (void*)android_location_GpsLocationProvider_supl_data_conn_open}, + {"native_supl_data_conn_closed", "()V", (void*)android_location_GpsLocationProvider_supl_data_conn_closed}, + {"native_supl_data_conn_failed", "()V", (void*)android_location_GpsLocationProvider_supl_data_conn_failed}, {"native_set_supl_server", "(II)V", (void*)android_location_GpsLocationProvider_set_supl_server}, - {"native_set_supl_apn", "(Ljava/lang/String;)V", (void*)android_location_GpsLocationProvider_set_supl_apn}, }; int register_android_location_GpsLocationProvider(JNIEnv* env) diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 7164b78..6aa40d00 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -312,7 +312,6 @@ private: bool processAudioBuffer(const sp<ClientRecordThread>& thread); - sp<IAudioFlinger> mAudioFlinger; sp<IAudioRecord> mAudioRecord; sp<IMemory> mCblkMemory; sp<ClientRecordThread> mClientRecordThread; diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index 7645978..ba0467c 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -383,7 +383,6 @@ private: bool processAudioBuffer(const sp<AudioTrackThread>& thread); - sp<IAudioFlinger> mAudioFlinger; sp<IAudioTrack> mAudioTrack; sp<IMemory> mCblkMemory; sp<AudioTrackThread> mAudioTrackThread; diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp index 43df7dd..a4050b3 100644 --- a/libs/audioflinger/AudioFlinger.cpp +++ b/libs/audioflinger/AudioFlinger.cpp @@ -655,16 +655,12 @@ status_t AudioFlinger::setStreamVolume(int stream, float value) if (stream == AudioSystem::VOICE_CALL || stream == AudioSystem::BLUETOOTH_SCO) { - float hwValue = value; + float hwValue; if (stream == AudioSystem::VOICE_CALL) { hwValue = (float)AudioSystem::logToLinear(value)/100.0f; - // FIXME: This is a temporary fix to re-base the internally - // generated in-call audio so that it is never muted, which is - // already the case for the hardware routed in-call audio. - // When audio stream handling is reworked, this should be - // addressed more cleanly. Fixes #1324; see discussion at - // http://review.source.android.com/8224 - value = value * 0.99 + 0.01; + // offset value to reflect actual hardware volume that never reaches 0 + // 1% corresponds roughly to first step in VOICE_CALL stream volume setting (see AudioService.java) + value = 0.01 + 0.99 * value; } else { // (type == AudioSystem::BLUETOOTH_SCO) hwValue = 1.0f; } @@ -681,6 +677,11 @@ status_t AudioFlinger::setStreamVolume(int stream, float value) mA2dpMixerThread->setStreamVolume(stream, value); #endif + mHardwareMixerThread->setStreamVolume(stream, value); +#ifdef WITH_A2DP + mA2dpMixerThread->setStreamVolume(stream, value); +#endif + return ret; } @@ -718,15 +719,14 @@ float AudioFlinger::streamVolume(int stream) const if (uint32_t(stream) >= AudioSystem::NUM_STREAM_TYPES) { return 0.0f; } - float value = mHardwareMixerThread->streamVolume(stream); + float volume = mHardwareMixerThread->streamVolume(stream); + // remove correction applied by setStreamVolume() if (stream == AudioSystem::VOICE_CALL) { - // FIXME: Re-base internally generated in-call audio, - // reverse of above in setStreamVolume. - value = (value - 0.01) / 0.99; + volume = (volume - 0.01) / 0.99 ; } - return value; + return volume; } bool AudioFlinger::streamMute(int stream) const @@ -829,17 +829,12 @@ void AudioFlinger::handleForcedSpeakerRoute(int command) if (mForcedRoute == 0 && !(mSavedRoute & AudioSystem::ROUTE_SPEAKER)) { LOGV("Route forced to Speaker ON %08x", mSavedRoute | AudioSystem::ROUTE_SPEAKER); mHardwareMixerThread->setStreamMute(AudioSystem::MUSIC, true); - mHardwareStatus = AUDIO_HW_SET_MASTER_VOLUME; - mAudioHardware->setMasterVolume(0); usleep(mHardwareMixerThread->latency()*1000); mHardwareStatus = AUDIO_HW_SET_ROUTING; mAudioHardware->setRouting(AudioSystem::MODE_NORMAL, mSavedRoute | AudioSystem::ROUTE_SPEAKER); mHardwareStatus = AUDIO_HW_IDLE; // delay track start so that audio hardware has time to siwtch routes usleep(kStartSleepTime); - mHardwareStatus = AUDIO_HW_SET_MASTER_VOLUME; - mAudioHardware->setMasterVolume(mHardwareMixerThread->masterVolume()); - mHardwareStatus = AUDIO_HW_IDLE; } mForcedRoute = AudioSystem::ROUTE_SPEAKER; } @@ -1497,18 +1492,6 @@ status_t AudioFlinger::MixerThread::addTrack_l(const sp<Track>& track) return status; } -// removeTrack_l() must be called with AudioFlinger::mLock held -void AudioFlinger::MixerThread::removeTrack_l(wp<Track> track, int name) -{ - sp<Track> t = track.promote(); - if (t!=NULL && (t->mState <= TrackBase::STOPPED)) { - t->reset(); - deleteTrackName_l(name); - removeActiveTrack_l(track); - mAudioFlinger->mWaitWorkCV.broadcast(); - } -} - // destroyTrack_l() must be called with AudioFlinger::mLock held void AudioFlinger::MixerThread::destroyTrack_l(const sp<Track>& track) { @@ -1714,7 +1697,7 @@ void* AudioFlinger::MixerThread::TrackBase::getBuffer(uint32_t offset, uint32_t // Check validity of returned pointer in case the track control block would have been corrupted. if (bufferStart < mBuffer || bufferStart > bufferEnd || bufferEnd > mBufferEnd || - cblk->channels == 2 && ((unsigned long)bufferStart & 3) ) { + (cblk->channels == 2 && ((unsigned long)bufferStart & 3))) { LOGE("TrackBase::getBuffer buffer out of range:\n start: %p, end %p , mBuffer %p mBufferEnd %p\n \ server %d, serverBase %d, user %d, userBase %d, channels %d", bufferStart, bufferEnd, mBuffer, mBufferEnd, @@ -1750,7 +1733,6 @@ AudioFlinger::MixerThread::Track::~Track() wp<Track> weak(this); // never create a strong ref from the dtor Mutex::Autolock _l(mMixerThread->mAudioFlinger->mLock); mState = TERMINATED; - mMixerThread->removeTrack_l(weak, mName); } void AudioFlinger::MixerThread::Track::destroy() diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h index db5cc74..c7ca9ec 100644 --- a/libs/audioflinger/AudioFlinger.h +++ b/libs/audioflinger/AudioFlinger.h @@ -501,7 +501,6 @@ private: MixerThread& operator = (const MixerThread&); status_t addTrack_l(const sp<Track>& track); - void removeTrack_l(wp<Track> track, int name); void destroyTrack_l(const sp<Track>& track); int getTrackName_l(); void deleteTrackName_l(int name); diff --git a/libs/audioflinger/AudioHardwareInterface.cpp b/libs/audioflinger/AudioHardwareInterface.cpp index ac76a19..cc1bd8f 100644 --- a/libs/audioflinger/AudioHardwareInterface.cpp +++ b/libs/audioflinger/AudioHardwareInterface.cpp @@ -53,7 +53,7 @@ static const char* routeStrings[] = "EARPIECE ", "SPEAKER ", "BLUETOOTH ", - "HEADSET " + "HEADSET ", "BLUETOOTH_A2DP " }; static const char* routeNone = "NONE"; diff --git a/location/java/android/location/Geocoder.java b/location/java/android/location/Geocoder.java index 53e46b7..2ce1273 100644 --- a/location/java/android/location/Geocoder.java +++ b/location/java/android/location/Geocoder.java @@ -36,11 +36,11 @@ import java.util.List; * coordinate into a (partial) address. The amount of detail in a * reverse geocoded location description may vary, for example one * might contain the full street address of the closest building, while - * another might contain only a city name and postal code. + * another might contain only a city name and postal code. * * The Geocoder class requires a backend service that is not included in - * the core android framework. The Geocoder query methods will return an - * empty list if there no backend service in the platform. + * the core android framework. The Geocoder query methods will return an + * empty list if there no backend service in the platform. */ public final class Geocoder { private static final String TAG = "Geocoder"; diff --git a/location/java/android/location/IGeocodeProvider.aidl b/location/java/android/location/IGeocodeProvider.aidl new file mode 100644 index 0000000..e79e8d2 --- /dev/null +++ b/location/java/android/location/IGeocodeProvider.aidl @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.location; + +import android.location.Address; + +/** + * An interface for location providers implementing the Geocoder services. + * + * {@hide} + */ +interface IGeocodeProvider { + + String getFromLocation(double latitude, double longitude, int maxResults, + String language, String country, String variant, String appName, out List<Address> addrs); + + String getFromLocationName(String locationName, + double lowerLeftLatitude, double lowerLeftLongitude, + double upperRightLatitude, double upperRightLongitude, int maxResults, + String language, String country, String variant, String appName, out List<Address> addrs); +} diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl index 86bd8b6..7d35814 100644 --- a/location/java/android/location/ILocationManager.aidl +++ b/location/java/android/location/ILocationManager.aidl @@ -18,6 +18,7 @@ package android.location; import android.app.PendingIntent; import android.location.Address; +import android.location.IGeocodeProvider; import android.location.IGpsStatusListener; import android.location.ILocationCollector; import android.location.ILocationListener; @@ -77,7 +78,8 @@ interface ILocationManager void setTestProviderStatus(String provider, int status, in Bundle extras, long updateTime); void clearTestProviderStatus(String provider); - /* for installing Network Location Provider */ + /* for installing external Location Providers */ void setNetworkLocationProvider(ILocationProvider provider); void setLocationCollector(ILocationCollector collector); + void setGeocodeProvider(IGeocodeProvider provider); } diff --git a/location/java/android/location/ILocationProvider.aidl b/location/java/android/location/ILocationProvider.aidl index 6f9daff..82533a5 100644 --- a/location/java/android/location/ILocationProvider.aidl +++ b/location/java/android/location/ILocationProvider.aidl @@ -16,7 +16,6 @@ package android.location; -import android.location.Address; import android.os.Bundle; /** @@ -47,15 +46,8 @@ interface ILocationProvider { void setMinTime(long minTime); void updateNetworkState(int state); boolean sendExtraCommand(String command, inout Bundle extras); - - /* the following are only used for NetworkLocationProvider */ - void updateCellLockStatus(boolean acquired); - void addListener(in String[] applications); - void removeListener(in String[] applications); - String getFromLocation(double latitude, double longitude, int maxResults, - String language, String country, String variant, String appName, out List<Address> addrs); - String getFromLocationName(String locationName, - double lowerLeftLatitude, double lowerLeftLongitude, - double upperRightLatitude, double upperRightLongitude, int maxResults, - String language, String country, String variant, String appName, out List<Address> addrs); + void addListener(int uid); + void removeListener(int uid); + void wakeLockAcquired(); + void wakeLockReleased(); } diff --git a/location/java/android/location/LocationProviderImpl.java b/location/java/android/location/LocationProviderImpl.java index 2a9199e..a20aa3c 100644 --- a/location/java/android/location/LocationProviderImpl.java +++ b/location/java/android/location/LocationProviderImpl.java @@ -249,4 +249,32 @@ public abstract class LocationProviderImpl extends LocationProvider { public boolean sendExtraCommand(String command, Bundle extras) { return false; } + + /** + * Informs the location provider when a new client is listening for location information + * + * @param uid the uid of the client proces + */ + public void addListener(int uid) { + } + + /** + * Informs the location provider when a client is no longer listening for location information + * + * @param uid the uid of the client proces + */ + public void removeListener(int uid) { + } + + /** + * Informs the location provider when the location manager service has acquired its wake lock + */ + public void wakeLockAcquired() { + } + + /** + * Informs the location provider when the location manager service has released its wake lock + */ + public void wakeLockReleased() { + } } diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java index 8a33574..924641c 100644 --- a/location/java/com/android/internal/location/GpsLocationProvider.java +++ b/location/java/com/android/internal/location/GpsLocationProvider.java @@ -22,20 +22,23 @@ import android.content.Intent; import android.content.IntentFilter; import android.location.Criteria; import android.location.IGpsStatusListener; -import android.location.ILocationCollector; import android.location.ILocationManager; import android.location.Location; import android.location.LocationManager; import android.location.LocationProvider; import android.location.LocationProviderImpl; +import android.net.ConnectivityManager; import android.net.SntpClient; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; +import android.os.ServiceManager; import android.os.SystemClock; import android.util.Config; import android.util.Log; +import android.util.SparseIntArray; +import com.android.internal.app.IBatteryStats; import com.android.internal.telephony.Phone; import com.android.internal.telephony.TelephonyIntents; @@ -99,6 +102,14 @@ public class GpsLocationProvider extends LocationProviderImpl { private static final int GPS_STATUS_ENGINE_ON = 3; private static final int GPS_STATUS_ENGINE_OFF = 4; + // these need to match GpsSuplStatusValue defines in gps.h + /** SUPL status event values. */ + private static final int GPS_REQUEST_SUPL_DATA_CONN = 1; + private static final int GPS_RELEASE_SUPL_DATA_CONN = 2; + private static final int GPS_SUPL_DATA_CONNECTED = 3; + private static final int GPS_SUPL_DATA_CONN_DONE = 4; + private static final int GPS_SUPL_DATA_CONN_FAILED = 5; + // these need to match GpsLocationFlags enum in gps.h private static final int LOCATION_INVALID = 0; private static final int LOCATION_HAS_LAT_LONG = 1; @@ -122,6 +133,11 @@ public class GpsLocationProvider extends LocationProviderImpl { private static final int GPS_DELETE_CELLDB_INFO = 0x8000; private static final int GPS_DELETE_ALL = 0xFFFF; + // for mSuplDataConnectionState + private static final int SUPL_DATA_CONNECTION_CLOSED = 0; + private static final int SUPL_DATA_CONNECTION_OPENING = 1; + private static final int SUPL_DATA_CONNECTION_OPEN = 2; + private static final String PROPERTIES_FILE = "/etc/gps.conf"; private int mLocationFlags = LOCATION_INVALID; @@ -176,6 +192,12 @@ public class GpsLocationProvider extends LocationProviderImpl { private String mSuplHost; private int mSuplPort; private boolean mSetSuplServer; + private String mSuplApn; + private int mSuplDataConnectionState; + private final ConnectivityManager mConnMgr; + + private final IBatteryStats mBatteryStats; + private final SparseIntArray mClientUids = new SparseIntArray(); // how often to request NTP time, in milliseconds // current setting 4 hours @@ -184,8 +206,6 @@ public class GpsLocationProvider extends LocationProviderImpl { // current setting - 5 minutes private static final long RETRY_INTERVAL = 5*60*1000; - private ILocationCollector mCollector; - private class TelephonyBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); @@ -198,10 +218,12 @@ public class GpsLocationProvider extends LocationProviderImpl { if (Config.LOGD) { Log.d(TAG, "state: " + state + " apnName: " + apnName + " reason: " + reason); } - if ("CONNECTED".equals(state)) { - native_set_supl_apn(apnName); - } else { - native_set_supl_apn(""); + if ("CONNECTED".equals(state) && apnName != null && apnName.length() > 0) { + mSuplApn = apnName; + if (mSuplDataConnectionState == SUPL_DATA_CONNECTION_OPENING) { + native_supl_data_conn_open(mSuplApn); + mSuplDataConnectionState = SUPL_DATA_CONNECTION_OPEN; + } } } } @@ -220,6 +242,11 @@ public class GpsLocationProvider extends LocationProviderImpl { intentFilter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED); context.registerReceiver(receiver, intentFilter); + mConnMgr = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); + + // Battery statistics service to be notified when GPS turns on or off + mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService("batteryinfo")); + mProperties = new Properties(); try { File file = new File(PROPERTIES_FILE); @@ -242,10 +269,6 @@ public class GpsLocationProvider extends LocationProviderImpl { } } - public void setLocationCollector(ILocationCollector collector) { - mCollector = collector; - } - /** * Returns true if the provider requires access to a * data network (e.g., the Internet), false otherwise. @@ -547,6 +570,30 @@ public class GpsLocationProvider extends LocationProviderImpl { } @Override + public void addListener(int uid) { + mClientUids.put(uid, 0); + if (mNavigating) { + try { + mBatteryStats.noteStartGps(uid); + } catch (RemoteException e) { + Log.w(TAG, "RemoteException in addListener"); + } + } + } + + @Override + public void removeListener(int uid) { + mClientUids.delete(uid); + if (mNavigating) { + try { + mBatteryStats.noteStopGps(uid); + } catch (RemoteException e) { + Log.w(TAG, "RemoteException in removeListener"); + } + } + } + + @Override public boolean sendExtraCommand(String command, Bundle extras) { if ("delete_aiding_data".equals(command)) { @@ -675,16 +722,6 @@ public class GpsLocationProvider extends LocationProviderImpl { } reportLocationChanged(mLocation); - - // Send to collector - if ((flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG - && mCollector != null) { - try { - mCollector.updateLocation(mLocation); - } catch (RemoteException e) { - Log.w(TAG, "mCollector.updateLocation failed"); - } - } } if (mStarted && mStatus != AVAILABLE) { @@ -725,6 +762,20 @@ public class GpsLocationProvider extends LocationProviderImpl { } } + try { + // update battery stats + for (int i=mClientUids.size() - 1; i >= 0; i--) { + int uid = mClientUids.keyAt(i); + if (mNavigating) { + mBatteryStats.noteStartGps(uid); + } else { + mBatteryStats.noteStopGps(uid); + } + } + } catch (RemoteException e) { + Log.w(TAG, "RemoteException in reportStatus"); + } + // send an intent to notify that the GPS has been enabled or disabled. Intent intent = new Intent(GPS_ENABLED_CHANGE_ACTION); intent.putExtra(EXTRA_ENABLED, mNavigating); @@ -782,7 +833,44 @@ public class GpsLocationProvider extends LocationProviderImpl { updateStatus(TEMPORARILY_UNAVAILABLE, mSvCount); } } - + + /** + * called from native code to update SUPL status + */ + private void reportSuplStatus(int status) { + switch (status) { + case GPS_REQUEST_SUPL_DATA_CONN: + int result = mConnMgr.startUsingNetworkFeature( + ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL); + if (result == Phone.APN_ALREADY_ACTIVE) { + native_supl_data_conn_open(mSuplApn); + mSuplDataConnectionState = SUPL_DATA_CONNECTION_OPEN; + } else if (result == Phone.APN_REQUEST_STARTED) { + mSuplDataConnectionState = SUPL_DATA_CONNECTION_OPENING; + } else { + native_supl_data_conn_failed(); + } + break; + case GPS_RELEASE_SUPL_DATA_CONN: + if (mSuplDataConnectionState != SUPL_DATA_CONNECTION_CLOSED) { + mConnMgr.stopUsingNetworkFeature( + ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL); + native_supl_data_conn_closed(); + mSuplDataConnectionState = SUPL_DATA_CONNECTION_CLOSED; + } + break; + case GPS_SUPL_DATA_CONNECTED: + // Log.d(TAG, "GPS_SUPL_DATA_CONNECTED"); + break; + case GPS_SUPL_DATA_CONN_DONE: + // Log.d(TAG, "GPS_SUPL_DATA_CONN_DONE"); + break; + case GPS_SUPL_DATA_CONN_FAILED: + // Log.d(TAG, "GPS_SUPL_DATA_CONN_FAILED"); + break; + } + } + private void xtraDownloadRequest() { if (Config.LOGD) Log.d(TAG, "xtraDownloadRequest"); if (mNetworkThread != null) { @@ -1002,6 +1090,8 @@ public class GpsLocationProvider extends LocationProviderImpl { private native void native_inject_xtra_data(byte[] data, int length); // SUPL Support + private native void native_supl_data_conn_open(String apn); + private native void native_supl_data_conn_closed(); + private native void native_supl_data_conn_failed(); private native void native_set_supl_server(int addr, int port); - private native void native_set_supl_apn(String apn); } diff --git a/location/java/com/android/internal/location/LocationProviderProxy.java b/location/java/com/android/internal/location/LocationProviderProxy.java index 1f4940f..72dd07d 100644 --- a/location/java/com/android/internal/location/LocationProviderProxy.java +++ b/location/java/com/android/internal/location/LocationProviderProxy.java @@ -222,52 +222,35 @@ public class LocationProviderProxy extends LocationProviderImpl { } } - public void updateCellLockStatus(boolean acquired) { + public void addListener(int uid) { try { - mProvider.updateCellLockStatus(acquired); - } catch (RemoteException e) { - Log.e(TAG, "updateCellLockStatus failed", e); - } - } - - public void addListener(String[] applications) { - try { - mProvider.addListener(applications); + mProvider.addListener(uid); } catch (RemoteException e) { Log.e(TAG, "addListener failed", e); } } - public void removeListener(String[] applications) { + public void removeListener(int uid) { try { - mProvider.removeListener(applications); + mProvider.removeListener(uid); } catch (RemoteException e) { Log.e(TAG, "removeListener failed", e); } } - public String getFromLocation(double latitude, double longitude, int maxResults, - String language, String country, String variant, String appName, List<Address> addrs) { + public void wakeLockAcquired() { try { - return mProvider.getFromLocation(latitude, longitude, maxResults, language, country, - variant, appName, addrs); + mProvider.wakeLockAcquired(); } catch (RemoteException e) { - Log.e(TAG, "getFromLocation failed", e); - return null; + Log.e(TAG, "wakeLockAcquired failed", e); } } - public String getFromLocationName(String locationName, - double lowerLeftLatitude, double lowerLeftLongitude, - double upperRightLatitude, double upperRightLongitude, int maxResults, - String language, String country, String variant, String appName, List<Address> addrs) { + public void wakeLockReleased() { try { - return mProvider.getFromLocationName(locationName, lowerLeftLatitude, - lowerLeftLongitude, upperRightLatitude, upperRightLongitude, - maxResults, language, country, variant, appName, addrs); + mProvider.wakeLockReleased(); } catch (RemoteException e) { - Log.e(TAG, "getFromLocationName failed", e); - return null; + Log.e(TAG, "wakeLockReleased failed", e); } } } diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index d0fa795..5917ab9 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -200,7 +200,7 @@ public class AudioSystem * param error error code: * - AUDIO_STATUS_OK * - AUDIO_STATUS_SERVER_DIED - * - UDIO_STATUS_ERROR + * - AUDIO_STATUS_ERROR */ void onError(int error); }; diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java index cba6292..c0cd5e3 100644 --- a/media/java/android/media/MediaScanner.java +++ b/media/java/android/media/MediaScanner.java @@ -459,11 +459,12 @@ public class MediaScanner FileCacheEntry entry = beginFile(path, mimeType, lastModified, fileSize); // rescan for metadata if file was modified since last scan if (entry != null && (entry.mLastModifiedChanged || scanAlways)) { - boolean ringtones = (path.indexOf(RINGTONES_DIR) > 0); - boolean notifications = (path.indexOf(NOTIFICATIONS_DIR) > 0); - boolean alarms = (path.indexOf(ALARMS_DIR) > 0); - boolean podcasts = (path.indexOf(PODCAST_DIR) > 0); - boolean music = (path.indexOf(MUSIC_DIR) > 0) || + String lowpath = path.toLowerCase(); + boolean ringtones = (lowpath.indexOf(RINGTONES_DIR) > 0); + boolean notifications = (lowpath.indexOf(NOTIFICATIONS_DIR) > 0); + boolean alarms = (lowpath.indexOf(ALARMS_DIR) > 0); + boolean podcasts = (lowpath.indexOf(PODCAST_DIR) > 0); + boolean music = (lowpath.indexOf(MUSIC_DIR) > 0) || (!ringtones && !notifications && !alarms && !podcasts); if (mFileType == MediaFile.FILE_TYPE_MP3 || diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 986f88e..1720af0 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -73,7 +73,6 @@ AudioRecord::~AudioRecord() // Otherwise the callback thread will never exit. stop(); if (mClientRecordThread != 0) { - mCblk->cv.signal(); mClientRecordThread->requestExitAndWait(); mClientRecordThread.clear(); } @@ -96,7 +95,7 @@ status_t AudioRecord::set( { LOGV("set(): sampleRate %d, channelCount %d, frameCount %d",sampleRate, channelCount, frameCount); - if (mAudioFlinger != 0) { + if (mAudioRecord != 0) { return INVALID_OPERATION; } @@ -181,7 +180,6 @@ status_t AudioRecord::set( mStatus = NO_ERROR; - mAudioFlinger = audioFlinger; mAudioRecord = record; mCblkMemory = cblk; mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer()); @@ -293,6 +291,7 @@ status_t AudioRecord::stop() } if (android_atomic_and(~1, &mActive) == 1) { + mCblk->cv.signal(); mAudioRecord->stop(); // the record head position will reset to 0, so if a marker is set, we need // to activate it again @@ -375,6 +374,7 @@ status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) status_t result; audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = audioBuffer->frameCount; + uint32_t waitTimeMs = (waitCount < 0) ? cblk->bufferTimeoutMs : WAIT_PERIOD_MS; audioBuffer->frameCount = 0; audioBuffer->size = 0; @@ -391,9 +391,9 @@ status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) if (UNLIKELY(!waitCount)) return WOULD_BLOCK; timeout = 0; - result = cblk->cv.waitRelative(cblk->lock, milliseconds(WAIT_PERIOD_MS)); + result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs)); if (__builtin_expect(result!=NO_ERROR, false)) { - cblk->waitTimeMs += WAIT_PERIOD_MS; + cblk->waitTimeMs += waitTimeMs; if (cblk->waitTimeMs >= cblk->bufferTimeoutMs) { LOGW( "obtainBuffer timed out (is the CPU pegged?) " "user=%08x, server=%08x", cblk->user, cblk->server); @@ -520,7 +520,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread) status_t err = obtainBuffer(&audioBuffer, 1); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE("Error obtaining an audio buffer, giving up."); + LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 24f7281..289bd75 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -92,7 +92,6 @@ AudioTrack::~AudioTrack() // Otherwise the callback thread will never exit. stop(); if (mAudioTrackThread != 0) { - mCblk->cv.signal(); mAudioTrackThread->requestExitAndWait(); mAudioTrackThread.clear(); } @@ -117,7 +116,7 @@ status_t AudioTrack::set( LOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); - if (mAudioFlinger != 0) { + if (mAudioTrack != 0) { LOGE("Track already in use"); return INVALID_OPERATION; } @@ -228,7 +227,6 @@ status_t AudioTrack::set( mStatus = NO_ERROR; - mAudioFlinger = audioFlinger; mAudioTrack = track; mCblkMemory = cblk; mCblk = static_cast<audio_track_cblk_t*>(cblk->pointer()); @@ -357,6 +355,7 @@ void AudioTrack::stop() } if (android_atomic_and(~1, &mActive) == 1) { + mCblk->cv.signal(); mAudioTrack->stop(); // Cancel loops (If we are in the middle of a loop, playback // would not stop until loopCount reaches 0). @@ -596,6 +595,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) status_t result; audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = audioBuffer->frameCount; + uint32_t waitTimeMs = (waitCount < 0) ? cblk->bufferTimeoutMs : WAIT_PERIOD_MS; audioBuffer->frameCount = 0; audioBuffer->size = 0; @@ -614,9 +614,9 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) if (UNLIKELY(!waitCount)) return WOULD_BLOCK; timeout = 0; - result = cblk->cv.waitRelative(cblk->lock, milliseconds(WAIT_PERIOD_MS)); + result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs)); if (__builtin_expect(result!=NO_ERROR, false)) { - cblk->waitTimeMs += WAIT_PERIOD_MS; + cblk->waitTimeMs += waitTimeMs; if (cblk->waitTimeMs >= cblk->bufferTimeoutMs) { // timing out when a loop has been set and we have already written upto loop end // is a normal condition: no need to wake AudioFlinger up. @@ -798,7 +798,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread) status_t err = obtainBuffer(&audioBuffer, 1); if (err < NO_ERROR) { if (err != TIMED_OUT) { - LOGE("Error obtaining an audio buffer, giving up."); + LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up."); return false; } break; diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index 5cbb25c..52bd7d4 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -336,7 +336,7 @@ public: { Parcel data, reply; data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor()); - remote()->transact(WAKE_UP, data, &reply); + remote()->transact(WAKE_UP, data, &reply, IBinder::FLAG_ONEWAY); return; } diff --git a/media/libmedia/IAudioFlingerClient.cpp b/media/libmedia/IAudioFlingerClient.cpp index 5feb11f..9d00aef 100644 --- a/media/libmedia/IAudioFlingerClient.cpp +++ b/media/libmedia/IAudioFlingerClient.cpp @@ -43,7 +43,7 @@ public: Parcel data, reply; data.writeInterfaceToken(IAudioFlingerClient::getInterfaceDescriptor()); data.writeInt32((int)enabled); - remote()->transact(AUDIO_OUTPUT_CHANGED, data, &reply); + remote()->transact(AUDIO_OUTPUT_CHANGED, data, &reply, IBinder::FLAG_ONEWAY); } }; diff --git a/services/java/com/android/server/BatteryService.java b/services/java/com/android/server/BatteryService.java index 6099024..90d8c9d 100644 --- a/services/java/com/android/server/BatteryService.java +++ b/services/java/com/android/server/BatteryService.java @@ -84,7 +84,7 @@ class BatteryService extends Binder { private static final int CRITICAL_BATTERY_LEVEL = 4; private static final int DUMP_MAX_LENGTH = 24 * 1024; - private static final String[] DUMPSYS_ARGS = new String[] { "-c", "-u" }; + private static final String[] DUMPSYS_ARGS = new String[] { "--checkin", "-u" }; private static final String BATTERY_STATS_SERVICE_NAME = "batteryinfo"; private static final String DUMPSYS_DATA_PATH = "/data/system/"; @@ -251,10 +251,14 @@ class BatteryService extends Binder { // since the standard intent will not wake any applications and some // applications may want to have smart behavior based on this. if (mPlugType != 0 && mLastPlugType == 0) { - mContext.sendBroadcast(new Intent(Intent.ACTION_POWER_CONNECTED)); + Intent intent = new Intent(Intent.ACTION_POWER_CONNECTED); + intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); + mContext.sendBroadcast(intent); } else if (mPlugType == 0 && mLastPlugType != 0) { - mContext.sendBroadcast(new Intent(Intent.ACTION_POWER_DISCONNECTED)); + Intent intent = new Intent(Intent.ACTION_POWER_DISCONNECTED); + intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); + mContext.sendBroadcast(intent); } mLastBatteryStatus = mBatteryStatus; diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index 938a43d..5e079d4 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -44,6 +44,7 @@ import android.content.IntentFilter; import android.content.pm.PackageManager; import android.database.Cursor; import android.location.Address; +import android.location.IGeocodeProvider; import android.location.IGpsStatusListener; import android.location.ILocationCollector; import android.location.ILocationListener; @@ -55,7 +56,6 @@ import android.location.LocationProvider; import android.location.LocationProviderImpl; import android.net.ConnectivityManager; import android.net.Uri; -import android.net.wifi.WifiManager; import android.os.Binder; import android.os.Bundle; import android.os.Handler; @@ -66,13 +66,11 @@ import android.os.Process; import android.os.RemoteException; import android.os.SystemClock; import android.provider.Settings; -import android.telephony.TelephonyManager; import android.util.Config; import android.util.Log; import android.util.PrintWriterPrinter; import android.util.SparseIntArray; -import com.android.internal.app.IBatteryStats; import com.android.internal.location.GpsLocationProvider; import com.android.internal.location.LocationProviderProxy; import com.android.internal.location.MockProvider; @@ -126,58 +124,33 @@ public class LocationManagerService extends ILocationManager.Stub { private final Context mContext; private GpsLocationProvider mGpsLocationProvider; - private boolean mGpsNavigating; private LocationProviderProxy mNetworkLocationProvider; + private IGeocodeProvider mGeocodeProvider; private LocationWorkerHandler mLocationHandler; // Handler messages private static final int MESSAGE_LOCATION_CHANGED = 1; - private static final int MESSAGE_ACQUIRE_WAKE_LOCK = 2; - private static final int MESSAGE_RELEASE_WAKE_LOCK = 3; + private static final int MESSAGE_RELEASE_WAKE_LOCK = 2; // Alarm manager and wakelock variables private final static String ALARM_INTENT = "com.android.location.ALARM_INTENT"; private final static String WAKELOCK_KEY = "LocationManagerService"; - private final static String WIFILOCK_KEY = "LocationManagerService"; private AlarmManager mAlarmManager; private long mAlarmInterval = 0; - private boolean mScreenOn = true; private PowerManager.WakeLock mWakeLock = null; - private WifiManager.WifiLock mWifiLock = null; private long mWakeLockAcquireTime = 0; private boolean mWakeLockGpsReceived = true; private boolean mWakeLockNetworkReceived = true; - private boolean mWifiWakeLockAcquired = false; - private boolean mCellWakeLockAcquired = false; - - private final IBatteryStats mBatteryStats; /** - * Mapping from listener IBinder/PendingIntent to local Listener wrappers. + * List of all receivers. */ - private final ArrayList<Receiver> mListeners = new ArrayList<Receiver>(); + private final HashMap<Object, Receiver> mReceivers = new HashMap<Object, Receiver>(); /** - * Used for reporting which UIDs are causing the GPS to run. - */ - private final SparseIntArray mReportedGpsUids = new SparseIntArray(); - private int mReportedGpsSeq = 0; - - /** - * Mapping from listener IBinder/PendingIntent to a map from provider name to UpdateRecord. - * This also serves as the lock for our state. + * Object used internally for synchronization */ - private final HashMap<Receiver,HashMap<String,UpdateRecord>> mLocationListeners = - new HashMap<Receiver,HashMap<String,UpdateRecord>>(); - - /** - * Mapping from listener IBinder/PendingIntent to a map from provider name to last broadcast - * location. - */ - private final HashMap<Receiver,HashMap<String,Location>> mLastFixBroadcast = - new HashMap<Receiver,HashMap<String,Location>>(); - private final HashMap<Receiver,HashMap<String,Long>> mLastStatusBroadcast = - new HashMap<Receiver,HashMap<String,Long>>(); + private final Object mLock = new Object(); /** * Mapping from provider name to all its UpdateRecords @@ -196,15 +169,9 @@ public class LocationManagerService extends ILocationManager.Stub { private HashMap<String,Location> mLastKnownLocation = new HashMap<String,Location>(); - // Last known cell service state - private TelephonyManager mTelephonyManager; - // Location collector private ILocationCollector mCollector; - // Wifi Manager - private WifiManager mWifiManager; - private int mNetworkState = LocationProvider.TEMPORARILY_UNAVAILABLE; // for Settings change notification @@ -217,20 +184,18 @@ public class LocationManagerService extends ILocationManager.Stub { private final class Receiver implements IBinder.DeathRecipient { final ILocationListener mListener; final PendingIntent mPendingIntent; - final int mUid; final Object mKey; + final HashMap<String,UpdateRecord> mUpdateRecords = new HashMap<String,UpdateRecord>(); - Receiver(ILocationListener listener, int uid) { + Receiver(ILocationListener listener) { mListener = listener; mPendingIntent = null; - mUid = uid; mKey = listener.asBinder(); } - Receiver(PendingIntent intent, int uid) { + Receiver(PendingIntent intent) { mPendingIntent = intent; mListener = null; - mUid = uid; mKey = intent; } @@ -254,11 +219,11 @@ public class LocationManagerService extends ILocationManager.Stub { if (mListener != null) { return "Receiver{" + Integer.toHexString(System.identityHashCode(this)) - + " uid " + mUid + " Listener " + mKey + "}"; + + " Listener " + mKey + "}"; } else { return "Receiver{" + Integer.toHexString(System.identityHashCode(this)) - + " uid " + mUid + " Intent " + mKey + "}"; + + " Intent " + mKey + "}"; } } @@ -327,7 +292,7 @@ public class LocationManagerService extends ILocationManager.Stub { if (LOCAL_LOGV) { Log.v(TAG, "Location listener died"); } - synchronized (mLocationListeners) { + synchronized (mLock) { removeUpdatesLocked(this); } } @@ -335,7 +300,7 @@ public class LocationManagerService extends ILocationManager.Stub { private final class SettingsObserver implements Observer { public void update(Observable o, Object arg) { - synchronized (mLocationListeners) { + synchronized (mLock) { updateProvidersLocked(); } } @@ -442,7 +407,7 @@ public class LocationManagerService extends ILocationManager.Stub { * properties */ private void loadProviders() { - synchronized (mLocationListeners) { + synchronized (mLock) { if (sProvidersLoaded) { return; } @@ -556,15 +521,9 @@ public class LocationManagerService extends ILocationManager.Stub { PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKELOCK_KEY); - // Battery statistics service to be notified when GPS turns on or off - mBatteryStats = BatteryStatsService.getService(); - // Load providers loadProviders(); - // Listen for Radio changes - mTelephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); - // Register for Network (Wifi or Mobile) updates NetworkStateBroadcastReceiver networkReceiver = new NetworkStateBroadcastReceiver(); IntentFilter networkIntentFilter = new IntentFilter(); @@ -576,8 +535,6 @@ public class LocationManagerService extends ILocationManager.Stub { PowerStateBroadcastReceiver powerStateReceiver = new PowerStateBroadcastReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(ALARM_INTENT); - intentFilter.addAction(Intent.ACTION_SCREEN_OFF); - intentFilter.addAction(Intent.ACTION_SCREEN_ON); intentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED); intentFilter.addAction(Intent.ACTION_PACKAGE_RESTARTED); context.registerReceiver(powerStateReceiver, intentFilter); @@ -591,12 +548,6 @@ public class LocationManagerService extends ILocationManager.Stub { mSettings = new ContentQueryMap(settingsCursor, Settings.System.NAME, true, mLocationHandler); SettingsObserver settingsObserver = new SettingsObserver(); mSettings.addObserver(settingsObserver); - - // Get the wifi manager - mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); - - // Create a wifi lock for future use - mWifiLock = getWifiWakelockLocked(); } public void setNetworkLocationProvider(ILocationProvider provider) { @@ -605,16 +556,14 @@ public class LocationManagerService extends ILocationManager.Stub { "Installing location providers outside of the system is not supported"); } - synchronized (mLocationListeners) { + synchronized (mLock) { mNetworkLocationProvider = new LocationProviderProxy(LocationManager.NETWORK_PROVIDER, this, provider); - mNetworkLocationProvider.addListener(getPackageNames()); LocationProviderImpl.addProvider(mNetworkLocationProvider); updateProvidersLocked(); // notify NetworkLocationProvider of any events it might have missed mNetworkLocationProvider.updateNetworkState(mNetworkState); - mNetworkLocationProvider.updateCellLockStatus(mCellWakeLockAcquired); } } @@ -624,20 +573,16 @@ public class LocationManagerService extends ILocationManager.Stub { "Installing location collectors outside of the system is not supported"); } - synchronized (mLocationListeners) { - mCollector = collector; - if (mGpsLocationProvider != null) { - mGpsLocationProvider.setLocationCollector(mCollector); - } - } + mCollector = collector; } - private WifiManager.WifiLock getWifiWakelockLocked() { - if (mWifiLock == null && mWifiManager != null) { - mWifiLock = mWifiManager.createWifiLock(WifiManager.WIFI_MODE_SCAN_ONLY, WIFILOCK_KEY); - mWifiLock.setReferenceCounted(false); + public void setGeocodeProvider(IGeocodeProvider provider) { + if (Binder.getCallingUid() != Process.SYSTEM_UID) { + throw new SecurityException( + "Installing location providers outside of the system is not supported"); } - return mWifiLock; + + mGeocodeProvider = provider; } private boolean isAllowedBySettingsLocked(String provider) { @@ -688,15 +633,9 @@ public class LocationManagerService extends ILocationManager.Stub { return true; } - private String[] getPackageNames() { - // Since a single UID may correspond to multiple packages, this can only be used as an - // approximation for tracking - return mContext.getPackageManager().getPackagesForUid(Binder.getCallingUid()); - } - public List<String> getAllProviders() { try { - synchronized (mLocationListeners) { + synchronized (mLock) { return _getAllProvidersLocked(); } } catch (SecurityException se) { @@ -722,7 +661,7 @@ public class LocationManagerService extends ILocationManager.Stub { public List<String> getProviders(boolean enabledOnly) { try { - synchronized (mLocationListeners) { + synchronized (mLock) { return _getProvidersLocked(enabledOnly); } } catch (SecurityException se) { @@ -822,16 +761,12 @@ public class LocationManagerService extends ILocationManager.Stub { if (listeners > 0) { p.setMinTime(getMinTimeLocked(provider)); p.enableLocationTracking(true); - updateWakelockStatusLocked(mScreenOn); + updateWakelockStatusLocked(); } } else { p.enableLocationTracking(false); - if (p == mGpsLocationProvider) { - mGpsNavigating = false; - reportStopGpsLocked(); - } p.disable(); - updateWakelockStatusLocked(mScreenOn); + updateWakelockStatusLocked(); } } @@ -852,19 +787,19 @@ public class LocationManagerService extends ILocationManager.Stub { final long mMinTime; final float mMinDistance; final int mUid; - final String[] mPackages; + Location mLastFixBroadcast; + long mLastStatusBroadcast; /** * Note: must be constructed with lock held. */ UpdateRecord(String provider, long minTime, float minDistance, - Receiver receiver, int uid, String[] packages) { + Receiver receiver, int uid) { mProvider = provider; mReceiver = receiver; mMinTime = minTime; mMinDistance = minDistance; mUid = uid; - mPackages = packages; ArrayList<UpdateRecord> records = mRecordsByProvider.get(provider); if (records == null) { @@ -896,33 +831,77 @@ public class LocationManagerService extends ILocationManager.Stub { pw.println(prefix + this); pw.println(prefix + "mProvider=" + mProvider + " mReceiver=" + mReceiver); pw.println(prefix + "mMinTime=" + mMinTime + " mMinDistance=" + mMinDistance); - StringBuilder sb = new StringBuilder(); - if (mPackages != null) { - for (int i=0; i<mPackages.length; i++) { - if (i > 0) sb.append(", "); - sb.append(mPackages[i]); - } - } - pw.println(prefix + "mUid=" + mUid + " mPackages=" + sb); + pw.println(prefix + "mUid=" + mUid); + pw.println(prefix + "mLastFixBroadcast:"); + mLastFixBroadcast.dump(new PrintWriterPrinter(pw), prefix + " "); + pw.println(prefix + "mLastStatusBroadcast=" + mLastStatusBroadcast); } /** * Calls dispose(). */ @Override protected void finalize() { - synchronized (mLocationListeners) { + synchronized (mLock) { disposeLocked(); } } } + private Receiver getReceiver(ILocationListener listener) { + IBinder binder = listener.asBinder(); + Receiver receiver = mReceivers.get(binder); + if (receiver == null) { + receiver = new Receiver(listener); + mReceivers.put(binder, receiver); + + try { + if (receiver.isListener()) { + receiver.getListener().asBinder().linkToDeath(receiver, 0); + } + } catch (RemoteException e) { + Log.e(TAG, "linkToDeath failed:", e); + return null; + } + } + return receiver; + } + + private Receiver getReceiver(PendingIntent intent) { + Receiver receiver = mReceivers.get(intent); + if (receiver == null) { + receiver = new Receiver(intent); + mReceivers.put(intent, receiver); + } + return receiver; + } + + private boolean providerHasListener(String provider, int uid, Receiver excludedReceiver) { + ArrayList<UpdateRecord> records = mRecordsByProvider.get(provider); + if (records != null) { + for (int i = records.size() - 1; i >= 0; i--) { + UpdateRecord record = records.get(i); + if (record.mUid == uid && record.mReceiver != excludedReceiver) { + return true; + } + } + } + if (LocationManager.GPS_PROVIDER.equals(provider) || + LocationManager.NETWORK_PROVIDER.equals(provider)) { + for (ProximityAlert alert : mProximityAlerts.values()) { + if (alert.mUid == uid) { + return true; + } + } + } + return false; + } + public void requestLocationUpdates(String provider, long minTime, float minDistance, ILocationListener listener) { try { - synchronized (mLocationListeners) { - requestLocationUpdatesLocked(provider, minTime, minDistance, - new Receiver(listener, Binder.getCallingUid())); + synchronized (mLock) { + requestLocationUpdatesLocked(provider, minTime, minDistance, getReceiver(listener)); } } catch (SecurityException se) { throw se; @@ -934,9 +913,8 @@ public class LocationManagerService extends ILocationManager.Stub { public void requestLocationUpdatesPI(String provider, long minTime, float minDistance, PendingIntent intent) { try { - synchronized (mLocationListeners) { - requestLocationUpdatesLocked(provider, minTime, minDistance, - new Receiver(intent, Binder.getCallingUid())); + synchronized (mLock) { + requestLocationUpdatesLocked(provider, minTime, minDistance, getReceiver(intent)); } } catch (SecurityException se) { throw se; @@ -958,47 +936,27 @@ public class LocationManagerService extends ILocationManager.Stub { checkPermissionsSafe(provider); - String[] packages = getPackageNames(); - // so wakelock calls will succeed final int callingUid = Binder.getCallingUid(); + boolean newUid = !providerHasListener(provider, callingUid, null); long identity = Binder.clearCallingIdentity(); try { - UpdateRecord r = new UpdateRecord(provider, minTime, minDistance, - receiver, callingUid, packages); - if (!mListeners.contains(receiver)) { - try { - if (receiver.isListener()) { - receiver.getListener().asBinder().linkToDeath(receiver, 0); - } - mListeners.add(receiver); - } catch (RemoteException e) { - return; - } - } - - HashMap<String,UpdateRecord> records = mLocationListeners.get(receiver); - if (records == null) { - records = new HashMap<String,UpdateRecord>(); - mLocationListeners.put(receiver, records); - } - UpdateRecord oldRecord = records.put(provider, r); + UpdateRecord r = new UpdateRecord(provider, minTime, minDistance, receiver, callingUid); + UpdateRecord oldRecord = receiver.mUpdateRecords.put(provider, r); if (oldRecord != null) { oldRecord.disposeLocked(); } + if (newUid) { + impl.addListener(callingUid); + } + boolean isProviderEnabled = isAllowedBySettingsLocked(provider); if (isProviderEnabled) { long minTimeForProvider = getMinTimeLocked(provider); impl.setMinTime(minTimeForProvider); impl.enableLocationTracking(true); - updateWakelockStatusLocked(mScreenOn); - - if (provider.equals(LocationManager.GPS_PROVIDER)) { - if (mGpsNavigating) { - updateReportedGpsLocked(); - } - } + updateWakelockStatusLocked(); } else { try { // Notify the listener that updates are currently disabled @@ -1017,8 +975,8 @@ public class LocationManagerService extends ILocationManager.Stub { public void removeUpdates(ILocationListener listener) { try { - synchronized (mLocationListeners) { - removeUpdatesLocked(new Receiver(listener, Binder.getCallingUid())); + synchronized (mLock) { + removeUpdatesLocked(getReceiver(listener)); } } catch (SecurityException se) { throw se; @@ -1029,8 +987,8 @@ public class LocationManagerService extends ILocationManager.Stub { public void removeUpdatesPI(PendingIntent intent) { try { - synchronized (mLocationListeners) { - removeUpdatesLocked(new Receiver(intent, Binder.getCallingUid())); + synchronized (mLock) { + removeUpdatesLocked(getReceiver(intent)); } } catch (SecurityException se) { throw se; @@ -1048,23 +1006,21 @@ public class LocationManagerService extends ILocationManager.Stub { final int callingUid = Binder.getCallingUid(); long identity = Binder.clearCallingIdentity(); try { - int idx = mListeners.indexOf(receiver); - if (idx >= 0) { - Receiver myReceiver = mListeners.remove(idx); - if (myReceiver.isListener()) { - myReceiver.getListener().asBinder().unlinkToDeath(myReceiver, 0); - } + if (mReceivers.remove(receiver.mKey) != null && receiver.isListener()) { + receiver.getListener().asBinder().unlinkToDeath(receiver, 0); } // Record which providers were associated with this listener HashSet<String> providers = new HashSet<String>(); - HashMap<String,UpdateRecord> oldRecords = mLocationListeners.get(receiver); + HashMap<String,UpdateRecord> oldRecords = receiver.mUpdateRecords; if (oldRecords != null) { // Call dispose() on the obsolete update records. for (UpdateRecord record : oldRecords.values()) { - if (record.mProvider.equals(LocationManager.NETWORK_PROVIDER)) { - if (mNetworkLocationProvider != null) { - mNetworkLocationProvider.removeListener(record.mPackages); + if (!providerHasListener(record.mProvider, callingUid, receiver)) { + LocationProviderImpl impl = + LocationProviderImpl.getProvider(record.mProvider); + if (impl != null) { + impl.removeListener(callingUid); } } record.disposeLocked(); @@ -1072,10 +1028,6 @@ public class LocationManagerService extends ILocationManager.Stub { // Accumulate providers providers.addAll(oldRecords.keySet()); } - - mLocationListeners.remove(receiver); - mLastFixBroadcast.remove(receiver); - mLastStatusBroadcast.remove(receiver); // See if the providers associated with this listener have any // other listeners; if one does, inform it of the new smallest minTime @@ -1099,14 +1051,10 @@ public class LocationManagerService extends ILocationManager.Stub { } else { p.enableLocationTracking(false); } - - if (p == mGpsLocationProvider && mGpsNavigating) { - updateReportedGpsLocked(); - } } } - updateWakelockStatusLocked(mScreenOn); + updateWakelockStatusLocked(); } finally { Binder.restoreCallingIdentity(identity); } @@ -1131,7 +1079,7 @@ public class LocationManagerService extends ILocationManager.Stub { } public void removeGpsStatusListener(IGpsStatusListener listener) { - synchronized (mLocationListeners) { + synchronized (mLock) { mGpsLocationProvider.removeGpsStatusListener(listener); } } @@ -1145,7 +1093,7 @@ public class LocationManagerService extends ILocationManager.Stub { throw new SecurityException("Requires ACCESS_LOCATION_EXTRA_COMMANDS permission"); } - synchronized (mLocationListeners) { + synchronized (mLock) { LocationProviderImpl impl = LocationProviderImpl.getProvider(provider); if (provider == null) { return false; @@ -1326,7 +1274,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void addProximityAlert(double latitude, double longitude, float radius, long expiration, PendingIntent intent) { try { - synchronized (mLocationListeners) { + synchronized (mLock) { addProximityAlertLocked(latitude, longitude, radius, expiration, intent); } } catch (SecurityException se) { @@ -1359,7 +1307,7 @@ public class LocationManagerService extends ILocationManager.Stub { mProximityAlerts.put(intent, alert); if (mProximityListener == null) { - mProximityListener = new Receiver(new ProximityListener(), -1); + mProximityListener = new Receiver(new ProximityListener()); LocationProvider provider = LocationProviderImpl.getProvider( LocationManager.GPS_PROVIDER); @@ -1372,14 +1320,12 @@ public class LocationManagerService extends ILocationManager.Stub { if (provider != null) { requestLocationUpdatesLocked(provider.getName(), 1000L, 1.0f, mProximityListener); } - } else if (mGpsNavigating) { - updateReportedGpsLocked(); } } public void removeProximityAlert(PendingIntent intent) { try { - synchronized (mLocationListeners) { + synchronized (mLock) { removeProximityAlertLocked(intent); } } catch (SecurityException se) { @@ -1398,8 +1344,6 @@ public class LocationManagerService extends ILocationManager.Stub { if (mProximityAlerts.size() == 0) { removeUpdatesLocked(mProximityListener); mProximityListener = null; - } else if (mGpsNavigating) { - updateReportedGpsLocked(); } } @@ -1410,7 +1354,7 @@ public class LocationManagerService extends ILocationManager.Stub { */ public Bundle getProviderInfo(String provider) { try { - synchronized (mLocationListeners) { + synchronized (mLock) { return _getProviderInfoLocked(provider); } } catch (SecurityException se) { @@ -1445,7 +1389,7 @@ public class LocationManagerService extends ILocationManager.Stub { public boolean isProviderEnabled(String provider) { try { - synchronized (mLocationListeners) { + synchronized (mLock) { return _isProviderEnabledLocked(provider); } } catch (SecurityException se) { @@ -1474,7 +1418,7 @@ public class LocationManagerService extends ILocationManager.Stub { public Location getLastKnownLocation(String provider) { try { - synchronized (mLocationListeners) { + synchronized (mLock) { return _getLastKnownLocationLocked(provider); } } catch (SecurityException se) { @@ -1574,16 +1518,11 @@ public class LocationManagerService extends ILocationManager.Stub { UpdateRecord r = records.get(i); Receiver receiver = r.mReceiver; - HashMap<String,Location> map = mLastFixBroadcast.get(receiver); - if (map == null) { - map = new HashMap<String,Location>(); - mLastFixBroadcast.put(receiver, map); - } - Location lastLoc = map.get(provider); + Location lastLoc = r.mLastFixBroadcast; if ((lastLoc == null) || shouldBroadcastSafe(location, lastLoc, r)) { if (lastLoc == null) { lastLoc = new Location(location); - map.put(provider, lastLoc); + r.mLastFixBroadcast = lastLoc; } else { lastLoc.set(location); } @@ -1596,19 +1535,11 @@ public class LocationManagerService extends ILocationManager.Stub { } } - // Broadcast status message - HashMap<String,Long> statusMap = mLastStatusBroadcast.get(receiver); - if (statusMap == null) { - statusMap = new HashMap<String,Long>(); - mLastStatusBroadcast.put(receiver, statusMap); - } - long prevStatusUpdateTime = - (statusMap.get(provider) != null) ? statusMap.get(provider) : 0; - + long prevStatusUpdateTime = r.mLastStatusBroadcast; if ((newStatusUpdateTime > prevStatusUpdateTime) && (prevStatusUpdateTime != 0 || status != LocationProvider.AVAILABLE)) { - statusMap.put(provider, newStatusUpdateTime); + r.mLastStatusBroadcast = newStatusUpdateTime; if (!receiver.callStatusChangedLocked(provider, status, extras)) { Log.w(TAG, "RemoteException calling onStatusChanged on " + receiver); if (deadReceivers == null) { @@ -1636,23 +1567,29 @@ public class LocationManagerService extends ILocationManager.Stub { if (msg.what == MESSAGE_LOCATION_CHANGED) { // log("LocationWorkerHandler: MESSAGE_LOCATION_CHANGED!"); - synchronized (mLocationListeners) { + synchronized (mLock) { Location location = (Location) msg.obj; + + if (mCollector != null && + LocationManager.GPS_PROVIDER.equals(location.getProvider())) { + try { + mCollector.updateLocation(location); + } catch (RemoteException e) { + Log.w(TAG, "mCollector.updateLocation failed"); + } + } + String provider = location.getProvider(); if (!isAllowedBySettingsLocked(provider)) { return; } - // Process the location fix if the screen is on or we're holding a wakelock - if (mScreenOn || (mWakeLockAcquireTime != 0)) { - handleLocationChangedLocked(location); - } + handleLocationChangedLocked(location); if ((mWakeLockAcquireTime != 0) && (SystemClock.elapsedRealtime() - mWakeLockAcquireTime > MAX_TIME_FOR_WAKE_LOCK)) { - removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); removeMessages(MESSAGE_RELEASE_WAKE_LOCK); log("LocationWorkerHandler: Exceeded max time for wake lock"); @@ -1662,7 +1599,6 @@ public class LocationManagerService extends ILocationManager.Stub { } else if (mWakeLockAcquireTime != 0 && mWakeLockGpsReceived && mWakeLockNetworkReceived) { - removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); removeMessages(MESSAGE_RELEASE_WAKE_LOCK); log("LocationWorkerHandler: Locations received."); @@ -1671,18 +1607,12 @@ public class LocationManagerService extends ILocationManager.Stub { sendMessageDelayed(m, TIME_AFTER_WAKE_LOCK); } } - - } else if (msg.what == MESSAGE_ACQUIRE_WAKE_LOCK) { - log("LocationWorkerHandler: Acquire"); - synchronized (mLocationListeners) { - acquireWakeLockLocked(); - } } else if (msg.what == MESSAGE_RELEASE_WAKE_LOCK) { log("LocationWorkerHandler: Release"); // Update wakelock status so the next alarm is set before releasing wakelock - synchronized (mLocationListeners) { - updateWakelockStatusLocked(mScreenOn); + synchronized (mLock) { + updateWakelockStatusLocked(); releaseWakeLockLocked(); } } @@ -1698,30 +1628,17 @@ public class LocationManagerService extends ILocationManager.Stub { String action = intent.getAction(); if (action.equals(ALARM_INTENT)) { - synchronized (mLocationListeners) { + synchronized (mLock) { log("PowerStateBroadcastReceiver: Alarm received"); - mLocationHandler.removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); // Have to do this immediately, rather than posting a // message, so we execute our code while the system // is holding a wake lock until the alarm broadcast // is finished. acquireWakeLockLocked(); } - - } else if (action.equals(Intent.ACTION_SCREEN_OFF)) { - log("PowerStateBroadcastReceiver: Screen off"); - synchronized (mLocationListeners) { - updateWakelockStatusLocked(false); - } - - } else if (action.equals(Intent.ACTION_SCREEN_ON)) { - log("PowerStateBroadcastReceiver: Screen on"); - synchronized (mLocationListeners) { - updateWakelockStatusLocked(true); - } } else if (action.equals(Intent.ACTION_PACKAGE_REMOVED) || action.equals(Intent.ACTION_PACKAGE_RESTARTED)) { - synchronized (mLocationListeners) { + synchronized (mLock) { int uid = intent.getIntExtra(Intent.EXTRA_UID, -1); if (uid >= 0) { ArrayList<Receiver> removedRecs = null; @@ -1779,7 +1696,7 @@ public class LocationManagerService extends ILocationManager.Stub { } // Notify location providers of current network state - synchronized (mLocationListeners) { + synchronized (mLock) { List<LocationProviderImpl> providers = LocationProviderImpl.getProviders(); for (LocationProviderImpl provider : providers) { if (provider.requiresNetwork()) { @@ -1792,13 +1709,8 @@ public class LocationManagerService extends ILocationManager.Stub { final boolean enabled = intent.getBooleanExtra(GpsLocationProvider.EXTRA_ENABLED, false); - synchronized (mLocationListeners) { - if (enabled) { - updateReportedGpsLocked(); - mGpsNavigating = true; - } else { - reportStopGpsLocked(); - mGpsNavigating = false; + synchronized (mLock) { + if (!enabled) { // When GPS is disabled, we are OK to release wake-lock mWakeLockGpsReceived = true; } @@ -1810,8 +1722,8 @@ public class LocationManagerService extends ILocationManager.Stub { // Wake locks - private void updateWakelockStatusLocked(boolean screenOn) { - log("updateWakelockStatus(): " + screenOn); + private void updateWakelockStatusLocked() { + log("updateWakelockStatus()"); long callerId = Binder.clearCallingIdentity(); @@ -1826,16 +1738,8 @@ public class LocationManagerService extends ILocationManager.Stub { if (mGpsLocationProvider != null && mGpsLocationProvider.isLocationTracking()) { needsLock = true; minTime = Math.min(mGpsLocationProvider.getMinTime(), minTime); - if (screenOn) { - startGpsLocked(); - } else if (mScreenOn && !screenOn) { - // We just turned the screen off so stop navigating - stopGpsLocked(); - } } - mScreenOn = screenOn; - PendingIntent sender = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_INTENT), 0); @@ -1843,7 +1747,7 @@ public class LocationManagerService extends ILocationManager.Stub { log("Cancelling existing alarm"); mAlarmManager.cancel(sender); - if (needsLock && !mScreenOn) { + if (needsLock) { long now = SystemClock.elapsedRealtime(); mAlarmManager.set( AlarmManager.ELAPSED_REALTIME_WAKEUP, now + minTime, sender); @@ -1854,7 +1758,6 @@ public class LocationManagerService extends ILocationManager.Stub { mAlarmInterval = -1; // Clear out existing wakelocks - mLocationHandler.removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); mLocationHandler.removeMessages(MESSAGE_RELEASE_WAKE_LOCK); releaseWakeLockLocked(); } @@ -1897,131 +1800,11 @@ public class LocationManagerService extends ILocationManager.Stub { mWakeLockAcquireTime = SystemClock.elapsedRealtime(); log("Acquired wakelock"); - // Start the gps provider - startGpsLocked(); - - // Acquire cell lock - if (mCellWakeLockAcquired) { - // Lock is already acquired - } else if (!mWakeLockNetworkReceived) { - mTelephonyManager.enableLocationUpdates(); - mCellWakeLockAcquired = true; - } else { - mCellWakeLockAcquired = false; - } - - // Notify NetworkLocationProvider if (mNetworkLocationProvider != null) { - mNetworkLocationProvider.updateCellLockStatus(mCellWakeLockAcquired); + mNetworkLocationProvider.wakeLockAcquired(); } - - // Acquire wifi lock - WifiManager.WifiLock wifiLock = getWifiWakelockLocked(); - if (wifiLock != null) { - if (mWifiWakeLockAcquired) { - // Lock is already acquired - } else if (mWifiManager.isWifiEnabled() && !mWakeLockNetworkReceived) { - wifiLock.acquire(); - mWifiWakeLockAcquired = true; - } else { - mWifiWakeLockAcquired = false; - Log.w(TAG, "acquireWakeLock(): Unable to get WiFi lock"); - } - } - } - - private boolean reportGpsUidLocked(int curSeq, int nextSeq, int uid) { - int seq = mReportedGpsUids.get(uid, -1); - if (seq == curSeq) { - // Already reported; propagate to next sequence. - mReportedGpsUids.put(uid, nextSeq); - return true; - } else if (seq != nextSeq) { - try { - // New UID; report it. - mBatteryStats.noteStartGps(uid); - mReportedGpsUids.put(uid, nextSeq); - return true; - } catch (RemoteException e) { - } - } - return false; - } - - private void updateReportedGpsLocked() { - if (mGpsLocationProvider == null) { - return; - } - - final String name = mGpsLocationProvider.getName(); - final int curSeq = mReportedGpsSeq; - final int nextSeq = (curSeq+1) >= 0 ? (curSeq+1) : 0; - mReportedGpsSeq = nextSeq; - - ArrayList<UpdateRecord> urs = mRecordsByProvider.get(name); - int num = 0; - final int N = urs.size(); - for (int i=0; i<N; i++) { - UpdateRecord ur = urs.get(i); - if (ur.mReceiver == mProximityListener) { - // We don't want the system to take the blame for this one. - continue; - } - if (reportGpsUidLocked(curSeq, nextSeq, ur.mUid)) { - num++; - } - } - - for (ProximityAlert pe : mProximityAlerts.values()) { - if (reportGpsUidLocked(curSeq, nextSeq, pe.mUid)) { - num++; - } - } - - if (num != mReportedGpsUids.size()) { - // The number of uids is processed is different than the - // array; report any that are no longer active. - for (int i=mReportedGpsUids.size()-1; i>=0; i--) { - if (mReportedGpsUids.valueAt(i) != nextSeq) { - try { - mBatteryStats.noteStopGps(mReportedGpsUids.keyAt(i)); - } catch (RemoteException e) { - } - mReportedGpsUids.removeAt(i); - } - } - } - } - - private void reportStopGpsLocked() { - int curSeq = mReportedGpsSeq; - for (int i=mReportedGpsUids.size()-1; i>=0; i--) { - if (mReportedGpsUids.valueAt(i) == curSeq) { - try { - mBatteryStats.noteStopGps(mReportedGpsUids.keyAt(i)); - } catch (RemoteException e) { - } - } - } - curSeq++; - if (curSeq < 0) curSeq = 0; - mReportedGpsSeq = curSeq; - mReportedGpsUids.clear(); - } - - private void startGpsLocked() { - boolean gpsActive = (mGpsLocationProvider != null) - && mGpsLocationProvider.isLocationTracking(); - if (gpsActive) { - mGpsLocationProvider.startNavigating(); - } - } - - private void stopGpsLocked() { - boolean gpsActive = mGpsLocationProvider != null - && mGpsLocationProvider.isLocationTracking(); - if (gpsActive) { - mGpsLocationProvider.stopNavigating(); + if (mGpsLocationProvider != null) { + mGpsLocationProvider.wakeLockAcquired(); } } @@ -2036,29 +1819,11 @@ public class LocationManagerService extends ILocationManager.Stub { } private void releaseWakeLockXLocked() { - // Release wifi lock - WifiManager.WifiLock wifiLock = getWifiWakelockLocked(); - if (wifiLock != null) { - if (mWifiWakeLockAcquired) { - wifiLock.release(); - mWifiWakeLockAcquired = false; - } - } - - if (!mScreenOn) { - // Stop the gps - stopGpsLocked(); - } - - // Release cell lock - if (mCellWakeLockAcquired) { - mTelephonyManager.disableLocationUpdates(); - mCellWakeLockAcquired = false; - } - - // Notify NetworkLocationProvider if (mNetworkLocationProvider != null) { - mNetworkLocationProvider.updateCellLockStatus(mCellWakeLockAcquired); + mNetworkLocationProvider.wakeLockReleased(); + } + if (mGpsLocationProvider != null) { + mGpsLocationProvider.wakeLockReleased(); } // Release wake lock @@ -2074,30 +1839,34 @@ public class LocationManagerService extends ILocationManager.Stub { // Geocoder public String getFromLocation(double latitude, double longitude, int maxResults, - String language, String country, String variant, String appName, List<Address> addrs) { - synchronized (mLocationListeners) { - if (mNetworkLocationProvider != null) { - return mNetworkLocationProvider.getFromLocation(latitude, longitude, maxResults, - language, country, variant, appName, addrs); - } else { - return null; + String language, String country, String variant, String appName, List<Address> addrs) { + if (mGeocodeProvider != null) { + try { + return mGeocodeProvider.getFromLocation(latitude, longitude, maxResults, language, country, + variant, appName, addrs); + } catch (RemoteException e) { + Log.e(TAG, "getFromLocation failed", e); } } + return null; } + public String getFromLocationName(String locationName, - double lowerLeftLatitude, double lowerLeftLongitude, - double upperRightLatitude, double upperRightLongitude, int maxResults, - String language, String country, String variant, String appName, List<Address> addrs) { - synchronized (mLocationListeners) { - if (mNetworkLocationProvider != null) { - return mNetworkLocationProvider.getFromLocationName(locationName, lowerLeftLatitude, - lowerLeftLongitude, upperRightLatitude, upperRightLongitude, maxResults, - language, country, variant, appName, addrs); - } else { - return null; + double lowerLeftLatitude, double lowerLeftLongitude, + double upperRightLatitude, double upperRightLongitude, int maxResults, + String language, String country, String variant, String appName, List<Address> addrs) { + + if (mGeocodeProvider != null) { + try { + return mGeocodeProvider.getFromLocationName(locationName, lowerLeftLatitude, + lowerLeftLongitude, upperRightLatitude, upperRightLongitude, + maxResults, language, country, variant, appName, addrs); + } catch (RemoteException e) { + Log.e(TAG, "getFromLocationName failed", e); } } + return null; } // Mock Providers @@ -2120,7 +1889,7 @@ public class LocationManagerService extends ILocationManager.Stub { boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider provider = new MockProvider(name, this, requiresNetwork, requiresSatellite, requiresCell, hasMonetaryCost, supportsAltitude, @@ -2136,7 +1905,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void removeTestProvider(String provider) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider mockProvider = mMockProviders.get(provider); if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); @@ -2149,7 +1918,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void setTestProviderLocation(String provider, Location loc) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider mockProvider = mMockProviders.get(provider); if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); @@ -2160,7 +1929,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void clearTestProviderLocation(String provider) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider mockProvider = mMockProviders.get(provider); if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); @@ -2171,7 +1940,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void setTestProviderEnabled(String provider, boolean enabled) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider mockProvider = mMockProviders.get(provider); if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); @@ -2191,7 +1960,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void clearTestProviderEnabled(String provider) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider mockProvider = mMockProviders.get(provider); if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); @@ -2204,7 +1973,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void setTestProviderStatus(String provider, int status, Bundle extras, long updateTime) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider mockProvider = mMockProviders.get(provider); if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); @@ -2215,7 +1984,7 @@ public class LocationManagerService extends ILocationManager.Stub { public void clearTestProviderStatus(String provider) { checkMockPermissionsSafe(); - synchronized (mLocationListeners) { + synchronized (mLock) { MockProvider mockProvider = mMockProviders.get(provider); if (mockProvider == null) { throw new IllegalArgumentException("Provider \"" + provider + "\" unknown"); @@ -2239,52 +2008,29 @@ public class LocationManagerService extends ILocationManager.Stub { return; } - synchronized (mLocationListeners) { + synchronized (mLock) { pw.println("Current Location Manager state:"); pw.println(" sProvidersLoaded=" + sProvidersLoaded); pw.println(" mGpsLocationProvider=" + mGpsLocationProvider); - pw.println(" mGpsNavigating=" + mGpsNavigating); pw.println(" mNetworkLocationProvider=" + mNetworkLocationProvider); pw.println(" mCollector=" + mCollector); pw.println(" mAlarmInterval=" + mAlarmInterval - + " mScreenOn=" + mScreenOn + " mWakeLockAcquireTime=" + mWakeLockAcquireTime); pw.println(" mWakeLockGpsReceived=" + mWakeLockGpsReceived + " mWakeLockNetworkReceived=" + mWakeLockNetworkReceived); - pw.println(" mWifiWakeLockAcquired=" + mWifiWakeLockAcquired - + " mCellWakeLockAcquired=" + mCellWakeLockAcquired); pw.println(" Listeners:"); - int N = mListeners.size(); + int N = mReceivers.size(); for (int i=0; i<N; i++) { - pw.println(" " + mListeners.get(i)); + pw.println(" " + mReceivers.get(i)); } pw.println(" Location Listeners:"); - for (Map.Entry<Receiver, HashMap<String,UpdateRecord>> i - : mLocationListeners.entrySet()) { - pw.println(" " + i.getKey() + ":"); - for (Map.Entry<String,UpdateRecord> j : i.getValue().entrySet()) { + for (Receiver i : mReceivers.values()) { + pw.println(" " + i + ":"); + for (Map.Entry<String,UpdateRecord> j : i.mUpdateRecords.entrySet()) { pw.println(" " + j.getKey() + ":"); j.getValue().dump(pw, " "); } } - pw.println(" Last Fix Broadcasts:"); - for (Map.Entry<Receiver, HashMap<String,Location>> i - : mLastFixBroadcast.entrySet()) { - pw.println(" " + i.getKey() + ":"); - for (Map.Entry<String,Location> j : i.getValue().entrySet()) { - pw.println(" " + j.getKey() + ":"); - j.getValue().dump(new PrintWriterPrinter(pw), " "); - } - } - pw.println(" Last Status Broadcasts:"); - for (Map.Entry<Receiver, HashMap<String,Long>> i - : mLastStatusBroadcast.entrySet()) { - pw.println(" " + i.getKey() + ":"); - for (Map.Entry<String,Long> j : i.getValue().entrySet()) { - pw.println(" " + j.getKey() + " -> 0x" - + Long.toHexString(j.getValue())); - } - } pw.println(" Records by Provider:"); for (Map.Entry<String, ArrayList<UpdateRecord>> i : mRecordsByProvider.entrySet()) { @@ -2336,12 +2082,6 @@ public class LocationManagerService extends ILocationManager.Stub { i.getValue().dump(pw, " "); } } - pw.println(" Reported GPS UIDs @ seq " + mReportedGpsSeq + ":"); - N = mReportedGpsUids.size(); - for (int i=0; i<N; i++) { - pw.println(" UID " + mReportedGpsUids.keyAt(i) - + " seq=" + mReportedGpsUids.valueAt(i)); - } } } } diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java index 54e77f0..8850c31 100644 --- a/services/java/com/android/server/WifiService.java +++ b/services/java/com/android/server/WifiService.java @@ -165,7 +165,6 @@ public class WifiService extends IWifiManager.Stub { * Character buffer used to parse scan results (optimization) */ private static final int SCAN_RESULT_BUFFER_SIZE = 512; - private char[] mScanResultBuffer; private boolean mNeedReconfig; /* @@ -204,8 +203,6 @@ public class WifiService extends IWifiManager.Stub { } }; - mScanResultBuffer = new char [SCAN_RESULT_BUFFER_SIZE]; - HandlerThread wifiThread = new HandlerThread("WifiService"); wifiThread.start(); mWifiHandler = new WifiHandler(wifiThread.getLooper()); @@ -1217,61 +1214,13 @@ public class WifiService extends IWifiManager.Stub { lineBeg = lineEnd + 1; continue; } - int lineLen = lineEnd - lineBeg; - if (0 < lineLen && lineLen <= SCAN_RESULT_BUFFER_SIZE) { - int scanResultLevel = 0; - /* - * At most one thread should have access to the buffer at a time! - */ - synchronized(mScanResultBuffer) { - boolean parsingScanResultLevel = false; - for (int i = lineBeg; i < lineEnd; ++i) { - char ch = reply.charAt(i); - /* - * Assume that the signal level starts with a '-' - */ - if (ch == '-') { - /* - * Skip whatever instances of '-' we may have - * after we parse the signal level - */ - parsingScanResultLevel = (scanResultLevel == 0); - } else if (parsingScanResultLevel) { - int digit = Character.digit(ch, 10); - if (0 <= digit) { - scanResultLevel = - 10 * scanResultLevel + digit; - /* - * Replace the signal level number in - * the string with 0's for caching - */ - ch = '0'; - } else { - /* - * Reset the flag if we meet a non-digit - * character - */ - parsingScanResultLevel = false; - } - } - mScanResultBuffer[i - lineBeg] = ch; - } - if (scanResultLevel != 0) { - ScanResult scanResult = parseScanResult( - new String(mScanResultBuffer, 0, lineLen)); - if (scanResult != null) { - scanResult.level = -scanResultLevel; - scanList.add(scanResult); - } - } else if (DBG) { - Log.w(TAG, - "ScanResult.level=0: misformatted scan result?"); - } - } - } else if (0 < lineLen) { - if (DBG) { - Log.w(TAG, "Scan result line is too long: " + - (lineEnd - lineBeg) + ", skipping the line!"); + if (lineEnd > lineBeg) { + String line = reply.substring(lineBeg, lineEnd); + ScanResult scanResult = parseScanResult(line); + if (scanResult != null) { + scanList.add(scanResult); + } else if (DBG) { + Log.w(TAG, "misformatted scan result for: " + line); } } lineBeg = lineEnd + 1; @@ -1294,21 +1243,29 @@ public class WifiService extends IWifiManager.Stub { * must synchronized here! */ synchronized (mScanResultCache) { - scanResult = mScanResultCache.get(line); - if (scanResult == null) { - String[] result = scanResultPattern.split(line); - if (3 <= result.length && result.length <= 5) { - // bssid | frequency | level | flags | ssid - int frequency; - int level; - try { - frequency = Integer.parseInt(result[1]); - level = Integer.parseInt(result[2]); - } catch (NumberFormatException e) { - frequency = 0; - level = 0; - } + String[] result = scanResultPattern.split(line); + if (3 <= result.length && result.length <= 5) { + String bssid = result[0]; + // bssid | frequency | level | flags | ssid + int frequency; + int level; + try { + frequency = Integer.parseInt(result[1]); + level = Integer.parseInt(result[2]); + /* some implementations avoid negative values by adding 256 + * so we need to adjust for that here. + */ + if (level > 0) level -= 256; + } catch (NumberFormatException e) { + frequency = 0; + level = 0; + } + // bssid is the hash key + scanResult = mScanResultCache.get(bssid); + if (scanResult != null) { + scanResult.level = level; + } else { /* * The formatting of the results returned by * wpa_supplicant is intended to make the fields @@ -1341,13 +1298,13 @@ public class WifiService extends IWifiManager.Stub { if (0 < ssid.trim().length()) { scanResult = new ScanResult( - ssid, result[0], flags, level, frequency); - mScanResultCache.put(line, scanResult); + ssid, bssid, flags, level, frequency); + mScanResultCache.put(bssid, scanResult); } - } else { - Log.w(TAG, "Misformatted scan result text with " + - result.length + " fields: " + line); } + } else { + Log.w(TAG, "Misformatted scan result text with " + + result.length + " fields: " + line); } } } diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 0b1ddc8..b0fcb1c 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -77,7 +77,6 @@ import android.os.SystemClock; import android.os.SystemProperties; import android.os.TokenWatcher; import android.provider.Settings; -import android.util.Config; import android.util.EventLog; import android.util.Log; import android.util.SparseIntArray; @@ -137,7 +136,7 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo static final boolean PROFILE_ORIENTATION = false; static final boolean BLUR = true; - static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV; + static final boolean localLOGV = DEBUG; static final int LOG_WM_NO_SURFACE_MEMORY = 31000; @@ -2023,7 +2022,7 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo wtoken.appFullscreen = fullscreen; wtoken.requestedOrientation = requestedOrientation; mAppTokens.add(addPos, wtoken); - if (Config.LOGV) Log.v(TAG, "Adding new app token: " + wtoken); + if (localLOGV) Log.v(TAG, "Adding new app token: " + wtoken); mTokenMap.put(token.asBinder(), wtoken); mTokenList.add(wtoken); @@ -4801,14 +4800,11 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo mPaused = true; } else { if (mLastWin == null) { - if (Config.LOGI) Log.i( - TAG, "Key dispatching not paused: no last window."); + Log.i(TAG, "Key dispatching not paused: no last window."); } else if (mFinished) { - if (Config.LOGI) Log.i( - TAG, "Key dispatching not paused: finished last key."); + Log.i(TAG, "Key dispatching not paused: finished last key."); } else { - if (Config.LOGI) Log.i( - TAG, "Key dispatching not paused: window in higher layer."); + Log.i(TAG, "Key dispatching not paused: window in higher layer."); } } */ @@ -7423,7 +7419,7 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo private boolean mInLayout = false; private final void performLayoutAndPlaceSurfacesLocked() { if (mInLayout) { - if (Config.DEBUG) { + if (DEBUG) { throw new RuntimeException("Recursive call!"); } Log.w(TAG, "performLayoutAndPlaceSurfacesLocked called while in layout"); diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index d676c00..a3c23d3 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -682,6 +682,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen HashMap<String, IBinder> mAppBindArgs; /** + * Temporary to avoid allocations. Protected by main lock. + */ + final StringBuilder mStringBuilder = new StringBuilder(256); + + /** * Used to control how we initialize the service. */ boolean mStartRunning = false; @@ -778,6 +783,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen long mLastCpuTime = 0; long mLastWriteTime = 0; + long mInitialStartTime = 0; + /** * Set to true after the system has finished booting. */ @@ -1270,7 +1277,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen mBatteryStatsService.getActiveStatistics().writeLocked(); mUsageStatsService = new UsageStatsService( new File( - systemDir, "usagestats.bin").toString()); + systemDir, "usagestats").toString()); mConfiguration.makeDefault(); mProcessStats.init(); @@ -1635,6 +1642,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen if (r.startTime == 0) { r.startTime = SystemClock.uptimeMillis(); + if (mInitialStartTime == 0) { + mInitialStartTime = r.startTime; + } + } else if (mInitialStartTime == 0) { + mInitialStartTime = SystemClock.uptimeMillis(); } if (app != null && app.thread != null) { @@ -1785,7 +1797,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen Watchdog.getInstance().processStarted(app, app.processName, pid); } - StringBuilder buf = new StringBuilder(128); + StringBuilder buf = mStringBuilder; + buf.setLength(0); buf.append("Start proc "); buf.append(app.processName); buf.append(" for "); @@ -2813,7 +2826,6 @@ public final class ActivityManagerService extends ActivityManagerNative implemen HistoryRecord r = new HistoryRecord(this, callerApp, callingUid, intent, resolvedType, aInfo, mConfiguration, resultRecord, resultWho, requestCode, componentSpecified); - r.startTime = SystemClock.uptimeMillis(); HistoryRecord notTop = (launchFlags&Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP) != 0 ? r : null; @@ -4095,7 +4107,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen } } - StringBuilder info = new StringBuilder(); + StringBuilder info = mStringBuilder; + info.setLength(0); info.append("ANR (application not responding) in process: "); info.append(app.processName); if (annotation != null) { @@ -4517,7 +4530,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen } } else if (mStartingProcesses.size() > 0) { app = mStartingProcesses.remove(0); - app.pid = pid; + app.setPid(pid); } else { app = null; } @@ -7877,24 +7890,24 @@ public final class ActivityManagerService extends ActivityManagerNative implemen return; } pw.println("Activities in Current Activity Manager State:"); - dumpHistoryList(pw, mHistory, " ", "History"); + dumpHistoryList(pw, mHistory, " ", "History", true); pw.println(" "); pw.println(" Running activities (most recent first):"); - dumpHistoryList(pw, mLRUActivities, " ", "Running"); + dumpHistoryList(pw, mLRUActivities, " ", "Running", false); if (mWaitingVisibleActivities.size() > 0) { pw.println(" "); pw.println(" Activities waiting for another to become visible:"); - dumpHistoryList(pw, mWaitingVisibleActivities, " ", "Waiting"); + dumpHistoryList(pw, mWaitingVisibleActivities, " ", "Waiting", false); } if (mStoppingActivities.size() > 0) { pw.println(" "); pw.println(" Activities waiting to stop:"); - dumpHistoryList(pw, mStoppingActivities, " ", "Stopping"); + dumpHistoryList(pw, mStoppingActivities, " ", "Stopping", false); } if (mFinishingActivities.size() > 0) { pw.println(" "); pw.println(" Activities waiting to finish:"); - dumpHistoryList(pw, mFinishingActivities, " ", "Finishing"); + dumpHistoryList(pw, mFinishingActivities, " ", "Finishing", false); } pw.println(" "); @@ -7931,8 +7944,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen needSep = true; } ProcessRecord r = procs.valueAt(ia); - pw.println((r.persistent ? " *PERSISTENT* Process [" : " Process [") - + r.processName + "] UID " + procs.keyAt(ia)); + pw.print(r.persistent ? " *PERSISTENT* Process [" : " Process ["); + pw.print(r.processName); pw.print("] UID "); pw.println(procs.keyAt(ia)); r.dump(pw, " "); if (r.persistent) { numPers++; @@ -8360,16 +8373,29 @@ public final class ActivityManagerService extends ActivityManagerNative implemen } private static final void dumpHistoryList(PrintWriter pw, List list, - String prefix, String label) { + String prefix, String label, boolean complete) { TaskRecord lastTask = null; for (int i=list.size()-1; i>=0; i--) { HistoryRecord r = (HistoryRecord)list.get(i); if (lastTask != r.task) { lastTask = r.task; - lastTask.dump(pw, prefix + " "); + if (complete || !r.inHistory) { + lastTask.dump(pw, prefix + " "); + } else { + pw.print(prefix); + pw.print(" "); + pw.println(lastTask); + } + } + if (complete || !r.inHistory) { + pw.print(prefix); pw.print(" "); pw.print(label); + pw.print(" #"); pw.print(i); pw.println(":"); + r.dump(pw, prefix + " "); + } else { + pw.print(prefix); pw.print(" "); pw.print(label); + pw.print(" #"); pw.print(i); pw.print(": "); + pw.println(r); } - pw.println(prefix + " " + label + " #" + i + ":"); - r.dump(pw, prefix + " "); } } @@ -8401,7 +8427,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen private static final void dumpApplicationMemoryUsage(FileDescriptor fd, PrintWriter pw, List list, String prefix, String[] args) { - final boolean isCheckinRequest = scanArgs(args, "-c"); + final boolean isCheckinRequest = scanArgs(args, "--checkin"); long uptime = SystemClock.uptimeMillis(); long realtime = SystemClock.elapsedRealtime(); @@ -8738,7 +8764,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen mPidsSelfLocked.remove(app.pid); mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app); } - app.pid = 0; + app.setPid(0); } } diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java index c5907af..e265f43 100644 --- a/services/java/com/android/server/am/BatteryStatsService.java +++ b/services/java/com/android/server/am/BatteryStatsService.java @@ -295,7 +295,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub { boolean isCheckin = false; if (args != null) { for (String arg : args) { - if ("-c".equals(arg)) { + if ("--checkin".equals(arg)) { isCheckin = true; break; } diff --git a/services/java/com/android/server/am/ConnectionRecord.java b/services/java/com/android/server/am/ConnectionRecord.java index 41a783f..b4c7df1 100644 --- a/services/java/com/android/server/am/ConnectionRecord.java +++ b/services/java/com/android/server/am/ConnectionRecord.java @@ -28,7 +28,8 @@ class ConnectionRecord { final HistoryRecord activity; // If non-null, the owning activity. final IServiceConnection conn; // The client connection. final int flags; // Binding options. - + String stringName; // Caching of toString. + void dump(PrintWriter pw, String prefix) { pw.println(prefix + this); pw.println(prefix + "binding=" + binding); @@ -46,9 +47,17 @@ class ConnectionRecord { } public String toString() { - return "ConnectionRecord{" - + Integer.toHexString(System.identityHashCode(this)) - + " " + binding.service.shortName - + ":@" + Integer.toHexString(System.identityHashCode(conn.asBinder())) + "}"; + if (stringName != null) { + return stringName; + } + StringBuilder sb = new StringBuilder(128); + sb.append("ConnectionRecord{"); + sb.append(Integer.toHexString(System.identityHashCode(this))); + sb.append(' '); + sb.append(binding.service.shortName); + sb.append(":@"); + sb.append(Integer.toHexString(System.identityHashCode(conn.asBinder()))); + sb.append('}'); + return stringName = sb.toString(); } } diff --git a/services/java/com/android/server/am/ContentProviderRecord.java b/services/java/com/android/server/am/ContentProviderRecord.java index 9f37c14..2b9e006 100644 --- a/services/java/com/android/server/am/ContentProviderRecord.java +++ b/services/java/com/android/server/am/ContentProviderRecord.java @@ -32,7 +32,8 @@ class ContentProviderRecord extends ContentProviderHolder { int externals; // number of non-framework processes supported by this provider ProcessRecord app; // if non-null, hosting application ProcessRecord launchingApp; // if non-null, waiting for this app to be launched. - + String stringName; + public ContentProviderRecord(ProviderInfo _info, ApplicationInfo ai) { super(_info); uid = ai.uid; @@ -69,8 +70,15 @@ class ContentProviderRecord extends ContentProviderHolder { } public String toString() { - return "ContentProviderRecord{" - + Integer.toHexString(System.identityHashCode(this)) - + " " + info.name + "}"; + if (stringName != null) { + return stringName; + } + StringBuilder sb = new StringBuilder(128); + sb.append("ContentProviderRecord{"); + sb.append(Integer.toHexString(System.identityHashCode(this))); + sb.append(' '); + sb.append(info.name); + sb.append('}'); + return stringName = sb.toString(); } } diff --git a/services/java/com/android/server/am/HistoryRecord.java b/services/java/com/android/server/am/HistoryRecord.java index 0f62471..a2fd62b 100644 --- a/services/java/com/android/server/am/HistoryRecord.java +++ b/services/java/com/android/server/am/HistoryRecord.java @@ -100,46 +100,74 @@ class HistoryRecord extends IApplicationToken.Stub { boolean hasBeenLaunched;// has this activity ever been launched? boolean frozenBeforeDestroy;// has been frozen but not yet destroyed. + String stringName; // for caching of toString(). + void dump(PrintWriter pw, String prefix) { - pw.println(prefix + this); - pw.println(prefix + "packageName=" + packageName - + " processName=" + processName); - pw.println(prefix + "launchedFromUid=" + launchedFromUid - + " app=" + app); - pw.println(prefix + intent); - pw.println(prefix + "frontOfTask=" + frontOfTask + " task=" + task); - pw.println(prefix + "taskAffinity=" + taskAffinity); - pw.println(prefix + "realActivity=" + realActivity); - pw.println(prefix + "dir=" + baseDir + " res=" + resDir + " data=" + dataDir); - pw.println(prefix + "labelRes=0x" + Integer.toHexString(labelRes) - + " icon=0x" + Integer.toHexString(icon) - + " theme=0x" + Integer.toHexString(theme)); - pw.println(prefix + "stateNotNeeded=" + stateNotNeeded - + " componentSpecified=" + componentSpecified - + " isHomeActivity=" + isHomeActivity); - pw.println(prefix + "configuration=" + configuration); - pw.println(prefix + "resultTo=" + resultTo - + " resultWho=" + resultWho + " resultCode=" + requestCode); - pw.println(prefix + "results=" + results); - pw.println(prefix + "pendingResults=" + pendingResults); - pw.println(prefix + "readUriPermissions=" + readUriPermissions); - pw.println(prefix + "writeUriPermissions=" + writeUriPermissions); - pw.println(prefix + "launchFailed=" + launchFailed - + " haveState=" + haveState + " icicle=" + icicle); - pw.println(prefix + "state=" + state - + " stopped=" + stopped + " finishing=" + finishing); - pw.println(prefix + "keysPaused=" + keysPaused - + " inHistory=" + inHistory + " persistent=" + persistent - + " launchMode=" + launchMode); - pw.println(prefix + "fullscreen=" + fullscreen - + " visible=" + visible - + " frozenBeforeDestroy=" + frozenBeforeDestroy - + " thumbnailNeeded=" + thumbnailNeeded + " idle=" + idle); - pw.println(prefix + "waitingVisible=" + waitingVisible - + " nowVisible=" + nowVisible); - pw.println(prefix + "configDestroy=" + configDestroy - + " configChangeFlags=" + Integer.toHexString(configChangeFlags)); - pw.println(prefix + "connections=" + connections); + pw.print(prefix); pw.println(this); + pw.print(prefix); pw.print("packageName="); pw.print(packageName); + pw.print(" processName="); pw.println(processName); + pw.print(prefix); pw.print("launchedFromUid="); pw.print(launchedFromUid); + pw.print(" app="); pw.println(app); + pw.print(prefix); pw.println(intent); + pw.print(prefix); pw.print("frontOfTask="); pw.print(frontOfTask); + pw.print(" task="); pw.println(task); + pw.print(prefix); pw.print("taskAffinity="); pw.println(taskAffinity); + pw.print(prefix); pw.print("realActivity="); pw.println(realActivity); + pw.print(prefix); pw.print("dir="); pw.print(baseDir); + pw.print(" res="); pw.print(resDir); + pw.print(" data="); pw.println(dataDir); + pw.print(prefix); pw.print("labelRes=0x"); + pw.print(Integer.toHexString(labelRes)); + pw.print(" icon=0x"); pw.print(Integer.toHexString(icon)); + pw.print(" theme=0x"); pw.println(Integer.toHexString(theme)); + pw.print(prefix); pw.print("stateNotNeeded="); pw.print(stateNotNeeded); + pw.print(" componentSpecified="); pw.print(componentSpecified); + pw.print(" isHomeActivity="); pw.println(isHomeActivity); + pw.print(prefix); pw.print("configuration="); pw.println(configuration); + if (resultTo != null || resultWho != null) { + pw.print(prefix); pw.print("resultTo="); pw.print(resultTo); + pw.print(" resultWho="); pw.print(resultWho); + pw.print(" resultCode="); pw.println(requestCode); + } + if (results != null) { + pw.print(prefix); pw.print("results="); pw.println(results); + } + if (pendingResults != null) { + pw.print(prefix); pw.print("pendingResults="); pw.println(pendingResults); + } + if (readUriPermissions != null) { + pw.print(prefix); pw.print("readUriPermissions="); pw.println(readUriPermissions); + } + if (writeUriPermissions != null) { + pw.print(prefix); pw.print("writeUriPermissions="); pw.println(writeUriPermissions); + } + pw.print(prefix); pw.print("launchFailed="); pw.print(launchFailed); + pw.print(" haveState="); pw.print(haveState); + pw.print(" icicle="); pw.println(icicle); + pw.print(prefix); pw.print("state="); pw.print(state); + pw.print(" stopped="); pw.print(stopped); + pw.print(" finishing="); pw.println(finishing); + pw.print(prefix); pw.print("keysPaused="); pw.print(keysPaused); + pw.print(" inHistory="); pw.print(inHistory); + pw.print(" persistent="); pw.print(persistent); + pw.print(" launchMode="); pw.println(launchMode); + pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen); + pw.print(" visible="); pw.print(visible); + pw.print(" frozenBeforeDestroy="); pw.print(frozenBeforeDestroy); + pw.print(" thumbnailNeeded="); pw.print(thumbnailNeeded); + pw.print(" idle="); pw.println(idle); + if (waitingVisible || nowVisible) { + pw.print(prefix); pw.print("waitingVisible="); pw.print(waitingVisible); + pw.print(" nowVisible="); pw.println(nowVisible); + } + if (configDestroy || configChangeFlags != 0) { + pw.print(prefix); pw.print("configDestroy="); pw.print(configDestroy); + pw.print(" configChangeFlags="); + pw.println(Integer.toHexString(configChangeFlags)); + } + if (connections != null) { + pw.print(prefix); pw.print("connections="); pw.println(connections); + } } HistoryRecord(ActivityManagerService _service, ProcessRecord _caller, @@ -335,15 +363,31 @@ class HistoryRecord extends IApplicationToken.Stub { public void windowsVisible() { synchronized(service) { - if (ActivityManagerService.SHOW_ACTIVITY_START_TIME - && startTime != 0) { - long time = SystemClock.uptimeMillis() - startTime; - EventLog.writeEvent(ActivityManagerService.LOG_ACTIVITY_LAUNCH_TIME, - System.identityHashCode(this), shortComponentName, time); - Log.i(ActivityManagerService.TAG, "Displayed activity " - + shortComponentName - + ": " + time + " ms"); + if (startTime != 0) { + final long curTime = SystemClock.uptimeMillis(); + final long thisTime = curTime - startTime; + final long totalTime = service.mInitialStartTime != 0 + ? (curTime - service.mInitialStartTime) : thisTime; + if (ActivityManagerService.SHOW_ACTIVITY_START_TIME) { + EventLog.writeEvent(ActivityManagerService.LOG_ACTIVITY_LAUNCH_TIME, + System.identityHashCode(this), shortComponentName, + thisTime, totalTime); + StringBuilder sb = service.mStringBuilder; + sb.setLength(0); + sb.append("Displayed activity "); + sb.append(shortComponentName); + sb.append(": "); + sb.append(thisTime); + sb.append(" ms (total "); + sb.append(totalTime); + sb.append(" ms)"); + Log.i(ActivityManagerService.TAG, sb.toString()); + } + if (totalTime > 0) { + service.mUsageStatsService.noteLaunchTime(realActivity, (int)totalTime); + } startTime = 0; + service.mInitialStartTime = 0; } if (ActivityManagerService.DEBUG_SWITCH) Log.v( ActivityManagerService.TAG, "windowsVisible(): " + this); @@ -453,8 +497,15 @@ class HistoryRecord extends IApplicationToken.Stub { public String toString() { - return "HistoryRecord{" - + Integer.toHexString(System.identityHashCode(this)) - + " " + intent.getComponent().toShortString() + "}"; + if (stringName != null) { + return stringName; + } + StringBuilder sb = new StringBuilder(128); + sb.append("HistoryRecord{"); + sb.append(Integer.toHexString(System.identityHashCode(this))); + sb.append(' '); + sb.append(intent.getComponent().toShortString()); + sb.append('}'); + return stringName = sb.toString(); } } diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java index a1320df..d2667e7 100644 --- a/services/java/com/android/server/am/ProcessRecord.java +++ b/services/java/com/android/server/am/ProcessRecord.java @@ -98,44 +98,82 @@ class ProcessRecord implements Watchdog.PssRequestor { boolean waitedForDebugger; // has process show wait for debugger dialog? Dialog waitDialog; // current wait for debugger dialog + String stringName; // caching of toString() result. + // These reports are generated & stored when an app gets into an error condition. // They will be "null" when all is OK. ActivityManager.ProcessErrorStateInfo crashingReport; ActivityManager.ProcessErrorStateInfo notRespondingReport; void dump(PrintWriter pw, String prefix) { - pw.println(prefix + this); - pw.println(prefix + "class=" + info.className); - pw.println(prefix+"manageSpaceActivityName="+info.manageSpaceActivityName); - pw.println(prefix + "dir=" + info.sourceDir + " publicDir=" + info.publicSourceDir - + " data=" + info.dataDir); - pw.println(prefix + "packageList=" + pkgList); - pw.println(prefix + "instrumentationClass=" + instrumentationClass - + " instrumentationProfileFile=" + instrumentationProfileFile); - pw.println(prefix + "instrumentationArguments=" + instrumentationArguments); - pw.println(prefix + "thread=" + thread + " curReceiver=" + curReceiver); - pw.println(prefix + "pid=" + pid + " starting=" + starting - + " lastPss=" + lastPss); - pw.println(prefix + "maxAdj=" + maxAdj + " hiddenAdj=" + hiddenAdj - + " curRawAdj=" + curRawAdj + " setRawAdj=" + setRawAdj - + " curAdj=" + curAdj + " setAdj=" + setAdj); - pw.println(prefix + "isForeground=" + isForeground - + " setIsForeground=" + setIsForeground - + " foregroundServices=" + foregroundServices - + " forcingToForeground=" + forcingToForeground); - pw.println(prefix + "persistent=" + persistent + " removed=" + removed - + " persistentActivities=" + persistentActivities); - pw.println(prefix + "debugging=" + debugging - + " crashing=" + crashing + " " + crashDialog - + " notResponding=" + notResponding + " " + anrDialog - + " bad=" + bad); - pw.println(prefix + "activities=" + activities); - pw.println(prefix + "services=" + services); - pw.println(prefix + "executingServices=" + executingServices); - pw.println(prefix + "connections=" + connections); - pw.println(prefix + "pubProviders=" + pubProviders); - pw.println(prefix + "conProviders=" + conProviders); - pw.println(prefix + "receivers=" + receivers); + pw.print(prefix); pw.println(this); + if (info.className != null) { + pw.print(prefix); pw.print("class="); pw.println(info.className); + } + if (info.manageSpaceActivityName != null) { + pw.print(prefix); pw.print("manageSpaceActivityName="); + pw.println(info.manageSpaceActivityName); + } + pw.print(prefix); pw.print("dir="); pw.print(info.sourceDir); + pw.print(" publicDir="); pw.print(info.publicSourceDir); + pw.print(" data="); pw.println(info.dataDir); + pw.print(prefix); pw.print("packageList="); pw.println(pkgList); + if (instrumentationClass != null || instrumentationProfileFile != null + || instrumentationArguments != null) { + pw.print(prefix); pw.print("instrumentationClass="); + pw.print(instrumentationClass); + pw.print(" instrumentationProfileFile="); + pw.println(instrumentationProfileFile); + pw.print(prefix); pw.print("instrumentationArguments="); + pw.println(instrumentationArguments); + } + pw.print(prefix); pw.print("thread="); pw.print(thread); + pw.print(" curReceiver="); pw.println(curReceiver); + pw.print(prefix); pw.print("pid="); pw.print(pid); pw.print(" starting="); + pw.print(starting); pw.print(" lastPss="); pw.println(lastPss); + pw.print(prefix); pw.print("oom: max="); pw.print(maxAdj); + pw.print(" hidden="); pw.print(hiddenAdj); + pw.print(" curRaw="); pw.print(curRawAdj); + pw.print(" setRaw="); pw.print(setRawAdj); + pw.print(" cur="); pw.print(curAdj); + pw.print(" set="); pw.println(setAdj); + pw.print(prefix); pw.print("isForeground="); pw.print(isForeground); + pw.print(" setIsForeground="); pw.print(setIsForeground); + pw.print(" foregroundServices="); pw.print(foregroundServices); + pw.print(" forcingToForeground="); pw.println(forcingToForeground); + pw.print(prefix); pw.print("persistent="); pw.print(persistent); + pw.print(" removed="); pw.print(removed); + pw.print(" persistentActivities="); pw.println(persistentActivities); + if (debugging || crashing || crashDialog != null || notResponding + || anrDialog != null || bad) { + pw.print(prefix); pw.print("debugging="); pw.print(debugging); + pw.print(" crashing="); pw.print(crashing); + pw.print(" "); pw.print(crashDialog); + pw.print(" notResponding="); pw.print(notResponding); + pw.print(" " ); pw.print(anrDialog); + pw.print(" bad="); pw.println(bad); + } + if (activities.size() > 0) { + pw.print(prefix); pw.print("activities="); pw.println(activities); + } + if (services.size() > 0) { + pw.print(prefix); pw.print("services="); pw.println(services); + } + if (executingServices.size() > 0) { + pw.print(prefix); pw.print("executingServices="); pw.println(executingServices); + } + if (connections.size() > 0) { + pw.print(prefix); pw.print("connections="); pw.println(connections); + } + if (pubProviders.size() > 0) { + pw.print(prefix); pw.print("pubProviders="); pw.println(pubProviders); + } + if (conProviders.size() > 0) { + pw.print(prefix); pw.print("conProviders="); pw.println(conProviders); + } + if (receivers.size() > 0) { + pw.print(prefix); pw.print("receivers="); pw.println(receivers); + } } ProcessRecord(BatteryStatsImpl.Uid.Proc _batteryStats, IApplicationThread _thread, @@ -154,6 +192,11 @@ class ProcessRecord implements Watchdog.PssRequestor { persistentActivities = 0; } + public void setPid(int _pid) { + pid = _pid; + stringName = null; + } + /** * This method returns true if any of the activities within the process record are interesting * to the user. See HistoryRecord.isInterestingToUserLocked() @@ -188,9 +231,20 @@ class ProcessRecord implements Watchdog.PssRequestor { } public String toString() { - return "ProcessRecord{" - + Integer.toHexString(System.identityHashCode(this)) - + " " + pid + ":" + processName + "/" + info.uid + "}"; + if (stringName != null) { + return stringName; + } + StringBuilder sb = new StringBuilder(128); + sb.append("ProcessRecord{"); + sb.append(Integer.toHexString(System.identityHashCode(this))); + sb.append(' '); + sb.append(pid); + sb.append(':'); + sb.append(processName); + sb.append('/'); + sb.append(info.uid); + sb.append('}'); + return stringName = sb.toString(); } /* diff --git a/services/java/com/android/server/am/ReceiverList.java b/services/java/com/android/server/am/ReceiverList.java index 6ac527b..b8bf30c 100644 --- a/services/java/com/android/server/am/ReceiverList.java +++ b/services/java/com/android/server/am/ReceiverList.java @@ -39,6 +39,8 @@ class ReceiverList extends ArrayList<BroadcastFilter> BroadcastRecord curBroadcast = null; boolean linkedToDeath = false; + String stringName; + ReceiverList(ActivityManagerService _owner, ProcessRecord _app, int _pid, int _uid, IIntentReceiver _receiver) { owner = _owner; @@ -82,11 +84,21 @@ class ReceiverList extends ArrayList<BroadcastFilter> } public String toString() { - return "ReceiverList{" - + Integer.toHexString(System.identityHashCode(this)) - + " " + pid + " " + (app != null ? app.processName : "(unknown name)") - + "/" + uid + " client " - + Integer.toHexString(System.identityHashCode(receiver.asBinder())) - + "}"; + if (stringName != null) { + return stringName; + } + StringBuilder sb = new StringBuilder(128); + sb.append("ReceiverList{"); + sb.append(Integer.toHexString(System.identityHashCode(this))); + sb.append(' '); + sb.append(pid); + sb.append(' '); + sb.append((app != null ? app.processName : "(unknown name)")); + sb.append('/'); + sb.append(uid); + sb.append(" client "); + sb.append(Integer.toHexString(System.identityHashCode(receiver.asBinder()))); + sb.append('}'); + return stringName = sb.toString(); } } diff --git a/services/java/com/android/server/am/ServiceRecord.java b/services/java/com/android/server/am/ServiceRecord.java index 4b90600..a8fc761 100644 --- a/services/java/com/android/server/am/ServiceRecord.java +++ b/services/java/com/android/server/am/ServiceRecord.java @@ -77,6 +77,8 @@ class ServiceRecord extends Binder { long restartTime; // time of last restart. long nextRestartTime; // time when restartDelay will expire. + String stringName; // caching of toString + void dump(PrintWriter pw, String prefix) { pw.println(prefix + this); pw.println(prefix + "intent=" + intent.getIntent()); @@ -159,8 +161,15 @@ class ServiceRecord extends Binder { } public String toString() { - return "ServiceRecord{" - + Integer.toHexString(System.identityHashCode(this)) - + " " + shortName + "}"; + if (stringName != null) { + return stringName; + } + StringBuilder sb = new StringBuilder(128); + sb.append("ServiceRecord{"); + sb.append(Integer.toHexString(System.identityHashCode(this))); + sb.append(' '); + sb.append(shortName); + sb.append('}'); + return stringName = sb.toString(); } } diff --git a/services/java/com/android/server/am/UsageStatsService.java b/services/java/com/android/server/am/UsageStatsService.java index 3922f39..b6f9158 100755 --- a/services/java/com/android/server/am/UsageStatsService.java +++ b/services/java/com/android/server/am/UsageStatsService.java @@ -37,11 +37,11 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TimeZone; /** * This service collects the statistics associated with usage @@ -53,6 +53,23 @@ public final class UsageStatsService extends IUsageStats.Stub { public static final String SERVICE_NAME = "usagestats"; private static final boolean localLOGV = false; private static final String TAG = "UsageStats"; + + // Current on-disk Parcel version + private static final int VERSION = 1004; + + private static final int CHECKIN_VERSION = 3; + + private static final String FILE_PREFIX = "usage-"; + + private static final int FILE_WRITE_INTERVAL = 30*60*1000; //ms + + private static final int MAX_NUM_FILES = 5; + + private static final int NUM_LAUNCH_TIME_BINS = 10; + private static final int[] LAUNCH_TIME_BINS = { + 250, 500, 750, 1000, 1500, 2000, 3000, 4000, 5000 + }; + static IUsageStats sService; private Context mContext; // structure used to maintain statistics since the last checkin. @@ -66,16 +83,48 @@ public final class UsageStatsService extends IUsageStats.Stub { // Order of locks is mFileLock followed by mStatsLock to avoid deadlocks private String mResumedPkg; private File mFile; + private String mFileLeaf; //private File mBackupFile; - private long mLastWriteRealTime; - private int _FILE_WRITE_INTERVAL = 30*60*1000; //ms - private static final String _PREFIX_DELIMIT="."; - private String mFilePrefix; + private long mLastWriteElapsedTime; + private File mDir; private Calendar mCal; - private static final int _MAX_NUM_FILES = 10; - private long mLastTime; + private int mLastWriteDay; + + static class TimeStats { + int[] times = new int[NUM_LAUNCH_TIME_BINS]; + + TimeStats() { + } + + void add(int val) { + final int[] bins = LAUNCH_TIME_BINS; + for (int i=0; i<NUM_LAUNCH_TIME_BINS-1; i++) { + if (val < bins[i]) { + times[i]++; + return; + } + } + times[NUM_LAUNCH_TIME_BINS-1]++; + } + + TimeStats(Parcel in) { + final int[] localTimes = times; + for (int i=0; i<NUM_LAUNCH_TIME_BINS; i++) { + localTimes[i] = in.readInt(); + } + } + + void writeToParcel(Parcel out) { + final int[] localTimes = times; + for (int i=0; i<NUM_LAUNCH_TIME_BINS; i++) { + out.writeInt(localTimes[i]); + } + } + } private class PkgUsageStatsExtended { + final HashMap<String, TimeStats> mLaunchTimes + = new HashMap<String, TimeStats>(); int mLaunchCount; long mUsageTime; long mPausedTime; @@ -85,44 +134,106 @@ public final class UsageStatsService extends IUsageStats.Stub { mLaunchCount = 0; mUsageTime = 0; } + + PkgUsageStatsExtended(Parcel in) { + mLaunchCount = in.readInt(); + mUsageTime = in.readLong(); + if (localLOGV) Log.v(TAG, "Launch count: " + mLaunchCount + + ", Usage time:" + mUsageTime); + + final int N = in.readInt(); + if (localLOGV) Log.v(TAG, "Reading comps: " + N); + for (int i=0; i<N; i++) { + String comp = in.readString(); + if (localLOGV) Log.v(TAG, "Component: " + comp); + TimeStats times = new TimeStats(in); + mLaunchTimes.put(comp, times); + } + } + void updateResume() { mLaunchCount ++; mResumedTime = SystemClock.elapsedRealtime(); } + void updatePause() { mPausedTime = SystemClock.elapsedRealtime(); mUsageTime += (mPausedTime - mResumedTime); } + + void addLaunchTime(String comp, int millis) { + TimeStats times = mLaunchTimes.get(comp); + if (times == null) { + times = new TimeStats(); + mLaunchTimes.put(comp, times); + } + times.add(millis); + } + + void writeToParcel(Parcel out) { + out.writeInt(mLaunchCount); + out.writeLong(mUsageTime); + final int N = mLaunchTimes.size(); + out.writeInt(N); + if (N > 0) { + for (Map.Entry<String, TimeStats> ent : mLaunchTimes.entrySet()) { + out.writeString(ent.getKey()); + TimeStats times = ent.getValue(); + times.writeToParcel(out); + } + } + } + void clear() { + mLaunchTimes.clear(); mLaunchCount = 0; mUsageTime = 0; } } - UsageStatsService(String fileName) { + UsageStatsService(String dir) { mStats = new HashMap<String, PkgUsageStatsExtended>(); mStatsLock = new Object(); mFileLock = new Object(); - mFilePrefix = fileName; - mCal = Calendar.getInstance(); + mDir = new File(dir); + mCal = Calendar.getInstance(TimeZone.getTimeZone("GMT+0")); + + mDir.mkdir(); + + // Remove any old usage files from previous versions. + File parentDir = mDir.getParentFile(); + String fList[] = parentDir.list(); + if (fList != null) { + String prefix = mDir.getName() + "."; + int i = fList.length; + while (i > 0) { + i--; + if (fList[i].startsWith(prefix)) { + Log.i(TAG, "Deleting old usage file: " + fList[i]); + (new File(parentDir, fList[i])).delete(); + } + } + } + // Update current stats which are binned by date - String uFileName = getCurrentDateStr(mFilePrefix); - mFile = new File(uFileName); + mFileLeaf = getCurrentDateStr(FILE_PREFIX); + mFile = new File(mDir, mFileLeaf); readStatsFromFile(); - mLastWriteRealTime = SystemClock.elapsedRealtime(); - mLastTime = new Date().getTime(); + mLastWriteElapsedTime = SystemClock.elapsedRealtime(); + // mCal was set by getCurrentDateStr(), want to use that same time. + mLastWriteDay = mCal.get(Calendar.DAY_OF_YEAR); } /* * Utility method to convert date into string. */ private String getCurrentDateStr(String prefix) { - mCal.setTime(new Date()); + mCal.setTimeInMillis(System.currentTimeMillis()); StringBuilder sb = new StringBuilder(); if (prefix != null) { sb.append(prefix); - sb.append("."); } + sb.append(mCal.get(Calendar.YEAR)); int mm = mCal.get(Calendar.MONTH) - Calendar.JANUARY +1; if (mm < 10) { sb.append("0"); @@ -133,7 +244,6 @@ public final class UsageStatsService extends IUsageStats.Stub { sb.append("0"); } sb.append(dd); - sb.append(mCal.get(Calendar.YEAR)); return sb.toString(); } @@ -166,11 +276,20 @@ public final class UsageStatsService extends IUsageStats.Stub { private void readStatsFLOCK(File file) throws IOException { Parcel in = getParcelForFile(file); - while (in.dataAvail() > 0) { + int vers = in.readInt(); + if (vers != VERSION) { + Log.w(TAG, "Usage stats version changed; dropping"); + return; + } + int N = in.readInt(); + while (N > 0) { + N--; String pkgName = in.readString(); - PkgUsageStatsExtended pus = new PkgUsageStatsExtended(); - pus.mLaunchCount = in.readInt(); - pus.mUsageTime = in.readLong(); + if (pkgName == null) { + break; + } + if (localLOGV) Log.v(TAG, "Reading package #" + N + ": " + pkgName); + PkgUsageStatsExtended pus = new PkgUsageStatsExtended(in); synchronized (mStatsLock) { mStats.put(pkgName, pus); } @@ -178,27 +297,18 @@ public final class UsageStatsService extends IUsageStats.Stub { } private ArrayList<String> getUsageStatsFileListFLOCK() { - File dir = getUsageFilesDir(); - if (dir == null) { - Log.w(TAG, "Couldnt find writable directory for usage stats file"); - return null; - } // Check if there are too many files in the system and delete older files - String fList[] = dir.list(); + String fList[] = mDir.list(); if (fList == null) { return null; } - File pre = new File(mFilePrefix); - String filePrefix = pre.getName(); - // file name followed by dot - int prefixLen = filePrefix.length()+1; ArrayList<String> fileList = new ArrayList<String>(); for (String file : fList) { - int index = file.indexOf(filePrefix); - if (index == -1) { + if (!file.startsWith(FILE_PREFIX)) { continue; } if (file.endsWith(".bak")) { + (new File(mDir, file)).delete(); continue; } fileList.add(file); @@ -206,20 +316,7 @@ public final class UsageStatsService extends IUsageStats.Stub { return fileList; } - private File getUsageFilesDir() { - if (mFilePrefix == null) { - return null; - } - File pre = new File(mFilePrefix); - return new File(pre.getParent()); - } - private void checkFileLimitFLOCK() { - File dir = getUsageFilesDir(); - if (dir == null) { - Log.w(TAG, "Couldnt find writable directory for usage stats file"); - return; - } // Get all usage stats output files ArrayList<String> fileList = getUsageStatsFileListFLOCK(); if (fileList == null) { @@ -227,49 +324,54 @@ public final class UsageStatsService extends IUsageStats.Stub { return; } int count = fileList.size(); - if (count <= _MAX_NUM_FILES) { + if (count <= MAX_NUM_FILES) { return; } // Sort files Collections.sort(fileList); - count -= _MAX_NUM_FILES; + count -= MAX_NUM_FILES; // Delete older files for (int i = 0; i < count; i++) { String fileName = fileList.get(i); - File file = new File(dir, fileName); - Log.i(TAG, "Deleting file : "+fileName); + File file = new File(mDir, fileName); + Log.i(TAG, "Deleting usage file : " + fileName); file.delete(); } } - private void writeStatsToFile() { + private void writeStatsToFile(boolean force) { synchronized (mFileLock) { - long currTime = new Date().getTime(); - boolean dayChanged = ((currTime - mLastTime) >= (24*60*60*1000)); - long currRealTime = SystemClock.elapsedRealtime(); - if (((currRealTime-mLastWriteRealTime) < _FILE_WRITE_INTERVAL) && - (!dayChanged)) { - // wait till the next update - return; + mCal.setTimeInMillis(System.currentTimeMillis()); + final int curDay = mCal.get(Calendar.DAY_OF_YEAR); + // Determine if the day changed... note that this will be wrong + // if the year has changed but we are in the same day of year... + // we can probably live with this. + final boolean dayChanged = curDay != mLastWriteDay; + long currElapsedTime = SystemClock.elapsedRealtime(); + if (!force) { + if (((currElapsedTime-mLastWriteElapsedTime) < FILE_WRITE_INTERVAL) && + (!dayChanged)) { + // wait till the next update + return; + } } // Get the most recent file - String todayStr = getCurrentDateStr(mFilePrefix); + mFileLeaf = getCurrentDateStr(FILE_PREFIX); // Copy current file to back up File backupFile = new File(mFile.getPath() + ".bak"); mFile.renameTo(backupFile); try { - checkFileLimitFLOCK(); - mFile.createNewFile(); // Write mStats to file writeStatsFLOCK(); - mLastWriteRealTime = currRealTime; - mLastTime = currTime; + mLastWriteElapsedTime = currElapsedTime; if (dayChanged) { + mLastWriteDay = curDay; // clear stats synchronized (mStats) { mStats.clear(); } - mFile = new File(todayStr); + mFile = new File(mDir, mFileLeaf); + checkFileLimitFLOCK(); } // Delete the backup file if (backupFile != null) { @@ -278,6 +380,7 @@ public final class UsageStatsService extends IUsageStats.Stub { } catch (IOException e) { Log.w(TAG, "Failed writing stats to file:" + mFile); if (backupFile != null) { + mFile.delete(); backupFile.renameTo(mFile); } } @@ -286,22 +389,26 @@ public final class UsageStatsService extends IUsageStats.Stub { private void writeStatsFLOCK() throws IOException { FileOutputStream stream = new FileOutputStream(mFile); - Parcel out = Parcel.obtain(); - writeStatsToParcelFLOCK(out); - stream.write(out.marshall()); - out.recycle(); - stream.flush(); - stream.close(); + try { + Parcel out = Parcel.obtain(); + writeStatsToParcelFLOCK(out); + stream.write(out.marshall()); + out.recycle(); + stream.flush(); + } finally { + stream.close(); + } } private void writeStatsToParcelFLOCK(Parcel out) { synchronized (mStatsLock) { + out.writeInt(VERSION); Set<String> keys = mStats.keySet(); + out.writeInt(keys.size()); for (String key : keys) { PkgUsageStatsExtended pus = mStats.get(key); out.writeString(key); - out.writeInt(pus.mLaunchCount); - out.writeLong(pus.mUsageTime); + pus.writeToParcel(out); } } } @@ -355,6 +462,10 @@ public final class UsageStatsService extends IUsageStats.Stub { return; } if (localLOGV) Log.i(TAG, "paused component:"+pkgName); + + // Persist current data to file if needed. + writeStatsToFile(false); + synchronized (mStatsLock) { PkgUsageStatsExtended pus = mStats.get(pkgName); if (pus == null) { @@ -364,8 +475,25 @@ public final class UsageStatsService extends IUsageStats.Stub { } pus.updatePause(); } - // Persist data to file - writeStatsToFile(); + } + + public void noteLaunchTime(ComponentName componentName, int millis) { + enforceCallingPermission(); + String pkgName; + if ((componentName == null) || + ((pkgName = componentName.getPackageName()) == null)) { + return; + } + + // Persist current data to file if needed. + writeStatsToFile(false); + + synchronized (mStatsLock) { + PkgUsageStatsExtended pus = mStats.get(pkgName); + if (pus != null) { + pus.addLaunchTime(componentName.getClassName(), millis); + } + } } public void enforceCallingPermission() { @@ -432,27 +560,25 @@ public final class UsageStatsService extends IUsageStats.Stub { } } - private void collectDumpInfoFLOCK(PrintWriter pw, String[] args) { + private void collectDumpInfoFLOCK(PrintWriter pw, boolean isCompactOutput, + boolean deleteAfterPrint) { List<String> fileList = getUsageStatsFileListFLOCK(); if (fileList == null) { return; } - final boolean isCheckinRequest = scanArgs(args, "-c"); Collections.sort(fileList); - File usageFile = new File(mFilePrefix); - String dirName = usageFile.getParent(); - File dir = new File(dirName); - String filePrefix = usageFile.getName(); - // file name followed by dot - int prefixLen = filePrefix.length()+1; - String todayStr = getCurrentDateStr(null); for (String file : fileList) { - File dFile = new File(dir, file); - String dateStr = file.substring(prefixLen); + if (deleteAfterPrint && file.equalsIgnoreCase(mFileLeaf)) { + // In this mode we don't print the current day's stats, since + // they are incomplete. + continue; + } + File dFile = new File(mDir, file); + String dateStr = file.substring(FILE_PREFIX.length()); try { Parcel in = getParcelForFile(dFile); - collectDumpInfoFromParcelFLOCK(in, pw, dateStr, isCheckinRequest); - if (isCheckinRequest && !todayStr.equalsIgnoreCase(dateStr)) { + collectDumpInfoFromParcelFLOCK(in, pw, dateStr, isCompactOutput); + if (deleteAfterPrint) { // Delete old file after collecting info only for checkin requests dFile.delete(); } @@ -466,40 +592,101 @@ public final class UsageStatsService extends IUsageStats.Stub { } private void collectDumpInfoFromParcelFLOCK(Parcel in, PrintWriter pw, - String date, boolean isCheckinRequest) { - StringBuilder sb = new StringBuilder(); - sb.append("Date:"); + String date, boolean isCompactOutput) { + StringBuilder sb = new StringBuilder(512); + if (isCompactOutput) { + sb.append("D:"); + sb.append(CHECKIN_VERSION); + sb.append(','); + } else { + sb.append("Date: "); + } + sb.append(date); - boolean first = true; - while (in.dataAvail() > 0) { + + int vers = in.readInt(); + if (vers != VERSION) { + sb.append(" (old data version)"); + pw.println(sb.toString()); + return; + } + + pw.println(sb.toString()); + int N = in.readInt(); + + while (N > 0) { + N--; String pkgName = in.readString(); - int launchCount = in.readInt(); - long usageTime = in.readLong(); - if (isCheckinRequest) { - if (!first) { - sb.append(","); - } + if (pkgName == null) { + break; + } + sb.setLength(0); + PkgUsageStatsExtended pus = new PkgUsageStatsExtended(in); + if (isCompactOutput) { + sb.append("P:"); sb.append(pkgName); sb.append(","); - sb.append(launchCount); + sb.append(pus.mLaunchCount); sb.append(","); - sb.append(usageTime); - sb.append("ms"); - } else { - if (first) { - sb.append("\n"); + sb.append(pus.mUsageTime); + sb.append('\n'); + final int NC = pus.mLaunchTimes.size(); + if (NC > 0) { + for (Map.Entry<String, TimeStats> ent : pus.mLaunchTimes.entrySet()) { + sb.append("A:"); + sb.append(ent.getKey()); + TimeStats times = ent.getValue(); + for (int i=0; i<NUM_LAUNCH_TIME_BINS; i++) { + sb.append(","); + sb.append(times.times[i]); + } + sb.append('\n'); + } } - sb.append("pkg="); + + } else { + sb.append(" "); sb.append(pkgName); - sb.append(", launchCount="); - sb.append(launchCount); - sb.append(", usageTime="); - sb.append(usageTime); - sb.append(" ms\n"); + sb.append(": "); + sb.append(pus.mLaunchCount); + sb.append(" times, "); + sb.append(pus.mUsageTime); + sb.append(" ms"); + sb.append('\n'); + final int NC = pus.mLaunchTimes.size(); + if (NC > 0) { + for (Map.Entry<String, TimeStats> ent : pus.mLaunchTimes.entrySet()) { + sb.append(" "); + sb.append(ent.getKey()); + TimeStats times = ent.getValue(); + int lastBin = 0; + boolean first = true; + for (int i=0; i<NUM_LAUNCH_TIME_BINS-1; i++) { + if (times.times[i] != 0) { + sb.append(first ? ": " : ", "); + sb.append(lastBin); + sb.append('-'); + sb.append(LAUNCH_TIME_BINS[i]); + sb.append('='); + sb.append(times.times[i]); + first = false; + } + lastBin = LAUNCH_TIME_BINS[i]; + } + if (times.times[NUM_LAUNCH_TIME_BINS-1] != 0) { + sb.append(first ? ": " : ", "); + sb.append(">="); + sb.append(lastBin); + sb.append('='); + sb.append(times.times[NUM_LAUNCH_TIME_BINS-1]); + } + sb.append('\n'); + } + } } - first = false; + + pw.write(sb.toString()); } - pw.write(sb.toString()); } /** @@ -524,8 +711,19 @@ public final class UsageStatsService extends IUsageStats.Stub { * The data persisted to file is parsed and the stats are computed. */ protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + final boolean isCheckinRequest = scanArgs(args, "--checkin"); + final boolean isCompactOutput = isCheckinRequest || scanArgs(args, "-c"); + final boolean deleteAfterPrint = isCheckinRequest || scanArgs(args, "-d"); + + // Make sure the current stats are written to the file. This + // doesn't need to be done if we are deleting files after printing, + // since it that case we won't print the current stats. + if (!deleteAfterPrint) { + writeStatsToFile(true); + } + synchronized (mFileLock) { - collectDumpInfoFLOCK(pw, args); + collectDumpInfoFLOCK(pw, isCompactOutput, deleteAfterPrint); } } diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java index ed90d32..3f210ca 100644 --- a/telephony/java/com/android/internal/telephony/Phone.java +++ b/telephony/java/com/android/internal/telephony/Phone.java @@ -113,9 +113,12 @@ public interface Phone { static final String APN_TYPE_DEFAULT = "default"; /** APN type for MMS traffic */ static final String APN_TYPE_MMS = "mms"; + /** APN type for SUPL assisted GPS */ + static final String APN_TYPE_SUPL = "supl"; // "Features" accessible through the connectivity manager static final String FEATURE_ENABLE_MMS = "enableMMS"; + static final String FEATURE_ENABLE_SUPL = "enableSUPL"; /** * Return codes for <code>enableApnType()</code> @@ -170,7 +173,7 @@ public interface Phone { int NT_MODE_EVDO_NO_CDMA = 6; /* EvDo only */ int NT_MODE_GLOBAL = 7; /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) AVAILABLE Application Settings menu*/ - int PREFERRED_NT_MODE = NT_MODE_GLOBAL; + int PREFERRED_NT_MODE = NT_MODE_GSM_ONLY; // Used for CDMA roaming mode diff --git a/telephony/java/com/android/internal/telephony/PhoneFactory.java b/telephony/java/com/android/internal/telephony/PhoneFactory.java index 3db0499..86e2f04 100644 --- a/telephony/java/com/android/internal/telephony/PhoneFactory.java +++ b/telephony/java/com/android/internal/telephony/PhoneFactory.java @@ -108,26 +108,23 @@ public class PhoneFactory { sCommandsInterface = new RIL(context, networkMode, cdmaSubscription); switch(networkMode) { - case RILConstants.NETWORK_MODE_WCDMA_PREF: - case RILConstants.NETWORK_MODE_GSM_ONLY: - case RILConstants.NETWORK_MODE_WCDMA_ONLY: - case RILConstants.NETWORK_MODE_GSM_UMTS: - sProxyPhone = new PhoneProxy(new GSMPhone(context, - sCommandsInterface, sPhoneNotifier)); - Log.i(LOG_TAG, "Creating GSMPhone"); - break; case RILConstants.NETWORK_MODE_CDMA: case RILConstants.NETWORK_MODE_CDMA_NO_EVDO: case RILConstants.NETWORK_MODE_EVDO_NO_CDMA: + case RILConstants.NETWORK_MODE_GLOBAL: sProxyPhone = new PhoneProxy(new CDMAPhone(context, sCommandsInterface, sPhoneNotifier)); Log.i(LOG_TAG, "Creating CDMAPhone"); break; - case RILConstants.NETWORK_MODE_GLOBAL: + case RILConstants.NETWORK_MODE_WCDMA_PREF: + case RILConstants.NETWORK_MODE_GSM_ONLY: + case RILConstants.NETWORK_MODE_WCDMA_ONLY: + case RILConstants.NETWORK_MODE_GSM_UMTS: default: - sProxyPhone = new PhoneProxy(new CDMAPhone(context, + sProxyPhone = new PhoneProxy(new GSMPhone(context, sCommandsInterface, sPhoneNotifier)); - Log.i(LOG_TAG, "Creating CDMAPhone"); + Log.i(LOG_TAG, "Creating GSMPhone"); + break; } sMadeDefaults = true; } @@ -160,5 +157,3 @@ public class PhoneFactory { } } } - - diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java index f5d3b32..636a223 100644 --- a/telephony/java/com/android/internal/telephony/RIL.java +++ b/telephony/java/com/android/internal/telephony/RIL.java @@ -565,22 +565,18 @@ public final class RIL extends BaseCommands implements CommandsInterface { mNetworkMode = networkMode; //At startup mPhoneType is first set from networkMode switch(networkMode) { - case RILConstants.NETWORK_MODE_WCDMA_PREF: - case RILConstants.NETWORK_MODE_GSM_ONLY: - case RILConstants.NETWORK_MODE_WCDMA_ONLY: - case RILConstants.NETWORK_MODE_GSM_UMTS: - mPhoneType = RILConstants.GSM_PHONE; - break; case RILConstants.NETWORK_MODE_CDMA: case RILConstants.NETWORK_MODE_CDMA_NO_EVDO: case RILConstants.NETWORK_MODE_EVDO_NO_CDMA: - mPhoneType = RILConstants.CDMA_PHONE; - break; case RILConstants.NETWORK_MODE_GLOBAL: mPhoneType = RILConstants.CDMA_PHONE; break; + case RILConstants.NETWORK_MODE_WCDMA_PREF: + case RILConstants.NETWORK_MODE_GSM_ONLY: + case RILConstants.NETWORK_MODE_WCDMA_ONLY: + case RILConstants.NETWORK_MODE_GSM_UMTS: default: - mPhoneType = RILConstants.CDMA_PHONE; + mPhoneType = RILConstants.GSM_PHONE; } PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index 028aad7..9c63627 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -51,7 +51,7 @@ public interface RILConstants { int NETWORK_MODE_EVDO_NO_CDMA = 6; /* EvDo only */ int NETWORK_MODE_GLOBAL = 7; /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) AVAILABLE Application Settings menu*/ - int PREFERRED_NETWORK_MODE = NETWORK_MODE_GLOBAL; + int PREFERRED_NETWORK_MODE = NETWORK_MODE_GSM_ONLY; /* CDMA subscription source. See ril.h RIL_REQUEST_CDMA_SET_SUBSCRIPTION */ int SUBSCRIPTION_FROM_RUIM = 0; /* CDMA subscription from RUIM when available */ diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java index a4bf0dd..28a9968 100644 --- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java @@ -114,7 +114,6 @@ public abstract class ServiceStateTracker extends Handler { // Event Log Tags protected static final int EVENT_LOG_CGREG_FAIL = 50107; - protected static final int EVENT_DATA_STATE_RADIO_OFF = 50108; //***** Time Zones protected static final String TIMEZONE_PROPERTY = "persist.sys.timezone"; @@ -241,4 +240,3 @@ public abstract class ServiceStateTracker extends Handler { pollingContext = new int[1]; } } - diff --git a/telephony/java/com/android/internal/telephony/SmsMessageBase.java b/telephony/java/com/android/internal/telephony/SmsMessageBase.java index 7c32451..1aad38d 100644 --- a/telephony/java/com/android/internal/telephony/SmsMessageBase.java +++ b/telephony/java/com/android/internal/telephony/SmsMessageBase.java @@ -20,20 +20,7 @@ import android.util.Log; import com.android.internal.telephony.SmsHeader; import java.util.Arrays; -import static android.telephony.SmsMessage.ENCODING_7BIT; -import static android.telephony.SmsMessage.ENCODING_16BIT; -import static android.telephony.SmsMessage.MAX_USER_DATA_BYTES; -import static android.telephony.SmsMessage.MAX_USER_DATA_BYTES_WITH_HEADER; -import static android.telephony.SmsMessage.MAX_USER_DATA_SEPTETS; -import static android.telephony.SmsMessage.MAX_USER_DATA_SEPTETS_WITH_HEADER; import static android.telephony.SmsMessage.MessageClass; -import static com.android.internal.telephony.SmsAddress.TON_ABBREVIATED; -import static com.android.internal.telephony.SmsAddress.TON_ALPHANUMERIC; -import static com.android.internal.telephony.SmsAddress.TON_INTERNATIONAL; -import static com.android.internal.telephony.SmsAddress.TON_NATIONAL; -import static com.android.internal.telephony.SmsAddress.TON_NETWORK; -import static com.android.internal.telephony.SmsAddress.TON_SUBSCRIBER; -import static com.android.internal.telephony.SmsAddress.TON_UNKNOWN; /** * Base class declaring the specific methods and members for SmsMessage. @@ -385,4 +372,3 @@ public abstract class SmsMessageBase { } } - diff --git a/telephony/java/com/android/internal/telephony/TelephonyEventLog.java b/telephony/java/com/android/internal/telephony/TelephonyEventLog.java index 1ef3c6c..97f9d7d 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyEventLog.java +++ b/telephony/java/com/android/internal/telephony/TelephonyEventLog.java @@ -28,6 +28,6 @@ public final class TelephonyEventLog { public static final int EVENT_LOG_RADIO_PDP_SETUP_FAIL = 50105; public static final int EVENT_LOG_CALL_DROP = 50106; public static final int EVENT_LOG_CGREG_FAIL = 50107; - public static final int EVENT_DATA_STATE_RADIO_OFF = 50108; + public static final int EVENT_LOG_DATA_STATE_RADIO_OFF = 50108; public static final int EVENT_LOG_PDP_NETWORK_DROP = 50109; } diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java index c139619..8ffb7ec 100644..100755 --- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java @@ -475,6 +475,11 @@ public class CDMAPhone extends PhoneBase { // we report data connected ret = DataState.CONNECTED; + } else if (mSST == null) { + // Radio Technology Change is ongoning, dispose() and removeReferences() have + // already been called + + ret = DataState.DISCONNECTED; } else if (mSST.getCurrentCdmaDataConnectionState() == ServiceState.RADIO_TECHNOLOGY_UNKNOWN) { // If we're out of service, open TCP sockets may still work diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java index ed617ef..e0a84ab 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java @@ -228,6 +228,9 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { Log.d(LOG_TAG, "Request to enableApnType("+type+")"); if (TextUtils.equals(type, Phone.APN_TYPE_MMS)) { return Phone.APN_ALREADY_ACTIVE; + } else if (TextUtils.equals(type, Phone.APN_TYPE_SUPL)) { + Log.w(LOG_TAG, "Phone.APN_TYPE_SUPL not enabled for CDMA"); + return Phone.APN_REQUEST_FAILED; } else { return Phone.APN_REQUEST_FAILED; } @@ -822,7 +825,6 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { private void destroyAllDataConnectionList() { if(dataConnectionList != null) { - CdmaDataConnection pdp; dataConnectionList.removeAll(dataConnectionList); } } diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java index ca40e76..6f344b9 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java @@ -388,7 +388,7 @@ final class CdmaServiceStateTracker extends ServiceStateTracker { EventLog.List val = new EventLog.List( dcTracker.getStateInString(), (dcTracker.getAnyDataEnabled() ? 1 : 0) ); - EventLog.writeEvent(TelephonyEventLog.EVENT_DATA_STATE_RADIO_OFF, val); + EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_DATA_STATE_RADIO_OFF, val); } dcTracker.cleanConnectionBeforeRadioOff(); diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java index e4b474a..2f26bdc 100644 --- a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java +++ b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java @@ -27,7 +27,6 @@ import com.android.internal.telephony.SmsHeader; import com.android.internal.telephony.SmsMessageBase; import com.android.internal.telephony.cdma.sms.BearerData; import com.android.internal.telephony.cdma.sms.CdmaSmsAddress; -import com.android.internal.telephony.cdma.sms.SmsDataCoding; import com.android.internal.telephony.cdma.sms.SmsEnvelope; import com.android.internal.telephony.cdma.sms.UserData; @@ -50,23 +49,6 @@ import static android.telephony.SmsMessage.MAX_USER_DATA_BYTES_WITH_HEADER; import static android.telephony.SmsMessage.MAX_USER_DATA_SEPTETS; import static android.telephony.SmsMessage.MAX_USER_DATA_SEPTETS_WITH_HEADER; import static android.telephony.SmsMessage.MessageClass; -import static com.android.internal.telephony.cdma.sms.BearerData.ERROR_NONE; -import static com.android.internal.telephony.cdma.sms.BearerData.ERROR_TEMPORARY; -import static com.android.internal.telephony.cdma.sms.BearerData.ERROR_PERMANENT; -import static com.android.internal.telephony.cdma.sms.BearerData.MESSAGE_TYPE_DELIVER; -import static com.android.internal.telephony.cdma.sms.BearerData.MESSAGE_TYPE_SUBMIT; -import static com.android.internal.telephony.cdma.sms.BearerData.MESSAGE_TYPE_CANCELLATION; -import static com.android.internal.telephony.cdma.sms.BearerData.MESSAGE_TYPE_DELIVERY_ACK; -import static com.android.internal.telephony.cdma.sms.BearerData.MESSAGE_TYPE_USER_ACK; -import static com.android.internal.telephony.cdma.sms.BearerData.MESSAGE_TYPE_READ_ACK; -import static com.android.internal.telephony.cdma.sms.CdmaSmsAddress.SMS_ADDRESS_MAX; -import static com.android.internal.telephony.cdma.sms.CdmaSmsAddress.SMS_SUBADDRESS_MAX; -import static com.android.internal.telephony.cdma.sms.SmsEnvelope.SMS_BEARER_DATA_MAX; -import static com.android.internal.telephony.cdma.sms.UserData.UD_ENCODING_7BIT_ASCII; -import static com.android.internal.telephony.cdma.sms.UserData.UD_ENCODING_GSM_7BIT_ALPHABET; -import static com.android.internal.telephony.cdma.sms.UserData.UD_ENCODING_IA5; -import static com.android.internal.telephony.cdma.sms.UserData.UD_ENCODING_OCTET; -import static com.android.internal.telephony.cdma.sms.UserData.UD_ENCODING_UNICODE_16; /** * A Short Message Service message. @@ -186,7 +168,7 @@ public class SmsMessage extends SmsMessageBase { // ignore subaddress p.readInt(); //p_cur->sSubAddress.subaddressType - p.readByte(); //p_cur->sSubAddress.odd + p.readInt(); //p_cur->sSubAddress.odd count = p.readByte(); //p_cur->sSubAddress.number_of_digits //p_cur->sSubAddress.digits[digitCount] : for (int index=0; index < count; index++) { @@ -309,15 +291,15 @@ public class SmsMessage extends SmsMessageBase { int septetCount = GsmAlphabet.countGsmSeptets(message, true); // User Data (and length) - uData.userData = message.getBytes(); + uData.payload = message.getBytes(); - if (uData.userData.length > MAX_USER_DATA_SEPTETS) { + if (uData.payload.length > MAX_USER_DATA_SEPTETS) { // Message too long return null; } // desired TP-Data-Coding-Scheme - uData.userDataEncoding = UserData.UD_ENCODING_GSM_7BIT_ALPHABET; + uData.msgEncoding = UserData.ENCODING_GSM_7BIT_ALPHABET; // paddingBits not needed for UD_ENCODING_GSM_7BIT_ALPHABET @@ -341,15 +323,15 @@ public class SmsMessage extends SmsMessageBase { return null; } - uData.userData = textPart; + uData.payload = textPart; - if (uData.userData.length > MAX_USER_DATA_BYTES) { + if (uData.payload.length > MAX_USER_DATA_BYTES) { // Message too long return null; } // TP-Data-Coding-Scheme - uData.userDataEncoding = UserData.UD_ENCODING_UNICODE_16; + uData.msgEncoding = UserData.ENCODING_UNICODE_16; // sms header if(headerData != null) { @@ -425,8 +407,8 @@ public class SmsMessage extends SmsMessageBase { // TP-Data-Coding-Scheme // No class, 8 bit data - uData.userDataEncoding = UserData.UD_ENCODING_OCTET; - uData.userData = data; + uData.msgEncoding = UserData.ENCODING_OCTET; + uData.payload = data; byte[] msgData = sms.getEnvelope(destinationAddress, statusReportRequested, uData, true, true); @@ -619,21 +601,21 @@ public class SmsMessage extends SmsMessageBase { * Parses a SMS message from its BearerData stream. (mobile-terminated only) */ protected void parseSms() { - mBearerData = SmsDataCoding.decodeCdmaSms(mEnvelope.bearerData); - messageRef = mBearerData.messageID; + mBearerData = BearerData.decode(mEnvelope.bearerData); + messageRef = mBearerData.messageId; // TP-Message-Type-Indicator // (See 3GPP2 C.S0015-B, v2, 4.5.1) int messageType = mBearerData.messageType; switch (messageType) { - case MESSAGE_TYPE_USER_ACK: - case MESSAGE_TYPE_READ_ACK: - case MESSAGE_TYPE_DELIVER: + case BearerData.MESSAGE_TYPE_USER_ACK: + case BearerData.MESSAGE_TYPE_READ_ACK: + case BearerData.MESSAGE_TYPE_DELIVER: // Deliver (mobile-terminated only) parseSmsDeliver(); break; - case MESSAGE_TYPE_DELIVERY_ACK: + case BearerData.MESSAGE_TYPE_DELIVERY_ACK: parseSmsDeliveryAck(); break; @@ -699,22 +681,22 @@ public class SmsMessage extends SmsMessageBase { return; } - encodingType = uData.userDataEncoding; + encodingType = uData.msgEncoding; // insert DCS-decoding here when type is supported by ril-library - userData = uData.userData; + userData = uData.payload; userDataHeader = uData.userDataHeader; switch (encodingType) { - case UD_ENCODING_GSM_7BIT_ALPHABET: - case UD_ENCODING_UNICODE_16: + case UserData.ENCODING_GSM_7BIT_ALPHABET: + case UserData.ENCODING_UNICODE_16: // user data was already decoded by wmsts-library messageBody = new String(userData); break; // data and unsupported encodings: - case UD_ENCODING_OCTET: + case UserData.ENCODING_OCTET: default: messageBody = null; break; @@ -771,7 +753,7 @@ public class SmsMessage extends SmsMessageBase { if (useNewId) { setNextMessageId(); } - mBearerData.messageID = nextMessageId; + mBearerData.messageId = nextMessageId; // Set the reply options (See C.S0015-B, v2.0, 4.5.11) if(statusReportRequested) { @@ -795,7 +777,7 @@ public class SmsMessage extends SmsMessageBase { // ** encode BearerData ** byte[] encodedBearerData = null; try { - encodedBearerData = SmsDataCoding.encodeCdmaSms(mBearerData); + encodedBearerData = BearerData.encode(mBearerData); } catch (Exception e) { Log.e(LOG_TAG, "doGetSubmitPdu: EncodeCdmaSMS function in JNI interface failed: " + e.getMessage()); diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java index fec9529..8e67387 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java @@ -16,7 +16,52 @@ package com.android.internal.telephony.cdma.sms; +import android.util.Log; + +import com.android.internal.telephony.GsmAlphabet; +import com.android.internal.telephony.SmsHeader; +import com.android.internal.telephony.cdma.sms.UserData; + +import com.android.internal.util.HexDump; +import com.android.internal.util.BitwiseInputStream; +import com.android.internal.util.BitwiseOutputStream; + +/** + * XXX + * + * + */ public final class BearerData{ + private final static String LOG_TAG = "SMS"; + + /** + * Bearer Data Subparameter Indentifiers + * (See 3GPP2 C.S0015-B, v2.0, table 4.5-1) + */ + private final static byte SUBPARAM_MESSAGE_IDENTIFIER = 0x00; + private final static byte SUBPARAM_USER_DATA = 0x01; + private final static byte SUBPARAM_USER_REPONSE_CODE = 0x02; + private final static byte SUBPARAM_MESSAGE_CENTER_TIME_STAMP = 0x03; + //private final static byte SUBPARAM_VALIDITY_PERIOD_ABSOLUTE = 0x04; + //private final static byte SUBPARAM_VALIDITY_PERIOD_RELATIVE = 0x05; + //private final static byte SUBPARAM_DEFERRED_DELIVERY_TIME_ABSOLUTE = 0x06; + //private final static byte SUBPARAM_DEFERRED_DELIVERY_TIME_RELATIVE = 0x07; + //private final static byte SUBPARAM_PRIORITY_INDICATOR = 0x08; + //private final static byte SUBPARAM_PRIVACY_INDICATOR = 0x09; + private final static byte SUBPARAM_REPLY_OPTION = 0x0A; + private final static byte SUBPARAM_NUMBER_OF_MESSAGES = 0x0B; + //private final static byte SUBPARAM_ALERT_ON_MESSAGE_DELIVERY = 0x0C; + //private final static byte SUBPARAM_LANGUAGE_INDICATOR = 0x0D; + private final static byte SUBPARAM_CALLBACK_NUMBER = 0x0E; + //private final static byte SUBPARAM_MESSAGE_DISPLAY_MODE = 0x0F; + //private final static byte SUBPARAM_MULTIPLE_ENCODING_USER_DATA = 0x10; + //private final static byte SUBPARAM_MESSAGE_DEPOSIT_INDEX = 0x11; + //private final static byte SUBPARAM_SERVICE_CATEGORY_PROGRAM_DATA = 0x12; + //private final static byte SUBPARAM_SERVICE_CATEGORY_PROGRAM_RESULTS = 0x13; + private final static byte SUBPARAM_MESSAGE_STATUS = 0x14; + //private final static byte SUBPARAM_TP_FAILURE_CAUSE = 0x15; + //private final static byte SUBPARAM_ENHANCED_VMN = 0x16; + //private final static byte SUBPARAM_ENHANCED_VMN_ACK = 0x17; // For completeness the following fields are listed, though not used yet. /** @@ -94,9 +139,6 @@ public final class BearerData{ public static final int ERROR_UNDEFINED = 0xFF; public static final int STATUS_UNDEFINED = 0xFF; - /** Bit-mask indicating used fields for SmsDataCoding */ - public int mask; - /** * 4-bit value indicating the message type in accordance to * table 4.5.1-1 @@ -109,7 +151,7 @@ public final class BearerData{ * (Special rules apply for WAP-messages.) * (See 3GPP2 C.S0015-B, v2, 4.5.1) */ - public int messageID; + public int messageId; /** * 1-bit value that indicates whether a User Data Header is present. @@ -188,5 +230,440 @@ public final class BearerData{ */ public int messageStatus = STATUS_UNDEFINED; -} + private static class CodingException extends Exception { + public CodingException(String s) { + super(s); + } + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("BearerData:\n"); + builder.append(" messageType: " + messageType + "\n"); + builder.append(" messageId: " + (int)messageId + "\n"); + builder.append(" hasUserDataHeader: " + hasUserDataHeader + "\n"); + builder.append(" timeStamp: " + timeStamp + "\n"); + builder.append(" userAckReq: " + userAckReq + "\n"); + builder.append(" deliveryAckReq: " + deliveryAckReq + "\n"); + builder.append(" readAckReq: " + readAckReq + "\n"); + builder.append(" reportReq: " + reportReq + "\n"); + builder.append(" numberOfMessages: " + numberOfMessages + "\n"); + builder.append(" callbackNumber: " + callbackNumber + "\n"); + builder.append(" displayMode: " + displayMode + "\n"); + builder.append(" errorClass: " + errorClass + "\n"); + builder.append(" messageStatus: " + messageStatus + "\n"); + builder.append(" userData: " + userData + "\n"); + return builder.toString(); + } + + private static void encodeMessageId(BearerData bData, BitwiseOutputStream outStream) + throws BitwiseOutputStream.AccessException + { + outStream.write(8, 3); + outStream.write(4, bData.messageType); + outStream.write(8, bData.messageId >> 8); + outStream.write(8, bData.messageId); + outStream.write(1, bData.hasUserDataHeader ? 1 : 0); + outStream.skip(3); + } + + private static void encodeUserData(BearerData bData, BitwiseOutputStream outStream) + throws BitwiseOutputStream.AccessException + { + int dataBits = (bData.userData.payload.length * 8) - bData.userData.paddingBits; + byte[] headerData = null; + if (bData.hasUserDataHeader) { + headerData = bData.userData.userDataHeader.toByteArray(); + dataBits += headerData.length * 8; + } + int paramBits = dataBits + 13; + if ((bData.userData.msgEncoding == UserData.ENCODING_IS91_EXTENDED_PROTOCOL) || + (bData.userData.msgEncoding == UserData.ENCODING_GSM_DCS)) { + paramBits += 8; + } + int paramBytes = (paramBits / 8) + ((paramBits % 8) > 0 ? 1 : 0); + int paddingBits = (paramBytes * 8) - paramBits; + outStream.write(8, paramBytes); + outStream.write(5, bData.userData.msgEncoding); + if ((bData.userData.msgEncoding == UserData.ENCODING_IS91_EXTENDED_PROTOCOL) || + (bData.userData.msgEncoding == UserData.ENCODING_GSM_DCS)) { + outStream.write(8, bData.userData.msgType); + } + outStream.write(8, bData.userData.numFields); + if (headerData != null) outStream.writeByteArray(headerData.length * 8, headerData); + outStream.writeByteArray(dataBits, bData.userData.payload); + if (paddingBits > 0) outStream.write(paddingBits, 0); + } + + private static void encodeReplyOption(BearerData bData, BitwiseOutputStream outStream) + throws BitwiseOutputStream.AccessException + { + outStream.write(8, 1); + outStream.write(1, bData.userAckReq ? 1 : 0); + outStream.write(1, bData.deliveryAckReq ? 1 : 0); + outStream.write(1, bData.readAckReq ? 1 : 0); + outStream.write(1, bData.reportReq ? 1 : 0); + outStream.write(4, 0); + } + + private static byte[] encodeDtmfSmsAddress(String address) { + int digits = address.length(); + int dataBits = digits * 4; + int dataBytes = (dataBits / 8); + dataBytes += (dataBits % 8) > 0 ? 1 : 0; + byte[] rawData = new byte[dataBytes]; + for (int i = 0; i < digits; i++) { + char c = address.charAt(i); + int val = 0; + if ((c >= '1') && (c <= '9')) val = c - '0'; + else if (c == '0') val = 10; + else if (c == '*') val = 11; + else if (c == '#') val = 12; + else return null; + rawData[i / 2] |= val << (4 - ((i % 2) * 4)); + } + return rawData; + } + + private static void encodeCdmaSmsAddress(CdmaSmsAddress addr) throws CodingException { + if (addr.digitMode == CdmaSmsAddress.DIGIT_MODE_8BIT_CHAR) { + try { + addr.origBytes = addr.address.getBytes("US-ASCII"); + } catch (java.io.UnsupportedEncodingException ex) { + throw new CodingException("invalid SMS address, cannot convert to ASCII"); + } + } else { + addr.origBytes = encodeDtmfSmsAddress(addr.address); + } + } + + private static void encodeCallbackNumber(BearerData bData, BitwiseOutputStream outStream) + throws BitwiseOutputStream.AccessException, CodingException + { + CdmaSmsAddress addr = bData.callbackNumber; + encodeCdmaSmsAddress(addr); + int paramBits = 9; + int dataBits = 0; + if (addr.digitMode == CdmaSmsAddress.DIGIT_MODE_8BIT_CHAR) { + paramBits += 7; + dataBits = addr.numberOfDigits * 8; + } else { + dataBits = addr.numberOfDigits * 4; + } + paramBits += dataBits; + int paramBytes = (paramBits / 8) + ((paramBits % 8) > 0 ? 1 : 0); + int paddingBits = (paramBytes * 8) - paramBits; + outStream.write(8, paramBytes); + outStream.write(1, addr.digitMode); + if (addr.digitMode == CdmaSmsAddress.DIGIT_MODE_8BIT_CHAR) { + outStream.write(3, addr.ton); + outStream.write(4, addr.numberPlan); + } + outStream.write(8, addr.numberOfDigits); + outStream.writeByteArray(dataBits, addr.origBytes); + if (paddingBits > 0) outStream.write(paddingBits, 0); + } + + private static void encodeMsgStatus(BearerData bData, BitwiseOutputStream outStream) + throws BitwiseOutputStream.AccessException + { + outStream.write(8, 1); + outStream.write(2, bData.errorClass); + outStream.write(6, bData.messageStatus); + } + private static void encodeMsgCount(BearerData bData, BitwiseOutputStream outStream) + throws BitwiseOutputStream.AccessException + { + outStream.write(8, 1); + outStream.write(8, bData.numberOfMessages); + } + + private static void encodeMsgCenterTimeStamp(BearerData bData, BitwiseOutputStream outStream) + throws BitwiseOutputStream.AccessException + { + outStream.write(8, 6); + outStream.writeByteArray(6 * 8, bData.timeStamp); + } + + /** + * Create serialized representation for BearerData object. + * (See 3GPP2 C.R1001-F, v1.0, section 4.5 for layout details) + * + * @param bearerData an instance of BearerData. + * + * @return data byta array of raw encoded SMS bearer data. + */ + public static byte[] encode(BearerData bData) { + try { + BitwiseOutputStream outStream = new BitwiseOutputStream(200); + outStream.write(8, SUBPARAM_MESSAGE_IDENTIFIER); + encodeMessageId(bData, outStream); + if (bData.userData != null) { + outStream.write(8, SUBPARAM_USER_DATA); + encodeUserData(bData, outStream); + } + if (bData.callbackNumber != null) { + outStream.write(8, SUBPARAM_CALLBACK_NUMBER); + encodeCallbackNumber(bData, outStream); + } + if (bData.userAckReq || bData.deliveryAckReq || bData.readAckReq || bData.reportReq) { + outStream.write(8, SUBPARAM_REPLY_OPTION); + encodeReplyOption(bData, outStream); + } + if (bData.numberOfMessages != 0) { + outStream.write(8, SUBPARAM_NUMBER_OF_MESSAGES); + encodeMsgCount(bData, outStream); + } + if (bData.timeStamp != null) { + outStream.write(8, SUBPARAM_MESSAGE_CENTER_TIME_STAMP); + encodeMsgCenterTimeStamp(bData, outStream); + } + return outStream.toByteArray(); + } catch (BitwiseOutputStream.AccessException ex) { + Log.e(LOG_TAG, "BearerData encode failed: " + ex); + } catch (CodingException ex) { + Log.e(LOG_TAG, "BearerData encode failed: " + ex); + } + return null; + } + + private static void decodeMessageId(BearerData bData, BitwiseInputStream inStream) + throws BitwiseInputStream.AccessException, CodingException + { + if (inStream.read(8) != 3) { + throw new CodingException("MESSAGE_IDENTIFIER subparam size incorrect"); + } + bData.messageType = inStream.read(4); + bData.messageId = inStream.read(8) << 8; + bData.messageId |= inStream.read(8); + bData.hasUserDataHeader = (inStream.read(1) == 1); + inStream.skip(3); + } + + private static void decodeUserData(BearerData bData, BitwiseInputStream inStream) + throws BitwiseInputStream.AccessException + { + byte paramBytes = inStream.read(8); + bData.userData = new UserData(); + bData.userData.msgEncoding = inStream.read(5); + bData.userData.msgType = 0; + int consumedBits = 5; + if ((bData.userData.msgEncoding == UserData.ENCODING_IS91_EXTENDED_PROTOCOL) || + (bData.userData.msgEncoding == UserData.ENCODING_GSM_DCS)) { + bData.userData.msgType = inStream.read(8); + consumedBits += 8; + } + bData.userData.numFields = inStream.read(8); + consumedBits += 8; + int dataBits = (paramBytes * 8) - consumedBits; + bData.userData.payload = inStream.readByteArray(dataBits); + } + + private static String decodePayloadStr(byte[] data, int offset, int numFields, String format) + throws CodingException + { + try { + return new String(data, offset, numFields, format); + } catch (java.io.UnsupportedEncodingException ex) { + throw new CodingException("invalid ASCII user data code"); + } + } + + private static void decodeUserDataPayload(UserData userData, boolean hasUserDataHeader) + throws CodingException + { + int offset = 0; + if (hasUserDataHeader) { + int UdhLen = userData.payload[0]; + byte[] headerData = new byte[UdhLen]; + System.arraycopy(userData.payload, 1, headerData, 0, UdhLen); + userData.userDataHeader = SmsHeader.parse(headerData); + } + switch (userData.msgEncoding) { + case UserData.ENCODING_GSM_7BIT_ALPHABET: + userData.payloadStr = GsmAlphabet.gsm7BitPackedToString(userData.payload, + offset, userData.numFields); + break; + case UserData.ENCODING_7BIT_ASCII: + userData.payloadStr = decodePayloadStr(userData.payload, offset, + userData.numFields, "US-ASCII"); + break; + case UserData.ENCODING_UNICODE_16: + userData.payloadStr = decodePayloadStr(userData.payload, offset, + userData.numFields * 2, "UTF-16"); + break; + default: + throw new CodingException("unsupported user data encoding (" + + userData.msgEncoding + ")"); + } + } + + private static void decodeReplyOption(BearerData bData, BitwiseInputStream inStream) + throws BitwiseInputStream.AccessException, CodingException + { + byte paramBytes = inStream.read(8); + if (paramBytes != 1) { + throw new CodingException("REPLY_OPTION subparam size incorrect"); + } + bData.userAckReq = (inStream.read(1) == 1); + bData.deliveryAckReq = (inStream.read(1) == 1); + bData.readAckReq = (inStream.read(1) == 1); + bData.reportReq = (inStream.read(1) == 1); + inStream.skip(4); + } + + private static void decodeMsgCount(BearerData bData, BitwiseInputStream inStream) + throws BitwiseInputStream.AccessException, CodingException + { + if (inStream.read(8) != 1) { + throw new CodingException("NUMBER_OF_MESSAGES subparam size incorrect"); + } + bData.numberOfMessages = inStream.read(8); + } + + private static String decodeDtmfSmsAddress(byte[] rawData, int numFields) + throws CodingException + { + /* DTMF 4-bit digit encoding, defined in at + * 3GPP2 C.S005-D, v2.0, table 2.7.1.3.2.4-4 */ + StringBuffer strBuf = new StringBuffer(numFields); + for (int i = 0; i < numFields; i++) { + int val = 0x0F & (rawData[i / 2] >>> (4 - ((i % 2) * 4))); + if ((val >= 1) && (val <= 9)) strBuf.append(Integer.toString(val, 10)); + else if (val == 10) strBuf.append('0'); + else if (val == 11) strBuf.append('*'); + else if (val == 12) strBuf.append('#'); + else throw new CodingException("invalid SMS address DTMF code (" + val + ")"); + } + return strBuf.toString(); + } + + private static void decodeSmsAddress(CdmaSmsAddress addr) throws CodingException { + if (addr.digitMode == CdmaSmsAddress.DIGIT_MODE_8BIT_CHAR) { + try { + /* As specified in 3GPP2 C.S0015-B, v2, 4.5.15 -- actually + * just 7-bit ASCII encoding, with the MSB being zero. */ + addr.address = new String(addr.origBytes, 0, addr.origBytes.length, "US-ASCII"); + } catch (java.io.UnsupportedEncodingException ex) { + throw new CodingException("invalid SMS address ASCII code"); + } + } else { + addr.address = decodeDtmfSmsAddress(addr.origBytes, addr.numberOfDigits); + } + } + + private static void decodeCallbackNumber(BearerData bData, BitwiseInputStream inStream) + throws BitwiseInputStream.AccessException, CodingException + { + byte paramBytes = inStream.read(8); + CdmaSmsAddress addr = new CdmaSmsAddress(); + addr.digitMode = inStream.read(1); + byte fieldBits = 4; + byte consumedBits = 1; + if (addr.digitMode == CdmaSmsAddress.DIGIT_MODE_8BIT_CHAR) { + addr.ton = inStream.read(3); + addr.numberPlan = inStream.read(4); + fieldBits = 8; + consumedBits += 7; + } + addr.numberOfDigits = inStream.read(8); + consumedBits += 8; + int remainingBits = (paramBytes * 8) - consumedBits; + int dataBits = addr.numberOfDigits * fieldBits; + int paddingBits = remainingBits - dataBits; + if (remainingBits < dataBits) { + throw new CodingException("CALLBACK_NUMBER subparam encoding size error (" + + "remainingBits " + remainingBits + ", dataBits " + + dataBits + ", paddingBits " + paddingBits + ")"); + } + addr.origBytes = inStream.readByteArray(dataBits); + inStream.skip(paddingBits); + decodeSmsAddress(addr); + bData.callbackNumber = addr; + } + + private static void decodeMsgStatus(BearerData bData, BitwiseInputStream inStream) + throws BitwiseInputStream.AccessException, CodingException + { + if (inStream.read(8) != 1) { + throw new CodingException("MESSAGE_STATUS subparam size incorrect"); + } + bData.errorClass = inStream.read(2); + bData.messageStatus = inStream.read(6); + } + + private static void decodeMsgCenterTimeStamp(BearerData bData, + BitwiseInputStream inStream) + throws BitwiseInputStream.AccessException, CodingException + { + if (inStream.read(8) != 6) { + throw new CodingException("MESSAGE_CENTER_TIME_STAMP subparam size incorrect"); + } + bData.timeStamp = inStream.readByteArray(6 * 8); + } + + /** + * Create BearerData object from serialized representation. + * (See 3GPP2 C.R1001-F, v1.0, section 4.5 for layout details) + * + * @param smsData byte array of raw encoded SMS bearer data. + * + * @return an instance of BearerData. + */ + public static BearerData decode(byte[] smsData) { + try { + BitwiseInputStream inStream = new BitwiseInputStream(smsData); + BearerData bData = new BearerData(); + int foundSubparamMask = 0; + while (inStream.available() > 0) { + int subparamId = inStream.read(8); + int subparamIdBit = 1 << subparamId; + if ((foundSubparamMask & subparamIdBit) != 0) { + throw new CodingException("illegal duplicate subparameter (" + + subparamId + ")"); + } + foundSubparamMask |= subparamIdBit; + switch (subparamId) { + case SUBPARAM_MESSAGE_IDENTIFIER: + decodeMessageId(bData, inStream); + break; + case SUBPARAM_USER_DATA: + decodeUserData(bData, inStream); + break; + case SUBPARAM_REPLY_OPTION: + decodeReplyOption(bData, inStream); + break; + case SUBPARAM_NUMBER_OF_MESSAGES: + decodeMsgCount(bData, inStream); + break; + case SUBPARAM_CALLBACK_NUMBER: + decodeCallbackNumber(bData, inStream); + break; + case SUBPARAM_MESSAGE_STATUS: + decodeMsgStatus(bData, inStream); + break; + case SUBPARAM_MESSAGE_CENTER_TIME_STAMP: + decodeMsgCenterTimeStamp(bData, inStream); + break; + default: + throw new CodingException("unsupported bearer data subparameter (" + + subparamId + ")"); + } + } + if ((foundSubparamMask & (1 << SUBPARAM_MESSAGE_IDENTIFIER)) == 0) { + throw new CodingException("missing MESSAGE_IDENTIFIER subparam"); + } + if (bData.userData != null) { + decodeUserDataPayload(bData.userData, bData.hasUserDataHeader); + } + return bData; + } catch (BitwiseInputStream.AccessException ex) { + Log.e(LOG_TAG, "BearerData decode failed: " + ex); + } catch (CodingException ex) { + Log.e(LOG_TAG, "BearerData decode failed: " + ex); + } + return null; + } +} diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java b/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java index 1643cab..440debb 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java @@ -17,6 +17,7 @@ package com.android.internal.telephony.cdma.sms; import com.android.internal.telephony.SmsAddress; +import com.android.internal.util.HexDump; public class CdmaSmsAddress extends SmsAddress { /** @@ -95,4 +96,18 @@ public class CdmaSmsAddress extends SmsAddress { public CdmaSmsAddress(){ } + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("CdmaSmsAddress:\n"); + builder.append(" digitMode: " + digitMode + "\n"); + builder.append(" numberMode: " + numberMode + "\n"); + builder.append(" numberPlan: " + numberPlan + "\n"); + builder.append(" numberOfDigits: " + numberOfDigits + "\n"); + builder.append(" ton: " + ton + "\n"); + builder.append(" address: " + address + "\n"); + builder.append(" origBytes: " + HexDump.toHexString(origBytes) + "\n"); + return builder.toString(); + } + } diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/SmsDataCoding.java b/telephony/java/com/android/internal/telephony/cdma/sms/SmsDataCoding.java deleted file mode 100644 index 6ba7463..0000000 --- a/telephony/java/com/android/internal/telephony/cdma/sms/SmsDataCoding.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.internal.telephony.cdma.sms; - -import com.android.internal.telephony.SmsHeader; - -/* - * The SMSDataCoding class encodes and decodes CDMA SMS messages. - */ -public class SmsDataCoding { - private final static String TAG = "CDMA_SMS_JNI"; - - private final static int CDMA_SMS_WMS_MASK_BD_NULL = 0x00000000; - private final static int CDMA_SMS_WMS_MASK_BD_MSG_ID = 0x00000001; - private final static int CDMA_SMS_WMS_MASK_BD_USER_DATA = 0x00000002; -// private final static int CDMA_SMS_WMS_MASK_BD_USER_RESP = 0x00000004; - private final static int CDMA_SMS_WMS_MASK_BD_MC_TIME = 0x00000008; -// private final static int CDMA_SMS_WMS_MASK_BD_VALID_ABS = 0x00000010; -// private final static int CDMA_SMS_WMS_MASK_BD_VALID_REL = 0x00000020; -// private final static int CDMA_SMS_WMS_MASK_BD_DEFER_ABS = 0x00000040; -// private final static int CDMA_SMS_WMS_MASK_BD_DEFER_REL = 0x00000080; -// private final static int CDMA_SMS_WMS_MASK_BD_PRIORITY = 0x00000100; -// private final static int CDMA_SMS_WMS_MASK_BD_PRIVACY = 0x00000200; -// private final static int CDMA_SMS_WMS_MASK_BD_REPLY_OPTION = 0x00000400; - private final static int CDMA_SMS_WMS_MASK_BD_NUM_OF_MSGS = 0x00000800; -// private final static int CDMA_SMS_WMS_MASK_BD_ALERT = 0x00001000; -// private final static int CDMA_SMS_WMS_MASK_BD_LANGUAGE = 0x00002000; - private final static int CDMA_SMS_WMS_MASK_BD_CALLBACK = 0x00004000; - private final static int CDMA_SMS_WMS_MASK_BD_DISPLAY_MODE = 0x00008000; -// private final static int CDMA_SMS_WMS_MASK_BD_SCPT_DATA = 0x00010000; -// private final static int CDMA_SMS_WMS_MASK_BD_SCPT_RESULT = 0x00020000; -// private final static int CDMA_SMS_WMS_MASK_BD_DEPOSIT_INDEX = 0x00040000; -// private final static int CDMA_SMS_WMS_MASK_BD_DELIVERY_STATUS = 0x00080000; -// private final static int CDMA_SMS_WMS_MASK_BD_IP_ADDRESS = 0x10000000; -// private final static int CDMA_SMS_WMS_MASK_BD_RSN_NO_NOTIFY = 0x20000000; -// private final static int CDMA_SMS_WMS_MASK_BD_OTHER = 0x40000000; - - /** - * Successful operation. - */ - private static final int JNI_CDMA_SMS_SUCCESS = 0; - - /** - * General failure. - */ - private static final int JNI_CDMA_SMS_FAILURE = 1; - - /** - * Data length is out of length. - */ - private static final int JNI_CDMA_SMS_DATA_LEN_OUT_OF_RANGE = 2; - - /** - * Class name unknown. - */ - private static final int JNI_CDMA_SMS_CLASS_UNKNOWN = 3; - - /** - * Field ID unknown. - */ - private static final int JNI_CDMA_SMS_FIELD_ID_UNKNOWN = 4; - - /** - * Memory allocation failed. - */ - private static final int JNI_CDMA_SMS_OUT_OF_MEMORY = 5; - - /** - * Encode SMS. - * - * @param bearerData an instance of BearerData. - * - * @return the encoded SMS as byte[]. - */ - public static byte[] encodeCdmaSms(BearerData bearerData) { - byte[] encodedSms; - - if( nativeCdmaSmsConstructClientBD() == JNI_CDMA_SMS_FAILURE){ - return null; - } - - // check bearer data and generate bit mask - generateBearerDataBitMask(bearerData); - encodedSms = startEncoding(bearerData); - - if( nativeCdmaSmsDestructClientBD() == JNI_CDMA_SMS_FAILURE){ - return null; - } - return encodedSms; - } - - /** - * Decode SMS. - * - * @param SmsData the encoded SMS. - * - * @return an instance of BearerData. - */ - public static BearerData decodeCdmaSms(byte[] SmsData) { - BearerData bearerData; - - if( nativeCdmaSmsConstructClientBD() == JNI_CDMA_SMS_FAILURE){ - return null; - } - - bearerData = startDecoding(SmsData); - - if( nativeCdmaSmsDestructClientBD() == JNI_CDMA_SMS_FAILURE){ - return null; - } - return bearerData; - } - - private static void generateBearerDataBitMask(BearerData bearerData) { - // initial - bearerData.mask = CDMA_SMS_WMS_MASK_BD_NULL; - - // check message type - if (bearerData.messageType != 0){ - bearerData.mask |= CDMA_SMS_WMS_MASK_BD_MSG_ID; - } - - // check mUserData - if (bearerData.userData != null){ - bearerData.mask |= CDMA_SMS_WMS_MASK_BD_USER_DATA; - } - - // check mTimeStamp - if (bearerData.timeStamp != null){ - bearerData.mask |= CDMA_SMS_WMS_MASK_BD_MC_TIME; - } - - // check mNumberOfMessages - if (bearerData.numberOfMessages > 0){ - bearerData.mask |= CDMA_SMS_WMS_MASK_BD_NUM_OF_MSGS; - } - - // check mCallbackNumber - if(bearerData.callbackNumber != null){ - bearerData.mask |= CDMA_SMS_WMS_MASK_BD_CALLBACK; - } - - // check DisplayMode - if(bearerData.displayMode == BearerData.DISPLAY_DEFAULT || - bearerData.displayMode == BearerData.DISPLAY_IMMEDIATE || - bearerData.displayMode == BearerData.DISPLAY_USER){ - bearerData.mask |= CDMA_SMS_WMS_MASK_BD_DISPLAY_MODE; - } - } - - private static byte[] startEncoding(BearerData bearerData) { - int m_id; - byte[] m_data; - int dataLength; - byte[] encodedSms; - int nbrOfHeaders = 0; - - if( nativeCdmaSmsSetBearerDataPrimitives(bearerData) == JNI_CDMA_SMS_FAILURE){ - return null; - } - - if ((bearerData.mask & CDMA_SMS_WMS_MASK_BD_USER_DATA) == CDMA_SMS_WMS_MASK_BD_USER_DATA){ - if( nativeCdmaSmsSetUserData(bearerData.userData) == JNI_CDMA_SMS_FAILURE){ - return null; - } - - if (bearerData.userData.userDataHeader != null){ - nbrOfHeaders = bearerData.userData.userDataHeader.nbrOfHeaders; - } - - for (int i = 0; i < nbrOfHeaders; i++) { - m_id = bearerData.userData.userDataHeader.getElements().get(i).getID(); - m_data = bearerData.userData.userDataHeader.getElements().get(i).getData(); - dataLength = m_data.length; - if( nativeCdmaSmsSetUserDataHeader(m_id, m_data, dataLength, i) - == JNI_CDMA_SMS_FAILURE){ - return null; - } - } - } - - if ((bearerData.mask & CDMA_SMS_WMS_MASK_BD_CALLBACK) == CDMA_SMS_WMS_MASK_BD_CALLBACK) { - if( nativeCdmaSmsSetSmsAddress(bearerData.callbackNumber) == JNI_CDMA_SMS_FAILURE){ - return null; - } - } - - /* call native method to encode SMS */ - encodedSms = nativeCdmaSmsEncodeSms(); - - return encodedSms; - } - - private static BearerData startDecoding(byte[] SmsData) { - BearerData bData = new BearerData(); - byte[] udhData; - - /* call native method to decode SMS */ - if( nativeCdmaSmsDecodeSms(SmsData) == JNI_CDMA_SMS_FAILURE){ - return null; - } - - if( nativeCdmaSmsGetBearerDataPrimitives(bData) == JNI_CDMA_SMS_FAILURE){ - return null; - } - - if ((bData.mask & CDMA_SMS_WMS_MASK_BD_USER_DATA) == CDMA_SMS_WMS_MASK_BD_USER_DATA) { - bData.userData = new UserData(); - if( nativeCdmaSmsGetUserData(bData.userData) == JNI_CDMA_SMS_FAILURE){ - return null; - } - - udhData = nativeCdmaSmsGetUserDataHeader(); - if (udhData != null) { - bData.userData.userDataHeader = SmsHeader.parse(udhData); - } - } - - if ((bData.mask & CDMA_SMS_WMS_MASK_BD_CALLBACK) == CDMA_SMS_WMS_MASK_BD_CALLBACK) { - bData.callbackNumber = new CdmaSmsAddress(); - if( nativeCdmaSmsGetSmsAddress(bData.callbackNumber) == JNI_CDMA_SMS_FAILURE){ - return null; - } - } - - return bData; - } - - // native methods - - /** - * native method: Allocate memory for clientBD structure - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsConstructClientBD(); - - /** - * native method: Free memory used for clientBD structure - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsDestructClientBD(); - - /** - * native method: fill clientBD structure with bearerData primitives - * - * @param bearerData an instance of BearerData. - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsSetBearerDataPrimitives(BearerData bearerData); - - /** - * native method: fill bearerData primitives with clientBD variables - * - * @param bearerData an instance of BearerData. - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsGetBearerDataPrimitives(BearerData bearerData); - - /** - * native method: fill clientBD.user_data with UserData primitives - * - * @param userData an instance of UserData. - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsSetUserData(UserData userData); - - /** - * native method: fill UserData primitives with clientBD.user_data - * - * @param userData an instance of UserData. - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsGetUserData(UserData userData); - - /** - * native method: fill clientBD.user_data.headers with UserDataHeader primitives - * - * @param ID ID of element. - * @param data element data. - * @param dataLength data length - * @param index index of element - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsSetUserDataHeader( - int ID, byte[] data, int dataLength, int index); - - /** - * native method: fill UserDataHeader primitives with clientBD.user_data.headers - * - * @return user data headers - */ - private static native byte[] nativeCdmaSmsGetUserDataHeader(); - - /** - * native method: fill clientBD.callback with SmsAddress primitives - * - * @param smsAddr an instance of SmsAddress. - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsSetSmsAddress(CdmaSmsAddress smsAddr); - - /** - * native method: fill SmsAddress primitives with clientBD.callback - * - * @param smsAddr an instance of SmsAddress. - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsGetSmsAddress(CdmaSmsAddress smsAddr); - - /** - * native method: call encoding functions and get encoded SMS - * - * @return the encoded SMS - */ - private static native byte[] nativeCdmaSmsEncodeSms(); - - /** - * native method: call decode functions - * - * @param encodedSMS encoded SMS. - * - * @return #JNI_CDMA_SMS_SUCCESS if succeed. - * #JNI_CDMA_SMS_FAILURE if fail. - */ - private static native int nativeCdmaSmsDecodeSms(byte[] encodedSMS); - - /** - * Load the shared library to link the native methods. - */ - static { - try { - System.loadLibrary("cdma_sms_jni"); - } - catch (UnsatisfiedLinkError ule) { - System.err.println("WARNING: Could not load cdma_sms_jni.so"); - } - } -} - diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/UserData.java b/telephony/java/com/android/internal/telephony/cdma/sms/UserData.java index e761469..bd6fbb4 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/UserData.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/UserData.java @@ -17,24 +17,25 @@ package com.android.internal.telephony.cdma.sms; import com.android.internal.telephony.SmsHeader; +import com.android.internal.util.HexDump; public class UserData{ /** - * Supported user data encoding types + * User data encoding types * (See 3GPP2 C.R1001-F, v1.0, table 9.1-1) */ - public static final int UD_ENCODING_OCTET = 0x00; - //public static final int UD_ENCODING_EXTENDED_PROTOCOL = 0x01; - public static final int UD_ENCODING_7BIT_ASCII = 0x02; - public static final int UD_ENCODING_IA5 = 0x03; - public static final int UD_ENCODING_UNICODE_16 = 0x04; - //public static final int UD_ENCODING_SHIFT_JIS = 0x05; - //public static final int UD_ENCODING_KOREAN = 0x06; - //public static final int UD_ENCODING_LATIN_HEBREW = 0x07; - //public static final int UD_ENCODING_LATIN = 0x08; - public static final int UD_ENCODING_GSM_7BIT_ALPHABET = 0x09; - //public static final int UD_ENCODING_GSM_DCS = 0x0A; + public static final int ENCODING_OCTET = 0x00; + public static final int ENCODING_IS91_EXTENDED_PROTOCOL = 0x01; + public static final int ENCODING_7BIT_ASCII = 0x02; + //public static final int ENCODING_IA5 = 0x03; + public static final int ENCODING_UNICODE_16 = 0x04; + //public static final int ENCODING_SHIFT_JIS = 0x05; + //public static final int ENCODING_KOREAN = 0x06; + //public static final int ENCODING_LATIN_HEBREW = 0x07; + //public static final int ENCODING_LATIN = 0x08; + public static final int ENCODING_GSM_7BIT_ALPHABET = 0x09; + public static final int ENCODING_GSM_DCS = 0x0A; /** * Contains the data header of the user data @@ -44,20 +45,37 @@ public class UserData{ /** * Contains the data encoding type for the SMS message */ - public int userDataEncoding; + public int msgEncoding; - // needed when encoding is IS91 or DCS (not supported yet): - //public int messageType; + // XXX needed when encoding is IS91 or DCS (not supported yet): + public int msgType; /** * Number of invalid bits in the last byte of data. */ public int paddingBits; + public int numFields; + /** * Contains the user data of a SMS message * (See 3GPP2 C.S0015-B, v2, 4.5.2) */ - public byte[] userData; + public byte[] payload; + public String payloadStr; + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("UserData:\n"); + builder.append(" msgEncoding: " + msgEncoding + "\n"); + builder.append(" msgType: " + msgType + "\n"); + builder.append(" paddingBits: " + paddingBits + "\n"); + builder.append(" numFields: " + (int)numFields + "\n"); + builder.append(" userDataHeader: " + userDataHeader + "\n"); + builder.append(" payload: " + HexDump.toHexString(payload)); + builder.append(" payloadStr: " + payloadStr); + return builder.toString(); + } } diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java index d1ae997..a2d3c5e 100644..100755 --- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java +++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java @@ -316,6 +316,11 @@ public class GSMPhone extends PhoneBase { // we report data connected ret = DataState.CONNECTED; + } else if (mSST == null) { + // Radio Technology Change is ongoning, dispose() and removeReferences() have + // already been called + + ret = DataState.DISCONNECTED; } else if (mSST.getCurrentGprsState() != ServiceState.STATE_IN_SERVICE) { // If we're out of service, open TCP sockets may still work diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java index e2da7cb..b889704 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java @@ -131,7 +131,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { private static int APN_DEFAULT_ID = 0; private static int APN_MMS_ID = 1; - private static int APN_NUM_TYPES = 2; + private static int APN_SUPL_ID = 2; + private static int APN_NUM_TYPES = 3; private boolean[] dataEnabled = new boolean[APN_NUM_TYPES]; @@ -153,13 +154,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { private static final String INTENT_RECONNECT_ALARM = "com.android.internal.telephony.gprs-reconnect"; private static final String INTENT_RECONNECT_ALARM_EXTRA_REASON = "reason"; - //***** Tag IDs for EventLog - private static final int EVENT_LOG_RADIO_RESET_COUNTDOWN_TRIGGERED = 50101; - private static final int EVENT_LOG_RADIO_RESET = 50102; - private static final int EVENT_LOG_PDP_RESET = 50103; - private static final int EVENT_LOG_REREGISTER_NETWORK = 50104; - private static final int EVENT_LOG_RADIO_PDP_SETUP_FAIL = 50105; - static final Uri PREFERAPN_URI = Uri.parse("content://telephony/carriers/preferapn"); static final String APN_ID = "apn_id"; private boolean canSetPreferApn = false; @@ -322,8 +316,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { /** * Ensure that we are connected to an APN of the specified type. - * @param type the APN type (currently the only valid value - * is {@link Phone#APN_TYPE_MMS}) + * @param type the APN type (currently the only valid values + * are {@link Phone#APN_TYPE_MMS} and {@link Phone#APN_TYPE_SUPL}) * @return the result of the operation. Success is indicated by * a return value of either {@code Phone.APN_ALREADY_ACTIVE} or * {@code Phone.APN_REQUEST_STARTED}. In the latter case, a broadcast @@ -331,9 +325,11 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { * the APN has been established. */ protected int enableApnType(String type) { - if (!TextUtils.equals(type, Phone.APN_TYPE_MMS)) { + if (!TextUtils.equals(type, Phone.APN_TYPE_MMS) && + !TextUtils.equals(type, Phone.APN_TYPE_SUPL)) { return Phone.APN_REQUEST_FAILED; } + // If already active, return Log.d(LOG_TAG, "enableApnType("+type+")"); if (isApnTypeActive(type)) { @@ -366,12 +362,15 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { * The APN of the specified type is no longer needed. Ensure that if * use of the default APN has not been explicitly disabled, we are connected * to the default APN. - * @param type the APN type. The only valid value currently is {@link Phone#APN_TYPE_MMS}. + * @param type the APN type. The only valid values are currently + * {@link Phone#APN_TYPE_MMS} and {@link Phone#APN_TYPE_SUPL}. * @return */ protected int disableApnType(String type) { Log.d(LOG_TAG, "disableApnType("+type+")"); - if (TextUtils.equals(type, Phone.APN_TYPE_MMS)) { + if ((TextUtils.equals(type, Phone.APN_TYPE_MMS) || + TextUtils.equals(type, Phone.APN_TYPE_SUPL)) + && isEnabled(type)) { removeMessages(EVENT_RESTORE_DEFAULT_APN); setEnabled(type, false); if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) { @@ -439,6 +438,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { return dataEnabled[APN_DEFAULT_ID]; } else if (TextUtils.equals(apnType, Phone.APN_TYPE_MMS)) { return dataEnabled[APN_MMS_ID]; + } else if (TextUtils.equals(apnType, Phone.APN_TYPE_SUPL)) { + return dataEnabled[APN_SUPL_ID]; } else { return false; } @@ -450,9 +451,12 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { dataEnabled[APN_DEFAULT_ID] = enable; } else if (TextUtils.equals(apnType, Phone.APN_TYPE_MMS)) { dataEnabled[APN_MMS_ID] = enable; + } else if (TextUtils.equals(apnType, Phone.APN_TYPE_SUPL)) { + dataEnabled[APN_SUPL_ID] = enable; } Log.d(LOG_TAG, "dataEnabled[DEFAULT_APN]=" + dataEnabled[APN_DEFAULT_ID] + - " dataEnabled[MMS_APN]=" + dataEnabled[APN_MMS_ID]); + " dataEnabled[MMS_APN]=" + dataEnabled[APN_MMS_ID] + + " dataEnabled[SUPL_APN]=" + dataEnabled[APN_SUPL_ID]); } /** @@ -476,13 +480,14 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { return trySetupData(Phone.REASON_DATA_ENABLED); } else if (!enable) { setEnabled(Phone.APN_TYPE_DEFAULT, false); - // Don't tear down if there is an active APN and it handles MMS. + // Don't tear down if there is an active APN and it handles MMS or SUPL. // TODO: This isn't very general. - if (!isApnTypeActive(Phone.APN_TYPE_MMS) || !isEnabled(Phone.APN_TYPE_MMS)) { - cleanUpConnection(true, Phone.REASON_DATA_DISABLED); - return true; + if ((isApnTypeActive(Phone.APN_TYPE_MMS) && isEnabled(Phone.APN_TYPE_MMS)) || + (isApnTypeActive(Phone.APN_TYPE_SUPL) && isEnabled(Phone.APN_TYPE_SUPL))) { + return false; } - return false; + cleanUpConnection(true, Phone.REASON_DATA_DISABLED); + return true; } else { // isEnabled && enable return true; @@ -513,7 +518,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { * {@code true} otherwise. */ public boolean getAnyDataEnabled() { - return dataEnabled[APN_DEFAULT_ID] || dataEnabled[APN_MMS_ID]; + return dataEnabled[APN_DEFAULT_ID] || dataEnabled[APN_MMS_ID] || dataEnabled[APN_SUPL_ID]; } /** @@ -1316,7 +1321,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { * rather an app that inadvertantly fails to reset to the * default APN, or that dies before doing so. */ - if (dataEnabled[APN_MMS_ID]) { + if (dataEnabled[APN_MMS_ID] || dataEnabled[APN_SUPL_ID]) { removeMessages(EVENT_RESTORE_DEFAULT_APN); sendMessageDelayed(obtainMessage(EVENT_RESTORE_DEFAULT_APN), getRestoreDefaultApnDelay()); diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java index 8ecf245..9ab1002 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java @@ -539,7 +539,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker { EventLog.List val = new EventLog.List( dcTracker.getStateInString(), (dcTracker.getAnyDataEnabled() ? 1 : 0) ); - EventLog.writeEvent(TelephonyEventLog.EVENT_DATA_STATE_RADIO_OFF, val); + EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_DATA_STATE_RADIO_OFF, val); } dcTracker.cleanConnectionBeforeRadioOff(); diff --git a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java index 09a17f5..f9015d9 100644 --- a/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java +++ b/telephony/java/com/android/internal/telephony/gsm/SIMRecords.java @@ -1099,14 +1099,9 @@ public final class SIMRecords extends IccRecords { // Note: Data may include trailing FF's. That's OK; message // should still parse correctly. - byte[] nba = new byte[n - 1]; - System.arraycopy(ba, 1, nba, 0, n - 1); - - String pdu = IccUtils.bytesToHexString(nba); - // XXX first line is bogus - SmsMessage message = SmsMessage.newFromCMT( - new String[] { "", pdu }); - + byte[] pdu = new byte[n - 1]; + System.arraycopy(ba, 1, pdu, 0, n - 1); + SmsMessage message = SmsMessage.createFromPdu(pdu); ((GSMPhone) phone).mSMS.dispatchMessage(message); } @@ -1130,14 +1125,9 @@ public final class SIMRecords extends IccRecords { // Note: Data may include trailing FF's. That's OK; message // should still parse correctly. - byte[] nba = new byte[n - 1]; - System.arraycopy(ba, 1, nba, 0, n - 1); - - String pdu = IccUtils.bytesToHexString(nba); - // XXX first line is bogus - SmsMessage message = SmsMessage.newFromCMT( - new String[] { "", pdu }); - + byte[] pdu = new byte[n - 1]; + System.arraycopy(ba, 1, pdu, 0, n - 1); + SmsMessage message = SmsMessage.createFromPdu(pdu); ((GSMPhone) phone).mSMS.dispatchMessage(message); @@ -1499,6 +1489,3 @@ public final class SIMRecords extends IccRecords { } } - - - diff --git a/telephony/jni/cdmasms/Android.mk b/telephony/jni/cdmasms/Android.mk deleted file mode 100644 index b0c96b4..0000000 --- a/telephony/jni/cdmasms/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - cdma_sms_jni.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libutils \ - libandroid_runtime \ - libnativehelper - -LOCAL_MODULE:= libcdma_sms_jni - -LOCAL_C_INCLUDES += \ - $(JNI_H_INCLUDE) \ - hardware/ril/include/telephony - -LOCAL_C_INCLUDES += hardware/ril/reference-cdma-sms -LOCAL_SHARED_LIBRARIES += libreference-cdma-sms -LOCAL_CFLAGS += -DREFERENCE_CDMA_SMS - -LOCAL_PRELINK_MODULE := false -include $(BUILD_SHARED_LIBRARY) diff --git a/telephony/jni/cdmasms/cdma_sms_jni.cpp b/telephony/jni/cdmasms/cdma_sms_jni.cpp deleted file mode 100644 index 2a8e825..0000000 --- a/telephony/jni/cdmasms/cdma_sms_jni.cpp +++ /dev/null @@ -1,1300 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file cdma_sms_jni.cpp - * - * This file implement the Java Native Interface - * for encoding and decoding of SMS - */ - - -#include <nativehelper/jni.h> -#include <nativehelper/JNIHelp.h> -#include <android_runtime/AndroidRuntime.h> -#include <cdma_sms_jni.h> - - -#ifdef __cplusplus -extern "C" { -#endif //__cplusplus - -#include <reference-cdma-sms.h> - -#ifdef __cplusplus -} -#endif //__cplusplus - -#undef LOG_TAG -#define LOG_TAG "CDMA" -#include <utils/Log.h> - -static RIL_CDMA_SMS_ClientBd *clientBdData = NULL; - - -static jint getObjectIntField(JNIEnv * env, jobject obj, const char *name, jint * value) -{ - jclass clazz; - jfieldID field; - -#ifdef DBG_LOG_LEVEL_B - LOGD("getObjectIntField():"); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "I"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - *value = env->GetIntField(obj, field); - -#ifdef DBG_LOG_LEVEL_B - LOGD(" %s = %d\n", name, *value); -#endif - - return JNI_SUCCESS; -} - -static jint setObjectIntField(JNIEnv * env, jobject obj, const char *name, jint value) -{ - jclass clazz; - jfieldID field; - -#ifdef DBG_LOG_LEVEL_B - LOGD("setObjectIntField(): %s = %d\n", name, value); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "I"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - env->SetIntField(obj, field, value); - - return JNI_SUCCESS; -} - -static jint getObjectByteField(JNIEnv * env, jobject obj, const char *name, jbyte * value) -{ - jclass clazz; - jfieldID field; - -#ifdef DBG_LOG_LEVEL_B - LOGD("getObjectByteField():"); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "B"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - *value = env->GetByteField(obj, field); - -#ifdef DBG_LOG_LEVEL_B - LOGD(" %s = %02x\n", name, *value); -#endif - - return JNI_SUCCESS; -} - -static jint setObjectByteField(JNIEnv * env, jobject obj, const char *name, jbyte value) -{ - jclass clazz; - jfieldID field; -#ifdef DBG_LOG_LEVEL_B - LOGD("setObjectByteField(): %s = 0x%02x\n", name, value); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "B"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - env->SetByteField(obj, field, value); - - return JNI_SUCCESS; -} - -static jint getObjectBooleanField(JNIEnv * env, jobject obj, const char *name, jboolean * value) -{ - jclass clazz; - jfieldID field; - -#ifdef DBG_LOG_LEVEL_B - LOGD("getObjectBooleanField():"); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "Z"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - *value = env->GetBooleanField(obj, field); - -#ifdef DBG_LOG_LEVEL_B - LOGD(" %s = %d\n", name, *value); -#endif - - return JNI_SUCCESS; -} - -static jint setObjectBooleanField(JNIEnv * env, jobject obj, const char *name, jboolean value) -{ - jclass clazz; - jfieldID field; - -#ifdef DBG_LOG_LEVEL_B - LOGD("setObjectBooleanField(): %s = %d\n", name, value); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "Z"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - env->SetBooleanField(obj, field, value); - - return JNI_SUCCESS; -} - -static jint getObjectByteArrayField(JNIEnv * env, jobject obj, const char *name, jbyte* arrData, int* length) -{ - jclass clazz; - jfieldID field; - jbyte * data_buf; - -#ifdef DBG_LOG_LEVEL_B - LOGD("getObjectByteArrayField(): %s\n", name); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "[B"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - jbyteArray buffer = (jbyteArray)(env->GetObjectField(obj, field)); - if (buffer != NULL) { - int len = env->GetArrayLength(buffer); - data_buf = env->GetByteArrayElements(buffer, NULL); - for (int i=0; i<len; i++) { - *arrData++ = data_buf[i]; -#ifdef DBG_LOG_LEVEL_B - LOGD(" [%d] = 0x%02x\n", i, data_buf[i]); -#endif - } - *length = len; - } else { - jniThrowException(env, "java/lang/NullPointerException", NULL); - return JNI_FAILURE; - } - - return JNI_SUCCESS; -} - -static jint setObjectByteArrayField(JNIEnv * env, jobject obj, const char *name, jbyte* arrData, int length) -{ - jclass clazz; - jfieldID field; - jbyte* byte_buf; - -#ifdef DBG_LOG_LEVEL_B - LOGD("setObjectByteArrayField(): %s\n", name); -#endif - - clazz = env->GetObjectClass(obj); - if (NULL == clazz) { - jniThrowException(env, "java/lang/Exception", NULL); - return JNI_FAILURE; - } - - field = env->GetFieldID(clazz, name, "[B"); - env->DeleteLocalRef(clazz); - - if (NULL == field) { - jniThrowException(env, "java/lang/NoSuchFieldException", name); - return JNI_FAILURE; - } - - jbyteArray buffer = (jbyteArray)(env->GetObjectField(obj, field)); - if (buffer == NULL) { -#ifdef DBG_LOG_LEVEL_B - LOGD("setObjectByteArrayField(): %s = null\n", name); -#endif - buffer = env->NewByteArray(length); - env->SetObjectField(obj, field, buffer); - } - - if (buffer != NULL) { -#ifdef DBG_LOG_LEVEL_B - for (int i=0; i<length; i++) { - LOGD(" [%d] = 0x%02x\n", i, arrData[i]); - } -#endif - env->SetByteArrayRegion(buffer, 0, length, arrData); - } else { - jniThrowException(env, "java/lang/NullPointerException", NULL); - return JNI_FAILURE; - } - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsConstructClientBD - (JNIEnv * env, jobject obj) -{ -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsConstructClientBD()...\n"); -#endif - - clientBdData = (RIL_CDMA_SMS_ClientBd *)malloc(sizeof(RIL_CDMA_SMS_ClientBd)); - if (NULL == clientBdData) { - jniThrowException(env, "java/lang/OutOfMemoryError", "clientBdData memory allocation failed"); - return JNI_FAILURE; - } - memset(clientBdData, 0, sizeof(RIL_CDMA_SMS_ClientBd)); - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsDestructClientBD - (JNIEnv * env, jobject obj) -{ -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsDestructClientBD()...\n"); -#endif - - if (clientBdData == NULL) { - jniThrowException(env, "java/lang/NullPointerException", "clientBdData is null"); - return JNI_FAILURE; - } - free(clientBdData); - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetBearerDataPrimitives - (JNIEnv * env, jobject obj, jobject bearerData) -{ - jbyteArray mc_time = NULL; - jbyte mctime_buffer[6]; - int length; - jint intData; - jbyte byteData; - jboolean booleanData; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsSetBearerDataPrimitives()...\n"); -#endif - - // mask - if (getObjectIntField(env, bearerData, "mask", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->mask = intData; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->mask = 0x%x\n", clientBdData->mask); -#endif - - // message_id.type - if (getObjectByteField(env, bearerData, "messageType", &byteData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->message_id.type = (RIL_CDMA_SMS_BdMessageType)(byteData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->message_id.type = 0x%02x\n", clientBdData->message_id.type); -#endif - - // message_id.id_number - if ((clientBdData->mask & WMS_MASK_BD_MSG_ID) == WMS_MASK_BD_MSG_ID) { - if (getObjectIntField(env, bearerData, "messageID", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->message_id.id_number = (RIL_CDMA_SMS_MessageNumber)(intData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->message_id.id_number = %d\n", clientBdData->message_id.id_number); -#endif - } - - // message_id.udh_present - if (getObjectBooleanField(env, bearerData, "hasUserDataHeader", &booleanData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->message_id.udh_present = (unsigned char)(booleanData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->message_id.udh_present = %d\n", clientBdData->message_id.udh_present); -#endif - - // user_response - // TODO - - // mc_time - if ((clientBdData->mask & WMS_MASK_BD_MC_TIME) == WMS_MASK_BD_MC_TIME) { - if (getObjectByteArrayField(env, bearerData, "timeStamp", mctime_buffer, &length) != JNI_SUCCESS) - return JNI_FAILURE; - if (mctime_buffer != NULL) { - clientBdData->mc_time.year = mctime_buffer[0]; - clientBdData->mc_time.month = mctime_buffer[1]; - clientBdData->mc_time.day = mctime_buffer[2]; - clientBdData->mc_time.hour = mctime_buffer[3]; - clientBdData->mc_time.minute = mctime_buffer[4]; - clientBdData->mc_time.second = mctime_buffer[5]; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->mc_time.year = %d\n", clientBdData->mc_time.year); - LOGD("clientBdData->mc_time.month = %d\n", clientBdData->mc_time.month); - LOGD("clientBdData->mc_time.day = %d\n", clientBdData->mc_time.day); - LOGD("clientBdData->mc_time.hour = %d\n", clientBdData->mc_time.hour); - LOGD("clientBdData->mc_time.minute = %d\n", clientBdData->mc_time.minute); - LOGD("clientBdData->mc_time.second = %d\n", clientBdData->mc_time.second); -#endif - } - } - - // clientBdData->mc_time.timezone - // TODO - - // validity_absolute; - // TODO - - // validity_relative; - // TODO - - // deferred_absolute - // TODO - - // deferred_relative; - // TODO - - // priority - // TODO - - // privacy - // TODO - - if ((clientBdData->mask & WMS_MASK_BD_REPLY_OPTION) == WMS_MASK_BD_REPLY_OPTION) { - // reply_option.user_ack_requested - if (getObjectBooleanField(env, bearerData, "userAckReq", &booleanData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->reply_option.user_ack_requested = (unsigned char)(booleanData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->reply_option.user_ack_requested = %d\n", clientBdData->reply_option.user_ack_requested); -#endif - // reply_option.user_ack_requested - if (getObjectBooleanField(env, bearerData, "deliveryAckReq", &booleanData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->reply_option.delivery_ack_requested = (unsigned char)(booleanData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->reply_option.delivery_ack_requested = %d\n", clientBdData->reply_option.delivery_ack_requested); -#endif - // reply_option.user_ack_requested - if (getObjectBooleanField(env, bearerData, "readAckReq", &booleanData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->reply_option.read_ack_requested = (unsigned char)(booleanData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->reply_option.read_ack_requested = %d\n", clientBdData->reply_option.read_ack_requested); -#endif - } - - // num_messages - if ((clientBdData->mask & WMS_MASK_BD_NUM_OF_MSGS) == WMS_MASK_BD_NUM_OF_MSGS) { - if (getObjectIntField(env, bearerData, "numberOfMessages", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->num_messages = (unsigned char)(intData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->num_messages = %d\n", clientBdData->num_messages); -#endif - } - - // alert_mode - // TODO - - // language - // TODO - - // display_mode - if ((clientBdData->mask & WMS_MASK_BD_DISPLAY_MODE) == WMS_MASK_BD_DISPLAY_MODE) { - if (getObjectByteField(env, bearerData, "displayMode", &byteData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->display_mode = (RIL_CDMA_SMS_DisplayMode)(byteData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->display_mode = 0x%02x\n", clientBdData->display_mode); -#endif - } - - // delivery_status - if ((clientBdData->mask & WMS_MASK_BD_DELIVERY_STATUS) == WMS_MASK_BD_DELIVERY_STATUS) { - // delivery_status.error_class - if (getObjectIntField(env, bearerData, "errorClass", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->delivery_status.error_class = (RIL_CDMA_SMS_ErrorClass)(intData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->delivery_status.error_class = %d\n", clientBdData->delivery_status.error_class); -#endif - // delivery_status.status - if (getObjectIntField(env, bearerData, "messageStatus", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->delivery_status.status = (RIL_CDMA_SMS_DeliveryStatusE)(intData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->delivery_status.status = %d\n", clientBdData->delivery_status.status); -#endif - } - - // deposit_index - // TODO - - // ip_address - // TODO - - // rsn_no_notify - // TODO - - // other - // TODO - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetBearerDataPrimitives - (JNIEnv * env, jobject obj, jobject bearerData) -{ - jclass BearerDataClass; - jfieldID field; - jbyte mctime_buffer[6]; - jbyteArray addr_array; - int length; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsGetBearerDataPrimitives()...\n"); -#endif - - // mask -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->mask = 0x%x\n", clientBdData->mask); -#endif - if (setObjectIntField(env, bearerData, "mask", clientBdData->mask) != JNI_SUCCESS) - return JNI_FAILURE; - - // message_id.type -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->message_id.type = 0x%02x\n", clientBdData->message_id.type); -#endif - if (setObjectByteField(env, bearerData, "messageType", (jbyte)clientBdData->message_id.type) != JNI_SUCCESS) - return JNI_FAILURE; - - // message_id.id_number - if ((clientBdData->mask & WMS_MASK_BD_MSG_ID) == WMS_MASK_BD_MSG_ID) { -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->message_id.id_number = %d\n", clientBdData->message_id.id_number); -#endif - if (setObjectIntField(env, bearerData, "messageID", clientBdData->message_id.id_number) != JNI_SUCCESS) - return JNI_FAILURE; - } - - // message_id.udh_present -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->message_id.udh_present = %d\n", clientBdData->message_id.udh_present); -#endif - if (setObjectBooleanField(env, bearerData, "hasUserDataHeader", (jboolean)clientBdData->message_id.udh_present) != JNI_SUCCESS) - return JNI_FAILURE; - - // user_response - // TODO - - // mc_time - if ((clientBdData->mask & WMS_MASK_BD_MC_TIME) == WMS_MASK_BD_MC_TIME) { - jclass clazz= env->GetObjectClass(bearerData); - if (NULL == clazz) - return JNI_FAILURE; - jfieldID field = env->GetFieldID(clazz, "timeStamp", "[B"); - env->DeleteLocalRef(clazz); - - addr_array = env->NewByteArray((jsize)6); - env->SetObjectField(bearerData, field, addr_array); - -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->mc_time.year = %d\n", clientBdData->mc_time.year); - LOGD("clientBdData->mc_time.month = %d\n", clientBdData->mc_time.month); - LOGD("clientBdData->mc_time.day = %d\n", clientBdData->mc_time.day); - LOGD("clientBdData->mc_time.hour = %d\n", clientBdData->mc_time.hour); - LOGD("clientBdData->mc_time.minute = %d\n", clientBdData->mc_time.minute); - LOGD("clientBdData->mc_time.second = %d\n", clientBdData->mc_time.second); -#endif - mctime_buffer[0] = clientBdData->mc_time.year; - mctime_buffer[1] = clientBdData->mc_time.month; - mctime_buffer[2] = clientBdData->mc_time.day; - mctime_buffer[3] = clientBdData->mc_time.hour; - mctime_buffer[4] = clientBdData->mc_time.minute; - mctime_buffer[5] = clientBdData->mc_time.second; - length = sizeof(mctime_buffer) / sizeof(jbyte); - if (setObjectByteArrayField(env, bearerData, "timeStamp", mctime_buffer, length) != JNI_SUCCESS) - return JNI_FAILURE; - } - - // clientBdData->mc_time.timezone - // TODO - - // validity_absolute; - // TODO - - // validity_relative; - // TODO - - // deferred_absolute - // TODO - - // deferred_relative; - // TODO - - // priority - // TODO - - // privacy - // TODO - - if ((clientBdData->mask & WMS_MASK_BD_REPLY_OPTION) == WMS_MASK_BD_REPLY_OPTION) { - // reply_option.user_ack_requested -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->reply_option.user_ack_requested = %d\n", clientBdData->reply_option.user_ack_requested); -#endif - if (setObjectBooleanField(env, bearerData, "userAckReq", (jboolean)clientBdData->reply_option.user_ack_requested) != JNI_SUCCESS) - return JNI_FAILURE; - - // reply_option.user_ack_requested -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->reply_option.delivery_ack_requested = %d\n", clientBdData->reply_option.delivery_ack_requested); -#endif - if (setObjectBooleanField(env, bearerData, "deliveryAckReq", (jboolean)clientBdData->reply_option.delivery_ack_requested) != JNI_SUCCESS) - return JNI_FAILURE; - - // reply_option.user_ack_requested -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->reply_option.read_ack_requested = %d\n", clientBdData->reply_option.read_ack_requested); -#endif - if (setObjectBooleanField(env, bearerData, "readAckReq", (jboolean)clientBdData->reply_option.read_ack_requested) != JNI_SUCCESS) - return JNI_FAILURE; - } - - // num_messages - if ((clientBdData->mask & WMS_MASK_BD_NUM_OF_MSGS) == WMS_MASK_BD_NUM_OF_MSGS) { -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->num_messages = %d\n", clientBdData->num_messages); -#endif - if (setObjectIntField(env, bearerData, "numberOfMessages", (int)clientBdData->num_messages) != JNI_SUCCESS) - return JNI_FAILURE; - } - - // alert_mode - // TODO - - // language - // TODO - - // display_mode - if ((clientBdData->mask & WMS_MASK_BD_DISPLAY_MODE) == WMS_MASK_BD_DISPLAY_MODE) { -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->display_mode = 0x%02x\n", clientBdData->display_mode); -#endif - if (setObjectByteField(env, bearerData, "displayMode", (jbyte)clientBdData->display_mode) != JNI_SUCCESS) - return JNI_FAILURE; - } - - // delivery_status - if ((clientBdData->mask & WMS_MASK_BD_DELIVERY_STATUS) == WMS_MASK_BD_DELIVERY_STATUS) { -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->delivery_status.error_class = %d\n", clientBdData->delivery_status.error_class); -#endif - // delivery_status.error_class - if (setObjectIntField(env, bearerData, "errorClass", (int)clientBdData->delivery_status.error_class) != JNI_SUCCESS) - return JNI_FAILURE; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->delivery_status.status = %d\n", clientBdData->delivery_status.status); -#endif - // delivery_status.status - if (setObjectIntField(env, bearerData, "messageStatus", (int)clientBdData->delivery_status.status) != JNI_SUCCESS) - return JNI_FAILURE; - } - - // deposit_index - // TODO - - // ip_address - // TODO - - // rsn_no_notify - // TODO - - // other - // TODO - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetUserData - (JNIEnv * env, jobject obj, jobject userData) -{ - jclass UserDataClass; - jfieldID field; - jbyteArray arrData = NULL; - jbyte data_buf[RIL_CDMA_SMS_USER_DATA_MAX]; - int length; - jint intData; - jbyte byteData; - jboolean booleanData; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsSetUserData()...\n"); -#endif - - // set num_headers to 0 here, increment later - clientBdData->user_data.num_headers = 0; - - // user_data.encoding - if (getObjectIntField(env, userData, "userDataEncoding", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->user_data.encoding = (RIL_CDMA_SMS_UserDataEncoding)(intData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.encoding = %d\n", clientBdData->user_data.encoding); -#endif - - // is91ep_type - // TODO - - // user_data.padding_bits - if (getObjectIntField(env, userData, "paddingBits", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->user_data.padding_bits = (unsigned char)(intData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.padding_bits = %d\n", clientBdData->user_data.padding_bits); -#endif - - // user_data.data - if (getObjectByteArrayField(env, userData, "userData", data_buf, &length) != JNI_SUCCESS ) - return JNI_FAILURE; - for (int i = 0; i < length; i++) { - clientBdData->user_data.data[i] = data_buf[i]; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.data[%d] = 0x%02x\n", i, clientBdData->user_data.data[i]); -#endif - } - - // user_data.data_len - // TODO - - // number_of_digits - clientBdData->user_data.number_of_digits = (unsigned char)(length); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.number_of_digits = %d\n", clientBdData->user_data.number_of_digits); -#endif - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetUserData - (JNIEnv * env, jobject obj, jobject userData) -{ - jclass UserDataClass; - jfieldID field; - jbyte *data_buf; - int length; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsGetUserData()...\n"); -#endif - - // user_data.num_headers -// if (setObjectIntField(env, userData, "mNumberOfHeaders", (int)clientBdData->user_data.num_headers) != JNI_SUCCESS) -// return JNI_FAILURE; - - // user_data.encoding -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.encoding = %d\n", clientBdData->user_data.encoding); -#endif - if (setObjectIntField(env, userData, "userDataEncoding", clientBdData->user_data.encoding) != JNI_SUCCESS) - return JNI_FAILURE; - - // is91ep_type - // TODO - - // user_data.data_len -// if (setObjectIntField(env, userData, "mDataLength", (int)clientBdData->user_data.data_len) != JNI_SUCCESS) -// return JNI_FAILURE; - - // user_data.padding_bits -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.padding_bits = %d\n", clientBdData->user_data.padding_bits); -#endif - if (setObjectIntField(env, userData, "paddingBits", (int)clientBdData->user_data.padding_bits) != JNI_SUCCESS) - return JNI_FAILURE; - - // user_data.data -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.data_len = %d\n", clientBdData->user_data.data_len); -#endif - length = clientBdData->user_data.data_len; -#ifdef DBG_LOG_LEVEL_A - for (int i = 0; i < length; i++) { - LOGD("clientBdData->user_data.data[%d] = 0x%02x\n", i, clientBdData->user_data.data[i]); - } -#endif - data_buf = (jbyte*)clientBdData->user_data.data; - if (setObjectByteArrayField(env, userData, "userData", data_buf, length) != JNI_SUCCESS) - return JNI_FAILURE; - - // number_of_digits - // TODO - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetUserDataHeader - (JNIEnv * env, jobject obj, jint ID, jbyteArray data, jint length, jint index) -{ - jbyte data_buf[length]; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsSetUserDataHeader()...\n"); -#endif - - env->GetByteArrayRegion(data, 0, length, data_buf); - - // user_data.headers[index].header_id - clientBdData->user_data.headers[index].header_id = (RIL_CDMA_SMS_UdhId)(ID); - - // user_data.headers[index].u - // TODO: add support for all udh id's - switch(clientBdData->user_data.headers[index].header_id) - { - case RIL_CDMA_SMS_UDH_CONCAT_8: - clientBdData->user_data.headers[index].u.concat_8.msg_ref = data_buf[0]; - clientBdData->user_data.headers[index].u.concat_8.total_sm = data_buf[1]; - clientBdData->user_data.headers[index].u.concat_8.seq_num = data_buf[2]; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.concat_8.msg_ref = 0x%02x\n", index, clientBdData->user_data.headers[index].u.concat_8.msg_ref); - LOGD("clientBdData->user_data.headers[%d].u.concat_8.total_sm = 0x%02x\n", index, clientBdData->user_data.headers[index].u.concat_8.total_sm); - LOGD("clientBdData->user_data.headers[%d].u.concat_8.seq_num = 0x%02x\n", index, clientBdData->user_data.headers[index].u.concat_8.seq_num); -#endif - break; - case RIL_CDMA_SMS_UDH_SPECIAL_SM: - clientBdData->user_data.headers[index].u.special_sm.msg_waiting = (RIL_CDMA_SMS_GWMsgWaiting)( - (data_buf[0] << 23) | (data_buf[1] << 15) | - (data_buf[2] << 7) | data_buf[3]); - clientBdData->user_data.headers[index].u.special_sm.msg_waiting_kind = (RIL_CDMA_SMS_GWMsgWaitingKind)( - (data_buf[4] << 23) | (data_buf[5] << 15) | - (data_buf[6] << 7) | data_buf[7]); - clientBdData->user_data.headers[index].u.special_sm.message_count = data_buf[8]; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.special_sm.msg_waiting = 0x%04x\n", index, clientBdData->user_data.headers[index].u.special_sm.msg_waiting); - LOGD("clientBdData->user_data.headers[%d].u.special_sm.msg_waiting_kind = 0x%04x\n", index, clientBdData->user_data.headers[index].u.special_sm.msg_waiting_kind); - LOGD("clientBdData->user_data.headers[%d].u.special_sm.message_count = 0x%02x\n", index, clientBdData->user_data.headers[index].u.special_sm.message_count); -#endif - break; - case RIL_CDMA_SMS_UDH_PORT_8: - clientBdData->user_data.headers[index].u.wap_8.dest_port = data_buf[0]; - clientBdData->user_data.headers[index].u.wap_8.orig_port = data_buf[1]; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.wap_8.dest_port = 0x%02x\n", index, clientBdData->user_data.headers[index].u.wap_8.dest_port); - LOGD("clientBdData->user_data.headers[%d].u.wap_8.orig_port = 0x%02x\n", index, clientBdData->user_data.headers[index].u.wap_8.orig_port); -#endif - break; - case RIL_CDMA_SMS_UDH_PORT_16: - clientBdData->user_data.headers[index].u.wap_16.dest_port = (data_buf[0] << 7) | data_buf[1]; // unsigned short - clientBdData->user_data.headers[index].u.wap_16.orig_port = (data_buf[2] << 7) | data_buf[3]; // unsigned short -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.wap_16.dest_port = 0x%04x\n", index, clientBdData->user_data.headers[index].u.wap_16.dest_port); - LOGD("clientBdData->user_data.headers[%d].u.wap_16.orig_port = 0x%04x\n", index, clientBdData->user_data.headers[index].u.wap_16.orig_port); -#endif - break; - case RIL_CDMA_SMS_UDH_CONCAT_16: - clientBdData->user_data.headers[index].u.concat_16.msg_ref = (data_buf[0] << 7) | data_buf[1]; // unsigned short - clientBdData->user_data.headers[index].u.concat_16.total_sm = data_buf[2]; - clientBdData->user_data.headers[index].u.concat_16.seq_num = data_buf[3]; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.concat_16.msg_ref = 0x%04x\n", index, clientBdData->user_data.headers[index].u.concat_16.msg_ref); - LOGD("clientBdData->user_data.headers[%d].u.concat_16.total_sm = 0x%04x\n", index, clientBdData->user_data.headers[index].u.concat_16.total_sm); - LOGD("clientBdData->user_data.headers[%d].u.concat_16.seq_num = 0x%04x\n", index, clientBdData->user_data.headers[index].u.concat_16.seq_num); -#endif - break; - default: - break; - } - - // increment num_of_headers - clientBdData->user_data.num_headers++; - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jbyteArray JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetUserDataHeader - (JNIEnv * env, jobject obj) -{ - jbyteArray arrData = NULL; - jbyte data_buf[sizeof(clientBdData->user_data.headers)]; - int length = 0; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsGetUserDataHeader()...\n"); -#endif - -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.num_headers = %d, size = %d\n", clientBdData->user_data.num_headers, sizeof(clientBdData->user_data.headers)); -#endif - - for (int index = 0; index < clientBdData->user_data.num_headers; index++) { - // user_data.headers[index].header_id - data_buf[length++] = (jbyte)clientBdData->user_data.headers[index].header_id; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].header_id = %d", index, clientBdData->user_data.headers[index].header_id); -#endif - - // user_data.headers[index].u - // TODO: add support for all udh id's - switch(clientBdData->user_data.headers[index].header_id) - { - case RIL_CDMA_SMS_UDH_CONCAT_8: -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.concat_8.msg_ref = 0x%02x\n", index, clientBdData->user_data.headers[index].u.concat_8.msg_ref); - LOGD("clientBdData->user_data.headers[%d].u.concat_8.total_sm = 0x%02x\n", index, clientBdData->user_data.headers[index].u.concat_8.total_sm); - LOGD("clientBdData->user_data.headers[%d].u.concat_8.seq_num = 0x%02x\n", index, clientBdData->user_data.headers[index].u.concat_8.seq_num); -#endif - data_buf[length++] = 3; - data_buf[length++] = clientBdData->user_data.headers[index].u.concat_8.msg_ref; - data_buf[length++] = clientBdData->user_data.headers[index].u.concat_8.total_sm; - data_buf[length++] = clientBdData->user_data.headers[index].u.concat_8.seq_num; - break; - case RIL_CDMA_SMS_UDH_SPECIAL_SM: -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.special_sm.msg_waiting = 0x%04x\n", index, clientBdData->user_data.headers[index].u.special_sm.msg_waiting); - LOGD("clientBdData->user_data.headers[%d].u.special_sm.msg_waiting_kind = 0x%04x\n", index, clientBdData->user_data.headers[index].u.special_sm.msg_waiting_kind); - LOGD("clientBdData->user_data.headers[%d].u.special_sm.message_count = 0x%02x\n", index, clientBdData->user_data.headers[index].u.special_sm.message_count); -#endif - data_buf[length++] = 9; - data_buf[length++] = (clientBdData->user_data.headers[index].u.special_sm.msg_waiting & 0xFF000000) >> 23; // int - data_buf[length++] = (clientBdData->user_data.headers[index].u.special_sm.msg_waiting & 0x00FF0000) >> 15; - data_buf[length++] = (clientBdData->user_data.headers[index].u.special_sm.msg_waiting & 0x0000FF00) >> 7; - data_buf[length++] = clientBdData->user_data.headers[index].u.special_sm.msg_waiting & 0x000000FF; - data_buf[length++] = (clientBdData->user_data.headers[index].u.special_sm.msg_waiting_kind & 0xFF000000) >> 23; // int - data_buf[length++] = (clientBdData->user_data.headers[index].u.special_sm.msg_waiting_kind & 0x00FF0000) >> 15; - data_buf[length++] = (clientBdData->user_data.headers[index].u.special_sm.msg_waiting_kind & 0x0000FF00) >> 7; - data_buf[length++] = clientBdData->user_data.headers[index].u.special_sm.msg_waiting_kind & 0x000000FF; - data_buf[length++] = clientBdData->user_data.headers[index].u.special_sm.message_count; - break; - case RIL_CDMA_SMS_UDH_PORT_8: -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.wap_8.dest_port = 0x%02x\n", index, clientBdData->user_data.headers[index].u.wap_8.dest_port); - LOGD("clientBdData->user_data.headers[%d].u.wap_8.orig_port = 0x%02x\n", index, clientBdData->user_data.headers[index].u.wap_8.orig_port); -#endif - data_buf[length++] = 2; - data_buf[length++] = clientBdData->user_data.headers[index].u.wap_8.dest_port; - data_buf[length++] = clientBdData->user_data.headers[index].u.wap_8.orig_port; - break; - case RIL_CDMA_SMS_UDH_PORT_16: -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.wap_16.dest_port = 0x%04x\n", index, clientBdData->user_data.headers[index].u.wap_16.dest_port); - LOGD("clientBdData->user_data.headers[%d].u.wap_16.orig_port = 0x%04x\n", index, clientBdData->user_data.headers[index].u.wap_16.orig_port); -#endif - data_buf[length++] = 4; - data_buf[length++] = (clientBdData->user_data.headers[index].u.wap_16.dest_port & 0xFF00) >> 7; // unsigned short - data_buf[length++] = clientBdData->user_data.headers[index].u.wap_16.dest_port & 0x00FF; - data_buf[length++] = (clientBdData->user_data.headers[index].u.wap_16.orig_port & 0xFF00) >> 7; // unsigned short - data_buf[length++] = clientBdData->user_data.headers[index].u.wap_16.orig_port & 0x00FF; - break; - case RIL_CDMA_SMS_UDH_CONCAT_16: -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->user_data.headers[%d].u.concat_16.msg_ref = 0x%04x\n", index, clientBdData->user_data.headers[index].u.concat_16.msg_ref); - LOGD("clientBdData->user_data.headers[%d].u.concat_16.total_sm = 0x%04x\n", index, clientBdData->user_data.headers[index].u.concat_16.total_sm); - LOGD("clientBdData->user_data.headers[%d].u.concat_16.seq_num = 0x%04x\n", index, clientBdData->user_data.headers[index].u.concat_16.seq_num); -#endif - data_buf[length++] = 4; - data_buf[length++] = (clientBdData->user_data.headers[index].u.concat_16.msg_ref & 0xFF00) >> 7; // unsigned short - data_buf[length++] = clientBdData->user_data.headers[index].u.concat_16.msg_ref & 0x00FF; - data_buf[length++] = clientBdData->user_data.headers[index].u.concat_16.total_sm; - data_buf[length++] = clientBdData->user_data.headers[index].u.concat_16.seq_num; - break; - default: - break; - } - } - - if (length != 0) { - arrData = env->NewByteArray((jsize)length); - env->SetByteArrayRegion(arrData, 0, length, data_buf); - } - - return arrData; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetSmsAddress - (JNIEnv * env, jobject obj, jobject smsAddress) -{ - jclass SmsAddressClass; - jfieldID field; - jbyteArray arrData = NULL; - jbyte byte_buf[RIL_CDMA_SMS_ADDRESS_MAX]; - int length; - jint intData; - jbyte byteData; - jboolean booleanData; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsSetSmsAddress()...\n"); -#endif - - // callback.digit_mode - if (getObjectByteField(env, smsAddress, "digitMode", &byteData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->callback.digit_mode = (RIL_CDMA_SMS_DigitMode)(byteData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.digit_mode = 0x%02x\n", clientBdData->callback.digit_mode); -#endif - - // callback.number_mode - if (getObjectByteField(env, smsAddress, "numberMode", &byteData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->callback.number_mode = (RIL_CDMA_SMS_NumberMode)(byteData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_mode = 0x%02x\n", clientBdData->callback.number_mode); -#endif - - // callback.number_type - if (getObjectIntField(env, smsAddress, "ton", &intData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->callback.number_type = (RIL_CDMA_SMS_NumberType)(intData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_type = %d\n", clientBdData->callback.number_type); -#endif - - // callback.number_plan - if (getObjectByteField(env, smsAddress, "numberPlan", &byteData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->callback.number_plan = (RIL_CDMA_SMS_NumberPlan)(byteData); -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_plan = 0x%02x\n", clientBdData->callback.number_plan); -#endif - - // callback.number_of_digits - if (getObjectByteField(env, smsAddress, "numberOfDigits", &byteData) != JNI_SUCCESS) - return JNI_FAILURE; - clientBdData->callback.number_of_digits = byteData; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_of_digits = %d\n",clientBdData->callback.number_of_digits); -#endif - - // callback.digits - if (getObjectByteArrayField(env, smsAddress, "origBytes", byte_buf, &length) != JNI_SUCCESS) - return JNI_FAILURE; - for (int i = 0; i < clientBdData->callback.number_of_digits; i++) { - clientBdData->callback.digits[i] = byte_buf[i]; -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.digits[%d] = 0x%02x\n", i, clientBdData->callback.digits[i]); -#endif - } - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetSmsAddress - (JNIEnv * env, jobject obj, jobject smsAddress) -{ - jclass SmsAddressClass; - jfieldID field; - jbyteArray arrData = NULL; - jbyte *byte_buf; - int length; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsGetSmsAddress()...\n"); -#endif - - // callback.digit_mode -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.digit_mode = 0x%02x\n", clientBdData->callback.digit_mode); -#endif - if (setObjectByteField(env, smsAddress, "digitMode", (jbyte)clientBdData->callback.digit_mode) != JNI_SUCCESS) - return JNI_FAILURE; - - // callback.number_mode -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_mode = 0x%02x\n", clientBdData->callback.number_mode); -#endif - if (setObjectByteField(env, smsAddress, "numberMode", (jbyte)clientBdData->callback.number_mode) != JNI_SUCCESS) - return JNI_FAILURE; - - // callback.number_type -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_type = %d\n", clientBdData->callback.number_type); -#endif - if (setObjectIntField(env, smsAddress, "ton", (jint)clientBdData->callback.number_type) != JNI_SUCCESS) - return JNI_FAILURE; - - // callback.number_plan -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_plan = 0x%02x\n", clientBdData->callback.number_plan); -#endif - if (setObjectByteField(env, smsAddress, "numberPlan", (jbyte)clientBdData->callback.number_plan) != JNI_SUCCESS) - return JNI_FAILURE; - - // callback.number_of_digits -#ifdef DBG_LOG_LEVEL_A - LOGD("clientBdData->callback.number_of_digits = %d\n", clientBdData->callback.number_of_digits); -#endif - if (setObjectByteField(env, smsAddress, "numberOfDigits", (jbyte)clientBdData->callback.number_of_digits) != JNI_SUCCESS) - return JNI_FAILURE; - - // callback.digits - byte_buf = (jbyte*)clientBdData->callback.digits; - length = clientBdData->callback.number_of_digits; -#ifdef DBG_LOG_LEVEL_A - for (int i = 0; i < length; i++) { - LOGD("clientBdData->callback.digits[%d] = 0x%02x\n", i, clientBdData->callback.digits[i]); - } -#endif - - if (setObjectByteArrayField(env, smsAddress, "origBytes", byte_buf, length) != JNI_SUCCESS) - return JNI_FAILURE; - - return JNI_SUCCESS; -} - - -/* native interface */ -JNIEXPORT jbyteArray JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsEncodeSms - (JNIEnv * env, jobject obj) -{ - RIL_CDMA_Encoded_SMS *encoded_sms = (RIL_CDMA_Encoded_SMS *)malloc(sizeof(RIL_CDMA_Encoded_SMS)); - jbyte* data_buf; - jint result = JNI_SUCCESS; - jbyteArray encodedSMS; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsEncodeSms(): entry\n"); -#endif - - if (NULL == encoded_sms) { - jniThrowException(env, "java/lang/NullPointerException", "encoded_sms is null"); - return NULL; - } - memset(encoded_sms, 0, sizeof(RIL_CDMA_Encoded_SMS)); - - // call CDMA SMS encode function - if(wmsts_ril_cdma_encode_sms(clientBdData, encoded_sms) != RIL_E_SUCCESS) { - jniThrowException(env, "java/lang/Exception", "CDMA SMS Encoding failed"); - return NULL; - } - -#ifdef DBG_LOG_LEVEL_A - LOGD(" EncodeSMS: length = %i\n", encoded_sms->length); -#endif - encodedSMS = env->NewByteArray((jsize)encoded_sms->length); - env->SetByteArrayRegion(encodedSMS, 0, encoded_sms->length, (jbyte*)encoded_sms->data); - free(encoded_sms); - - return encodedSMS; -} - - -/* native interface */ -JNIEXPORT jint JNICALL -Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsDecodeSms - (JNIEnv * env, jobject obj, jbyteArray encodedSMS) -{ - RIL_CDMA_Encoded_SMS *encoded_sms = (RIL_CDMA_Encoded_SMS *)malloc(sizeof(RIL_CDMA_Encoded_SMS)); - jbyte* data_buf; - jint result = JNI_SUCCESS; - jsize length; - -#ifdef DBG_LOG_LEVEL_B - LOGD("nativeCdmaSmsDecodeSms(): entry\n"); -#endif - - if (NULL == encoded_sms) { - jniThrowException(env, "java/lang/NullPointerException", "encoded_sms is null"); - return JNI_FAILURE; - } - memset(encoded_sms, 0, sizeof(RIL_CDMA_Encoded_SMS)); - - length = env->GetArrayLength(encodedSMS); - if (length < 0 || length > 255) { - jniThrowException(env, "java/lang/ArrayIndexOutOfBounds", "wrong encoded SMS data length"); - return JNI_FAILURE; - } - encoded_sms->length = length; -#ifdef DBG_LOG_LEVEL_A - LOGD(" DecodeSMS: arrayLength = %d\n", encoded_sms->length); -#endif - data_buf = env->GetByteArrayElements(encodedSMS, NULL); - encoded_sms->data = (unsigned char*)data_buf; - env->ReleaseByteArrayElements(encodedSMS, data_buf, 0); - - // call CDMA SMS decode function - if(wmsts_ril_cdma_decode_sms(encoded_sms, clientBdData) != RIL_E_SUCCESS) { - jniThrowException(env, "java/lang/Exception", "CDMA SMS Decoding failed"); - result = JNI_FAILURE; - } - - free(encoded_sms); - - return result; -} - - -// --------------------------------------------------------------------------- - -static const char *classPathName = "com/android/internal/telephony/cdma/sms/SmsDataCoding"; - -static JNINativeMethod methods[] = { - /* name, signature, funcPtr */ - {"nativeCdmaSmsConstructClientBD", "()I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsConstructClientBD }, - {"nativeCdmaSmsDestructClientBD", "()I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsDestructClientBD }, - {"nativeCdmaSmsSetBearerDataPrimitives", "(Lcom/android/internal/telephony/cdma/sms/BearerData;)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetBearerDataPrimitives }, - {"nativeCdmaSmsGetBearerDataPrimitives", "(Lcom/android/internal/telephony/cdma/sms/BearerData;)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetBearerDataPrimitives }, - {"nativeCdmaSmsSetUserData", "(Lcom/android/internal/telephony/cdma/sms/UserData;)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetUserData }, - {"nativeCdmaSmsGetUserData", "(Lcom/android/internal/telephony/cdma/sms/UserData;)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetUserData }, - {"nativeCdmaSmsSetUserDataHeader", "(I[BII)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetUserDataHeader }, - {"nativeCdmaSmsGetUserDataHeader", "()[B", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetUserDataHeader }, - {"nativeCdmaSmsSetSmsAddress", "(Lcom/android/internal/telephony/cdma/sms/CdmaSmsAddress;)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetSmsAddress }, - {"nativeCdmaSmsGetSmsAddress", "(Lcom/android/internal/telephony/cdma/sms/CdmaSmsAddress;)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetSmsAddress }, - {"nativeCdmaSmsEncodeSms", "()[B", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsEncodeSms }, - {"nativeCdmaSmsDecodeSms", "([B)I", - (void*)Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsDecodeSms }, -}; - -int register_android_cdma_sms_methods(JNIEnv *_env) -{ - return android::AndroidRuntime::registerNativeMethods( - _env, classPathName, methods, NELEM(methods)); -} - -// --------------------------------------------------------------------------- - -jint JNI_OnLoad(JavaVM* vm, void* reserved) -{ - JNIEnv* env = NULL; - jint result = -1; - - if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { - LOGE("ERROR: GetEnv failed\n"); - goto bail; - } - assert(env != NULL); - - if (register_android_cdma_sms_methods(env) < 0) { - LOGE("ERROR: CDMA SMS native registration failed\n"); - goto bail; - } - - /* success -- return valid version number */ - result = JNI_VERSION_1_4; - -bail: - return result; -} diff --git a/telephony/jni/cdmasms/cdma_sms_jni.h b/telephony/jni/cdmasms/cdma_sms_jni.h deleted file mode 100644 index 253c006..0000000 --- a/telephony/jni/cdmasms/cdma_sms_jni.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class com_android_internal_telephony_cdma_sms_SmsDataCoding */ - -#ifndef _Included_com_android_internal_telephony_cdma_sms_SmsDataCoding -#define _Included_com_android_internal_telephony_cdma_sms_SmsDataCoding -#ifdef __cplusplus -extern "C" { -#endif -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_NULL -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_NULL 0L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_MSG_ID -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_MSG_ID 1L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_USER_DATA -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_USER_DATA 2L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_MC_TIME -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_MC_TIME 8L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_NUM_OF_MSGS -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_NUM_OF_MSGS 2048L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_CALLBACK -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_CALLBACK 16384L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_DISPLAY_MODE -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_CDMA_SMS_WMS_MASK_BD_DISPLAY_MODE 32768L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_SUCCESS -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_SUCCESS 0L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_FAILURE -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_FAILURE 1L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_DATA_LEN_OUT_OF_RANGE -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_DATA_LEN_OUT_OF_RANGE 2L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_CLASS_UNKNOWN -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_CLASS_UNKNOWN 3L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_FIELD_ID_UNKNOWN -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_FIELD_ID_UNKNOWN 4L -#undef com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_OUT_OF_MEMORY -#define com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_OUT_OF_MEMORY 5L -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsConstructClientBD - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsConstructClientBD - (JNIEnv *, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsDestructClientBD - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsDestructClientBD - (JNIEnv *, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsSetBearerDataPrimitives - * Signature: (Lcom/android/internal/telephony/cdma/sms/BearerData;)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetBearerDataPrimitives - (JNIEnv *, jobject, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsGetBearerDataPrimitives - * Signature: (Lcom/android/internal/telephony/cdma/sms/BearerData;)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetBearerDataPrimitives - (JNIEnv *, jobject, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsSetUserData - * Signature: (Lcom/android/internal/telephony/cdma/sms/UserData;)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetUserData - (JNIEnv *, jobject, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsGetUserData - * Signature: (Lcom/android/internal/telephony/cdma/sms/UserData;)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetUserData - (JNIEnv *, jobject, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsSetUserDataHeader - * Signature: (I[BII)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetUserDataHeader - (JNIEnv *, jobject, jint, jbyteArray, jint, jint); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsGetUserDataHeader - * Signature: ()[B - */ -JNIEXPORT jbyteArray JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetUserDataHeader - (JNIEnv *, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsSetSmsAddress - * Signature: (Lcom/android/internal/telephony/cdma/sms/CdmaSmsAddress;)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsSetSmsAddress - (JNIEnv *, jobject, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsGetSmsAddress - * Signature: (Lcom/android/internal/telephony/cdma/sms/CdmaSmsAddress;)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsGetSmsAddress - (JNIEnv *, jobject, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsEncodeSms - * Signature: ()[B - */ -JNIEXPORT jbyteArray JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsEncodeSms - (JNIEnv *, jobject); - -/* - * Class: com_android_internal_telephony_cdma_sms_SmsDataCoding - * Method: nativeCdmaSmsDecodeSms - * Signature: ([B)I - */ -JNIEXPORT jint JNICALL Java_com_android_internal_telephony_cdma_sms_SmsDataCoding_nativeCdmaSmsDecodeSms - (JNIEnv *, jobject, jbyteArray); - -/** - * CDMA SMS return value defines - */ -#define JNI_SUCCESS \ -com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_SUCCESS /**< Successful operation */ -#define JNI_FAILURE \ -com_android_internal_telephony_cdma_sms_SmsDataCoding_JNI_CDMA_SMS_FAILURE /**< General failure */ - -#ifdef __cplusplus -} -#endif -#endif diff --git a/tests/AndroidTests/src/com/android/unit_tests/BitwiseStreamsTest.java b/tests/AndroidTests/src/com/android/unit_tests/BitwiseStreamsTest.java new file mode 100644 index 0000000..a935247 --- /dev/null +++ b/tests/AndroidTests/src/com/android/unit_tests/BitwiseStreamsTest.java @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.unit_tests; + +import com.android.internal.util.BitwiseInputStream; +import com.android.internal.util.BitwiseOutputStream; +import com.android.internal.util.HexDump; + +import android.test.AndroidTestCase; +import android.test.suitebuilder.annotation.SmallTest; + +import android.util.Log; + +public class BitwiseStreamsTest extends AndroidTestCase { + private final static String LOG_TAG = "BitwiseStreamsTest"; + + @SmallTest + public void testOne() throws Exception { + int offset = 3; + byte[] inBuf = HexDump.hexStringToByteArray("FFDD"); + BitwiseOutputStream outStream = new BitwiseOutputStream(30); + outStream.skip(offset); + for (int i = 0; i < inBuf.length; i++) outStream.write(8, inBuf[i]); + byte[] outBuf = outStream.toByteArray(); + BitwiseInputStream inStream = new BitwiseInputStream(outBuf); + byte[] inBufDup = new byte[inBuf.length]; + inStream.skip(offset); + for (int i = 0; i < inBufDup.length; i++) inBufDup[i] = inStream.read(8); + assertEquals(HexDump.toHexString(inBuf), HexDump.toHexString(inBufDup)); + } + + @SmallTest + public void testTwo() throws Exception { + int offset = 3; + byte[] inBuf = HexDump.hexStringToByteArray("11d4f29c0e9ad3c36e72584e064d9b53"); + BitwiseOutputStream outStream = new BitwiseOutputStream(30); + outStream.skip(offset); + for (int i = 0; i < inBuf.length; i++) outStream.write(8, inBuf[i]); + BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); + inStream.skip(offset); + byte[] inBufDup = new byte[inBuf.length]; + for (int i = 0; i < inBufDup.length; i++) inBufDup[i] = inStream.read(8); + assertEquals(HexDump.toHexString(inBuf), HexDump.toHexString(inBufDup)); + } + + @SmallTest + public void testThree() throws Exception { + int offset = 4; + byte[] inBuf = HexDump.hexStringToByteArray("00031040900112488ea794e0"); + BitwiseOutputStream outStream = new BitwiseOutputStream(30); + outStream.skip(offset); + for (int i = 0; i < inBuf.length; i++) outStream.write(8, inBuf[i]); + BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); + inStream.skip(offset); + byte[] inBufDup = new byte[inBuf.length]; + for (int i = 0; i < inBufDup.length; i++) inBufDup[i] = inStream.read(8); + assertEquals(HexDump.toHexString(inBuf), HexDump.toHexString(inBufDup)); + } + + @SmallTest + public void testFour() throws Exception { + int offset = 7; + byte[] inBuf = HexDump.hexStringToByteArray("00031040900112488ea794e0"); + BitwiseOutputStream outStream = new BitwiseOutputStream(30); + outStream.skip(offset); + for (int i = 0; i < inBuf.length; i++) { + outStream.write(5, inBuf[i] >>> 3); + outStream.write(3, inBuf[i] & 0x07); + } + BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); + inStream.skip(offset); + byte[] inBufDup = new byte[inBuf.length]; + for (int i = 0; i < inBufDup.length; i++) inBufDup[i] = inStream.read(8); + assertEquals(HexDump.toHexString(inBuf), HexDump.toHexString(inBufDup)); + } + + @SmallTest + public void testFive() throws Exception { + int num_runs = 10; + long start = android.os.SystemClock.elapsedRealtime(); + for (int run = 0; run < num_runs; run++) { + int offset = run % 8; + byte[] inBuf = HexDump.hexStringToByteArray("00031040900112488ea794e0"); + BitwiseOutputStream outStream = new BitwiseOutputStream(30); + outStream.skip(offset); + for (int i = 0; i < inBuf.length; i++) { + outStream.write(5, inBuf[i] >>> 3); + outStream.write(3, inBuf[i] & 0x07); + } + BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); + inStream.skip(offset); + byte[] inBufDup = new byte[inBuf.length]; + for (int i = 0; i < inBufDup.length; i++) inBufDup[i] = inStream.read(8); + assertEquals(HexDump.toHexString(inBuf), HexDump.toHexString(inBufDup)); + } + long end = android.os.SystemClock.elapsedRealtime(); + Log.d(LOG_TAG, "repeated encode-decode took " + (end - start) + " ms"); + } +} diff --git a/tests/AndroidTests/src/com/android/unit_tests/CdmaSmsTest.java b/tests/AndroidTests/src/com/android/unit_tests/CdmaSmsTest.java new file mode 100644 index 0000000..723512c --- /dev/null +++ b/tests/AndroidTests/src/com/android/unit_tests/CdmaSmsTest.java @@ -0,0 +1,273 @@ +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.unit_tests; + +import com.android.internal.telephony.GsmAlphabet; +import com.android.internal.telephony.SmsHeader; +import com.android.internal.telephony.cdma.sms.BearerData; +import com.android.internal.telephony.cdma.sms.UserData; +import com.android.internal.telephony.cdma.sms.CdmaSmsAddress; +import com.android.internal.util.BitwiseInputStream; +import com.android.internal.util.BitwiseOutputStream; +import com.android.internal.util.HexDump; + +import android.test.AndroidTestCase; +import android.test.suitebuilder.annotation.SmallTest; + +import java.util.Iterator; + +import android.util.Log; + +public class CdmaSmsTest extends AndroidTestCase { + private final static String LOG_TAG = "Cdma_Sms_Test"; + + private static UserData makeUserData(String msg) { + UserData userData = new UserData(); + byte[] payload; + try { + payload = GsmAlphabet.stringToGsm7BitPacked(msg); + userData.payload = new byte[payload.length - 1]; + for (int i = 0; i < userData.payload.length; i++) userData.payload[i] = payload[i + 1]; + userData.numFields = payload[0]; + userData.paddingBits = (userData.payload.length * 8) - (userData.numFields * 7); + userData.paddingBits = 0; // XXX this is better, wtf? + userData.msgEncoding = UserData.ENCODING_GSM_7BIT_ALPHABET; + } catch (com.android.internal.telephony.EncodeException ex) { + assertEquals(1, 0); + } + return userData; + } + + @SmallTest + public void testStandardSms() throws Exception { + String pdu = "00031040900112488ea794e074d69e1b7392c270326cde9e98"; + BearerData bearerData = BearerData.decode(HexDump.hexStringToByteArray(pdu)); + assertEquals("Test standard SMS", bearerData.userData.payloadStr); + } + + @SmallTest + public void testStandardSmsFeedback() throws Exception { + BearerData bearerData = new BearerData(); + bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER; + bearerData.messageId = 0; + bearerData.hasUserDataHeader = false; + String payloadStr = "Test standard SMS"; + bearerData.userData = makeUserData(payloadStr); + byte []encodedSms = BearerData.encode(bearerData); + BearerData revBearerData = BearerData.decode(encodedSms); + assertEquals(BearerData.MESSAGE_TYPE_DELIVER, revBearerData.messageType); + assertEquals(0, revBearerData.messageId); + assertEquals(false, revBearerData.hasUserDataHeader); + assertEquals(UserData.ENCODING_GSM_7BIT_ALPHABET, revBearerData.userData.msgEncoding); + assertEquals(payloadStr.length(), revBearerData.userData.numFields); + assertEquals(payloadStr, revBearerData.userData.payloadStr); + } + + @SmallTest + public void testAltUserDataFeedback() throws Exception { + try { + BearerData bearerData = new BearerData(); + bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER; + bearerData.messageId = 0; + bearerData.hasUserDataHeader = false; + UserData userData = new UserData(); + String str1 = "test ascii user data encoding"; + userData.payload = str1.getBytes("US-ASCII"); + userData.numFields = str1.length(); + userData.paddingBits = 0; + userData.msgEncoding = UserData.ENCODING_7BIT_ASCII; + bearerData.userData = userData; + byte []encodedSms = BearerData.encode(bearerData); + BearerData revBearerData = BearerData.decode(encodedSms); + assertEquals(str1, revBearerData.userData.payloadStr); + String str2 = "\u0160u\u1E5B\u0301r\u1ECFg\uD835\uDC1At\u00E9\u4E002\u3042"; + userData.payload = str2.getBytes("UTF-16"); + userData.numFields = str2.length() + 1; + userData.msgEncoding = UserData.ENCODING_UNICODE_16; + encodedSms = BearerData.encode(bearerData); + revBearerData = BearerData.decode(encodedSms); + assertEquals(str2, revBearerData.userData.payloadStr); + } catch (java.io.UnsupportedEncodingException ex) { + throw new RuntimeException("user data encoding error"); + } + } + + @SmallTest + public void testReplyOption() throws Exception { + String pdu1 = "0003104090011648b6a794e0705476bf77bceae934fe5f6d94d87450080a0180"; + BearerData bd1 = BearerData.decode(HexDump.hexStringToByteArray(pdu1)); + assertEquals("Test Acknowledgement 1", bd1.userData.payloadStr); + assertEquals(true, bd1.userAckReq); + assertEquals(false, bd1.deliveryAckReq); + assertEquals(false, bd1.readAckReq); + assertEquals(false, bd1.reportReq); + String pdu2 = "0003104090011648b6a794e0705476bf77bceae934fe5f6d94d87490080a0140"; + BearerData bd2 = BearerData.decode(HexDump.hexStringToByteArray(pdu2)); + assertEquals("Test Acknowledgement 2", bd2.userData.payloadStr); + assertEquals(false, bd2.userAckReq); + assertEquals(true, bd2.deliveryAckReq); + assertEquals(false, bd2.readAckReq); + assertEquals(false, bd2.reportReq); + String pdu3 = "0003104090011648b6a794e0705476bf77bceae934fe5f6d94d874d0080a0120"; + BearerData bd3 = BearerData.decode(HexDump.hexStringToByteArray(pdu3)); + assertEquals("Test Acknowledgement 3", bd3.userData.payloadStr); + assertEquals(false, bd3.userAckReq); + assertEquals(false, bd3.deliveryAckReq); + assertEquals(true, bd3.readAckReq); + assertEquals(false, bd3.reportReq); + String pdu4 = "0003104090011648b6a794e0705476bf77bceae934fe5f6d94d87510080a0110"; + BearerData bd4 = BearerData.decode(HexDump.hexStringToByteArray(pdu4)); + assertEquals("Test Acknowledgement 4", bd4.userData.payloadStr); + assertEquals(false, bd4.userAckReq); + assertEquals(false, bd4.deliveryAckReq); + assertEquals(false, bd4.readAckReq); + assertEquals(true, bd4.reportReq); + } + + @SmallTest + public void testReplyOptionFeedback() throws Exception { + BearerData bearerData = new BearerData(); + bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER; + bearerData.messageId = 0; + bearerData.hasUserDataHeader = false; + bearerData.userData = makeUserData("test reply option"); + bearerData.userAckReq = true; + byte []encodedSms = BearerData.encode(bearerData); + BearerData revBearerData = BearerData.decode(encodedSms); + assertEquals(true, revBearerData.userAckReq); + assertEquals(false, revBearerData.deliveryAckReq); + assertEquals(false, revBearerData.readAckReq); + assertEquals(false, revBearerData.reportReq); + bearerData.userAckReq = false; + bearerData.deliveryAckReq = true; + encodedSms = BearerData.encode(bearerData); + revBearerData = BearerData.decode(encodedSms); + assertEquals(false, revBearerData.userAckReq); + assertEquals(true, revBearerData.deliveryAckReq); + assertEquals(false, revBearerData.readAckReq); + assertEquals(false, revBearerData.reportReq); + bearerData.deliveryAckReq = false; + bearerData.readAckReq = true; + encodedSms = BearerData.encode(bearerData); + revBearerData = BearerData.decode(encodedSms); + assertEquals(false, revBearerData.userAckReq); + assertEquals(false, revBearerData.deliveryAckReq); + assertEquals(true, revBearerData.readAckReq); + assertEquals(false, revBearerData.reportReq); + bearerData.readAckReq = false; + bearerData.reportReq = true; + encodedSms = BearerData.encode(bearerData); + revBearerData = BearerData.decode(encodedSms); + assertEquals(false, revBearerData.userAckReq); + assertEquals(false, revBearerData.deliveryAckReq); + assertEquals(false, revBearerData.readAckReq); + assertEquals(true, revBearerData.reportReq); + } + + @SmallTest + public void testNumberOfMessages() throws Exception { + String pdu1 = "000310409001124896a794e07595f69f199540ea759a0dc8e00b0163"; + BearerData bd1 = BearerData.decode(HexDump.hexStringToByteArray(pdu1)); + assertEquals("Test Voice mail 99", bd1.userData.payloadStr); + assertEquals(99, bd1.numberOfMessages); + String pdu2 = "00031040900113489ea794e07595f69f199540ea759a0988c0600b0164"; + BearerData bd2 = BearerData.decode(HexDump.hexStringToByteArray(pdu2)); + assertEquals("Test Voice mail 100", bd2.userData.payloadStr); + assertEquals(100, bd2.numberOfMessages); + } + + @SmallTest + public void testNumberOfMessagesFeedback() throws Exception { + BearerData bearerData = new BearerData(); + bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER; + bearerData.messageId = 0; + bearerData.hasUserDataHeader = false; + bearerData.userData = makeUserData("test message count"); + bearerData.numberOfMessages = 27; + byte []encodedSms = BearerData.encode(bearerData); + BearerData revBearerData = BearerData.decode(encodedSms); + assertEquals(bearerData.numberOfMessages, revBearerData.numberOfMessages); + } + + @SmallTest + public void testCallbackNum() throws Exception { + String pdu1 = "00031040900112488ea794e070d436cb638bc5e035ce2f97900e06910431323334"; + BearerData bd1 = BearerData.decode(HexDump.hexStringToByteArray(pdu1)); + assertEquals("Test Callback nbr", bd1.userData.payloadStr); + assertEquals(CdmaSmsAddress.DIGIT_MODE_8BIT_CHAR, bd1.callbackNumber.digitMode); + assertEquals(CdmaSmsAddress.TON_INTERNATIONAL_OR_IP, bd1.callbackNumber.ton); + assertEquals(CdmaSmsAddress.NUMBER_MODE_NOT_DATA_NETWORK, bd1.callbackNumber.numberMode); + assertEquals(CdmaSmsAddress.NUMBERING_PLAN_ISDN_TELEPHONY, bd1.callbackNumber.numberPlan); + assertEquals("1234", bd1.callbackNumber.address); + } + + @SmallTest + public void testCallbackNumFeedback() throws Exception { + BearerData bearerData = new BearerData(); + bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER; + bearerData.messageId = 0; + bearerData.hasUserDataHeader = false; + bearerData.userData = makeUserData("test callback number"); + CdmaSmsAddress addr = new CdmaSmsAddress(); + addr.digitMode = CdmaSmsAddress.DIGIT_MODE_8BIT_CHAR; + addr.ton = CdmaSmsAddress.TON_NATIONAL_OR_EMAIL; + addr.numberMode = CdmaSmsAddress.NUMBER_MODE_NOT_DATA_NETWORK; + addr.numberPlan = CdmaSmsAddress.NUMBERING_PLAN_UNKNOWN; + addr.address = "8005551212"; + addr.numberOfDigits = (byte)addr.address.length(); + bearerData.callbackNumber = addr; + byte []encodedSms = BearerData.encode(bearerData); + BearerData revBearerData = BearerData.decode(encodedSms); + CdmaSmsAddress revAddr = revBearerData.callbackNumber; + assertEquals(addr.digitMode, revAddr.digitMode); + assertEquals(addr.ton, revAddr.ton); + assertEquals(addr.numberMode, revAddr.numberMode); + assertEquals(addr.numberPlan, revAddr.numberPlan); + assertEquals(addr.numberOfDigits, revAddr.numberOfDigits); + assertEquals(addr.address, revAddr.address); + addr.address = "8*55#1012"; + addr.numberOfDigits = (byte)addr.address.length(); + addr.digitMode = CdmaSmsAddress.DIGIT_MODE_4BIT_DTMF; + encodedSms = BearerData.encode(bearerData); + revBearerData = BearerData.decode(encodedSms); + revAddr = revBearerData.callbackNumber; + assertEquals(addr.digitMode, revAddr.digitMode); + assertEquals(addr.numberOfDigits, revAddr.numberOfDigits); + assertEquals(addr.address, revAddr.address); + } + + @SmallTest + public void testMsgCenterTimeStampFeedback() throws Exception { + BearerData bearerData = new BearerData(); + bearerData.messageType = BearerData.MESSAGE_TYPE_DELIVER; + bearerData.messageId = 0; + bearerData.hasUserDataHeader = false; + bearerData.userData = makeUserData("test message center timestamp"); + bearerData.timeStamp = HexDump.hexStringToByteArray("112233445566"); + byte []encodedSms = BearerData.encode(bearerData); + BearerData revBearerData = BearerData.decode(encodedSms); + assertEquals(HexDump.toHexString(bearerData.timeStamp), + HexDump.toHexString(revBearerData.timeStamp)); + } + + // XXX test messageId + + // String pdu1 = "0003104090010d4866a794e07055965b91d040300c0100"; sid 12 + // String pdu1 = "0003104090011748bea794e0731436ef3bd7c2e0352eef27a1c263fe58080d0101"; sid 13 + // Log.d(LOG_TAG, "revBearerData -- " + revBearerData); + +} diff --git a/tests/sketch/Android.mk b/tests/sketch/Android.mk new file mode 100644 index 0000000..814e370 --- /dev/null +++ b/tests/sketch/Android.mk @@ -0,0 +1,8 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(call all-subdir-java-files) + +LOCAL_PACKAGE_NAME := Sketch + +include $(BUILD_PACKAGE) diff --git a/tests/sketch/AndroidManifest.xml b/tests/sketch/AndroidManifest.xml new file mode 100755 index 0000000..c44b54e --- /dev/null +++ b/tests/sketch/AndroidManifest.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.gesture" + android:versionCode="1" + android:versionName="1.0.0"> + <application android:icon="@drawable/icon" android:label="@string/app_name"> + <activity android:name="com.android.gesture.example.GestureEntryDemo" + android:label="@string/app_name"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity android:name="com.android.gesture.example.GestureLibViewer"/> + </application> +</manifest> diff --git a/tests/sketch/res/drawable/icon.png b/tests/sketch/res/drawable/icon.png Binary files differnew file mode 100755 index 0000000..7502484 --- /dev/null +++ b/tests/sketch/res/drawable/icon.png diff --git a/tests/sketch/res/layout/demo.xml b/tests/sketch/res/layout/demo.xml new file mode 100755 index 0000000..e516229 --- /dev/null +++ b/tests/sketch/res/layout/demo.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + <Spinner + android:id="@+id/spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:drawSelectorOnTop="true" + android:prompt="@string/recognition_result"/> + + <com.android.gesture.GesturePad + android:id="@+id/drawingpad" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1"/> + +</LinearLayout> diff --git a/tests/sketch/res/layout/gestureviewer.xml b/tests/sketch/res/layout/gestureviewer.xml new file mode 100755 index 0000000..5302d34 --- /dev/null +++ b/tests/sketch/res/layout/gestureviewer.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <Spinner + android:id="@+id/spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:drawSelectorOnTop="true" + android:prompt="@string/recognition_result"/> + + <com.android.gesture.GesturePad + android:id="@+id/drawingpad" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1"/> + + <LinearLayout + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + <Button + android:id="@+id/previous" + android:text="@string/previous" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1"/> + <Button + android:id="@+id/remove" + android:text="@string/remove" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1"/> + <Button + android:id="@+id/next" + android:text="@string/next" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1"/> + </LinearLayout> + +</LinearLayout> diff --git a/tests/sketch/res/layout/newgesture_dialog.xml b/tests/sketch/res/layout/newgesture_dialog.xml new file mode 100755 index 0000000..6e45d81 --- /dev/null +++ b/tests/sketch/res/layout/newgesture_dialog.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <EditText + android:id="@+id/gesturename_edit" + android:layout_height="wrap_content" + android:layout_width="fill_parent" + android:layout_marginLeft="20dip" + android:layout_marginRight="20dip" + android:scrollHorizontally="true" + android:autoText="false" + android:capitalize="none" + android:gravity="fill_horizontal" + android:textAppearance="?android:attr/textAppearanceMedium" /> + +</LinearLayout> diff --git a/tests/sketch/res/values/strings.xml b/tests/sketch/res/values/strings.xml new file mode 100755 index 0000000..4c6aa20 --- /dev/null +++ b/tests/sketch/res/values/strings.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <string name="app_name">Gesture Demo</string> + <string name="recognition_result">Recognition Result</string> + <string name="clear">Clear</string> + <string name="newgesture">Add</string> + <string name="viewgesture">View</string> + <string name="newgesture_dialog_ok">OK</string> + <string name="newgesture_dialog_cancel">Cancel</string> + <string name="newgesture_text_entry">Gesture Name</string> + <string name="previous">Previous</string> + <string name="remove">Remove</string> + <string name="next">Next</string> +</resources> diff --git a/tests/sketch/src/com/android/gesture/Gesture.java b/tests/sketch/src/com/android/gesture/Gesture.java new file mode 100755 index 0000000..29c07ad --- /dev/null +++ b/tests/sketch/src/com/android/gesture/Gesture.java @@ -0,0 +1,361 @@ +/* + * Copyright (C) 2008-2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture; + +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.graphics.Path; +import android.graphics.PointF; +import android.graphics.RectF; +import android.os.Parcel; +import android.os.Parcelable; + +import com.android.gesture.recognizer.RecognitionUtil; + +import org.xmlpull.v1.XmlSerializer; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.StringTokenizer; + +/** + * A single stroke gesture. + */ + +public class Gesture implements Parcelable { + + private RectF mBBX; + private float mLength = 0; + private int mColor; + private float mWidth; + private ArrayList<PointF> mPtsBuffer = new ArrayList<PointF>(); + private long mTimestamp = 0; + private long mID; + + private static final long systemStartupTime = System.currentTimeMillis(); + private static int instanceCount = 0; + + public Gesture() { + mID = systemStartupTime + instanceCount++; + } + + public void setColor(int c) { + mColor = c; + } + + public void setStrokeWidth(float w) { + mWidth = w; + } + + public int getColor() { + return mColor; + } + + public float getStrokeWidth() { + return mWidth; + } + + public ArrayList<PointF> getPoints() { + return this.mPtsBuffer; + } + + public int numOfPoints() { + return this.mPtsBuffer.size(); + } + + public void addPoint(float x, float y) { + mPtsBuffer.add(new PointF(x, y)); + if (mBBX == null) { + mBBX = new RectF(); + mBBX.top = y; + mBBX.left = x; + mBBX.right = x; + mBBX.bottom = y; + mLength = 0; + } + else { + PointF lst = mPtsBuffer.get(mPtsBuffer.size()-2); + mLength += Math.sqrt(Math.pow(x-lst.x, 2)+Math.pow(y-lst.y, 2)); + mBBX.union(x, y); + } + mTimestamp = System.currentTimeMillis(); + } + + /** + * @return the length of the gesture + */ + public float getLength() { + return this.mLength; + } + + public RectF getBBX() { + return mBBX; + } + + public void setID(long id) { + mID = id; + } + + public long getID() { + return mID; + } + + public long getTimeStamp() { + return mTimestamp; + } + + public void setTimestamp(long t) { + this.mTimestamp = t; + } + + /** + * draw the gesture + * @param canvas + */ + public void draw(Canvas canvas) { + Paint paint = new Paint(); + paint.setAntiAlias(true); + paint.setDither(true); + paint.setColor(mColor); + paint.setStyle(Paint.Style.STROKE); + paint.setStrokeJoin(Paint.Join.ROUND); + paint.setStrokeCap(Paint.Cap.ROUND); + paint.setStrokeWidth(mWidth); + + Path path = null; + float mX = 0, mY = 0; + Iterator<PointF> it = mPtsBuffer.iterator(); + while (it.hasNext()) { + PointF p = it.next(); + float x = p.x; + float y = p.y; + if (path == null) { + path = new Path(); + path.moveTo(x, y); + mX = x; + mY = y; + } else { + float dx = Math.abs(x - mX); + float dy = Math.abs(y - mY); + if (dx >= 3 || dy >= 3) { + path.quadTo(mX, mY, (x + mX)/2, (y + mY)/2); + mX = x; + mY = y; + } + } + } + + canvas.drawPath(path, paint); + } + + /** + * convert the gesture to a Path + * @param width the width of the bounding box of the target path + * @param height the height of the bounding box of the target path + * @param numSample the num of points needed + * @return the path + */ + public Path toPath(float width, float height, int numSample) { + float[] pts = RecognitionUtil.resample(this, numSample); + RectF rect = this.getBBX(); + float scale = height / rect.height(); + Matrix matrix = new Matrix(); + matrix.setTranslate(-rect.left, -rect.top); + Matrix scalem = new Matrix(); + scalem.setScale(scale, scale); + matrix.postConcat(scalem); + Matrix translate = new Matrix(); + matrix.postConcat(translate); + matrix.mapPoints(pts); + + Path path = null; + float mX = 0, mY = 0; + for (int i=0; i<pts.length-1; i+=2) { + float x = pts[i]; + float y = pts[i+1]; + if (path == null) { + path = new Path(); + path.moveTo(x, y); + mX = x; + mY = y; + } else { + float dx = Math.abs(x - mX); + float dy = Math.abs(y - mY); + if (dx >= 3 || dy >= 3) { + path.quadTo(mX, mY, (x + mX)/2, (y + mY)/2); + mX = x; + mY = y; + } + } + } + return path; + } + + /** + * get a bitmap thumbnail of the gesture with a transparent background + * @param w + * @param h + * @param edge + * @param numSample + * @param foreground + * @return + */ + public Bitmap toBitmap(int w, int h, + int edge, int numSample) { + RectF bbx = this.getBBX(); + Bitmap bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); + Path path = this.toPath(w - 2 * edge, h - 2 * edge, numSample); + Canvas c = new Canvas(bitmap); + //c.drawColor(background); + c.translate(edge, edge); + Paint paint = new Paint(); + paint.setAntiAlias(true); + paint.setDither(true); + paint.setColor(mColor); + paint.setStyle(Paint.Style.STROKE); + paint.setStrokeJoin(Paint.Join.ROUND); + paint.setStrokeCap(Paint.Cap.ROUND); + paint.setStrokeWidth(2); + c.drawPath(path, paint); + return bitmap; + } + + /** + * save the gesture as XML + * @param namespace + * @param serializer + * @throws IOException + */ + public void toXML(String namespace, XmlSerializer serializer) throws IOException { + serializer.startTag(namespace, "stroke"); + serializer.attribute(namespace, "timestamp", Long.toString(mTimestamp)); + serializer.attribute(namespace, "id", Long.toString(mID)); + serializer.attribute(namespace, "color", Integer.toString(mColor)); + serializer.attribute(namespace, "width", Float.toString(mWidth)); + Iterator it = this.mPtsBuffer.iterator(); + String pts = ""; + while (it.hasNext()) { + PointF fp = (PointF)it.next(); + if (pts.length() > 0) + pts += ","; + pts += fp.x + "," + fp.y; + } + serializer.text(pts); + serializer.endTag(namespace, "stroke"); + } + + + public void createFromString(String str) { + StringTokenizer st = new StringTokenizer(str, "#"); + + String para = st.nextToken(); + StringTokenizer innerst = new StringTokenizer(para, ","); + this.mBBX = new RectF(); + this.mBBX.left = Float.parseFloat(innerst.nextToken()); + this.mBBX.top = Float.parseFloat(innerst.nextToken()); + this.mBBX.right = Float.parseFloat(innerst.nextToken()); + this.mBBX.bottom = Float.parseFloat(innerst.nextToken()); + + para = st.nextToken(); + innerst = new StringTokenizer(para, ","); + while (innerst.hasMoreTokens()) { + String s = innerst.nextToken().trim(); + if (s.length()==0) + break; + float x = Float.parseFloat(s); + float y = Float.parseFloat(innerst.nextToken()); + this.mPtsBuffer.add(new PointF(x, y)); + } + + para = st.nextToken(); + this.mColor = Integer.parseInt(para); + + para = st.nextToken(); + this.mWidth = Float.parseFloat(para); + + para = st.nextToken(); + this.mLength = Float.parseFloat(para); + + para = st.nextToken(); + this.mTimestamp = Long.parseLong(para); + } + + @Override + public String toString() { + String str = ""; + + str += "#" + this.mBBX.left + "," + this.mBBX.top + "," + + this.mBBX.right + "," + this.mBBX.bottom; + + str += "#"; + Iterator<PointF> it = this.mPtsBuffer.iterator(); + while (it.hasNext()) { + PointF fp = it.next(); + str += fp.x + "," + fp.y + ","; + } + + str += "#"; + str += this.mColor; + + str += "#"; + str += this.mWidth; + + str += "#"; + str += this.mLength; + + str += "#"; + str += this.mTimestamp; + + return str; + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public Gesture createFromParcel(Parcel in) { + String str = in.readString(); + Gesture stk = new Gesture(); + stk.createFromString(str); + return stk; + } + + public Gesture[] newArray(int size) { + return new Gesture[size]; + } + }; + + public static Gesture buildFromArray(byte[] bytes) { + String str = new String(bytes); + Gesture stk = new Gesture(); + stk.createFromString(str); + return stk; + } + + public static byte[] saveToArray(Gesture stk) { + String str = stk.toString(); + return str.getBytes(); + } + + public void writeToParcel(Parcel out, int flags) { + out.writeString(this.toString()); + } + + public int describeContents() { + return CONTENTS_FILE_DESCRIPTOR; + } +} diff --git a/tests/sketch/src/com/android/gesture/GestureLib.java b/tests/sketch/src/com/android/gesture/GestureLib.java new file mode 100755 index 0000000..d0a25f2 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/GestureLib.java @@ -0,0 +1,280 @@ +/* + * Copyright (C) 2008-2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture; + +import android.util.Log; +import android.util.Xml; +import android.util.Xml.Encoding; + +import com.android.gesture.recognizer.Classifier; +import com.android.gesture.recognizer.Instance; +import com.android.gesture.recognizer.NearestNeighbor; +import com.android.gesture.recognizer.Prediction; + +import org.xml.sax.Attributes; +import org.xml.sax.ContentHandler; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; +import org.xmlpull.v1.XmlSerializer; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Set; +import java.util.StringTokenizer; + +public class GestureLib { + + private static final String LOGTAG = "GestureLib"; + private static String namespace = "ink"; + private final String datapath; + private HashMap<String, ArrayList<Gesture>> name2gestures = + new HashMap<String, ArrayList<Gesture>>(); + private Classifier mClassifier; + + public GestureLib(String path) { + datapath = path; + mClassifier = new NearestNeighbor(); + } + + public Classifier getClassifier() { + return mClassifier; + } + + /** + * get all the labels in the library + * @return a set of strings + */ + public Set<String> getLabels() { + return name2gestures.keySet(); + } + + public ArrayList<Prediction> recognize(Gesture gesture) { + Instance instance = Instance.createInstance(gesture, null); + return mClassifier.classify(instance); + } + + public void addGesture(String name, Gesture gesture) { + Log.v(LOGTAG, "add an example for gesture: " + name); + ArrayList<Gesture> gestures = name2gestures.get(name); + if (gestures == null) { + gestures = new ArrayList<Gesture>(); + name2gestures.put(name, gestures); + } + gestures.add(gesture); + mClassifier.addInstance( + Instance.createInstance(gesture, name)); + } + + public void removeGesture(String name, Gesture gesture) { + ArrayList<Gesture> gestures = name2gestures.get(name); + if (gestures == null) { + return; + } + + gestures.remove(gesture); + + // if there are no more samples, remove the entry automatically + if (gestures.isEmpty()) { + name2gestures.remove(name); + } + + mClassifier.removeInstance(gesture.getID()); + } + + public ArrayList<Gesture> getGestures(String label) { + ArrayList<Gesture> gestures = name2gestures.get(label); + if (gestures != null) + return (ArrayList<Gesture>)gestures.clone(); + else + return null; + } + + public void load() { + String filename = datapath + + File.separator + "gestures.xml"; + File f = new File(filename); + if (f.exists()) { + try { + loadInk(filename, null); + } + catch (SAXException ex) { + ex.printStackTrace(); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + } + + public void save() { + try { + compactSave(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private void compactSave() throws IOException { + File f = new File(datapath); + if (f.exists() == false) { + f.mkdirs(); + } + String filename = datapath + File.separator + "gestures.xml"; + Log.v(LOGTAG, "save to " + filename); + BufferedOutputStream fos = new BufferedOutputStream( + new FileOutputStream(filename)); + + PrintWriter writer = new PrintWriter(fos); + XmlSerializer serializer = Xml.newSerializer(); + serializer.setOutput(writer); + serializer.startDocument(Encoding.ISO_8859_1.name(), null); + serializer.startTag(namespace, "gestures"); + Iterator<String> it = name2gestures.keySet().iterator(); + while (it.hasNext()) { + String key = it.next(); + ArrayList<Gesture> gestures = name2gestures.get(key); + saveGestures(serializer, key, gestures); + } + + serializer.endTag(namespace, "gestures"); + serializer.endDocument(); + serializer.flush(); + writer.close(); + fos.close(); + } + + private static void saveGestures(XmlSerializer serializer, + String name, ArrayList<Gesture> strokes) throws IOException { + serializer.startTag(namespace, "gesture"); + serializer.startTag(namespace, "name"); + serializer.text(name); + serializer.endTag(namespace, "name"); + Iterator<Gesture> it = strokes.iterator(); + while (it.hasNext()) { + Gesture stk = it.next(); + stk.toXML(namespace, serializer); + } + serializer.endTag(namespace, "gesture"); + } + + private void loadInk(String filename, String label) throws SAXException, IOException { + Log.v(LOGTAG, "load from " + filename); + BufferedInputStream in = new BufferedInputStream( + new FileInputStream(filename)); + Xml.parse(in, Encoding.ISO_8859_1, new CompactInkHandler()); + in.close(); + } + + class CompactInkHandler implements ContentHandler { + + Gesture currentGesture = null; + StringBuffer buffer = null; + String gestureName; + ArrayList<Gesture> gestures; + + CompactInkHandler() { + } + + // Receive notification of character data. + public void characters(char[] ch, int start, int length) { + buffer.append(ch, start, length); + } + + //Receive notification of the end of a document. + public void endDocument() { + } + + // Receive notification of the end of an element. + public void endElement(String uri, String localName, String qName) { + if (localName.equals("gesture")) { + name2gestures.put(gestureName, gestures); + gestures = null; + } else if (localName.equals("name")) { + gestureName = buffer.toString(); + } else if (localName.equals("stroke")) { + StringTokenizer tokenizer = new StringTokenizer(buffer.toString(), ","); + while (tokenizer.hasMoreTokens()) { + String str = tokenizer.nextToken(); + float x = Float.parseFloat(str); + str = tokenizer.nextToken(); + float y = Float.parseFloat(str); + try + { + currentGesture.addPoint(x, y); + } + catch(Exception ex) { + ex.printStackTrace(); + } + } + gestures.add(currentGesture); + mClassifier.addInstance( + Instance.createInstance(currentGesture, gestureName)); + currentGesture = null; + } + } + + // End the scope of a prefix-URI mapping. + public void endPrefixMapping(String prefix) { + } + + //Receive notification of ignorable whitespace in element content. + public void ignorableWhitespace(char[] ch, int start, int length) { + } + + //Receive notification of a processing instruction. + public void processingInstruction(String target, String data) { + } + + // Receive an object for locating the origin of SAX document events. + public void setDocumentLocator(Locator locator) { + } + + // Receive notification of a skipped entity. + public void skippedEntity(String name) { + } + + // Receive notification of the beginning of a document. + public void startDocument() { + } + + // Receive notification of the beginning of an element. + public void startElement(String uri, String localName, String qName, Attributes atts) { + if (localName.equals("gesture")) { + gestures = new ArrayList<Gesture>(); + } else if (localName.equals("name")) { + buffer = new StringBuffer(); + } else if (localName.equals("stroke")) { + currentGesture = new Gesture(); + currentGesture.setTimestamp(Long.parseLong(atts.getValue(namespace, "timestamp"))); + currentGesture.setColor(Integer.parseInt(atts.getValue(namespace, "color"))); + currentGesture.setStrokeWidth(Float.parseFloat(atts.getValue(namespace, "width"))); + buffer = new StringBuffer(); + } + } + + public void startPrefixMapping(String prefix, String uri) { + } + } +} diff --git a/tests/sketch/src/com/android/gesture/GestureListener.java b/tests/sketch/src/com/android/gesture/GestureListener.java new file mode 100755 index 0000000..ebb4149 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/GestureListener.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2008-2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture; + +import android.view.MotionEvent; + +public interface GestureListener { + public void onStartGesture(GesturePad pad, MotionEvent event); + public void onGesture(GesturePad pad, MotionEvent event); + public void onFinishGesture(GesturePad pad, MotionEvent event); +} diff --git a/tests/sketch/src/com/android/gesture/GesturePad.java b/tests/sketch/src/com/android/gesture/GesturePad.java new file mode 100755 index 0000000..45a09e6 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/GesturePad.java @@ -0,0 +1,371 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture; + +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.graphics.Path; +import android.graphics.PointF; +import android.os.Handler; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import java.util.ArrayList; +import java.util.Iterator; + +/** + * A view for rendering and processing gestures + */ + +public class GesturePad extends View { + + public static final float TOUCH_TOLERANCE = 4; + public static final int default_foreground = Color.argb(255, 255, 255, 0); + private int background = Color.argb(0, 0, 0, 0); + private int foreground = default_foreground; + private int uncertain_foreground = Color.argb(55, 255, 255, 0); + private Bitmap mBitmap; + private Canvas mCanvas; + private Path mPath; + private Paint mBitmapPaint; + private Paint mPaint; + private Paint mDebugPaint; + private float mX, mY; + private boolean mEnableInput = true; + private boolean mEnableRendering = true; + private boolean mCacheGesture = true; + private Gesture mCurrentGesture = null; + ArrayList<GestureListener> mGestureListeners = new ArrayList<GestureListener>(); + + private boolean mShouldFadingOut = true; + private boolean mIsFadingOut = false; + private float mFadingAlpha = 1; + + private boolean reconstruct = false; + + private ArrayList<Path> debug = new ArrayList<Path>(); + private Handler mHandler = new Handler(); + + private Runnable mFadingOut = new Runnable() { + public void run() { + mFadingAlpha -= 0.03f; + if (mFadingAlpha <= 0) { + mIsFadingOut = false; + mPath.reset(); + } else { + mHandler.postDelayed(this, 100); + } + invalidate(); + } + }; + + public GesturePad(Context context) { + super(context); + init(); + } + + public GesturePad(Context context, AttributeSet attrs) { + super(context, attrs); + init(); + } + + public boolean isEnableRendering() { + return this.mEnableRendering; + } + + public Gesture getCurrentGesture() { + return mCurrentGesture; + } + + public Paint getPaint() { + return mPaint; + } + + public void setColor(int c) { + this.foreground = c; + } + + public void setFadingAlpha(float f) { + mFadingAlpha = f; + } + + public void setCurrentGesture(Gesture stk) { + this.mCurrentGesture = stk; + reconstruct = true; + } + + private void init() { + mDebugPaint = new Paint(); + mDebugPaint.setColor(Color.WHITE); + mDebugPaint.setStrokeWidth(4); + mDebugPaint.setAntiAlias(true); + mDebugPaint.setStyle(Paint.Style.STROKE); + + mPaint = new Paint(); + mPaint.setAntiAlias(true); + mPaint.setDither(true); + mPaint.setColor(foreground); + mPaint.setStyle(Paint.Style.STROKE); + mPaint.setStrokeJoin(Paint.Join.ROUND); + mPaint.setStrokeCap(Paint.Cap.ROUND); + mPaint.setStrokeWidth(12); + + mBitmapPaint = new Paint(Paint.DITHER_FLAG); + mPath = new Path(); + + reconstruct = false; + } + + public void cacheGesture(boolean b) { + mCacheGesture = b; + } + + public void enableRendering(boolean b) { + mEnableRendering = b; + } + + + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + // TODO Auto-generated method stub + super.onSizeChanged(w, h, oldw, oldh); + + if (w <=0 || h <=0) + return; + + int width = w>oldw? w : oldw; + int height = h>oldh? h : oldh; + Bitmap newBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); + mCanvas = new Canvas(newBitmap); + + if (mBitmap != null) { + mCanvas.drawColor(background); + mCanvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint); + mCanvas.drawPath(mPath, mPaint); + } + + mBitmap = newBitmap; + } + + public void addGestureListener(GestureListener l) { + this.mGestureListeners.add(l); + } + + public void removeGestureListener(GestureListener l) { + this.mGestureListeners.remove(l); + } + + @Override + protected void onDraw(Canvas canvas) { + canvas.drawColor(background); + + if (mCacheGesture) + canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint); + + if (mIsFadingOut) { + int color = foreground; + int alpha = (int)(Color.alpha(color) * mFadingAlpha); + mPaint.setColor(Color.argb(alpha, + Color.red(color), + Color.green(color), + Color.blue(color))); + } else if (mEnableRendering == false) { + mPaint.setColor(uncertain_foreground); + } else { + mPaint.setColor(foreground); + } + + if (reconstruct) { + + if (this.mCurrentGesture != null) { + float xedge = 30; + float yedge = 30; + float w = this.getWidth() - 2 * xedge; + float h = this.getHeight() - 2 * yedge; + float sx = w / this.mCurrentGesture.getBBX().width(); + float sy = h / mCurrentGesture.getBBX().height(); + float scale = sx>sy?sy:sx; + convertFromStroke(mCurrentGesture); + Matrix matrix = new Matrix(); + matrix.preTranslate(-mCurrentGesture.getBBX().centerX(), -mCurrentGesture.getBBX().centerY()); + matrix.postScale(scale, scale); + matrix.postTranslate(this.getWidth()/2, this.getHeight()/2); + this.mPath.transform(matrix); + } else { + mPath.reset(); + } + + reconstruct = false; + } + + canvas.drawPath(mPath, mPaint); + + Iterator<Path> it = debug.iterator(); + while (it.hasNext()) { + Path path = it.next(); + canvas.drawPath(path, mDebugPaint); + } + } + + public void clearDebugPath() { + debug.clear(); + } + + public void addDebugPath(Path path) { + debug.add(path); + } + + public void addDebugPath(ArrayList<Path> paths) { + debug.addAll(paths); + } + + public void clear() { + mPath = new Path(); + this.mCurrentGesture = null; + mCanvas.drawColor(background); + this.invalidate(); + } + + private void convertFromStroke(Gesture stk) { + mPath = null; + Iterator it = stk.getPoints().iterator(); + while (it.hasNext()) { + PointF p = (PointF) it.next(); + if (mPath == null) { + mPath = new Path(); + mPath.moveTo(p.x, p.y); + mX = p.x; + mY = p.y; + } else { + float dx = Math.abs(p.x - mX); + float dy = Math.abs(p.y - mY); + if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) { + mPath.quadTo(mX, mY, (p.x + mX)/2, (p.y + mY)/2); + mX = p.x; + mY = p.y; + } + } + } + mPath.lineTo(mX, mY); + } + + public void setEnableInput(boolean b) { + mEnableInput = b; + } + + public boolean isEnableInput() { + return mEnableInput; + } + + @Override + public boolean onTouchEvent(MotionEvent event) { + + if(mEnableInput == false) + return true; + + switch (event.getAction()) { + case MotionEvent.ACTION_DOWN: + touch_start(event); + invalidate(); + break; + case MotionEvent.ACTION_MOVE: + touch_move(event); + invalidate(); + break; + case MotionEvent.ACTION_UP: + touch_up(event); + invalidate(); + break; + } + return true; + } + + private void touch_start(MotionEvent event) { + mIsFadingOut = false; + mHandler.removeCallbacks(mFadingOut); + + float x = event.getX(); + float y = event.getY(); + + mCurrentGesture = new Gesture(); + mCurrentGesture.addPoint(x, y); + + mPath.reset(); + mPath.moveTo(x, y); + mX = x; + mY = y; + + Iterator<GestureListener> it = mGestureListeners.iterator(); + while (it.hasNext()) { + it.next().onStartGesture(this, event); + } + } + + private void touch_move(MotionEvent event) { + float x = event.getX(); + float y = event.getY(); + + float dx = Math.abs(x - mX); + float dy = Math.abs(y - mY); + if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) { + mPath.quadTo(mX, mY, (x + mX)/2, (y + mY)/2); + mX = x; + mY = y; + } + + mCurrentGesture.addPoint(x, y); + + Iterator<GestureListener> it = mGestureListeners.iterator(); + while (it.hasNext()) { + it.next().onGesture(this, event); + } + } + + public void setFadingOut(boolean b) { + mShouldFadingOut = b; + mIsFadingOut = false; + } + + public boolean shouldFadingOut() { + return mShouldFadingOut; + } + + private void touch_up(MotionEvent event) { + mPath.lineTo(mX, mY); + + if (mCacheGesture) + mCanvas.drawPath(mPath, mPaint); + + // kill this so we don't double draw + if (shouldFadingOut()) { + mFadingAlpha = 1; + mIsFadingOut = true; + mHandler.removeCallbacks(mFadingOut); + mHandler.postDelayed(mFadingOut, 100); + } + + Iterator<GestureListener> it = mGestureListeners.iterator(); + while (it.hasNext()) { + it.next().onFinishGesture(this, event); + } + } + +} diff --git a/tests/sketch/src/com/android/gesture/example/GestureEntryDemo.java b/tests/sketch/src/com/android/gesture/example/GestureEntryDemo.java new file mode 100755 index 0000000..8fee21a --- /dev/null +++ b/tests/sketch/src/com/android/gesture/example/GestureEntryDemo.java @@ -0,0 +1,220 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture.example; + +import android.app.Activity; +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.MotionEvent; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.EditText; +import android.widget.Spinner; +import android.widget.AdapterView.OnItemSelectedListener; + +import com.android.gesture.Gesture; +import com.android.gesture.GestureLib; +import com.android.gesture.GestureListener; +import com.android.gesture.GesturePad; +import com.android.gesture.R; +import com.android.gesture.recognizer.Prediction; + +import java.util.ArrayList; + +/** + * The demo shows how to construct a gesture-based user interface on Android. + */ + +public class GestureEntryDemo extends Activity { + + private static final int DIALOG_NEW_ENTRY = 1; + private static final int NEW_ID = Menu.FIRST; + private static final int VIEW_ID = Menu.FIRST + 1; + + GesturePad mView; + Spinner mResult; + GestureLib mRecognizer; + boolean mChangedByRecognizer = false; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.demo); + + // init the recognizer + mRecognizer = new GestureLib("/sdcard/gestureentry"); + mRecognizer.load(); + + // create the spinner for showing the recognition results + // the spinner also allows a user to correct a prediction + mResult = (Spinner) findViewById(R.id.spinner); + mResult.setOnItemSelectedListener(new OnItemSelectedListener() { + + public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { + // TODO Auto-generated method stub + // correct the recognition result by adding the new example + if (mChangedByRecognizer == false) { + mRecognizer.addGesture(parent.getSelectedItem().toString(), + mView.getCurrentGesture()); + } else { + mChangedByRecognizer = false; + } + } + + public void onNothingSelected(AdapterView<?> parent) { + // TODO Auto-generated method stub + + } + + }); + + // create the area for drawing a gesture + mView = (GesturePad)this.findViewById(R.id.drawingpad); + mView.cacheGesture(false); + mView.setFadingOut(false); + mView.addGestureListener(new GestureListener() { + public void onFinishGesture(GesturePad patch, MotionEvent event) { + // TODO Auto-generated method stub + recognize(patch.getCurrentGesture()); + } + public void onGesture(GesturePad patch, MotionEvent event) { + // TODO Auto-generated method stub + + } + public void onStartGesture(GesturePad patch, MotionEvent event) { + // TODO Auto-generated method stub + + } + }); + + + if (savedInstanceState != null) { + mView.setCurrentGesture( + (Gesture)savedInstanceState.getParcelable("gesture")); + } + } + + @Override + protected Dialog onCreateDialog(int id) { + // create the dialog for adding a new entry + LayoutInflater factory = LayoutInflater.from(this); + final View textEntryView = + factory.inflate(R.layout.newgesture_dialog, null); + return new AlertDialog.Builder(GestureEntryDemo.this) + .setTitle(R.string.newgesture_text_entry) + .setView(textEntryView) + .setPositiveButton(R.string.newgesture_dialog_ok, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int whichButton) { + /* User clicked OK so do some stuff */ + EditText edittext = + (EditText)((AlertDialog)dialog).findViewById(R.id.gesturename_edit); + String text = edittext.getText().toString().trim(); + if (text.length() > 0) { + mRecognizer.addGesture(text, mView.getCurrentGesture()); + } + } + }) + .setNegativeButton(R.string.newgesture_dialog_cancel, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int whichButton) { + /* User clicked cancel so do some stuff */ + } + }) + .create(); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // TODO Auto-generated method stub + super.onCreateOptionsMenu(menu); + menu.add(0, NEW_ID, 0, R.string.newgesture) + .setShortcut('0', 'n') + .setIcon(android.R.drawable.ic_menu_add); + menu.add(0, VIEW_ID, 0, R.string.viewgesture) + .setShortcut('1', 'v') + .setIcon(android.R.drawable.ic_menu_view); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle all of the possible menu actions. + switch (item.getItemId()) { + case NEW_ID: + // if there has been a gesture on the canvas + if (mView.getCurrentGesture() != null) { + showDialog(DIALOG_NEW_ENTRY); + } + break; + + case VIEW_ID: + startActivityForResult( + new Intent(this, GestureLibViewer.class), VIEW_ID); + break; + } + + return super.onOptionsItemSelected(item); + } + + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + mRecognizer.load(); + mView.clear(); + } + + @Override + protected void onPause() { + // TODO Auto-generated method stub + super.onPause(); + mRecognizer.save(); + } + + + @Override + protected void onPrepareDialog(int id, Dialog dialog) { + // TODO Auto-generated method stub + super.onPrepareDialog(id, dialog); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + // TODO Auto-generated method stub + super.onSaveInstanceState(outState); + outState.putParcelable("gesture", mView.getCurrentGesture()); + mRecognizer.save(); + } + + public void recognize(Gesture ink) { + mChangedByRecognizer = true; + ArrayList<Prediction> predictions = mRecognizer.recognize(ink); + ArrayAdapter adapter = new ArrayAdapter(this, + android.R.layout.simple_spinner_item, predictions); + adapter.setDropDownViewResource( + android.R.layout.simple_spinner_dropdown_item); + mResult.setAdapter(adapter); + } + +} diff --git a/tests/sketch/src/com/android/gesture/example/GestureLibViewer.java b/tests/sketch/src/com/android/gesture/example/GestureLibViewer.java new file mode 100755 index 0000000..7ae7fc5 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/example/GestureLibViewer.java @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture.example; + +import android.app.Activity; +import android.graphics.Matrix; +import android.graphics.Path; +import android.os.Bundle; +import android.view.KeyEvent; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.Spinner; +import android.widget.AdapterView.OnItemSelectedListener; + +import com.android.gesture.Gesture; +import com.android.gesture.GestureLib; +import com.android.gesture.GesturePad; +import com.android.gesture.R; +import com.android.gesture.recognizer.Instance; + +import java.util.ArrayList; +import java.util.Collections; + +/** + * GestureLibViewer is for viewing existing gestures and + * removing unwanted gestures. + */ + +public class GestureLibViewer extends Activity { + + GesturePad mView; + Spinner mResult; + GestureLib mRecognizer; + ArrayList<Gesture> mSamples; + int mCurrentGestureIndex; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.gestureviewer); + + // create the area for drawing a glyph + mView = (GesturePad)this.findViewById(R.id.drawingpad); + mView.cacheGesture(false); + mView.setFadingOut(false); + mView.setEnableInput(false); + + // init the recognizer + mRecognizer = new GestureLib("/sdcard/gestureentry"); + mRecognizer.load(); + + mResult = (Spinner) findViewById(R.id.spinner); + ArrayList<String> list = new ArrayList<String>(); + list.addAll(mRecognizer.getLabels()); + Collections.sort(list); + ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, + android.R.layout.simple_spinner_item, + list); + adapter.setDropDownViewResource( + android.R.layout.simple_spinner_dropdown_item); + mResult.setAdapter(adapter); + mSamples = mRecognizer.getGestures(list.get(0)); + if (mSamples.isEmpty() == false) { + mCurrentGestureIndex = 0; + Gesture gesture = mSamples.get(mCurrentGestureIndex); + mView.setCurrentGesture(gesture); + mView.clearDebugPath(); + mView.addDebugPath( + toPath(mRecognizer.getClassifier().getInstance(gesture.getID()))); + } + + mResult.setOnItemSelectedListener(new OnItemSelectedListener() { + public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { + // TODO Auto-generated method stub + mSamples = mRecognizer.getGestures( + (String)mResult.getSelectedItem()); + if (mSamples.isEmpty() == false) { + mCurrentGestureIndex = 0; + Gesture gesture = mSamples.get(mCurrentGestureIndex); + mView.setCurrentGesture(gesture); + mView.clearDebugPath(); + mView.addDebugPath( + toPath(mRecognizer.getClassifier().getInstance(gesture.getID()))); + } + mView.invalidate(); + } + + public void onNothingSelected(AdapterView<?> parent) { + // TODO Auto-generated method stub + + } + + }); + + Button remove = (Button)this.findViewById(R.id.remove); + remove.setOnClickListener(new OnClickListener() { + public void onClick(View v) { + // TODO Auto-generated method stub + if (mSamples.isEmpty()) + return; + + String name = (String)mResult.getSelectedItem(); + Gesture gesture = mSamples.get(mCurrentGestureIndex); + mRecognizer.removeGesture(name, gesture); + + mSamples = mRecognizer.getGestures(name); + + if (mSamples == null) { + // delete the entire entry + mCurrentGestureIndex = 0; + ArrayList<String> list = new ArrayList<String>(); + list.addAll(mRecognizer.getLabels()); + Collections.sort(list); + ArrayAdapter<String> adapter = new ArrayAdapter<String>( + GestureLibViewer.this, + android.R.layout.simple_spinner_item, + list); + adapter.setDropDownViewResource( + android.R.layout.simple_spinner_dropdown_item); + mResult.setAdapter(adapter); + } else { + if (mCurrentGestureIndex > mSamples.size()-1) { + mCurrentGestureIndex--; + } + gesture = mSamples.get(mCurrentGestureIndex); + mView.setCurrentGesture(gesture); + mView.clearDebugPath(); + mView.addDebugPath( + toPath(mRecognizer.getClassifier().getInstance(gesture.getID()))); + mView.invalidate(); + } + } + }); + + Button next = (Button)this.findViewById(R.id.next); + next.setOnClickListener(new OnClickListener() { + public void onClick(View v) { + // TODO Auto-generated method stub + if (mCurrentGestureIndex >= mSamples.size()-1) + return; + + mCurrentGestureIndex++; + Gesture gesture = mSamples.get(mCurrentGestureIndex); + mView.setCurrentGesture(gesture); + mView.clearDebugPath(); + mView.addDebugPath( + toPath(mRecognizer.getClassifier().getInstance(gesture.getID()))); + mView.invalidate(); + } + }); + + Button previous = (Button)this.findViewById(R.id.previous); + previous.setOnClickListener(new OnClickListener() { + public void onClick(View v) { + // TODO Auto-generated method stub + if (mCurrentGestureIndex >= 1 && + mSamples.isEmpty() == false) { + mCurrentGestureIndex--; + Gesture gesture = mSamples.get(mCurrentGestureIndex); + mView.setCurrentGesture(gesture); + mView.clearDebugPath(); + mView.addDebugPath( + toPath(mRecognizer.getClassifier().getInstance(gesture.getID()))); + mView.invalidate(); + } + } + }); + } + + public static ArrayList<Path> toPath(Instance instance) { + ArrayList<Path> paths = new ArrayList(); + Path path = null; + float minx = 0, miny = 0; + float mX = 0, mY = 0; + for (int i=0; i<instance.vector.length; i+=2) { + float x = instance.vector[i]; + float y = instance.vector[i+1]; + if (x < minx) + minx = x; + if (y < miny) + miny = y; + if (path == null) { + path = new Path(); + path.moveTo(x, y); + mX = x; + mY = y; + } else { + float dx = Math.abs(x - mX); + float dy = Math.abs(y - mY); + if (dx >= 3 || dy >= 3) { + path.quadTo(mX, mY, (x + mX)/2, (y + mY)/2); + mX = x; + mY = y; + } + } + } + Matrix matrix = new Matrix(); + matrix.setTranslate(-minx + 10, -miny + 10); + path.transform(matrix); + paths.add(path); + + path = new Path(); + path.moveTo(instance.vector[0]-5, instance.vector[1]-5); + path.lineTo(instance.vector[0]-5, instance.vector[1]+5); + path.lineTo(instance.vector[0]+5, instance.vector[1]+5); + path.lineTo(instance.vector[0]+5, instance.vector[1]-5); + path.close(); + path.transform(matrix); + paths.add(path); + + return paths; + } + + @Override + public boolean onKeyUp(int keyCode, KeyEvent event) { + // TODO Auto-generated method stub + if (keyCode == KeyEvent.KEYCODE_BACK) { + mRecognizer.save(); + this.setResult(RESULT_OK); + finish(); + return true; + } + else + return false; + } + + @Override + protected void onPause() { + // TODO Auto-generated method stub + super.onPause(); + mRecognizer.save(); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + // TODO Auto-generated method stub + super.onSaveInstanceState(outState); + mRecognizer.save(); + } +} diff --git a/tests/sketch/src/com/android/gesture/recognizer/Classifier.java b/tests/sketch/src/com/android/gesture/recognizer/Classifier.java new file mode 100755 index 0000000..584e0a5 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/recognizer/Classifier.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture.recognizer; + +import java.util.ArrayList; +import java.util.HashMap; + +/** + * The abstract class of Classifier + */ +public abstract class Classifier { + + HashMap<Long, Instance> mInstances = new HashMap<Long, Instance>(); + + public void addInstance(Instance instance) { + mInstances.put(instance.id, instance); + } + + public Instance getInstance(long id) { + return mInstances.get(id); + } + + public void removeInstance(long id) { + mInstances.remove(id); + } + + public abstract ArrayList<Prediction> classify(Instance instance); +} diff --git a/tests/sketch/src/com/android/gesture/recognizer/Instance.java b/tests/sketch/src/com/android/gesture/recognizer/Instance.java new file mode 100755 index 0000000..2eaa1c2 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/recognizer/Instance.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.android.gesture.recognizer; + +import android.graphics.PointF; + +import com.android.gesture.Gesture; + +/** + * An instance represents a sample if the label is available or a query if + * the label is null. + */ +public class Instance { + + private final static float[] targetOrientations = { + 0, 45, 90, 135, 180, -0, -45, -90, -135, -180 + }; + + // the feature vector + public final float[] vector; + // the label can be null + public final String label; + // the length of the vector + public final float length; + // the id of the instance + public final long id; + + Instance(long d, float[] v, String l) { + id = d; + vector = v; + label = l; + float sum = 0; + for (int i = 0; i < vector.length; i++) { + sum += vector[i] * vector[i]; + } + length = (float)Math.sqrt(sum); + } + + public static Instance createInstance(Gesture gesture, String label) { + float[] pts = RecognitionUtil.resample(gesture, 64); + PointF center = RecognitionUtil.computeCentroid(pts); + float inductiveOrientation = (float)Math.atan2(pts[1] - center.y, + pts[0] - center.x); + inductiveOrientation *= 180 / Math.PI; + + float minDeviation = Float.MAX_VALUE; + for (int i=0; i<targetOrientations.length; i++) { + float delta = targetOrientations[i] - inductiveOrientation; + if (Math.abs(delta) < Math.abs(minDeviation)) { + minDeviation = delta; + } + } + + android.graphics.Matrix m = new android.graphics.Matrix(); + m.setTranslate(-center.x, -center.y); + android.graphics.Matrix rotation = new android.graphics.Matrix(); + rotation.setRotate(minDeviation); + m.postConcat(rotation); + m.mapPoints(pts); + + return new Instance(gesture.getID(), pts, label); + } +} diff --git a/tests/sketch/src/com/android/gesture/recognizer/NearestNeighbor.java b/tests/sketch/src/com/android/gesture/recognizer/NearestNeighbor.java new file mode 100755 index 0000000..cb8a9d3 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/recognizer/NearestNeighbor.java @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture.recognizer; + +import android.util.Log; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.TreeMap; + +public class NearestNeighbor extends Classifier { + + private static final String LOGTAG = "NearestNeighbor"; + private static final double variance = 0.25; // std = 0.5 + + public ArrayList<Prediction> classify(Instance instance) { + + ArrayList<Prediction> list = new ArrayList<Prediction>(); + Iterator<Instance> it = mInstances.values().iterator(); + Log.v(LOGTAG, mInstances.size() + " instances found"); + TreeMap<String, Double> label2score = new TreeMap<String, Double>(); + while (it.hasNext()) { + Instance sample = it.next(); + double dis = RecognitionUtil.cosineDistance(sample, instance); + double weight = Math.exp(-dis*dis/(2 * variance)); + Log.v(LOGTAG, sample.label + " = " + dis + " weight = " + weight); + Double score = label2score.get(sample.label); + if (score == null) { + score = weight; + } + else { + score += weight; + } + label2score.put(sample.label, score); + } + + double sum = 0; + Iterator it2 = label2score.keySet().iterator(); + while (it2.hasNext()) { + String name = (String)it2.next(); + double score = label2score.get(name); + sum += score; + list.add(new Prediction(name, score)); + } + + it2 = list.iterator(); + while (it2.hasNext()) { + Prediction name = (Prediction)it2.next(); + name.score /= sum; + } + + + Collections.sort(list, new Comparator<Prediction>() { + public int compare(Prediction object1, Prediction object2) { + // TODO Auto-generated method stub + double score1 = object1.score; + double score2 = object2.score; + if (score1 > score2) + return -1; + else if (score1 < score2) + return 1; + else + return 0; + } + }); + + it2 = list.iterator(); + while (it2.hasNext()) { + Prediction name = (Prediction)it2.next(); + Log.v(LOGTAG, "prediction [" + name.label + " = " + name.score + "]"); + } + + return list; + } +} diff --git a/tests/sketch/src/com/android/gesture/recognizer/Prediction.java b/tests/sketch/src/com/android/gesture/recognizer/Prediction.java new file mode 100755 index 0000000..c318754 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/recognizer/Prediction.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture.recognizer; + +/** + * + * A recognition result that includes the label and its score + */ +public class Prediction { + public final String label; + public double score; + + public Prediction(String l, double s) { + label = l; + score = s; + } + + @Override + public String toString() { + return label; + } +} diff --git a/tests/sketch/src/com/android/gesture/recognizer/RecognitionUtil.java b/tests/sketch/src/com/android/gesture/recognizer/RecognitionUtil.java new file mode 100755 index 0000000..9146b95 --- /dev/null +++ b/tests/sketch/src/com/android/gesture/recognizer/RecognitionUtil.java @@ -0,0 +1,190 @@ +/* + * Copyright (C) 2008-2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gesture.recognizer; + +import android.graphics.PointF; + +import com.android.gesture.Gesture; + +import java.util.Iterator; + +/** + * + * Utilities for recognition. + */ + +public class RecognitionUtil { + + /** + * Re-sample a list of points to a given number + * @param stk + * @param num + * @return + */ + public static float[] resample(Gesture gesture, int num) { + final float increment = gesture.getLength()/(num - 1); + float[] newstk = new float[num*2]; + float distanceSoFar = 0; + Iterator<PointF> it = gesture.getPoints().iterator(); + PointF lstPoint = it.next(); + int index = 0; + PointF currentPoint = null; + try + { + newstk[index] = lstPoint.x; + index++; + newstk[index] = lstPoint.y; + index++; + while (it.hasNext()) { + if (currentPoint == null) + currentPoint = it.next(); + float deltaX = currentPoint.x - lstPoint.x; + float deltaY = currentPoint.y - lstPoint.y; + float distance = (float)Math.sqrt(deltaX*deltaX+deltaY*deltaY); + if (distanceSoFar+distance >= increment) { + float ratio = (increment - distanceSoFar) / distance; + float nx = lstPoint.x + ratio * deltaX; + float ny = lstPoint.y + ratio * deltaY; + newstk[index] = nx; + index++; + newstk[index] = ny; + index++; + lstPoint = new PointF(nx, ny); + distanceSoFar = 0; + } + else { + lstPoint = currentPoint; + currentPoint = null; + distanceSoFar += distance; + } + } + } + catch(Exception ex) { + ex.printStackTrace(); + } + + for(int i = index; i < newstk.length -1; i+=2) { + newstk[i] = lstPoint.x; + newstk[i+1] = lstPoint.y; + } + return newstk; + } + + /** + * Calculate the centroid of a list of points + * @param points + * @return the centroid + */ + public static PointF computeCentroid(float[] points) { + float centerX = 0; + float centerY = 0; + for(int i=0; i<points.length; i++) + { + centerX += points[i]; + i++; + centerY += points[i]; + } + centerX = 2 * centerX/points.length; + centerY = 2 * centerY/points.length; + return new PointF(centerX, centerY); + } + + /** + * calculate the variance-covariance matrix, treat each point as a sample + * @param points + * @return + */ + public static double[][] computeCoVariance(float[] points) { + double[][] array = new double[2][2]; + array[0][0] = 0; + array[0][1] = 0; + array[1][0] = 0; + array[1][1] = 0; + for(int i=0; i<points.length; i++) + { + float x = points[i]; + i++; + float y = points[i]; + array[0][0] += x * x; + array[0][1] += x * y; + array[1][0] = array[0][1]; + array[1][1] += y * y; + } + array[0][0] /= (points.length/2); + array[0][1] /= (points.length/2); + array[1][0] /= (points.length/2); + array[1][1] /= (points.length/2); + + return array; + } + + + public static float computeTotalLength(float[] points) { + float sum = 0; + for (int i=0; i<points.length - 4; i+=2) { + float dx = points[i+2] - points[i]; + float dy = points[i+3] - points[i+1]; + sum += Math.sqrt(dx*dx + dy*dy); + } + return sum; + } + + public static double computeStraightness(float[] points) { + float totalLen = computeTotalLength(points); + float dx = points[2] - points[0]; + float dy = points[3] - points[1]; + return Math.sqrt(dx*dx + dy*dy) / totalLen; + } + + public static double computeStraightness(float[] points, float totalLen) { + float dx = points[2] - points[0]; + float dy = points[3] - points[1]; + return Math.sqrt(dx*dx + dy*dy) / totalLen; + } + + public static double averageEuclidDistance(float[] stk1, float[] stk2) { + double distance = 0; + for (int i = 0; i < stk1.length; i += 2) { + distance += PointF.length(stk1[i] - stk2[i], stk1[i+1] - stk2[i+1]); + } + return distance/stk1.length; + } + + public static double squaredEuclidDistance(float[] stk1, float[] stk2) { + double squaredDistance = 0; + for (int i = 0; i < stk1.length; i++) { + float difference = stk1[i] - stk2[i]; + squaredDistance += difference * difference; + } + return squaredDistance/stk1.length; + } + + /** + * Calculate the cosine distance between two instances + * @param in1 + * @param in2 + * @return the angle between 0 and Math.PI + */ + public static double cosineDistance(Instance in1, Instance in2) { + float sum = 0; + for (int i = 0; i < in1.vector.length; i++) { + sum += in1.vector[i] * in2.vector[i]; + } + return Math.acos(sum / (in1.length * in2.length)); + } + +} |