Android Virtualizer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Virtualizer class.

This code example shows how to use the following methods:release, getProperties, setProperties
    public void test1_1Properties() throws Exception { 
        boolean result = false;
        String msg = "test1_1Properties()";
        getVirtualizer(0); 
        try { 
            Virtualizer.Settings settings = mVirtualizer.getProperties();
            String str = settings.toString();
            settings = new Virtualizer.Settings(str);
            mVirtualizer.setProperties(settings);
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");
            loge(msg, "Bad parameter value");
        } catch (UnsupportedOperationException e) {
            msg = msg.concat(": get parameter() rejected");
            loge(msg, "get parameter() rejected");
        } catch (IllegalStateException e) {
            msg = msg.concat("get parameter() called in wrong state");
            loge(msg, "get parameter() called in wrong state");
        } finally { 

8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:release, getProperties, setProperties
    public void test1_1Properties() throws Exception { 
        boolean result = false;
        String msg = "test1_1Properties()";
        getVirtualizer(0); 
        try { 
            Virtualizer.Settings settings = mVirtualizer.getProperties();
            String str = settings.toString();
            settings = new Virtualizer.Settings(str);
            mVirtualizer.setProperties(settings);
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");
            loge(msg, "Bad parameter value");
        } catch (UnsupportedOperationException e) {
            msg = msg.concat(": get parameter() rejected");
            loge(msg, "get parameter() rejected");
        } catch (IllegalStateException e) {
            msg = msg.concat("get parameter() called in wrong state");
            loge(msg, "get parameter() called in wrong state");
        } finally { 

8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:release, getRoundedStrength, getStrengthSupported, setStrength
    public void test1_0Strength() throws Exception { 
        boolean result = false;
        String msg = "test1_0Strength()";
        getVirtualizer(0); 
        try { 
            if (mVirtualizer.getStrengthSupported()) {
                mVirtualizer.setStrength((short)TEST_STRENGTH);
                short strength = mVirtualizer.getRoundedStrength();
                // allow 10% difference between set strength and rounded strength 
                assertTrue(msg +": got incorrect strength",
                        ((float)strength > (float)TEST_STRENGTH * 0.9f) &&
                        ((float)strength < (float)TEST_STRENGTH * 1.1f));
            } else { 
                short strength = mVirtualizer.getRoundedStrength();
                assertTrue(msg +": got incorrect strength", strength >= 0 && strength <= 1000);
            } 
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");
            loge(msg, "Bad parameter value");

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:release
            bassBoost.release();
        } 
        // Virtualizer 
        final Virtualizer virtualizer = mVirtualizerInstances.remove(audioSession);
        if (virtualizer != null) {
            virtualizer.release();
        } 
 
        mPackageSessions.remove(packageName);
    } 
 
    /** 
     * Enables or disables all effects (global enable/disable) for a given context, package name and 
     * audio session. It sets/inits the control mode and preferences and then sets the global 
     * enabled parameter. 
     * 
     * @param context 
     * @param packageName 
     * @param audioSession 
     *            System wide unique audio session identifier. 
2
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Android Virtualizer Methods: