FileDocCategorySizeDatePackage
LoadAverageService.javaAPI DocAndroid 5.1 API11404Thu Mar 12 22:22:42 GMT 2015com.android.systemui

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.MATCH_PARENT,
            WindowManager.LayoutParams.WRAP_CONTENT,
            WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY,
            WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
            WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
            PixelFormat.TRANSLUCENT);
        params.gravity = Gravity.END | Gravity.TOP;
        params.setTitle("Load Average");
        WindowManager wm = (WindowManager)getSystemService(WINDOW_SERVICE);
        wm.addView(mView, params);
    
public voidonDestroy()

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