javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/HandleCustomAttributes.java
changeset 50 023eef975703
parent 35 85266cc22c7f
child 64 0ea12c182930
equal deleted inserted replaced
49:35baca0e7a2e 50:023eef975703
    54     /** Handles Nokia-MIDlet-On-Screen-Keypad attribute. */
    54     /** Handles Nokia-MIDlet-On-Screen-Keypad attribute. */
    55     private void handleNokiaMidletOnScreenKeypad(InstallBall aBall)
    55     private void handleNokiaMidletOnScreenKeypad(InstallBall aBall)
    56     {
    56     {
    57         if (aBall.iApplicationRegistrator.isOnDeviceKeypadNeeded())
    57         if (aBall.iApplicationRegistrator.isOnDeviceKeypadNeeded())
    58         {
    58         {
    59             // default value when on-screen-keypad is needed
    59             // Default value when on-screen-keypad is needed.
    60             aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_GAMEACTIONS);
    60             aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_GAMEACTIONS);
    61 
    61 
    62             String attrName = "Nokia-MIDlet-On-Screen-Keypad";
    62             String attrName = "Nokia-MIDlet-On-Screen-Keypad";
    63             String attrValue = aBall.getAttributeValue(attrName);
    63             String attrValue = aBall.getAttributeValue(attrName);
    64             if (attrValue != null)
    64             if (attrValue != null)
    75                 {
    75                 {
    76                     aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_GAMEACTIONS);
    76                     aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_GAMEACTIONS);
    77                 }
    77                 }
    78                 else
    78                 else
    79                 {
    79                 {
    80                     Log.logWarning("Invalid " + attrName + " value " + attrValue);
    80                     // Ignore on-screen-keypad attribute with invalid value.
       
    81                     aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_UNDEFINED);
       
    82                     Log.logWarning("Ignoring invalid " + attrName +
       
    83                                    " value " + attrValue);
    81                 }
    84                 }
    82             }
    85             }
    83         }
    86         }
    84         else
    87         else
    85         {
    88         {
    86             // If the device does not need on-screen-keypad, the value is not set at all
    89             // If the device does not need on-screen-keypad, the value is not set at all.
    87             aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_UNDEFINED);
    90             aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_UNDEFINED);
    88         }
    91         }
    89 
    92 
    90     }
    93     }
    91 
    94