danger.app
Class Bundle

java.lang.Object
  extended by danger.app.Bundle


public final class Bundle
extends Object


Field Summary
static int SPLASH_HEIGHT
           
static int SPLASH_WIDTH
           
 
Method Summary
static void checkForBundles()
          Used by the OS to load more bundles as needed.
 boolean containsApp(Application app)
          Discover if this Bundle corresponds to the provide Application object
static Bundle findByClassName(String name)
          Return a bundle that has a Class Name which matches the provided string, or null if no such Bundle exists.
static Bundle findByDisplayName(String name)
          Return a bundle that has a Display Name which matches the provided string, or null if no such Bundle exists.
static Bundle findByID(int id)
          Return the bundle that has the id which matches the given one, or null if there is no such bundle.
static Bundle findByName(String name)
          Return a bundle that has a name which matches the provided string, or null if no such Bundle exists.
 String getChooserCategory()
          Return the chooser category where the application *hopes* to be placed.
 String getClassName()
          Return the class name of the Application class that will be instantiated to launch the app
 void getComponentVersion(ComponentVersion cv)
          Fill out the Component Version info for this Bundle
 String getDisplayName()
          Return the application name suitable for display in the Launcher, and other human-readable places
 int getID()
          This identifier is used by some internal system code.
 ImmutableBitmap getLargeIcon()
          Return a 32x32 (hopefully) large icon bitmap
static Bundle[] getList()
          Return an array containing all Bundles in the system.
 ImmutableBitmap getMiniIcon()
          Return a icon that it at most 11x11 and suitable for the Quick Access window.
 String getName()
           
 Bitmap getPreviewScreen()
          Deprecated.  
 RecordingPen.Record getPreviewScreenRecord()
           
 ResourceDatabase getResources()
          Return the Resource Database
 int getSize()
          size in flashrom in bytes.
 ImmutableBitmap getSmallIcon()
          Return a 16x16 (hopefully) small icon bitmap
 String getVendor()
           
 boolean invisibleToUser()
          Return true if this app should be invisible to the user.
 boolean isDebuggingTool()
          Return true if this app is a debugging tool.
 boolean isDirty()
          Returns true if the DIRTY state is set -- indicates preview screen is due for redraw in Launcher
 boolean isMIDlet()
           
 boolean isRunning()
          Return true if the application associated with this bundle is actually running.
 boolean launchOnBoot()
          Return true if this app should start on system boot
 void quitApp()
          Send a QUIT request to the application (if it's started)
 void resume()
          Send a RESUME request to the application (if it's started)
 void sendNetworkEvent(Event e)
          Send a Network Event to the application (if it's started)
protected  void setChooserFolderLabel(CharSequence label)
           
 void setDirty()
          Set the DIRTY state -- should only be used by launcher
 void setDisplayName(String appName)
          Change the display name.
 void setShowInChooserMenu(boolean showInChooserMenu)
          Change the show in chooser menu flag.
 boolean showInChooserMenu()
          Return true if this app should be shown in the chooser menu
 boolean showInChooserRing()
          Return true if this app should be shown in the chooser ring
 void suspend()
          Send a SUSPEND request to the application (if it's started)
 void sysSendEvent(Event e)
          Send an Event to the application (if it's started)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPLASH_WIDTH

public static final int SPLASH_WIDTH
See Also:
Constant Field Values

SPLASH_HEIGHT

public static final int SPLASH_HEIGHT
See Also:
Constant Field Values
Method Detail

getName

public String getName()

getVendor

public String getVendor()

getClassName

public String getClassName()
Return the class name of the Application class that will be instantiated to launch the app


getDisplayName

public String getDisplayName()
Return the application name suitable for display in the Launcher, and other human-readable places


setDisplayName

public void setDisplayName(String appName)
Change the display name.


getChooserCategory

public String getChooserCategory()
Return the chooser category where the application *hopes* to be placed. Lots of evil things can happen that will crush the this application writer's hope. Dont count on it.


launchOnBoot

public boolean launchOnBoot()
Return true if this app should start on system boot


showInChooserRing

public boolean showInChooserRing()
Return true if this app should be shown in the chooser ring


showInChooserMenu

public boolean showInChooserMenu()
Return true if this app should be shown in the chooser menu


setShowInChooserMenu

public void setShowInChooserMenu(boolean showInChooserMenu)
Change the show in chooser menu flag. Use to hide apps in the chooser menu dynamically.


invisibleToUser

public boolean invisibleToUser()
Return true if this app should be invisible to the user. That means NOT showing up in the Jump Shortcuts and system info.


isDebuggingTool

public boolean isDebuggingTool()
Return true if this app is a debugging tool.


getLargeIcon

public ImmutableBitmap getLargeIcon()
Return a 32x32 (hopefully) large icon bitmap


getSmallIcon

public ImmutableBitmap getSmallIcon()
Return a 16x16 (hopefully) small icon bitmap


getMiniIcon

public ImmutableBitmap getMiniIcon()
Return a icon that it at most 11x11 and suitable for the Quick Access window.


isMIDlet

public boolean isMIDlet()

isRunning

public boolean isRunning()
Return true if the application associated with this bundle is actually running.

Returns:
true if the app is running, false if not

sysSendEvent

public void sysSendEvent(Event e)
Send an Event to the application (if it's started)


sendNetworkEvent

public void sendNetworkEvent(Event e)
Send a Network Event to the application (if it's started)


suspend

public void suspend()
Send a SUSPEND request to the application (if it's started)


resume

public void resume()
Send a RESUME request to the application (if it's started)


quitApp

public void quitApp()
Send a QUIT request to the application (if it's started)


getPreviewScreen

public Bitmap getPreviewScreen()
Deprecated. 


setChooserFolderLabel

protected void setChooserFolderLabel(CharSequence label)

getPreviewScreenRecord

public RecordingPen.Record getPreviewScreenRecord()

containsApp

public boolean containsApp(Application app)
Discover if this Bundle corresponds to the provide Application object


isDirty

public boolean isDirty()
Returns true if the DIRTY state is set -- indicates preview screen is due for redraw in Launcher


setDirty

public void setDirty()
Set the DIRTY state -- should only be used by launcher


getResources

public ResourceDatabase getResources()
Return the Resource Database


getComponentVersion

public void getComponentVersion(ComponentVersion cv)
Fill out the Component Version info for this Bundle


checkForBundles

public static void checkForBundles()
Used by the OS to load more bundles as needed.


findByDisplayName

public static Bundle findByDisplayName(String name)
Return a bundle that has a Display Name which matches the provided string, or null if no such Bundle exists.


findByClassName

public static Bundle findByClassName(String name)
Return a bundle that has a Class Name which matches the provided string, or null if no such Bundle exists.


findByName

public static Bundle findByName(String name)
Return a bundle that has a name which matches the provided string, or null if no such Bundle exists.


findByID

public static Bundle findByID(int id)
Return the bundle that has the id which matches the given one, or null if there is no such bundle.

Parameters:
id - the id to look for
Returns:
null-ok; the corresponding bundle or null if there is none

getList

public static Bundle[] getList()
Return an array containing all Bundles in the system.


getID

public int getID()
This identifier is used by some internal system code. Do not count on it remaining constant or having any particular meaning


getSize

public int getSize()
size in flashrom in bytes. On the simulator it returns something random.