FileDocCategorySizeDatePackage
LoadAverageService.javaAPI DocAndroid 1.5 API10520Wed May 06 22:42:00 BST 2009com.android.server

LoadAverageService

public class LoadAverageService extends android.app.Service

Fields Summary
private android.view.View
mView
Constructors Summary
Methods Summary
public android.os.IBinderonBind(android.content.Intent intent)

        return null;
    
public voidonCreate()

        super.onCreate();
        mView = new LoadView(this);
        WindowManager.LayoutParams params = new WindowManager.LayoutParams(
            WindowManager.LayoutParams.WRAP_CONTENT,
            WindowManager.LayoutParams.WRAP_CONTENT,
            WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
            WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
            WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
            PixelFormat.TRANSLUCENT);
        params.gravity = Gravity.RIGHT | Gravity.TOP;
        params.setTitle("Load Average");
        WindowManagerImpl wm = (WindowManagerImpl)getSystemService(WINDOW_SERVICE);
        wm.addView(mView, params);
    
public voidonDestroy()

        super.onDestroy();
        ((WindowManagerImpl)getSystemService(WINDOW_SERVICE)).removeView(mView);
        mView = null;