mil.dod.th.ose.core.integration/src/mil/dod/th/ose/core/integration/TestPowerManager.java
private void removeOtherLocks()
    {
        PowerManager powerManager = ServiceUtils.getService(m_Context, PowerManager.class);
        Set<WakeLock> testLocks2 = powerManager.getWakeLocks(ExamplePlatformPowerManager.class, WakeLockState.Any);
        int count = 0;
        for(WakeLock lock : testLocks2)
        {
            lock.delete();
            Logging.log(LogService.LOG_DEBUG, "***** Deleting lock [%s] for context %s *****", lock.getId(), 
                    ExamplePlatformPowerManager.class);
            count++;
        }
        Logging.log(LogService.LOG_DEBUG, "***** %d Locks removed *****", count);
    }
/** Removes locks created in a different context */
Removes locks created in a different context
Removes locks created in a different context
private void removeOtherLocks()
    {
        PowerManager powerManager = ServiceUtils.getService(m_Context, PowerManager.class);
        Set<WakeLock> testLocks2 = powerManager.getWakeLocks(ExamplePlatformPowerManager.class, WakeLockState.Any);
        int count = 0;
        for(WakeLock lock : testLocks2)
        {
            lock.delete();
            Logging.log(LogService.LOG_DEBUG, "***** Deleting lock [%s] for context %s *****", lock.getId(), 
                    ExamplePlatformPowerManager.class);
            count++;
        }
        Logging.log(LogService.LOG_DEBUG, "***** %d Locks removed *****", count);
    }
private void removeOtherLocks ( ) { PowerManager powerManager = ServiceUtils . getService ( m_Context , PowerManager . class ) ; Set < WakeLock > testLocks2 = powerManager . getWakeLocks ( ExamplePlatformPowerManager . class , WakeLockState . Any ) ; int count = 0 ; for ( WakeLock lock : testLocks2 ) { lock . delete ( ) ; Logging . log ( LogService . LOG_DEBUG , "***** Deleting lock [%s] for context %s *****" , lock . getId ( ) , ExamplePlatformPowerManager . class ) ; count ++ ; } Logging . log ( LogService . LOG_DEBUG , "***** %d Locks removed *****" , count ) ; }
Removes locks created in a different context
Removes locks created in a different context