FileDocCategorySizeDatePackage
BrightnessLimit.javaAPI DocAndroid 1.5 API1883Wed May 06 22:42:02 BST 2009com.android.frameworktest.settings

BrightnessLimit

public class BrightnessLimit extends android.app.Activity implements android.view.View.OnClickListener
Tries to set the brightness to 0. Should be silently thwarted by the framework.

Fields Summary
Constructors Summary
Methods Summary
public voidonClick(android.view.View v)

        IHardwareService hardware = IHardwareService.Stub.asInterface(
                ServiceManager.getService("hardware"));
        if (hardware != null) {
            try {
                hardware.setBacklights(0);
            } catch (RemoteException darn) {
                
            }
        }
        Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 0);
    
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.brightness_limit);
        
        Button b = (Button) findViewById(R.id.go);
        b.setOnClickListener(this);