danger.app
Class Bundle

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


public final class Bundle
extends Object

A Bundle contains information related to an application.


Field Summary
static int SPLASH_HEIGHT
          Deprecated. Use SplashScreen.getMaxHeight() instead.
static int SPLASH_WIDTH
          Deprecated. Use SplashScreen.getMaxWidth() instead.
 
Method Summary
static void checkForBundles()
          Deprecated. For internal use only.
 boolean containsApp(Application app)
          Determine if this Bundle corresponds to the provided 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)
          Deprecated. For internal use only.
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()
          Deprecated. For internal use only.
 ImmutableBitmap getLargeIcon()
          Return the large icon for the application associated with this bundle.
static int getLargeIconSize()
          Return the maximum size (in pixels) for the large application icon, which is used in the jump screen.
static Bundle[] getList()
          Return an array containing all Bundles in the system.
 ImmutableBitmap getMiniIcon()
          Return the mini icon for the application associated with this bundle.
static int getMiniIconSize()
          Return the maximum size (in pixels) for the mini icon, which is used in the Quick Jump window.
 String getName()
          Get the package name of the application associated with this bundle.
 Bitmap getPreviewScreen()
          Deprecated.  
 RecordingPen.Record getPreviewScreenRecord()
          Get a RecordingPen.Record which corresponds to the splash screen associated with this application bundle.
 ResourceDatabase getResources()
          Return the Resource Database
 int getSize()
          size in flashrom in bytes.
 ImmutableBitmap getSmallIcon()
          Return the small icon for the application associated with this bundle.
static int getSmallIconSize()
          Return the maximum size (in pixels) for the small application icon, which is used in the title bar.
 String getVendor()
          Get the vendor of the application associated with this bundle.
 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()
          Deprecated. For internal use only.
 boolean isMIDlet()
          Determine if this Bundle is associated with a MIDlet.
 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 resume()
          Deprecated. For internal use only.
 void sendNetworkEvent(Event e)
          Deprecated. For internal use only.
protected  void setChooserFolderLabel(CharSequence label)
          Deprecated. For internal use only.
 void setDirty()
          Deprecated. For internal use only.
 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()
          Deprecated. For internal use only.
 void sysSendEvent(Event e)
          Deprecated. For internal use only.
 
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
Deprecated. Use SplashScreen.getMaxWidth() instead.
See Also:
Constant Field Values

SPLASH_HEIGHT

public static final int SPLASH_HEIGHT
Deprecated. Use SplashScreen.getMaxHeight() instead.
See Also:
Constant Field Values
Method Detail

getName

public String getName()
Get the package name of the application associated with this bundle.


getVendor

public String getVendor()

Get the vendor of the application associated with this bundle.

This is the ID_APP_VENDOR string specified in the application's resource file.

Returns null if no vendor has been specified.


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.


getLargeIconSize

public static int getLargeIconSize()
Return the maximum size (in pixels) for the large application icon, which is used in the jump screen. The size refers to both width and height.

Since:
4.0

getSmallIconSize

public static int getSmallIconSize()
Return the maximum size (in pixels) for the small application icon, which is used in the title bar. The size refers to both width and height.

Since:
4.0

getMiniIconSize

public static int getMiniIconSize()
Return the maximum size (in pixels) for the mini icon, which is used in the Quick Jump window. The size refers to both width and height.

Since:
4.0

getLargeIcon

public ImmutableBitmap getLargeIcon()
Return the large icon for the application associated with this bundle. This is the application specified by the ID_LARGE_ICON bitmap in the application's resource file. See Application.setLargeIcon(danger.ui.Bitmap).


getSmallIcon

public ImmutableBitmap getSmallIcon()
Return the small icon for the application associated with this bundle. This is the application specified by the ID_SMALL_ICON bitmap in the application's resource file. See Application.setSmallIcon(danger.ui.Bitmap).


getMiniIcon

public ImmutableBitmap getMiniIcon()
Return the mini icon for the application associated with this bundle. This is the application specified by the ID_MINI_ICON bitmap in the application's resource file. See Application.setMiniIcon(danger.ui.Bitmap).


isMIDlet

public boolean isMIDlet()
Determine if this Bundle is associated with a MIDlet.


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)
Deprecated. For internal use only.


sendNetworkEvent

public void sendNetworkEvent(Event e)
Deprecated. For internal use only.


suspend

public void suspend()
Deprecated. For internal use only.


resume

public void resume()
Deprecated. For internal use only.


getPreviewScreen

public Bitmap getPreviewScreen()
Deprecated. 


setChooserFolderLabel

protected void setChooserFolderLabel(CharSequence label)
Deprecated. For internal use only.


getPreviewScreenRecord

public RecordingPen.Record getPreviewScreenRecord()
Get a RecordingPen.Record which corresponds to the splash screen associated with this application bundle.


containsApp

public boolean containsApp(Application app)
Determine if this Bundle corresponds to the provided Application object.


isDirty

public boolean isDirty()
Deprecated. For internal use only.


setDirty

public void setDirty()
Deprecated. For internal use only.


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()
Deprecated. For internal use only.


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)
Deprecated. For internal use only.


getList

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


getID

public int getID()
Deprecated. For internal use only.


getSize

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