Code example for Binder

0
                        break fail; 
                    } 
                    IPowerManager pm
                            = IPowerManager.Stub.asInterface(ServiceManager.getService(Context.POWER_SERVICE));
                    try { 
                        IBinder lock = new Binder();
                        pm.acquireWakeLock(PowerManager.FULL_WAKE_LOCK, lock, "svc power", null);
                        pm.setStayOnSetting(val);
                        pm.releaseWakeLock(lock, 0);
                    } 
                    catch (RemoteException e) {
                        System.err.println("Faild to set setting: " + e);
                    } 
                    return; 
                } 
            } 
        } 
        System.err.println(longHelp());
    } 
}