Loading api/current.xml +304 −126 Original line number Diff line number Diff line Loading @@ -177,17 +177,6 @@ visibility="public" > </field> <field name="BIND_WALLPAPER" type="java.lang.String" transient="false" volatile="false" value=""android.permission.BIND_WALLPAPER"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="BLUETOOTH" type="java.lang.String" transient="false" Loading Loading @@ -3144,6 +3133,17 @@ visibility="public" > </field> <field name="dropDownHorizontalOffset" type="int" transient="false" volatile="false" value="16843436" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="dropDownItemStyle" type="int" transient="false" Loading Loading @@ -3177,6 +3177,17 @@ visibility="public" > </field> <field name="dropDownVerticalOffset" type="int" transient="false" volatile="false" value="16843437" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="dropDownWidth" type="int" transient="false" Loading Loading @@ -10934,6 +10945,17 @@ visibility="public" > </field> <field name="stat_notify_sdcard_prepare" type="int" transient="false" volatile="false" value="17301675" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="stat_notify_sdcard_usb" type="int" transient="false" Loading Loading @@ -17496,8 +17518,6 @@ </parameter> <parameter name="appSearchData" type="android.os.Bundle"> </parameter> <parameter name="globalSearch" type="boolean"> </parameter> </method> <method name="unregisterForContextMenu" return="void" Loading Loading @@ -24050,8 +24070,6 @@ </parameter> <parameter name="appSearchData" type="android.os.Bundle"> </parameter> <parameter name="globalSearch" type="boolean"> </parameter> </method> <field name="ACTION_KEY" type="java.lang.String" Loading Loading @@ -42778,25 +42796,6 @@ > </field> </class> <interface name="RegisteredServicesCacheListener" abstract="true" static="false" final="false" deprecated="not deprecated" visibility="public" > <method name="onRegisteredServicesCacheChanged" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> </interface> <class name="ResolveInfo" extends="java.lang.Object" abstract="false" Loading Loading @@ -63543,21 +63542,6 @@ visibility="public" > </method> <method name="setGammaForText" return="void" abstract="false" native="true" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="blackGamma" type="float"> </parameter> <parameter name="whiteGamma" type="float"> </parameter> </method> <field name="BOLD" type="int" transient="false" Loading Loading @@ -113197,37 +113181,6 @@ > </field> </interface> <class name="ContactsContract.CommonDataKinds.Birthday" extends="java.lang.Object" abstract="false" static="true" final="true" deprecated="not deprecated" visibility="public" > <field name="BIRTHDAY" type="java.lang.String" transient="false" volatile="false" value=""data1"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="CONTENT_ITEM_TYPE" type="java.lang.String" transient="false" volatile="false" value=""vnd.android.cursor.item/birthday"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ContactsContract.CommonDataKinds.Email" extends="java.lang.Object" abstract="false" Loading Loading @@ -113382,11 +113335,24 @@ deprecated="not deprecated" visibility="public" > <method name="getTypeResource" return="int" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="type" type="java.lang.Integer"> </parameter> </method> <field name="CONTENT_ITEM_TYPE" type="java.lang.String" transient="false" volatile="false" value=""vnd.android.cursor.item/event"" value=""vnd.android.cursor.item/contact_event"" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -113415,6 +113381,17 @@ visibility="public" > </field> <field name="TYPE_BIRTHDAY" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TYPE_OTHER" type="int" transient="false" Loading Loading @@ -115726,6 +115703,98 @@ > </constructor> </class> <class name="ContactsContract.QuickContact" extends="java.lang.Object" abstract="false" static="true" final="true" deprecated="not deprecated" visibility="public" > <constructor name="ContactsContract.QuickContact" type="android.provider.ContactsContract.QuickContact" static="false" final="false" deprecated="not deprecated" visibility="public" > </constructor> <method name="showQuickContact" return="void" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="target" type="android.view.View"> </parameter> <parameter name="lookupUri" type="android.net.Uri"> </parameter> <parameter name="mode" type="int"> </parameter> <parameter name="excludeMimes" type="java.lang.String[]"> </parameter> </method> <method name="showQuickContact" return="void" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="target" type="android.graphics.Rect"> </parameter> <parameter name="lookupUri" type="android.net.Uri"> </parameter> <parameter name="mode" type="int"> </parameter> <parameter name="excludeMimes" type="java.lang.String[]"> </parameter> </method> <field name="MODE_LARGE" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MODE_MEDIUM" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MODE_SMALL" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ContactsContract.RawContacts" extends="java.lang.Object" abstract="false" Loading Loading @@ -122075,37 +122144,6 @@ </implements> </interface> </package> <package name="android.service.wallpaper" > <class name="WallpaperSettingsActivity" extends="android.preference.PreferenceActivity" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <constructor name="WallpaperSettingsActivity" type="android.service.wallpaper.WallpaperSettingsActivity" static="false" final="false" deprecated="not deprecated" visibility="public" > </constructor> <field name="EXTRA_PREVIEW_MODE" type="java.lang.String" transient="false" volatile="false" value=""android.service.wallpaper.PREVIEW_MODE"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> </package> <package name="android.speech" > <class name="RecognizerIntent" Loading Loading @@ -155059,7 +155097,20 @@ visibility="public" > </method> <method name="setOnTop" <method name="setZOrderMediaOverlay" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="isMediaOverlay" type="boolean"> </parameter> </method> <method name="setZOrderOnTop" return="void" abstract="false" native="false" Loading Loading @@ -157224,19 +157275,6 @@ visibility="public" > </method> <method name="onCloseSystemDialogs" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="reason" type="java.lang.String"> </parameter> </method> <method name="onCreateContextMenu" return="void" abstract="false" Loading Loading @@ -186237,6 +186275,146 @@ </parameter> </method> </class> <class name="QuickContactBadge" extends="android.widget.ImageView" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <implements name="android.view.View.OnClickListener"> </implements> <constructor name="QuickContactBadge" type="android.widget.QuickContactBadge" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> </constructor> <constructor name="QuickContactBadge" type="android.widget.QuickContactBadge" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="attrs" type="android.util.AttributeSet"> </parameter> </constructor> <constructor name="QuickContactBadge" type="android.widget.QuickContactBadge" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="attrs" type="android.util.AttributeSet"> </parameter> <parameter name="defStyle" type="int"> </parameter> </constructor> <method name="assignContactFromEmail" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="emailAddress" type="java.lang.String"> </parameter> <parameter name="lazyLookup" type="boolean"> </parameter> </method> <method name="assignContactFromPhone" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="phoneNumber" type="java.lang.String"> </parameter> <parameter name="lazyLookup" type="boolean"> </parameter> </method> <method name="assignContactUri" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="contactUri" type="android.net.Uri"> </parameter> </method> <method name="onClick" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="v" type="android.view.View"> </parameter> </method> <method name="setExcludeMimes" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="excludeMimes" type="java.lang.String[]"> </parameter> </method> <method name="setMode" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="size" type="int"> </parameter> </method> <field name="mExcludeMimes" type="java.lang.String[]" transient="false" volatile="false" value="null" static="false" final="false" deprecated="not deprecated" visibility="protected" > </field> </class> <class name="RadioButton" extends="android.widget.CompoundButton" abstract="false" cmds/bootanimation/BootAnimation.cpp +231 −13 Original line number Diff line number Diff line Loading @@ -139,6 +139,62 @@ status_t BootAnimation::initTexture(Texture* texture, AssetManager& assets, return NO_ERROR; } status_t BootAnimation::initTexture(void* buffer, size_t len) { //StopWatch watch("blah"); SkBitmap bitmap; SkImageDecoder::DecodeMemory(buffer, len, &bitmap, SkBitmap::kRGB_565_Config, SkImageDecoder::kDecodePixels_Mode); // ensure we can call getPixels(). No need to call unlock, since the // bitmap will go out of scope when we return from this method. bitmap.lockPixels(); const int w = bitmap.width(); const int h = bitmap.height(); const void* p = bitmap.getPixels(); GLint crop[4] = { 0, h, w, -h }; int tw = 1 << (31 - __builtin_clz(w)); int th = 1 << (31 - __builtin_clz(h)); if (tw < w) tw <<= 1; if (th < h) th <<= 1; switch (bitmap.getConfig()) { case SkBitmap::kARGB_8888_Config: if (tw != w || th != h) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tw, th, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, p); } else { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tw, th, 0, GL_RGBA, GL_UNSIGNED_BYTE, p); } break; case SkBitmap::kRGB_565_Config: if (tw != w || th != h) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, tw, th, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 0); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, p); } else { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, tw, th, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, p); } break; default: break; } glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); return NO_ERROR; } status_t BootAnimation::readyToRun() { mAssets.addDefaultAssets(); Loading Loading @@ -187,16 +243,27 @@ status_t BootAnimation::readyToRun() { mFlingerSurfaceControl = control; mFlingerSurface = s; // initialize GL glShadeModel(GL_FLAT); glEnable(GL_TEXTURE_2D); glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); mAndroidAnimation = false; status_t err = mZip.open("/data/local/bootanimation.zip"); if (err != NO_ERROR) { err = mZip.open("/system/media/bootanimation.zip"); if (err != NO_ERROR) { mAndroidAnimation = true; } } return NO_ERROR; } bool BootAnimation::threadLoop() { bool r = android(); bool BootAnimation::threadLoop() { bool r; if (mAndroidAnimation) { r = android(); } else { r = movie(); } eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(mDisplay, mContext); eglDestroySurface(mDisplay, mSurface); Loading @@ -207,16 +274,21 @@ bool BootAnimation::threadLoop() { return r; } bool BootAnimation::android() { bool BootAnimation::android() { initTexture(&mAndroid[0], mAssets, "images/android-logo-mask.png"); initTexture(&mAndroid[1], mAssets, "images/android-logo-shine.png"); // clear screen glShadeModel(GL_FLAT); glDisable(GL_DITHER); glDisable(GL_SCISSOR_TEST); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(mDisplay, mSurface); glEnable(GL_TEXTURE_2D); glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); const GLint xc = (mWidth - mAndroid[0].w) / 2; const GLint yc = (mHeight - mAndroid[0].h) / 2; const Rect updateRect(xc, yc, xc + mAndroid[0].w, yc + mAndroid[0].h); Loading Loading @@ -267,6 +339,152 @@ bool BootAnimation::android() { return false; } bool BootAnimation::movie() { ZipFileRO& zip(mZip); size_t numEntries = zip.getNumEntries(); ZipEntryRO desc = zip.findEntryByName("desc.txt"); FileMap* descMap = zip.createEntryFileMap(desc); LOGE_IF(!descMap, "descMap is null"); if (!descMap) { return false; } String8 desString((char const*)descMap->getDataPtr(), descMap->getDataLength()); char const* s = desString.string(); Animation animation; // Parse the description file for (;;) { const char* endl = strstr(s, "\n"); if (!endl) break; String8 line(s, endl - s); const char* l = line.string(); int fps, width, height, count, pause; char path[256]; if (sscanf(l, "%d %d %d", &width, &height, &fps) == 3) { //LOGD("> w=%d, h=%d, fps=%d", fps, width, height); animation.width = width; animation.height = height; animation.fps = fps; } if (sscanf(l, "p %d %d %s", &count, &pause, path) == 3) { //LOGD("> count=%d, pause=%d, path=%s", count, pause, path); Animation::Part part; part.count = count; part.pause = pause; part.path = path; animation.parts.add(part); } s = ++endl; } // read all the data structures const size_t pcount = animation.parts.size(); for (size_t i=0 ; i<numEntries ; i++) { char name[256]; ZipEntryRO entry = zip.findEntryByIndex(i); if (zip.getEntryFileName(entry, name, 256) == 0) { const String8 entryName(name); const String8 path(entryName.getPathDir()); const String8 leaf(entryName.getPathLeaf()); if (leaf.size() > 0) { for (int j=0 ; j<pcount ; j++) { if (path == animation.parts[j].path) { int method; // supports only stored png files if (zip.getEntryInfo(entry, &method, 0, 0, 0, 0, 0)) { if (method == ZipFileRO::kCompressStored) { FileMap* map = zip.createEntryFileMap(entry); if (map) { Animation::Frame frame; frame.name = leaf; frame.map = map; Animation::Part& part(animation.parts.editItemAt(j)); part.frames.add(frame); } } } } } } } } // clear screen glShadeModel(GL_FLAT); glDisable(GL_DITHER); glDisable(GL_SCISSOR_TEST); glDisable(GL_BLEND); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(mDisplay, mSurface); glBindTexture(GL_TEXTURE_2D, 0); glEnable(GL_TEXTURE_2D); glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); const int xc = (mWidth - animation.width) / 2; const int yc = ((mHeight - animation.height) / 2); nsecs_t lastFrame = systemTime(); nsecs_t frameDuration = s2ns(1) / animation.fps; for (int i=0 ; i<pcount && !exitPending() ; i++) { const Animation::Part& part(animation.parts[i]); const size_t fcount = part.frames.size(); glBindTexture(GL_TEXTURE_2D, 0); for (int r=0 ; !part.count || r<part.count ; r++) { for (int j=0 ; j<fcount && !exitPending(); j++) { const Animation::Frame& frame(part.frames[j]); if (r > 0) { glBindTexture(GL_TEXTURE_2D, frame.tid); } else { if (part.count != 1) { glGenTextures(1, &frame.tid); glBindTexture(GL_TEXTURE_2D, frame.tid); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } initTexture( frame.map->getDataPtr(), frame.map->getDataLength()); } glDrawTexiOES(xc, yc, 0, animation.width, animation.height); eglSwapBuffers(mDisplay, mSurface); nsecs_t now = systemTime(); nsecs_t delay = frameDuration - (now - lastFrame); lastFrame = now; long wait = ns2us(frameDuration); if (wait > 0) usleep(wait); } usleep(part.pause * ns2us(frameDuration)); } // free the textures for this part if (part.count != 1) { for (int j=0 ; j<fcount ; j++) { const Animation::Frame& frame(part.frames[j]); glDeleteTextures(1, &frame.tid); } } } return false; } // --------------------------------------------------------------------------- } Loading cmds/bootanimation/BootAnimation.h +25 −0 Original line number Diff line number Diff line Loading @@ -57,8 +57,31 @@ private: GLuint name; }; struct Animation { struct Frame { String8 name; FileMap* map; mutable GLuint tid; bool operator < (const Frame& rhs) const { return name < rhs.name; } }; struct Part { int count; int pause; String8 path; SortedVector<Frame> frames; }; int fps; int width; int height; Vector<Part> parts; }; status_t initTexture(Texture* texture, AssetManager& asset, const char* name); status_t initTexture(void* buffer, size_t len); bool android(); bool movie(); sp<SurfaceComposerClient> mSession; AssetManager mAssets; Loading @@ -70,6 +93,8 @@ private: EGLDisplay mSurface; sp<SurfaceControl> mFlingerSurfaceControl; sp<Surface> mFlingerSurface; bool mAndroidAnimation; ZipFileRO mZip; }; // --------------------------------------------------------------------------- Loading core/java/android/app/Activity.java +2 −6 Original line number Diff line number Diff line Loading @@ -2619,14 +2619,10 @@ public class Activity extends ContextThemeWrapper * context here, in order to improve quality or specificity of its own * searches. This data will be returned with SEARCH intent(s). Null if * no extra data is required. * @param globalSearch If false, this will only launch the search that has been specifically * defined by the application (which is usually defined as a local search). If no default * search is defined in the current application or activity, no search will be launched. * If true, this will always launch a platform-global (e.g. web-based) search instead. */ public void triggerSearch(String query, Bundle appSearchData, boolean globalSearch) { public void triggerSearch(String query, Bundle appSearchData) { ensureSearchManager(); mSearchManager.triggerSearch(query, getComponentName(), appSearchData, globalSearch); mSearchManager.triggerSearch(query, getComponentName(), appSearchData); } /** Loading core/java/android/app/ActivityManagerNative.java +12 −2 Original line number Diff line number Diff line Loading @@ -315,8 +315,12 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM case ACTIVITY_IDLE_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder token = data.readStrongBinder(); Configuration config = null; if (data.readInt() != 0) { config = Configuration.CREATOR.createFromParcel(data); } if (token != null) { activityIdle(token); activityIdle(token, config); } reply.writeNoException(); return true; Loading Loading @@ -1397,12 +1401,18 @@ class ActivityManagerProxy implements IActivityManager data.recycle(); reply.recycle(); } public void activityIdle(IBinder token) throws RemoteException public void activityIdle(IBinder token, Configuration config) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); if (config != null) { data.writeInt(1); config.writeToParcel(data, 0); } else { data.writeInt(0); } mRemote.transact(ACTIVITY_IDLE_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY); reply.readException(); data.recycle(); Loading Loading
api/current.xml +304 −126 Original line number Diff line number Diff line Loading @@ -177,17 +177,6 @@ visibility="public" > </field> <field name="BIND_WALLPAPER" type="java.lang.String" transient="false" volatile="false" value=""android.permission.BIND_WALLPAPER"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="BLUETOOTH" type="java.lang.String" transient="false" Loading Loading @@ -3144,6 +3133,17 @@ visibility="public" > </field> <field name="dropDownHorizontalOffset" type="int" transient="false" volatile="false" value="16843436" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="dropDownItemStyle" type="int" transient="false" Loading Loading @@ -3177,6 +3177,17 @@ visibility="public" > </field> <field name="dropDownVerticalOffset" type="int" transient="false" volatile="false" value="16843437" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="dropDownWidth" type="int" transient="false" Loading Loading @@ -10934,6 +10945,17 @@ visibility="public" > </field> <field name="stat_notify_sdcard_prepare" type="int" transient="false" volatile="false" value="17301675" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="stat_notify_sdcard_usb" type="int" transient="false" Loading Loading @@ -17496,8 +17518,6 @@ </parameter> <parameter name="appSearchData" type="android.os.Bundle"> </parameter> <parameter name="globalSearch" type="boolean"> </parameter> </method> <method name="unregisterForContextMenu" return="void" Loading Loading @@ -24050,8 +24070,6 @@ </parameter> <parameter name="appSearchData" type="android.os.Bundle"> </parameter> <parameter name="globalSearch" type="boolean"> </parameter> </method> <field name="ACTION_KEY" type="java.lang.String" Loading Loading @@ -42778,25 +42796,6 @@ > </field> </class> <interface name="RegisteredServicesCacheListener" abstract="true" static="false" final="false" deprecated="not deprecated" visibility="public" > <method name="onRegisteredServicesCacheChanged" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> </interface> <class name="ResolveInfo" extends="java.lang.Object" abstract="false" Loading Loading @@ -63543,21 +63542,6 @@ visibility="public" > </method> <method name="setGammaForText" return="void" abstract="false" native="true" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="blackGamma" type="float"> </parameter> <parameter name="whiteGamma" type="float"> </parameter> </method> <field name="BOLD" type="int" transient="false" Loading Loading @@ -113197,37 +113181,6 @@ > </field> </interface> <class name="ContactsContract.CommonDataKinds.Birthday" extends="java.lang.Object" abstract="false" static="true" final="true" deprecated="not deprecated" visibility="public" > <field name="BIRTHDAY" type="java.lang.String" transient="false" volatile="false" value=""data1"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="CONTENT_ITEM_TYPE" type="java.lang.String" transient="false" volatile="false" value=""vnd.android.cursor.item/birthday"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ContactsContract.CommonDataKinds.Email" extends="java.lang.Object" abstract="false" Loading Loading @@ -113382,11 +113335,24 @@ deprecated="not deprecated" visibility="public" > <method name="getTypeResource" return="int" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="type" type="java.lang.Integer"> </parameter> </method> <field name="CONTENT_ITEM_TYPE" type="java.lang.String" transient="false" volatile="false" value=""vnd.android.cursor.item/event"" value=""vnd.android.cursor.item/contact_event"" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -113415,6 +113381,17 @@ visibility="public" > </field> <field name="TYPE_BIRTHDAY" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TYPE_OTHER" type="int" transient="false" Loading Loading @@ -115726,6 +115703,98 @@ > </constructor> </class> <class name="ContactsContract.QuickContact" extends="java.lang.Object" abstract="false" static="true" final="true" deprecated="not deprecated" visibility="public" > <constructor name="ContactsContract.QuickContact" type="android.provider.ContactsContract.QuickContact" static="false" final="false" deprecated="not deprecated" visibility="public" > </constructor> <method name="showQuickContact" return="void" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="target" type="android.view.View"> </parameter> <parameter name="lookupUri" type="android.net.Uri"> </parameter> <parameter name="mode" type="int"> </parameter> <parameter name="excludeMimes" type="java.lang.String[]"> </parameter> </method> <method name="showQuickContact" return="void" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="target" type="android.graphics.Rect"> </parameter> <parameter name="lookupUri" type="android.net.Uri"> </parameter> <parameter name="mode" type="int"> </parameter> <parameter name="excludeMimes" type="java.lang.String[]"> </parameter> </method> <field name="MODE_LARGE" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MODE_MEDIUM" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MODE_SMALL" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ContactsContract.RawContacts" extends="java.lang.Object" abstract="false" Loading Loading @@ -122075,37 +122144,6 @@ </implements> </interface> </package> <package name="android.service.wallpaper" > <class name="WallpaperSettingsActivity" extends="android.preference.PreferenceActivity" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <constructor name="WallpaperSettingsActivity" type="android.service.wallpaper.WallpaperSettingsActivity" static="false" final="false" deprecated="not deprecated" visibility="public" > </constructor> <field name="EXTRA_PREVIEW_MODE" type="java.lang.String" transient="false" volatile="false" value=""android.service.wallpaper.PREVIEW_MODE"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> </package> <package name="android.speech" > <class name="RecognizerIntent" Loading Loading @@ -155059,7 +155097,20 @@ visibility="public" > </method> <method name="setOnTop" <method name="setZOrderMediaOverlay" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="isMediaOverlay" type="boolean"> </parameter> </method> <method name="setZOrderOnTop" return="void" abstract="false" native="false" Loading Loading @@ -157224,19 +157275,6 @@ visibility="public" > </method> <method name="onCloseSystemDialogs" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="reason" type="java.lang.String"> </parameter> </method> <method name="onCreateContextMenu" return="void" abstract="false" Loading Loading @@ -186237,6 +186275,146 @@ </parameter> </method> </class> <class name="QuickContactBadge" extends="android.widget.ImageView" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <implements name="android.view.View.OnClickListener"> </implements> <constructor name="QuickContactBadge" type="android.widget.QuickContactBadge" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> </constructor> <constructor name="QuickContactBadge" type="android.widget.QuickContactBadge" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="attrs" type="android.util.AttributeSet"> </parameter> </constructor> <constructor name="QuickContactBadge" type="android.widget.QuickContactBadge" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="attrs" type="android.util.AttributeSet"> </parameter> <parameter name="defStyle" type="int"> </parameter> </constructor> <method name="assignContactFromEmail" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="emailAddress" type="java.lang.String"> </parameter> <parameter name="lazyLookup" type="boolean"> </parameter> </method> <method name="assignContactFromPhone" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="phoneNumber" type="java.lang.String"> </parameter> <parameter name="lazyLookup" type="boolean"> </parameter> </method> <method name="assignContactUri" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="contactUri" type="android.net.Uri"> </parameter> </method> <method name="onClick" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="v" type="android.view.View"> </parameter> </method> <method name="setExcludeMimes" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="excludeMimes" type="java.lang.String[]"> </parameter> </method> <method name="setMode" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="size" type="int"> </parameter> </method> <field name="mExcludeMimes" type="java.lang.String[]" transient="false" volatile="false" value="null" static="false" final="false" deprecated="not deprecated" visibility="protected" > </field> </class> <class name="RadioButton" extends="android.widget.CompoundButton" abstract="false"
cmds/bootanimation/BootAnimation.cpp +231 −13 Original line number Diff line number Diff line Loading @@ -139,6 +139,62 @@ status_t BootAnimation::initTexture(Texture* texture, AssetManager& assets, return NO_ERROR; } status_t BootAnimation::initTexture(void* buffer, size_t len) { //StopWatch watch("blah"); SkBitmap bitmap; SkImageDecoder::DecodeMemory(buffer, len, &bitmap, SkBitmap::kRGB_565_Config, SkImageDecoder::kDecodePixels_Mode); // ensure we can call getPixels(). No need to call unlock, since the // bitmap will go out of scope when we return from this method. bitmap.lockPixels(); const int w = bitmap.width(); const int h = bitmap.height(); const void* p = bitmap.getPixels(); GLint crop[4] = { 0, h, w, -h }; int tw = 1 << (31 - __builtin_clz(w)); int th = 1 << (31 - __builtin_clz(h)); if (tw < w) tw <<= 1; if (th < h) th <<= 1; switch (bitmap.getConfig()) { case SkBitmap::kARGB_8888_Config: if (tw != w || th != h) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tw, th, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, p); } else { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tw, th, 0, GL_RGBA, GL_UNSIGNED_BYTE, p); } break; case SkBitmap::kRGB_565_Config: if (tw != w || th != h) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, tw, th, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 0); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, p); } else { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, tw, th, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, p); } break; default: break; } glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); return NO_ERROR; } status_t BootAnimation::readyToRun() { mAssets.addDefaultAssets(); Loading Loading @@ -187,16 +243,27 @@ status_t BootAnimation::readyToRun() { mFlingerSurfaceControl = control; mFlingerSurface = s; // initialize GL glShadeModel(GL_FLAT); glEnable(GL_TEXTURE_2D); glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); mAndroidAnimation = false; status_t err = mZip.open("/data/local/bootanimation.zip"); if (err != NO_ERROR) { err = mZip.open("/system/media/bootanimation.zip"); if (err != NO_ERROR) { mAndroidAnimation = true; } } return NO_ERROR; } bool BootAnimation::threadLoop() { bool r = android(); bool BootAnimation::threadLoop() { bool r; if (mAndroidAnimation) { r = android(); } else { r = movie(); } eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(mDisplay, mContext); eglDestroySurface(mDisplay, mSurface); Loading @@ -207,16 +274,21 @@ bool BootAnimation::threadLoop() { return r; } bool BootAnimation::android() { bool BootAnimation::android() { initTexture(&mAndroid[0], mAssets, "images/android-logo-mask.png"); initTexture(&mAndroid[1], mAssets, "images/android-logo-shine.png"); // clear screen glShadeModel(GL_FLAT); glDisable(GL_DITHER); glDisable(GL_SCISSOR_TEST); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(mDisplay, mSurface); glEnable(GL_TEXTURE_2D); glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); const GLint xc = (mWidth - mAndroid[0].w) / 2; const GLint yc = (mHeight - mAndroid[0].h) / 2; const Rect updateRect(xc, yc, xc + mAndroid[0].w, yc + mAndroid[0].h); Loading Loading @@ -267,6 +339,152 @@ bool BootAnimation::android() { return false; } bool BootAnimation::movie() { ZipFileRO& zip(mZip); size_t numEntries = zip.getNumEntries(); ZipEntryRO desc = zip.findEntryByName("desc.txt"); FileMap* descMap = zip.createEntryFileMap(desc); LOGE_IF(!descMap, "descMap is null"); if (!descMap) { return false; } String8 desString((char const*)descMap->getDataPtr(), descMap->getDataLength()); char const* s = desString.string(); Animation animation; // Parse the description file for (;;) { const char* endl = strstr(s, "\n"); if (!endl) break; String8 line(s, endl - s); const char* l = line.string(); int fps, width, height, count, pause; char path[256]; if (sscanf(l, "%d %d %d", &width, &height, &fps) == 3) { //LOGD("> w=%d, h=%d, fps=%d", fps, width, height); animation.width = width; animation.height = height; animation.fps = fps; } if (sscanf(l, "p %d %d %s", &count, &pause, path) == 3) { //LOGD("> count=%d, pause=%d, path=%s", count, pause, path); Animation::Part part; part.count = count; part.pause = pause; part.path = path; animation.parts.add(part); } s = ++endl; } // read all the data structures const size_t pcount = animation.parts.size(); for (size_t i=0 ; i<numEntries ; i++) { char name[256]; ZipEntryRO entry = zip.findEntryByIndex(i); if (zip.getEntryFileName(entry, name, 256) == 0) { const String8 entryName(name); const String8 path(entryName.getPathDir()); const String8 leaf(entryName.getPathLeaf()); if (leaf.size() > 0) { for (int j=0 ; j<pcount ; j++) { if (path == animation.parts[j].path) { int method; // supports only stored png files if (zip.getEntryInfo(entry, &method, 0, 0, 0, 0, 0)) { if (method == ZipFileRO::kCompressStored) { FileMap* map = zip.createEntryFileMap(entry); if (map) { Animation::Frame frame; frame.name = leaf; frame.map = map; Animation::Part& part(animation.parts.editItemAt(j)); part.frames.add(frame); } } } } } } } } // clear screen glShadeModel(GL_FLAT); glDisable(GL_DITHER); glDisable(GL_SCISSOR_TEST); glDisable(GL_BLEND); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(mDisplay, mSurface); glBindTexture(GL_TEXTURE_2D, 0); glEnable(GL_TEXTURE_2D); glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); const int xc = (mWidth - animation.width) / 2; const int yc = ((mHeight - animation.height) / 2); nsecs_t lastFrame = systemTime(); nsecs_t frameDuration = s2ns(1) / animation.fps; for (int i=0 ; i<pcount && !exitPending() ; i++) { const Animation::Part& part(animation.parts[i]); const size_t fcount = part.frames.size(); glBindTexture(GL_TEXTURE_2D, 0); for (int r=0 ; !part.count || r<part.count ; r++) { for (int j=0 ; j<fcount && !exitPending(); j++) { const Animation::Frame& frame(part.frames[j]); if (r > 0) { glBindTexture(GL_TEXTURE_2D, frame.tid); } else { if (part.count != 1) { glGenTextures(1, &frame.tid); glBindTexture(GL_TEXTURE_2D, frame.tid); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } initTexture( frame.map->getDataPtr(), frame.map->getDataLength()); } glDrawTexiOES(xc, yc, 0, animation.width, animation.height); eglSwapBuffers(mDisplay, mSurface); nsecs_t now = systemTime(); nsecs_t delay = frameDuration - (now - lastFrame); lastFrame = now; long wait = ns2us(frameDuration); if (wait > 0) usleep(wait); } usleep(part.pause * ns2us(frameDuration)); } // free the textures for this part if (part.count != 1) { for (int j=0 ; j<fcount ; j++) { const Animation::Frame& frame(part.frames[j]); glDeleteTextures(1, &frame.tid); } } } return false; } // --------------------------------------------------------------------------- } Loading
cmds/bootanimation/BootAnimation.h +25 −0 Original line number Diff line number Diff line Loading @@ -57,8 +57,31 @@ private: GLuint name; }; struct Animation { struct Frame { String8 name; FileMap* map; mutable GLuint tid; bool operator < (const Frame& rhs) const { return name < rhs.name; } }; struct Part { int count; int pause; String8 path; SortedVector<Frame> frames; }; int fps; int width; int height; Vector<Part> parts; }; status_t initTexture(Texture* texture, AssetManager& asset, const char* name); status_t initTexture(void* buffer, size_t len); bool android(); bool movie(); sp<SurfaceComposerClient> mSession; AssetManager mAssets; Loading @@ -70,6 +93,8 @@ private: EGLDisplay mSurface; sp<SurfaceControl> mFlingerSurfaceControl; sp<Surface> mFlingerSurface; bool mAndroidAnimation; ZipFileRO mZip; }; // --------------------------------------------------------------------------- Loading
core/java/android/app/Activity.java +2 −6 Original line number Diff line number Diff line Loading @@ -2619,14 +2619,10 @@ public class Activity extends ContextThemeWrapper * context here, in order to improve quality or specificity of its own * searches. This data will be returned with SEARCH intent(s). Null if * no extra data is required. * @param globalSearch If false, this will only launch the search that has been specifically * defined by the application (which is usually defined as a local search). If no default * search is defined in the current application or activity, no search will be launched. * If true, this will always launch a platform-global (e.g. web-based) search instead. */ public void triggerSearch(String query, Bundle appSearchData, boolean globalSearch) { public void triggerSearch(String query, Bundle appSearchData) { ensureSearchManager(); mSearchManager.triggerSearch(query, getComponentName(), appSearchData, globalSearch); mSearchManager.triggerSearch(query, getComponentName(), appSearchData); } /** Loading
core/java/android/app/ActivityManagerNative.java +12 −2 Original line number Diff line number Diff line Loading @@ -315,8 +315,12 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM case ACTIVITY_IDLE_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder token = data.readStrongBinder(); Configuration config = null; if (data.readInt() != 0) { config = Configuration.CREATOR.createFromParcel(data); } if (token != null) { activityIdle(token); activityIdle(token, config); } reply.writeNoException(); return true; Loading Loading @@ -1397,12 +1401,18 @@ class ActivityManagerProxy implements IActivityManager data.recycle(); reply.recycle(); } public void activityIdle(IBinder token) throws RemoteException public void activityIdle(IBinder token, Configuration config) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); if (config != null) { data.writeInt(1); config.writeToParcel(data, 0); } else { data.writeInt(0); } mRemote.transact(ACTIVITY_IDLE_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY); reply.readException(); data.recycle(); Loading