Revision: v2.1.28 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 09 Jun 2010 09:34:07 +0300
branchRCL_3
changeset 34 71c436fe3ce0
parent 25 9ac0a0a7da70
child 37 16e59442b9b1
child 46 4376525cdefb
Revision: v2.1.28 Kit: 2010123
build/buildutils/checkfilenames.py
build/makefile.javaversion
build/sis/java_2_0.pkg
inc/build_defines.hrh
inc/java.txt
javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/Protocol.java
javacommons/gcfprotocols/http/src.s60/chttptransactionclient.cpp
javacommons/jvms/j9/bld.inf
javacommons/jvms/j9/exports.inf
javacommons/jvms/j9/j9.pro
javacommons/security/data/att_manufacturer.txt
javacommons/security/data/att_operator.txt
javacommons/security/data/att_operatorextra.txt
javacommons/security/data/msa_manufacturer.txt
javacommons/security/data/msa_operator.txt
javacommons/security/data/msa_trustedthirdparty.txt
javacommons/security/data/s60_manufacturer.txt
javacommons/security/data/s60_operator.txt
javacommons/security/data/s60_trustedthirdparty.txt
javacommons/security/inc/securitystoragedatadefs.h
javacommons/security/javasrc/com/nokia/mj/impl/security/common/Certificate.java
javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/AccessControllerFactoryImpl.java
javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPromptHandler.java
javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java
javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/UserSecuritySettings.java
javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/UserSecuritySettingsImpl.java
javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityPromptMessage.java
javacommons/security/tsrc/data/policies/test_manufacturer.txt
javacommons/security/tsrc/data/policies/test_operator.txt
javacommons/security/tsrc/data/policies/test_operatorextra.txt
javacommons/security/tsrc/data/policies/test_trustedthirdparty.txt
javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicyModuleTests.java
javacommons/utils/src.s60/s60commonutils.cpp
javamanager/javasettings/appmngrplugin/data/javaapplicationsettings.rss
javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingsutil.h
javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingshandler.cpp
javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingsutil.cpp
javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java
javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/utils/CmdLineArgsPermission.java
javaruntimes/midp/runtime/javasrc/javax/microedition/midlet/MIDlet.java
javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp
javaruntimes/starter/build/javamidp_installer.pkg
javaruntimes/starter/build/javamidp_template.pkg
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/bwins/eswtu.def
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/eabi/eswtu.def
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/eswt.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/eswtwidgetscore.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcombo.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcomposite.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcontrolbase.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtdateeditor.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtdisplaybase.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtevents.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtgrid.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistbase.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistbox.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistboxlists.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistview.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtshell.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtsortedlist.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttable.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttablelistbox.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttextbase.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtuiutils.h
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbrowser.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbutton.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcaptionedcontrol.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcombo.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcomposite.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtconstrainedtext.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcontrolbase.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdecorations.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdisplaybase.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtevents.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtgrid.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swthyperlink.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlink.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistbase.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistbox.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistboxlists.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistview.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtmenuarranger.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtmobileshell.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtshell.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtslider.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtsortedlist.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttable.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttablelistbox.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttext.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextextension.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttree.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtuiutils.cpp
javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/swt/custom/ScrolledComposite.java
javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitInvoker.java
javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitObserverNGAExtension.java
javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Toolkit.java
javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/ToolkitInvoker.java
javauis/lcdui_akn/lcdui/inc/CMIDCanvas.h
javauis/lcdui_akn/lcdui/inc/CMIDTextBoxQueryDialog.h
javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwinCustomDraw.h
javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp
javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupControl.cpp
javauis/lcdui_akn/lcdui/src/CMIDControlItem.cpp
javauis/lcdui_akn/lcdui/src/CMIDDateFieldItem.cpp
javauis/lcdui_akn/lcdui/src/CMIDFormPhysics.cpp
javauis/lcdui_akn/lcdui/src/CMIDItemLabel.cpp
javauis/lcdui_akn/lcdui/src/CMIDStringItem.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextFieldEdwin.cpp
javauis/lcdui_akn/lcdui/src/CMIDTextFieldItem.cpp
javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp
javauis/lcdui_akn/lcduiphysicswrapper/src/CMIDPhysicsWrapper.cpp
javauis/m3g_akn/javasrc/javax/microedition/m3g/Graphics3D.java
javauis/m3g_akn/javasrc/javax/microedition/m3g/Interface.java
javauis/m3g_akn/src/jni/graphics3d.inl
javauis/mmapi_akn/baseline/inc.emc/cmmaemcresolver.h
javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/PlayerBase.java
javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/PlayerImpl.java
javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/SourcePlayer.java
javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java
javauis/mmapi_akn/baseline/src.emc/cmmaemcresolver.cpp
javauis/mmapi_akn/baseline/src/cmmaaudioplayer.cpp
--- a/build/buildutils/checkfilenames.py	Tue May 25 12:34:19 2010 +0300
+++ b/build/buildutils/checkfilenames.py	Wed Jun 09 09:34:07 2010 +0300
@@ -42,7 +42,7 @@
     ".cvsignore", ".dat", ".dcf", ".def", ".defs", ".dll", ".der", ".doc",
     ".dr", ".dso", ".dsp", ".dsw", ".dtd",
     ".emx", ".exe", ".flm", ".gcfml", ".gif",
-    ".h", ".hrh", ".html", ".iby", ".inf", ".ini", ".inl",
+    ".h", ".hrh", ".htm", ".html", ".iby", ".inf", ".ini", ".inl",
     ".jad", ".jar", ".java", ".javaversion", ".jpeg", ".jpg", ".js", ".jsp", ".jupiter",
     ".key", ".ks", ".launch", ".lib", ".loc", ".log",
     ".mak", ".make", "makefile", "makefile_akn", "makefile_qt",  "manifest", ".mbm", ".mdl",
--- a/build/makefile.javaversion	Tue May 25 12:34:19 2010 +0300
+++ b/build/makefile.javaversion	Wed Jun 09 09:34:07 2010 +0300
@@ -1,6 +1,6 @@
 # Set Java version (must be dot separated, without spaces)
 ifdef RD_JAVA_S60_RELEASE_5_0_IAD
-  JAVA_VERSION = 2.1.26
+  JAVA_VERSION = 2.1.28
 else 
-  JAVA_VERSION = 2.1.26
+  JAVA_VERSION = 2.1.28
 endif
--- a/build/sis/java_2_0.pkg	Tue May 25 12:34:19 2010 +0300
+++ b/build/sis/java_2_0.pkg	Wed Jun 09 09:34:07 2010 +0300
@@ -663,6 +663,7 @@
 "\epoc32\data\z\resource\plugins\LCDC64K.rsc"-"c:\resource\plugins\LCDC64K.rsc"
 "\epoc32\release\armv5\urel\lcdgdrv.dll"-"c:\sys\bin\lcdgdrv.dll"
 "\epoc32\release\armv5\urel\lcdgdrvi.dll"-"c:\sys\bin\lcdgdrvi.dll"
+"\epoc32\release\armv5\urel\lcduiphysicswrap.dll"-"c:\sys\bin\lcduiphysicswrap.dll"
 #ifdef RD_JAVA_S60_RELEASE_5_0_IAD
 "\epoc32\release\armv5\urel\midp2permissiondb.dll"-"c:\sys\bin\midp2permissiondb.dll"
 "\epoc32\release\armv5\urel\midp2userpreferences.dll"-"c:\sys\bin\midp2userpreferences.dll"
--- a/inc/build_defines.hrh	Tue May 25 12:34:19 2010 +0300
+++ b/inc/build_defines.hrh	Wed Jun 09 09:34:07 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-#define RD_JAVA_VERSION 2,1,26 
+#define RD_JAVA_VERSION 2,1,28 
 #define RD_JAVA_SYMBIAN_TARGET 
 #define RD_JAVA_S60_RELEASE_9_2 
 #define RD_JAVA_S60_RELEASE_9_2_ONWARDS 
--- a/inc/java.txt	Tue May 25 12:34:19 2010 +0300
+++ b/inc/java.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -1,1 +1,1 @@
-2.1.26
+2.1.28
--- a/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/Protocol.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/Protocol.java	Wed Jun 09 09:34:07 2010 +0300
@@ -45,7 +45,7 @@
         String urls = null;
         int apnid = -1;
         int index = -1;
-        int responsetimeout = -1;
+        int responsetimeout = 180;  // default timeout of 3 minutes
         ConnectionManager cminstance = null;
         AccessPoint apn = null;
         iFullUrl = "http:" + aUri;
--- a/javacommons/gcfprotocols/http/src.s60/chttptransactionclient.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/gcfprotocols/http/src.s60/chttptransactionclient.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -626,6 +626,14 @@
             iStatus = CHttpTransactionClient::ERequestNextBodayData;
             break;
         }
+        
+        case THTTPEvent::EReceiveTimeOut:
+        {
+        	  ELOG(ESOCKET,"MHFRunL EReceiveTimeOut");
+        	  NotifyErrorL(KErrTimedOut);  // send timeout error to java
+        	  break;
+        	
+        }        
         /*
         * -j2me expects the http stack to be able to post body data with no content type
         *   the native stack default validation filter does not allow this.
@@ -694,7 +702,6 @@
         iTransaction.Cancel();
         iHttpSession.RestartConnection();
 
-
     }
     if (iJavaWaitingOnCallBack)
     {
@@ -707,7 +714,7 @@
         LOG(ESOCKET,EInfo,"Notifiy Read EOF / Cancel");
         iJavaWaitingOnCallBack=EFalse;
         //Notify Java of error if it is waiting for a read
-        iObserver->DataReadyForRead(-1);
+        iObserver->DataReadyForRead(aErrorCode);
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/jvms/j9/bld.inf	Wed Jun 09 09:34:07 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Generated bld.inf -file
+*
+*/
+
+PRJ_PLATFORMS
+default
+
+#include "exports.inf" 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/jvms/j9/exports.inf	Wed Jun 09 09:34:07 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+PRJ_PLATFORMS
+default
+
+#ifndef RD_JAVA_SF_BUILD
+#include "s60/exports.inf"
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/jvms/j9/j9.pro	Wed Jun 09 09:34:07 2010 +0300
@@ -0,0 +1,23 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+TEMPLATE = subdirs
+
+# Export J9 only when available here (not available here in SF builds)
+# (use indirection through ./exports.inf for pregenerated bld.inf variation)
+exists($${_PRO_FILE_PWD_}/s60/exports.inf): {
+  BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"exports.inf\"" \
+}
--- a/javacommons/security/data/att_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/att_manufacturer.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 
 grant assigned {
--- a/javacommons/security/data/att_operator.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/att_operator.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -48,8 +48,16 @@
     permission javax.microedition.io.PushRegistryPermission "*" "staticregistration,dynamicregistration,autoinvocation";
 }
 
+grant user "Url start" blanket,session,oneshot,no {
+    permission javax.microedition.midlet.CmdLineArgsPermission;
+}
+
 grant allowed {
     permission javax.microedition.io.Connector.sms "sms://*" "open,receive";
     permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
     permission javax.microedition.io.Connector.cbs "cbs://*" "open,receive";
 }
+
+grant assigned {
+    permission javax.microedition.midlet.AutoStartPermission;
+}
--- a/javacommons/security/data/att_operatorextra.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/att_operatorextra.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 
 grant assigned {
--- a/javacommons/security/data/msa_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/msa_manufacturer.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 
 grant assigned {
--- a/javacommons/security/data/msa_operator.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/msa_operator.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 
 grant assigned {
--- a/javacommons/security/data/msa_trustedthirdparty.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/msa_trustedthirdparty.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -62,6 +62,10 @@
     permission javax.microedition.apdu.aid "apdu://*" "aid";
 }
 
+grant user "Url start" session,oneshot,no {
+    permission javax.microedition.midlet.CmdLineArgsPermission;
+}
+
 grant allowed {
     permission javax.microedition.io.Connector.sms "sms://*" "open,receive";
     permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
--- a/javacommons/security/data/s60_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/s60_manufacturer.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 
 grant assigned {
--- a/javacommons/security/data/s60_operator.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/s60_operator.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 
 grant assigned {
--- a/javacommons/security/data/s60_trustedthirdparty.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/data/s60_trustedthirdparty.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -63,6 +63,10 @@
     permission javax.microedition.securityservice.CMSMessageSignatureService "pki://*" "authenticate";
 }
 
+grant user "Url start" session,oneshot,no {
+    permission javax.microedition.midlet.CmdLineArgsPermission;
+}
+
 grant allowed {
     permission javax.microedition.io.Connector.sms "sms://*" "open,receive";
     permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
--- a/javacommons/security/inc/securitystoragedatadefs.h	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/inc/securitystoragedatadefs.h	Wed Jun 09 09:34:07 2010 +0300
@@ -42,6 +42,7 @@
 const wchar_t* const AUTHENTICATION_SETTINGS = L"Authentication";
 const wchar_t* const BROADCAST_SETTINGS = L"Broadcast";
 const wchar_t* const NFC_WRITE_ACCESS_SETTINGS = L"NFC Write Access";
+const wchar_t* const URL_START_SETTINGS = L"Url start";
 
 // interaction modes values
 const wchar_t* const ONESHOT_INTERACTION_MODE = L"1";
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/common/Certificate.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/common/Certificate.java	Wed Jun 09 09:34:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -318,8 +318,9 @@
             {
                 Calendar cal = Calendar.getInstance();
                 cal.set(Calendar.YEAR, Integer.parseInt(str.substring(0,4)));
-                cal.set(Calendar.MONTH, Integer.parseInt(str.substring(4,6)));
-                cal.set(Calendar.DAY_OF_WEEK, Integer.parseInt(str.substring(6,8)));
+                // Calendar.MONTH begins from 0 (0=January, 1=Februrary, ...)
+                cal.set(Calendar.MONTH, Integer.parseInt(str.substring(4,6)) - 1);
+                cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(str.substring(6,8)));
                 cal.set(Calendar.HOUR, Integer.parseInt(str.substring(8,10)));
                 cal.set(Calendar.MINUTE, Integer.parseInt(str.substring(10,12)));
                 cal.set(Calendar.SECOND, Integer.parseInt(str.substring(12,14)));
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/AccessControllerFactoryImpl.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/AccessControllerFactoryImpl.java	Wed Jun 09 09:34:07 2010 +0300
@@ -61,7 +61,7 @@
      *                        which the AccessControllerImpl instance
      *                        is retrieved
      */
-    public static AccessControllerImpl getAccessController(StorageSession aStorageSession,
+    public synchronized static AccessControllerImpl getAccessController(StorageSession aStorageSession,
             Uid aAppSuiteUid,
             String aAppName)
     {
@@ -69,7 +69,6 @@
         {
             return null;
         }
-        // Synchronization missing
         AccessControllerImpl instance = (AccessControllerImpl)instances.get(
                                             aAppSuiteUid);
 
@@ -82,14 +81,13 @@
         return instance;
     }
 
-    public static void destroyAccessController(Uid appUID)
+    public synchronized static void destroyAccessController(Uid appUID)
     {
         if (appUID == null)
         {
             return;
         }
         // This is to be called when a MIDlet suite is stoped
-        // Synchronization missing
         // Remove the instance or mark it as inactive?
         AccessControllerImpl ac = (AccessControllerImpl)instances
                                   .remove(appUID);
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPromptHandler.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPromptHandler.java	Wed Jun 09 09:34:07 2010 +0300
@@ -81,7 +81,7 @@
         }
     }
 
-    public UserSecuritySettings handleUserPermission(
+    public synchronized UserSecuritySettings handleUserPermission(
         UserPermission userPermission, boolean blanketPromptShown)
     {
         UserSecuritySettings settings = userPermission
@@ -219,7 +219,7 @@
             }
             else
             {
-                RuntimeUi ui = getUiInstance();
+                getUiInstance();
                 boolean responseAvailable = ui.confirm(
                                                 appName,
                                                 cData);
@@ -329,13 +329,12 @@
         }
     }
 
-    private RuntimeUi getUiInstance()
+    private void getUiInstance()
     {
         if (ui == null)
         {
             ui = RuntimeUiFactory.getRuntimeUi();
         }
-        return ui;
     }
 
     private UserSecuritySettings handleDenyAnswer(UserSecuritySettings settings)
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java	Wed Jun 09 09:34:07 2010 +0300
@@ -228,6 +228,12 @@
        PERMISSION_MAPPING_TABLE.put(
             "javax.microedition.midlet.AutoStartPermission", new MIDPPermission(
                 "com.nokia.mj.impl.installer.utils.AutoStartPermission", null));
+       PERMISSION_MAPPING_TABLE.put(
+            "javax.microedition.midlet.CmdLineArgsPermission", new MIDPPermission(
+                "com.nokia.mj.impl.rt.utils.CmdLineArgsPermission", null));
+       PERMISSION_MAPPING_TABLE.put(
+            "com.nokia.webstart", new MIDPPermission(
+                "com.nokia.mj.impl.rt.utils.CmdLineArgsPermission", null));
     }
 
     /**
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/UserSecuritySettings.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/UserSecuritySettings.java	Wed Jun 09 09:34:07 2010 +0300
@@ -48,6 +48,7 @@
     public static final String AUTHENTICATION_SETTINGS = "Authentication";
     public static final String BROADCAST_SETTINGS = "Broadcast";
     public static final String NFC_WRITE_ACCESS_SETTINGS = "NFC Write Access";
+    public static final String URL_START_SETTINGS = "Url start";
 
     // security warnings modes
     public static final String SECURITY_WARNINGS_USER_DEFINED_MODE = "1";
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/UserSecuritySettingsImpl.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/UserSecuritySettingsImpl.java	Wed Jun 09 09:34:07 2010 +0300
@@ -51,6 +51,7 @@
     private static final String AUTHENTICATION_ID = "setting_auth";
     private static final String BROADCAST_ID = "setting_broadcast";
     private static final String NFC_WRITE_ACCESS_ID = "setting_nfc_write_access";
+    private static final String URL_START_ID = "setting_url_start";
 
     public UserSecuritySettingsImpl(
         String name,
@@ -159,6 +160,10 @@
         {
             id = BROADCAST_ID;
         }
+        else if (URL_START_SETTINGS.equalsIgnoreCase(aSettingName))
+        {
+            id = URL_START_ID;
+        }
         return resLoader.format(id, null /*aTextParameters*/);
     }
 
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityPromptMessage.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityPromptMessage.java	Wed Jun 09 09:34:07 2010 +0300
@@ -79,6 +79,7 @@
     public static final String QUESTION_ID_PUSH_DYNAMIC_REGISTRATION = "push_registration_dynamic";
     public static final String QUESTION_ID_AUTO_INVOCATION = "auto_invocation";
     public static final String QUESTION_ID_NDEF_TAG_WRITE = "nfc_ndef_tag_write";
+    public static final String QUESTION_ID_APP_AUTO_LAUNCH = "url_start";
 
     // identifiers for the security prompt answer options
     public static final String ANSWER_ID_ALLOW = "prompt_allow";
--- a/javacommons/security/tsrc/data/policies/test_manufacturer.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/tsrc/data/policies/test_manufacturer.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
--- a/javacommons/security/tsrc/data/policies/test_operator.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/tsrc/data/policies/test_operator.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -30,6 +30,7 @@
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
     permission javax.microedition.PropertyPermission "mobinfo.imsi" "read";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
 grant assigned {
     permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
--- a/javacommons/security/tsrc/data/policies/test_operatorextra.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/tsrc/data/policies/test_operatorextra.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -29,4 +29,5 @@
     permission javax.microedition.media.control.RecordControl "*" "record";
     permission javax.microedition.media.control.VideoControl.getSnapshot "*" "snapshot";
     permission javax.microedition.io.Connector.rtsp "*";
+    permission javax.microedition.midlet.CmdLineArgsPermission;
 }
--- a/javacommons/security/tsrc/data/policies/test_trustedthirdparty.txt	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/tsrc/data/policies/test_trustedthirdparty.txt	Wed Jun 09 09:34:07 2010 +0300
@@ -63,6 +63,10 @@
     permission javax.microedition.securityservice.CMSMessageSignatureService "pki://*" "authenticate";
 }
 
+grant user "Url start" session,oneshot,no {
+    permission javax.microedition.midlet.CmdLineArgsPermission;
+}
+
 grant allowed {
     permission javax.microedition.io.Connector.sms "sms://*" "open,receive";
     permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicyModuleTests.java	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicyModuleTests.java	Wed Jun 09 09:34:07 2010 +0300
@@ -89,6 +89,7 @@
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.publicinfo","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.cellid","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.midlet.AutoStartPermission"),null,null,null),
+        new SecurityPolicyPermission(getPermissionName("javax.microedition.midlet.CmdLineArgsPermission"),null,null,null),
     };
     static final SecurityPolicyPermission[] OPERATOR_PERMS =
     {
@@ -142,6 +143,7 @@
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.publicinfo","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.cellid","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.midlet.AutoStartPermission"),null,null,null),
+        new SecurityPolicyPermission(getPermissionName("javax.microedition.midlet.CmdLineArgsPermission"),null,null,null),
     };
     static final SecurityPolicyPermission[] IDENTIFIED_THIRD_PARTY_PERMS =
     {
@@ -265,6 +267,9 @@
                                                                           new int[]{UserSecuritySettings.BLANKET_INTERACTION_MODE,UserSecuritySettings.ONESHOT_INTERACTION_MODE,UserSecuritySettings.NO_INTERACTION_MODE,UserSecuritySettings.SESSION_INTERACTION_MODE})),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.publicinfo","read",null),
         new SecurityPolicyPermission(getPermissionName("javax.microedition.PropertyPermission"),"mobinfo.cellid","read",null),
+        new SecurityPolicyPermission(getPermissionName("javax.microedition.midlet.CmdLineArgsPermission"),null, null,
+                                     new SecurityPolicyPermissionSettings("Url start",UserSecuritySettings.SESSION_INTERACTION_MODE,
+                                                                          new int[]{UserSecuritySettings.ONESHOT_INTERACTION_MODE,UserSecuritySettings.NO_INTERACTION_MODE,UserSecuritySettings.SESSION_INTERACTION_MODE})),
     };
     static final SecurityPolicyPermission[] UNIDENTIFIED_THIRD_PARTY_PERMS =
     {
--- a/javacommons/utils/src.s60/s60commonutils.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javacommons/utils/src.s60/s60commonutils.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -118,6 +118,12 @@
 
     for (int i = 0; i< count; i++)
     {
+         if( !aNativeArray[ i ] )
+         {
+             // Skip null elements since already initialized
+             continue;
+         }
+    	
         //TPtr16 temp =  aNativeArray[i]->Des();
         jstring javaString = S60CommonUtils::NativeToJavaString(aJni, *aNativeArray[i]);
         if (javaString == NULL)
--- a/javamanager/javasettings/appmngrplugin/data/javaapplicationsettings.rss	Tue May 25 12:34:19 2010 +0300
+++ b/javamanager/javasettings/appmngrplugin/data/javaapplicationsettings.rss	Wed Jun 09 09:34:07 2010 +0300
@@ -432,6 +432,21 @@
     editor_resource_id = r_java__sec_lbx_resource;
     }
 
+//----------------------------------------------------------
+//
+// r_java_setting_url_start_page
+// Setting page for url start security permission
+//
+//----------------------------------------------------------
+//
+RESOURCE AVKON_SETTING_PAGE r_java_setting_url_start_page
+	{
+	label = qtn_java_setting_url_start;
+	softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
+	type = EAknSetListBox;
+	editor_resource_id = r_java__sec_lbx_resource;
+	}
+	
 // ------------------------------------------------------
 // Misc strings
 // ------------------------------------------------------
@@ -463,6 +478,7 @@
 RESOURCE TBUF r_java_setting_name_network_destination { buf=qtn_netw_conset_sett_destination; }
 RESOURCE TBUF r_java_setting_name_broadcast { buf=qtn_java_setting_broadcast; }
 RESOURCE TBUF r_java_setting_name_nfc_write_access { buf=qtn_java_setting_nfc_write_access; }
+RESOURCE TBUF r_java_setting_name_url_start { buf=qtn_java_setting_url_start; }
 RESOURCE TBUF r_java_setting_name_security_warnings { buf=qtn_java_setting_security_level; }
 RESOURCE TBUF r_java_setting_value_no { buf=qtn_java_setting_value_no; }
 RESOURCE TBUF r_java_setting_value_oneshot { buf=qtn_java_setting_value_oneshot; }
--- a/javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingsutil.h	Tue May 25 12:34:19 2010 +0300
+++ b/javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingsutil.h	Wed Jun 09 09:34:07 2010 +0300
@@ -65,7 +65,8 @@
 const int SMART_CARD_COMMUNICATION_SETTINGS_DISPLAY_INDEX = 15;
 const int BROADCAST_SETTINGS_DISPLAY_INDEX = 16;
 const int NFC_WRITE_ACCESS_SETTINGS_DISPLAY_INDEX = 17;
-const int LAST_SETTINGS_DISPLAY_INDEX = 18;
+const int URL_START_SETTINGS_DISPLAY_INDEX = 18;
+const int LAST_SETTINGS_DISPLAY_INDEX = 19;
 
 // CLASS DECLARATION
 class MidletSuiteSecuritySettings: public CBase
--- a/javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingshandler.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingshandler.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -140,14 +140,23 @@
     }
     default:
     {
-        RCmManagerExt manager;
-        manager.OpenLC();
-        RCmDestinationExt destination = manager.DestinationL(apnId);
-        CleanupClosePushL(destination);
-        name = destination.NameLC();
-        CleanupStack::Pop(name);
-        CleanupStack::PopAndDestroy(&destination);
-        CleanupStack::PopAndDestroy(&manager);
+        TRAPD(err,
+            RCmManagerExt manager;
+            manager.OpenLC();
+            RCmDestinationExt destination = manager.DestinationL(apnId);
+            CleanupClosePushL(destination);
+            name = destination.NameLC();
+            CleanupStack::Pop(name);
+            CleanupStack::PopAndDestroy(&destination);
+            CleanupStack::PopAndDestroy(&manager);
+        );
+        if (err != KErrNone)
+        {
+            // reset it back to default
+            snap->iId = (TUint)KDefaultConnection;
+            name = StringLoader::LoadL(R_JAVA_CONSET_SETT_DEFAULT_CONNECTION);
+            ConnectionManager::setDestinationNetworkIdL(iMidletSuiteUid, snap->iId);
+        }
     }
     }
     if (resourceOffset > 0)
--- a/javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingsutil.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingsutil.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -382,6 +382,10 @@
     {
         return NFC_WRITE_ACCESS_SETTINGS_DISPLAY_INDEX;
     }
+    if (aSettingsName == URL_START_SETTINGS)
+    {
+        return URL_START_SETTINGS_DISPLAY_INDEX;
+    }
     return LAST_SETTINGS_DISPLAY_INDEX;
 }
 
@@ -472,99 +476,106 @@
     {
         return R_JAVA_SETTING_NFC_WRITE_ACCESS_PAGE;
     }
+    if (aSettingsName == URL_START_SETTINGS)
+    {
+        return R_JAVA_SETTING_URL_START_PAGE;
+    }
     return R_JAVA_SETTING_DEFAULT_PAGE;
 
 }
 
 const wstring AppMngr2MidletSettingsUtil::getLocalizedSettingsName(wstring aSettingsName)
 {
-    HBufC* localizedName = NULL;
-    if (aSettingsName == ACCESS_POINT_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NETWORK_DESTINATION);
-    }
-    else if (aSettingsName == ON_SCREEN_KEYPAD_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_KEYPAD);
-    }
-    else if (aSettingsName == SECURITY_WARNINGS_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SECURITY_WARNINGS);
-    }
-    else if (aSettingsName == NET_ACCESS_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NET_ACCESS);
-    }
-    else if (aSettingsName == LOW_LEVEL_NET_ACCESS_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOW_LEVEL_NET_ACCESS);
-    }
-    else if (aSettingsName == CALL_CONTROL_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_CALL_CONTROL);
-    }
-    else if (aSettingsName == MESSAGING_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MESSAGING);
-    }
-    else if (aSettingsName == RESTRICTED_MESSAGING_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_MESSAGING);
-    }
-    else if (aSettingsName == APPLICATION_AUTO_INVOCATION_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_APP_AUTO_INVOCAT);
-    }
-    else if (aSettingsName == LOCAL_CONNECTIVITY_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCAL_CONN);
-    }
-    else if (aSettingsName == MULTIMEDIA_RECORDING_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MM_RECORD);
-    }
-    else if (aSettingsName == READ_USER_DATA_ACCESS_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_READ_DATA);
-    }
-    else if (aSettingsName == WRITE_USER_DATA_ACCESS_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_WRITE_DATA);
-    }
-    else if (aSettingsName == LOCATION_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCATION);
-    }
-    else if (aSettingsName == LANDMARK_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LANDMARKS);
-    }
-    else if (aSettingsName == AUTHENTICATION_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_AUT);
-    }
-    else if (aSettingsName == SMART_CARD_COMMUNICATION_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SMARTCARD);
-    }
-    else if (aSettingsName == BROADCAST_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_BROADCAST);
-    }
-    else if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
-    {
-        localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NFC_WRITE_ACCESS);
-    }
-    if (localizedName != NULL)
-    {
-        wstring ret = wstring((const wchar_t*)localizedName->Ptr(), localizedName->Length());
-        CleanupStack::PopAndDestroy(localizedName);
-        return ret;
-    }
-    else
-    {
-        return aSettingsName;
-    }
+    wstring ret = aSettingsName;
+    TRAP_IGNORE(
+        HBufC* localizedName = NULL;
+        if (aSettingsName == ACCESS_POINT_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NETWORK_DESTINATION);
+        }
+        else if (aSettingsName == ON_SCREEN_KEYPAD_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_KEYPAD);
+        }
+        else if (aSettingsName == SECURITY_WARNINGS_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SECURITY_WARNINGS);
+        }
+        else if (aSettingsName == NET_ACCESS_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NET_ACCESS);
+        }
+        else if (aSettingsName == LOW_LEVEL_NET_ACCESS_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOW_LEVEL_NET_ACCESS);
+        }
+        else if (aSettingsName == CALL_CONTROL_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_CALL_CONTROL);
+        }
+        else if (aSettingsName == MESSAGING_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MESSAGING);
+        }
+        else if (aSettingsName == RESTRICTED_MESSAGING_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_MESSAGING);
+        }
+        else if (aSettingsName == APPLICATION_AUTO_INVOCATION_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_APP_AUTO_INVOCAT);
+        }
+        else if (aSettingsName == LOCAL_CONNECTIVITY_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCAL_CONN);
+        }
+        else if (aSettingsName == MULTIMEDIA_RECORDING_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MM_RECORD);
+        }
+        else if (aSettingsName == READ_USER_DATA_ACCESS_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_READ_DATA);
+        }
+        else if (aSettingsName == WRITE_USER_DATA_ACCESS_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_WRITE_DATA);
+        }
+        else if (aSettingsName == LOCATION_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCATION);
+        }
+        else if (aSettingsName == LANDMARK_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LANDMARKS);
+        }
+        else if (aSettingsName == AUTHENTICATION_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_AUT);
+        }
+        else if (aSettingsName == SMART_CARD_COMMUNICATION_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SMARTCARD);
+        }
+        else if (aSettingsName == BROADCAST_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_BROADCAST);
+        }
+        else if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NFC_WRITE_ACCESS);
+        }
+        else if (aSettingsName == URL_START_SETTINGS)
+        {
+            localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_URL_START);
+        }
+        if (localizedName != NULL)
+        {
+            ret = wstring((const wchar_t*)localizedName->Ptr(), localizedName->Length());
+            CleanupStack::PopAndDestroy(localizedName);
+        }
+    );
+    return ret;
 }
 
 const wstring AppMngr2MidletSettingsUtil::getLocalizedSettingsInteractionMode(int aInteractionMode)
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java	Tue May 25 12:34:19 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java	Wed Jun 09 09:34:07 2010 +0300
@@ -25,16 +25,18 @@
 import java.util.Timer;
 import java.util.TimerTask;
 
+import java.security.AccessControlException;
+
 import com.nokia.mj.impl.rt.utils.ExtensionUtil;
+import com.nokia.mj.impl.rt.utils.CmdLineArgsPermission;
 
 import com.nokia.mj.impl.rt.support.Jvm;
 import com.nokia.mj.impl.rt.support.JvmInternal;
 import com.nokia.mj.impl.rt.support.ThreadEventListener;
+import com.nokia.mj.impl.rt.support.ApplicationUtils;
 
 import com.nokia.mj.impl.rt.legacy.LegacySupport;
 
-import com.nokia.mj.impl.gcf.PushSecurityUtils;
-
 import com.nokia.mj.impl.security.packageprotection.PackageProtector;
 import com.nokia.mj.impl.security.common.RuntimeSecurityException;
 import com.nokia.mj.impl.security.midp.authentication.AuthenticationModule;
@@ -620,7 +622,7 @@
     {
         if (Log.mOn) Log.logI("MidletLifeCycle.handleStartRequest(), subTask: "
                                   + subTask);
-        if ((mState == POST_INIT_DONE && subTask != LifeCycleTask.PRE_WARM_START) || 
+        if ((mState == POST_INIT_DONE && subTask != LifeCycleTask.PRE_WARM_START) ||
             (mState == PRE_INIT_DONE && subTask == LifeCycleTask.PRE_WARM_START))
         {
             if (subTask == LifeCycleTask.NORMAL_START)
@@ -879,7 +881,7 @@
             t = encodedArgs.charAt(idx);
             if (t < 'a')
             {
-                if (idx + 4 >= len)
+                if (idx + 3 >= len)
                     break;
                 // decode one 16-bit char
                 char a = (char)(t - 'A');
@@ -892,7 +894,7 @@
             }
             else
             {
-                if (idx + 2 >= len)
+                if (idx + 1 >= len)
                     break;
                 // decode one 8-bit char
                 char a = (char)(t - 'a');
@@ -960,7 +962,7 @@
         // If system property com.nokia.mid.cmdline has value, it contains
         // the arguments for the current MIDlet.
         setMidletArguments();
-    
+
         if (mPrewarmStart)
         {
             // Get the recorded heap size from previous run.
@@ -995,23 +997,23 @@
         if ((mMainArgs.findArgument("-autoinvocation") != null) ||
                 mAutoinvocationFromUrl)
         {
+            if (Log.mOn) Log.logI("Ensuring autoinvocation.");
+            String pushAdditionalInfo =
+                mMainArgs.findArgument("-autoInvocationAdditional");
+            if (Log.mOn) Log.logI("  addInfo: '" + pushAdditionalInfo + "'");
+
+            // ensure security
             try
             {
-                if (Log.mOn) Log.logI("Ensuring autoinvocation.");
-                String pushAdditionalInfo =
-                    mMainArgs.findArgument("-autoInvocationAdditional");
-                if (Log.mOn) Log.logI("  addInfo: '" + pushAdditionalInfo + "'");
-                PushSecurityUtils.ensurePermission("autoinvocation",
-                                                   pushAdditionalInfo);
-
+                ApplicationUtils appUtils = ApplicationUtils.getInstance();
+                CmdLineArgsPermission cmdLineArgsPermission = 
+                    new CmdLineArgsPermission();
+                appUtils.checkPermission(cmdLineArgsPermission);
                 if (Log.mOn) Log.logI("Autoinvocation allowed.");
-            }
-            catch (SecurityException se)
+            }catch(AccessControlException e)
             {
-                // The user didn't allow starting. Throw StartupException and
-                // mark it as non fatal.
-                if (Log.mOn) Log.logI("Autoinvocation NOT allowed.");
-                throw new StartupException("Auto invocation not allowed.",
+                if (Log.mOn) Log.logI("Autoinvocation NOT allowed.");                
+                throw new StartupException(e.toString(),
                                            false);
             }
         }
@@ -1169,7 +1171,7 @@
             if (mAcceptedUserProperties == null)
             {
                 // Doing intialization only once.
-                String launchParams = 
+                String launchParams =
                   ApplicationInfoImpl.getMidletInfo().getAttribute("Nokia-MIDlet-Launch-Params");
                 mAcceptedUserProperties = split(launchParams, ",");
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/utils/CmdLineArgsPermission.java	Wed Jun 09 09:34:07 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Permission object for managing access to command line API feature
+*
+*/
+
+
+
+package com.nokia.mj.impl.rt.utils;
+
+import java.security.Permission;
+import java.security.PermissionCollection;
+import com.nokia.mj.impl.security.common.PermissionBase;
+import com.nokia.mj.impl.security.utils.SecurityPromptMessage;
+
+/**
+ * Permission class representing the token access to command line API feature.
+ *
+ */
+public class CmdLineArgsPermission extends PermissionBase
+{
+    /**
+     * Constructor
+     *
+     */
+    public CmdLineArgsPermission()
+    {
+        super(null);
+    }
+
+    /**
+     * Returns the question (as localized text) associated with the security
+     * prompt
+     *
+     * @return the localized text associated with the security prompt
+     */
+    public String getSecurityPromptQuestion(int aInteractionMode)
+    {
+        return (SecurityPromptMessage.getInstance()).getText(
+            SecurityPromptMessage.QUESTION_ID_APP_AUTO_LAUNCH,
+            null);
+    }
+
+    /**
+     * Only implies permission objects of same instance
+     */
+    public boolean implies(Permission p)
+    {
+        if (p instanceof CmdLineArgsPermission)
+        {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * String representation of the permission
+     */
+    public String toString()
+    {
+        return "com.nokia.webstart";
+    }
+    
+    /**
+     * Don't allow cloning
+     */
+    public boolean equals(Object obj)
+    {
+        return (obj.hashCode() == hashCode());
+    }
+
+    /**
+     * Not supported
+     */
+    public int hashCode()
+    {
+        return 0;
+    }
+
+    /**
+     * Actions are not supported
+     */
+    public String getActions()
+    {
+        return null;
+    }
+
+    /**
+     * Permission collections not supported
+     */
+    public PermissionCollection newPermissionCollection()
+    {
+        return null;
+    }
+}
\ No newline at end of file
--- a/javaruntimes/midp/runtime/javasrc/javax/microedition/midlet/MIDlet.java	Tue May 25 12:34:19 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/javax/microedition/midlet/MIDlet.java	Wed Jun 09 09:34:07 2010 +0300
@@ -312,6 +312,8 @@
             mNetworkPromptSchemes = new Hashtable();
             mNetworkPromptSchemes.put("http:","javax.microedition.io.Connector.http");
             mNetworkPromptSchemes.put("https:","javax.microedition.io.Connector.https");
+            mNetworkPromptSchemes.put("rtsp:","javax.microedition.io.Connector.rtsp");
+            mNetworkPromptSchemes.put("mms:","javax.microedition.io.Connector.rtsp");
         }
         if (mNoPromptSchemes == null)
         {
--- a/javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -165,6 +165,14 @@
 
         // Starting with lower old space in pre warm case.
         jvm->overrideOldHeapSize(36);
+
+        // In the pre-warm start we need to add something into class path.
+        // Otherwise the VM puts class path to point MIDP private data cage.
+#ifdef RD_JAVA_SYMBIAN_TARGET
+        jvm->appendClassPath(L"z:/private/ignore.jar");
+#else // RD_JAVA_SYMBIAN_TARGET
+        jvm->appendClassPath(L"./ignore.jar");
+#endif // RD_JAVA_SYMBIAN_TARGET
     }
 
     // If the requested to go to back ground, pass the info to Java peer.
--- a/javaruntimes/starter/build/javamidp_installer.pkg	Tue May 25 12:34:19 2010 +0300
+++ b/javaruntimes/starter/build/javamidp_installer.pkg	Wed Jun 09 09:34:07 2010 +0300
@@ -1,4 +1,4 @@
-; javamidp_installer.pkg generated by qmake at 2010-05-10T13:53:31
+; javamidp_installer.pkg generated by qmake at 2010-05-25T10:01:51
 ; This file is generated by qmake and should not be modified by the user
 ;
 
--- a/javaruntimes/starter/build/javamidp_template.pkg	Tue May 25 12:34:19 2010 +0300
+++ b/javaruntimes/starter/build/javamidp_template.pkg	Wed Jun 09 09:34:07 2010 +0300
@@ -1,4 +1,4 @@
-; javamidp_template.pkg generated by qmake at 2010-05-10T13:53:31
+; javamidp_template.pkg generated by qmake at 2010-05-25T10:01:51
 ; This file is generated by qmake and should not be modified by the user
 ;
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/bwins/eswtu.def	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/bwins/eswtu.def	Wed Jun 09 09:34:07 2010 +0300
@@ -87,4 +87,6 @@
 	?RegisterWithParentL@ASwtControlBase@@IAEXXZ @ 86 NONAME ; void ASwtControlBase::RegisterWithParentL(void)
 	?DrawBorder@ASwtControlBase@@MBEXABVTRect@@@Z @ 87 NONAME ; void ASwtControlBase::DrawBorder(class TRect const &) const
 	?ComputeTabListL@ASwtControlBase@@UAEXAAV?$RPointerArray@VMSwtControl@@@@@Z @ 88 NONAME ; void ASwtControlBase::ComputeTabListL(class RPointerArray<class MSwtControl> &)
+	?VisibleRect@ASwtControlBase@@UBE?AVTRect@@H@Z @ 89 NONAME ; class TRect ASwtControlBase::VisibleRect(int) const
+	?EnableFocusHighlight@ASwtControlBase@@UAEXH@Z @ 90 NONAME ; void ASwtControlBase::EnableFocusHighlight(int)
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/eabi/eswtu.def	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/build/eabi/eswtu.def	Wed Jun 09 09:34:07 2010 +0300
@@ -97,4 +97,6 @@
 	_ZTV15ASwtControlBase @ 96 NONAME
 	_ZTV22CSwtBrowserPreferences @ 97 NONAME
 	_ZThn4_NK15ASwtControlBase4DrawER9CWindowGcRK11CCoeControlRK5TRect @ 98 NONAME
+	_ZNK15ASwtControlBase11VisibleRectEi @ 99 NONAME
+	_ZN15ASwtControlBase20EnableFocusHighlightEi @ 100 NONAME
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/eswt.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/eswt.h	Wed Jun 09 09:34:07 2010 +0300
@@ -305,7 +305,8 @@
     ESwtEventForeground       = 1006,
     ESwtEventDialogStringResult = 1007,
     ESwtEventDialogIntegerResult = 1008,
-    ESwtEventDialogRgbResult = 1009
+    ESwtEventDialogRgbResult  = 1009,
+    ESwtEventShowFocusedControl = 1010
 };
 
 
@@ -1062,7 +1063,12 @@
      * @return void
      */
     virtual void PostTitleEventL(TSwtPeer aPeer, const TDesC& aTitle) = 0;
-
+    
+    /**
+     * Posts a show focused control to a ScrolledComposite.
+     */
+    virtual void PostShowFocusedControlEventL(TSwtPeer aPeer) =0;
+    
     /**
      * Get eSWT Java application allocated id
      * @return Java application allocated id
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/eswtwidgetscore.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/eswtwidgetscore.h	Wed Jun 09 09:34:07 2010 +0300
@@ -765,6 +765,23 @@
                                            const TPointerEvent& aPointerEvent) const = 0;
 
     virtual void PostMouseEventL(const TPointerEvent& aPointerEvent) = 0;
+
+    /**
+     * Enables or disables focus highlight for controls
+     * Used only for list controls (Lists, ListView, ListBox and Table)
+     * Only for 9.2
+     */
+    virtual void EnableFocusHighlight(TBool aEnable) = 0;
+    
+    /**
+     * Get the visible rectangle of this control.
+     * Window coordinates.
+     * The clipping take in account the parent, but not the brother.
+     * To take in account the sibblings use VisibleRegion() method.
+     * @param aVisibleBounds If true return the visible rectangle of the control,
+     *        else return visible client rectangle of the control.
+     */
+    virtual TRect VisibleRect(TBool aVisibleBounds = EFalse) const = 0;
 };
 
 
@@ -1408,6 +1425,11 @@
      */
     virtual void SetTaskTip() = 0;
     virtual TBool IsTaskTip() const = 0;
+    
+    /**
+     * Sets the location even if top shell.
+     */
+    virtual void DoSetLocation(const TPoint& aPoint) = 0;
 };
 
 /**
@@ -2838,6 +2860,60 @@
      * Returns the current control that is grabbing the pointer events.
      */
     virtual MSwtControl* PointerCaptureControl() = 0;
+    
+    /**
+     * Rearranges the application layout (status pane, Shell position, split 
+     * input view size) for best editing experience. There can be only one 
+     * editor in split view mode at a time. Setting 0 clears the split view 
+     * and restores the layout.
+     * 
+     * Following actions must be delegated to UiUtils while split editing is on:
+     * - Relocating the split input Shell (@see SetSplitInputShellPos)
+     * - Resizing the split input view. (@see SetSplitInputViewSize)
+     * 
+     * Following actions must be notified to UiUtils while split editing is on:
+     * - Resizing the split input shell. (@see AdjustSplitInputShellPos)
+     * - Relocating the split input view. (@see AdjustSplitInputShellPos)
+     */
+    virtual void SetSplitInputEditor(MSwtControl* aEditor) = 0;
+    
+    /**
+     * The currently active(focused) split input editor.
+     * Can be any Text, TextExtension, ConstrainedText or DateEditor.
+     */
+    virtual MSwtControl* SplitInputEditor() const = 0;
+    
+    /**
+     * The currently active split input editor or a parent ScrolledComposite.
+     * The view is getting resized automatically to fit in the available space
+     * above the VKB.
+     */
+    virtual MSwtControl* SplitInputView() const = 0;
+    
+    /**
+     * The parent shell of the active split input editor is temporarily
+     * moved vertically during split input editing therefore setting a new
+     * location must be diverted trough UiUtils.
+     * @param aOriginalPos - The real position of the Shell, which will be 
+     *                       applied when VKB closes.
+     */
+    virtual void SetSplitInputShellPos(const TPoint& aOriginalPos) = 0;
+    
+    /**
+     * The active split input editor or its ScrolledComposite ancestor 
+     * is temporarily resized vertically during split input editing 
+     * therefore setting a new size must be diverted trough UiUtils.
+     * @param aOriginalSize - The real size of the control, which will be 
+     *                        applied when VKB closes.
+     */
+    virtual void SetSplitInputViewSize(const TSize& aOriginalSize) = 0;
+    
+    /**
+     * The split input shell resized during split editing or
+     * the split input view relocated during split editing.
+     * The vertical position of the shell will be readjusted.
+     */
+    virtual void AdjustSplitInputShellPos() = 0;
 };
 
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcombo.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcombo.h	Wed Jun 09 09:34:07 2010 +0300
@@ -188,11 +188,6 @@
     void DoSelectItemL(TInt aIdx);
 
     /**
-     * Fixed border for the contained combo.
-     */
-    void DrawContainedComboBorder() const;
-
-    /**
      * Position the contained combo in the middle of the compound control.
      */
     void CenterContainedCombo();
@@ -241,6 +236,12 @@
      * Not own.
      */
     MTouchFeedback* iFeedback;
+    
+    /**
+     * True for as long as pressed by pointer.
+     * Eclipses ASwtControlBase::iPressed!
+     */
+    TBool iPressed;
 };
 
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcomposite.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcomposite.h	Wed Jun 09 09:34:07 2010 +0300
@@ -91,6 +91,8 @@
     void ComputeTabListL(RSwtControlArray& aList);
     void UpdateDoNotDrawFlag();
     void Update() const;
+    void SetBounds(const TRect& aRect);
+    void SetWidgetSize(const TSize& aSize);
 
 // From ASwtScrollableBase
 protected:
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcontrolbase.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcontrolbase.h	Wed Jun 09 09:34:07 2010 +0300
@@ -57,16 +57,6 @@
 // Own methods
 public:
     /**
-     * Get the visible rectangle of this control.
-     * Window coordinates.
-     * The clipping take in account the parent, but not the brother.
-     * To take in account the brother use VisibleRegion() method.
-     * @param aVisibleBounds If true return the visible rectangle of the control,
-     *        else return visible client rectangle of the control.
-     */
-    TRect VisibleRect(TBool aVisibleBounds = EFalse) const;
-
-    /**
      * Clips given rectangle to rectangle which can be fully visible in
      * its parent. Other controls in the same parent are not taken
      * into account.
@@ -75,18 +65,6 @@
      */
     TRect ClipToVisibleRect(const TRect& aRect) const;
 
-// Hurts the performance of non overlapping drawing when there are a lot
-// of control sibblings and does not really work for overlapping drawing
-#if 0
-    /**
-     * Get the visible region of the Control.
-     * Screen coordinates.
-     * @param If true return the visible region of the control,
-     *        else return visible client region of the control.
-     */
-    void VisibleRegion(RRegion& aRegion, TBool aVisibleBounds = EFalse) const;
-#endif
-
     /**
      * Provide the Skin background.
      * Should be called by the MopSupplyObject of all implementeded controls.
@@ -397,6 +375,8 @@
     IMPORT_C void DoControlSpecificFeedback(const TBool& aFirstTap,
                                             const TBool& aTappedToChildRect, const TPointerEvent& aPointerEvent) const;
     IMPORT_C void PostMouseEventL(const TPointerEvent& aPointerEvent);
+    IMPORT_C void EnableFocusHighlight(TBool aEnable);
+    IMPORT_C TRect VisibleRect(TBool aVisibleBounds = EFalse) const;
 
 protected:
     MSwtDisplay& iDisplay;
@@ -413,7 +393,6 @@
     CAknsFrameBackgroundControlContext* iFocusFrame; // Frame context used to draw focus highlight background.
     TBool iTraverse;                // True when a keypress causes traversing
     TPoint iPrevSwtPos;             // Used by HandleSizeChanged and HandlePositionChanged only
-    TSize  iPrevSwtSize;            // Used by HandleSizeChanged and HandlePositionChanged only
     TPoint iPrevCoePos;             // Used by HandleSizeChanged and HandlePositionChanged only
     TSize  iPrevCoeSize;            // Used by HandleSizeChanged and HandlePositionChanged only
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtdateeditor.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtdateeditor.h	Wed Jun 09 09:34:07 2010 +0300
@@ -158,6 +158,9 @@
     void  SetBackgroundL(const MSwtColor* aColor);
     void  SetForegroundL(const MSwtColor* aColor);
     TBool IsKeyUsed(TUint aKeyCode) const;
+    void SetBounds(const TRect& aRect);
+    void SetWidgetSize(const TSize& aSize);
+    TSwtPeer Dispose();
 
 // From ASwtControlBase
 protected:
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtdisplaybase.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtdisplaybase.h	Wed Jun 09 09:34:07 2010 +0300
@@ -149,6 +149,7 @@
     void PostDialogResultEventL(CSwtDialogBroker* aBroker, TSwtPeer aPeer, TInt aDialogResult);
     void PostDialogResultEventL(CSwtDialogBroker* aBroker, TSwtPeer aPeer, TInt aDialogResult1, TInt aDialogResult2, TInt aDialogResult3);
     void PostCloseEventL(TSwtPeer aPeer, TBool& aDispatched);
+    void PostShowFocusedControlEventL(TSwtPeer aPeer);
     TInt ApplicationUid();
     void SetMobileDevice(MSwtMobileDevice* aMobileDevice);
     MSwtMobileDevice* MobileDevice();
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtevents.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtevents.h	Wed Jun 09 09:34:07 2010 +0300
@@ -1155,4 +1155,22 @@
     HBufC* iSelectedText;
 };
 
+/**
+ * CSwtShowFocusedControlEvent
+ * @lib eswt
+ */
+NONSHARABLE_CLASS(CSwtShowFocusedControlEvent)
+        : public CSwtEvent
+{
+// Own methods
+public:
+    CSwtShowFocusedControlEvent(TSwtPeer aPeer);
+
+// From CSwtEvent
+public:
+    TSwtEventType Type() const;
+
+protected:
+    void DoDispatch(JNIEnv* aJniEnv);
+};
 #endif // SWTEVENTS_H
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtgrid.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtgrid.h	Wed Jun 09 09:34:07 2010 +0300
@@ -70,6 +70,13 @@
     void SetItemDrawerClippingRect(const TRect& aRect);
 
     /**
+     * Forwards pointer event directly to CEikListbox's HandlePointerEventL.
+     * This method is used to handle scrollbar pointer events delivered while
+     * kinetic scrolling is ongoing.
+     */
+    void ForwardPointerEventL(const TPointerEvent& aPointerEvent);
+
+    /**
      * Wrapper for protected member function HandleScrollEventL of CAknGrid.
      */
 #if defined( RD_SCALABLE_UI_V2)
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistbase.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistbase.h	Wed Jun 09 09:34:07 2010 +0300
@@ -242,6 +242,12 @@
      */
     void GetUserSelectionL(CArrayFix<TInt>* aCurrSelItems);
 
+    /**
+     * Updates flick scrolling status.
+     * @param aEventType CEikListbox event type.
+     */
+    void UpdateFlickScrollingState(TListBoxEvent aEventType);
+
 // From CCoeControl
 public:
     TInt CountComponentControls() const;
@@ -280,6 +286,9 @@
     void SetForegroundL(const MSwtColor* aColor);
     void SetBackgroundL(const MSwtColor* aColor);
     TBool IsLongTapAnimationCandidate(const TPointerEvent& aPointerEvent) const;
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    void EnableFocusHighlight(TBool aEnable);
+#endif //RD_JAVA_S60_RELEASE_9_2
 
 // From ASwtScrollableBase
 protected:
@@ -368,6 +377,16 @@
      * View visible rect at last draw
      */
     mutable TRect iLastViewVisibleRect;
+
+    /**
+     * True when list is flick scrolling
+     */
+    TBool iFlickScrollingOngoing;
+
+    /**
+     * True when pointer events on scrollbar should be delivered to listbox
+     */
+    TBool iScrollbarPointerEventToListbox;
 };
 
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistbox.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistbox.h	Wed Jun 09 09:34:07 2010 +0300
@@ -176,6 +176,9 @@
     void SetForegroundL(const MSwtColor* aColor);
     void SetBackgroundL(const MSwtColor* aColor);
     TBool IsLongTapAnimationCandidate(const TPointerEvent& aPointerEvent) const;
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    void EnableFocusHighlight(TBool aEnable);
+#endif //RD_JAVA_S60_RELEASE_9_2
 
 // From MSwtListBox
 public:
@@ -398,6 +401,12 @@
      */
     void RemoveSubRefs();
 
+    /**
+     * Updates flick scrolling status.
+     * @param aEventType CEikListbox event type.
+     */
+    void UpdateFlickScrollingState(TListBoxEvent aEventType);
+
 #ifdef RD_JAVA_ADVANCED_TACTILE_FEEDBACK
 public:
     void DoControlSpecificFeedback(
@@ -485,6 +494,16 @@
      * View visible rect at last draw
      */
     mutable TRect iLastViewVisibleRect;
+
+    /**
+     * True when list is flick scrolling
+     */
+    TBool iFlickScrollingOngoing;
+
+    /**
+     * True when pointer events on scrollbar should be delivered to listbox
+     */
+    TBool iScrollbarPointerEventToListbox;
 };
 
 #endif // SWTLISTBOX_H
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistboxlists.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistboxlists.h	Wed Jun 09 09:34:07 2010 +0300
@@ -267,6 +267,15 @@
         TInt aListType,
         CEikTextListBox* aList,
         TBool aEnabled);
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    /**
+     * Enabling focus highlight for lists
+     */
+    static void EnableFocusHighlight(
+        CListItemDrawer* aItemDrawer,
+        TBool aEnable);
+#endif //RD_JAVA_S60_RELEASE_9_2
 };
 
 #endif // SWTLISTBOXLISTS_H
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistview.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlistview.h	Wed Jun 09 09:34:07 2010 +0300
@@ -126,6 +126,9 @@
     void            HandlePointerEventL(const TPointerEvent& aPointerEvent);
     const MSwtMenu* GetStylusPopupControlMenu() const;
 #endif
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    void            EnableFocusHighlight(TBool aEnable);
+#endif //RD_JAVA_S60_RELEASE_9_2
 
 // From MEikCommandObserver
 public:
@@ -154,7 +157,9 @@
     CAknGridView*   GetGridView() const;
     CGulIcon*       CreateIconL(const MSwtImage* aIcon) const;
     void            DoGridCellLayoutL(const TSwtListViewDensity& aDensity);
-    void            LoadLayouts(const TSwtListViewDensity& aDensity, TSize& aCellSize, TRect& aIconRect, TRect& aSelRect, TRect& aTextRect, TInt& aTextCellFontId);
+    void            LoadLayouts(const TSwtListViewDensity& aDensity, TSize& aCellSize,
+                                TRect& aIconRect, TRect& aSelRect, TRect& aTextRect,
+                                TInt& aTextCellFontId);
     void            CalcRowsColumns(const TSize& aCellSize, TInt& aXCells, TInt& aYCells) const;
     void            AddTextL(const TDesC& aPtr, const TInt& aPos);
     void            AddIconL(const MSwtImage* aImage, const TInt& aPos);
@@ -200,6 +205,7 @@
     ) const;
     void            CoerceCellRect(const TSwtListViewDensity& aDensity,
                                    TRect& aCellRect) const;
+    void            UpdateFlickScrollingState(TListBoxEvent aEventType);
 
 #ifdef RD_JAVA_ADVANCED_TACTILE_FEEDBACK
 public:
@@ -337,6 +343,16 @@
      * View visible rect at last draw
      */
     mutable TRect iLastViewVisibleRect;
+
+    /**
+     * True when list is flick scrolling
+     */
+    TBool iFlickScrollingOngoing;
+
+    /**
+     * True when pointer events on scrollbar should be delivered to listbox
+     */
+    TBool iScrollbarPointerEventToListbox;
 };
 
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtshell.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtshell.h	Wed Jun 09 09:34:07 2010 +0300
@@ -36,6 +36,11 @@
     void ConstructL();
     MSwtShell& GetTopShell() const;
     void RemoveAndRememberFocus();
+    
+    // Relocating an editor's Shell must be delegated to UiUtils 
+    // while split editing is on (@see SetSplitInputShellPos)
+    // CCoeControl::SetRect must not be called directly.
+    void DoSetRect(const TRect& aRect);
 
 // From CSwtComposite
 protected:
@@ -57,6 +62,7 @@
 protected:
     void FocusChanged(TDrawNow aDrawNow);
     void Draw(const TRect& aRect) const;
+    void SizeChanged();
 
 // From MCoeControlBackground
 public:
@@ -150,6 +156,7 @@
     TBool HasCba() const;
     void SetTaskTip();
     TBool IsTaskTip() const;
+    void DoSetLocation(const TPoint& aPoint);
 
 // From MEikStatusPaneObserver
 public:
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtsortedlist.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtsortedlist.h	Wed Jun 09 09:34:07 2010 +0300
@@ -160,6 +160,9 @@
     TRect ClientRect() const;
     TSize ComputeSizeL(TInt aWHint, TInt aHHint);
     void ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    void EnableFocusHighlight(TBool aEnable);
+#endif //RD_JAVA_S60_RELEASE_9_2
 protected:
     void DoPaint(const TRect& aRect) const;
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttable.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttable.h	Wed Jun 09 09:34:07 2010 +0300
@@ -280,6 +280,9 @@
     TBool               IsKeyUsed(TUint aKeyCode) const;
     TBool               MSKSelCmdEnabled() const;
     void                UpdateDoNotDrawFlag();
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    void                EnableFocusHighlight(TBool aEnable);
+#endif //RD_JAVA_S60_RELEASE_9_2
 
 // from base class ASwtScrollableBase
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttablelistbox.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttablelistbox.h	Wed Jun 09 09:34:07 2010 +0300
@@ -254,6 +254,12 @@
     TInt HorizontalScrollPixelsPerArrowEvent();
     TInt HorizontalScrollPixelsPerPageEvent();
 
+    /**
+     * Updates flick scrolling status.
+     * @param aEventType CEikListbox event type.
+     */
+    void UpdateFlickScrollingState(TListBoxEvent aEventType);
+
 private: // data
 
     /**
@@ -299,6 +305,16 @@
      * Used to implement horizontal panning.
      */
     TPoint iDragPos;
+
+    /**
+     * True when list is flick scrolling
+     */
+    TBool iFlickScrollingOngoing;
+
+    /**
+     * True when pointer events on scrollbar should be delivered to listbox
+     */
+    TBool iScrollbarPointerEventToListbox;
 };
 
 #endif // SWTTABLELISTBOX_H
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttextbase.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttextbase.h	Wed Jun 09 09:34:07 2010 +0300
@@ -18,7 +18,7 @@
 #include "swtscrollablebase.h"
 #include "swteditindicator.h"
 
-#if defined( RD_SCALABLE_UI_V2)
+#ifdef RD_SCALABLE_UI_V2
 #include <fepbase.h>
 #endif //RD_SCALABLE_UI_V2
 
@@ -32,7 +32,7 @@
 NONSHARABLE_CLASS(CSwtTextBase)
         : public CAknControl
         , public ASwtScrollableBase
-#if defined( RD_SCALABLE_UI_V2)
+#ifdef RD_SCALABLE_UI_V2
         , public MCoeCaptionRetrieverForFep
 #endif //RD_SCALABLE_UI_V2
 {
@@ -192,6 +192,9 @@
     TBool CanDrawOutsideRect() const;
     void SetBackgroundL(const MSwtColor* aColor);
     void SetForegroundL(const MSwtColor* aColor);
+    void SetBounds(const TRect& aRect);
+    void SetWidgetSize(const TSize& aSize);
+    TSwtPeer Dispose();
 
 // From ASwtControlBase
 protected:
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtuiutils.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtuiutils.h	Wed Jun 09 09:34:07 2010 +0300
@@ -187,6 +187,11 @@
 
     void HideIndicator(TInt aId);
     void HideIndicators();
+    
+    void DoSetSplitInputShellPos(const TPoint& aPos);
+    void DoSetSplitInputViewSize(const TSize& aSize);
+    
+    MSwtControl* ScrolledCompositeAncestor(const MSwtControl& aControl) const;
 
 // From MSwtUiUtils
 public:
@@ -229,7 +234,13 @@
     TRect TaskTipRect() const;
     void SetPointerCaptureControl(MSwtControl* aControl);
     MSwtControl* PointerCaptureControl();
-
+    void SetSplitInputEditor(MSwtControl *aEditor);
+    MSwtControl* SplitInputEditor() const;
+    MSwtControl* SplitInputView() const;
+    void SetSplitInputShellPos(const TPoint& aOriginalPos);
+    void SetSplitInputViewSize(const TSize& aOriginalSize);
+    void AdjustSplitInputShellPos();
+    
 protected:
     void HandleFreeRamEventL(TInt aEventType);
 
@@ -389,6 +400,15 @@
      * Key input flag.
      */
     TBool iNaviKeyInput;
+    
+    /**
+     * Split input data.
+     */
+    MSwtControl* iSplitInputEditor;
+    MSwtControl* iSplitInputView;
+    TSize iSplitInputViewSize;
+    TPoint iSplitInputShellPos;
+    TBool iSplitInputSPVisible;
 };
 
 /**
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbrowser.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbrowser.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -419,6 +419,8 @@
     }
 
     iHandlingPointerEv = EFalse;
+
+    PostMouseEventL(aPointerEvent);
 }
 #endif
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbutton.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtbutton.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -213,12 +213,18 @@
     iButton->SetBackground(this);   // Back will be drawn by ASwtControlBase::Draw
 
     // Set default color
-    TRgb color;
+    TRgb colorNormal;
     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
-                              color,
+                              colorNormal,
                               KAknsIIDQsnTextColors,
-                              EAknsCIQsnTextColorsCG63); // Messaging touch buttons
-    iButton->OverrideColorL(EColorButtonText, color);
+                              EAknsCIQsnTextColorsCG13); // SK
+    TRgb colorPressed;
+    AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+                              colorPressed,
+                              KAknsIIDQsnTextColors,
+                              EAknsCIQsnTextColorsCG69); // pressed SK
+    iButton->OverrideColorL(EColorButtonText, colorNormal);
+    iButton->OverrideColorL(EColorButtonTextPressed, colorPressed);
 }
 
 // ---------------------------------------------------------------------------
@@ -641,10 +647,12 @@
     else
     {
         // Reset to default color
+        TRgb colorNormal;
         AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
-                                  color,
+                                  colorNormal,
                                   KAknsIIDQsnTextColors,
-                                  EAknsCIQsnTextColorsCG63); // Messaging touch buttons
+                                  EAknsCIQsnTextColorsCG13); // SK
+        iButton->OverrideColorL(EColorButtonText, colorNormal);
     }
 
     if (iButton)
@@ -1182,6 +1190,8 @@
 #endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
         iButton->HandlePointerEventL(aPointerEvent);
     }
+
+    PostMouseEventL(aPointerEvent);
 }
 #endif // RD_SCALABLE_UI_V2
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcaptionedcontrol.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcaptionedcontrol.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -90,7 +90,16 @@
 
     if (iChild)
     {
-        iChild->CoeControl().SetSize(iSize);
+        // Divert the job to UiUtils if this is an editor open for split view editing.
+        MSwtUiUtils& utils = iChild->GetShell().Display().UiUtils();
+        if (utils.SplitInputView() == iChild)
+        {
+            utils.SetSplitInputViewSize(iSize);
+        }
+        else
+        {
+            iChild->CoeControl().SetSize(iSize);
+        }
     }
 }
 
@@ -674,6 +683,7 @@
     {
         iPointerGrabbingControl = NULL;
         ASwtControlBase::SetSwtFocus(KSwtFocusByPointer);
+        PostMouseEventL(aPointerEvent);
     }
 }
 #endif // RD_SCALABLE_UI_V2
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcombo.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcombo.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -293,7 +293,11 @@
     }
 
     if (pressed != iPressed)
+    {
         Redraw();
+    }
+
+    PostMouseEventL(aPointerEvent);
 }
 #endif //RD_SCALABLE_UI_V2
 
@@ -314,7 +318,23 @@
 //
 void CSwtCombo::Draw(const TRect& /*aRect*/) const
 {
-    DrawContainedComboBorder();
+    CWindowGc& gc = SystemGc();
+    TRect rect(iCombo->Rect());
+    TAknLayoutRect topLeft = CSwtLafFacade::GetLayoutRect(
+                                 CSwtLafFacade::EListHighlightSkinPlacingGeneralLine2, rect);
+
+    TAknLayoutRect bottomRight = CSwtLafFacade::GetLayoutRect(
+                                     CSwtLafFacade::EListHighlightSkinPlacingGeneralLine5, rect);
+
+    TRect innerRect(topLeft.Rect().iBr, bottomRight.Rect().iTl);
+
+    // "Connect" the label and the button with a toolbar frame.
+    AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(),
+                             gc,
+                             rect,
+                             innerRect,
+                             iPressed || iOpen ? KAknsIIDQsnFrButtonTbPressed : KAknsIIDQsnFrButtonTb,
+                             iPressed || iOpen ? KAknsIIDQsnFrButtonTbCenterPressed : KAknsIIDQsnFrButtonTbCenter);
 }
 
 // ---------------------------------------------------------------------------
@@ -1452,17 +1472,3 @@
 #endif //RD_TACTILE_FEEDBACK
 }
 
-// ---------------------------------------------------------------------------
-// CSwtCombo::DrawContainedComboBorder()
-// ---------------------------------------------------------------------------
-//
-void CSwtCombo::DrawContainedComboBorder() const
-{
-    CWindowGc& gc = SystemGc();
-    gc.SetBrushStyle(CGraphicsContext::ENullBrush);
-    gc.SetPenColor(iDisplay.UiUtils().GetSystemColor(ESwtColorWidgetBorder));
-    gc.SetPenStyle(CGraphicsContext::ESolidPen);
-    gc.SetPenSize(TSize(1, 1));
-    gc.DrawRect(iCombo->Rect());
-}
-
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcomposite.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcomposite.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -451,9 +451,17 @@
 
                         // Unfocus
                         MSwtControl* ctrl = GetShell().FocusControl();
-                        if (ctrl && ctrl != iPhysicsFocusedCtrl)
+                        if (ctrl)
                         {
-                            ctrl->CoeControl().SetFocus(EFalse);
+#ifdef RD_JAVA_S60_RELEASE_9_2
+                            // While panning there should be no focus highlight
+                            // Highlight is enabled after pressing any key
+                            ctrl->EnableFocusHighlight(EFalse);
+#endif //RD_JAVA_S60_RELEASE_9_2
+                            if (ctrl != iPhysicsFocusedCtrl)
+                            {
+                                ctrl->CoeControl().SetFocus(EFalse);
+                            }
                         }
 
                         // Revert
@@ -528,6 +536,7 @@
         // CSwtTable::CountComponentControls(), etc.
         CAknControl::HandlePointerEventL(aPointerEvent);
     }
+    PostMouseEventL(aPointerEvent);
 }
 
 void CSwtComposite::HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType)
@@ -936,6 +945,37 @@
     }
 }
 
+void CSwtComposite::SetBounds(const TRect& aRect)
+{
+    // Divert the job to UiUtils if this is a parent to an editor
+    // open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.SetSplitInputViewSize(aRect.Size());
+        SetLocation(aRect.iTl);
+    }
+    else
+    {
+        ASwtScrollableBase::SetBounds(aRect);
+    }
+}
+
+void CSwtComposite::SetWidgetSize(const TSize& aSize)
+{
+    // Divert the job to UiUtils if this is a parent to an editor
+    // open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.SetSplitInputViewSize(aSize);
+    }
+    else
+    {
+        ASwtScrollableBase::SetWidgetSize(aSize);
+    }
+}
+
 void CSwtComposite::DrawScrollBarBackground(const TRect& aRect) const
 {
     const CCoeControl& coeControl = CoeControl();
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtconstrainedtext.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtconstrainedtext.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -655,51 +655,53 @@
     {
     case ENumeric:
     {
-        CSwtIntegerEdwin* ed = new(ELeave)CSwtIntegerEdwin;
-        editor = ed;
+        editor = new(ELeave)CSwtIntegerEdwin;
         SetEditor(editor);
-        ed->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
-        Editor().SetTextLimit(iTextLimit);
-        Editor().SetAknEditorCase(EAknSCTNumeric);
-        Editor().SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
-        Editor().SetAknEditorInputMode(EAknEditorNumericInputMode);
-        Editor().SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
-        Editor().SetAknEditorFlags(EAknEditorFlagFixedCase | EAknEditorFlagNoT9);
-        Editor().SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
-#ifdef RD_SCALABLE_UI_V2
-        Editor().SetAknEditorFlags(EAknEditorFlagUseSCTNumericCharmap
-                                   | EAknEditorFlagDeliverVirtualKeyEventsToApplication);
-#else
-        Editor().SetAknEditorFlags(EAknEditorFlagUseSCTNumericCharmap);
-#endif // RD_SCALABLE_UI_V2 
-        Editor().SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_NUMERIC_MODE_DIALOG);
+        editor->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
+        editor->SetTextLimit(iTextLimit);
+        editor->SetAknEditorCase(EAknSCTNumeric);
+        editor->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
+        editor->SetAknEditorInputMode(EAknEditorNumericInputMode);
+        editor->SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
+        editor->SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
+        editor->SetAknEditorFlags(EAknEditorFlagFixedCase
+                                  | EAknEditorFlagNoT9
+                                  | EAknEditorFlagUseSCTNumericCharmap
+                                  | EAknEditorFlagDeliverVirtualKeyEventsToApplication
+#ifdef RD_JAVA_S60_RELEASE_9_2
+                                  | EAknEditorFlagEnablePartialScreen
+#endif // RD_JAVA_S60_RELEASE_9_2                           
+                                 );
+        editor->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_NUMERIC_MODE_DIALOG);
     }
     break;
     case EDecimal:
     {
-        CSwtFloatingPointEdwin* fpe = new(ELeave) CSwtFloatingPointEdwin;
-        editor = fpe;
+        editor = new(ELeave) CSwtFloatingPointEdwin;
         SetEditor(editor);
-        fpe->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
-        Editor().SetAknEditorCase(EAknSCTNumeric);
-        Editor().SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
-        Editor().SetAknEditorInputMode(EAknEditorNumericInputMode);
-        Editor().SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
-        Editor().SetAknEditorFlags(EAknEditorFlagFixedCase | EAknEditorFlagNoT9);
-        Editor().SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
-#ifdef RD_SCALABLE_UI_V2
-        Editor().SetAknEditorFlags(EAknEditorFlagUseSCTNumericCharmap
-                                   | EAknEditorFlagDeliverVirtualKeyEventsToApplication);
-#else
-        Editor().SetAknEditorFlags(EAknEditorFlagUseSCTNumericCharmap);
-#endif // RD_SCALABLE_UI_V2 
+        editor->ConstructL(-KMaxTInt, KMaxTInt, iTextLimit);
+        editor->SetAknEditorCase(EAknSCTNumeric);
+        editor->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
+        editor->SetAknEditorInputMode(EAknEditorNumericInputMode);
+        editor->SetAknEditorCurrentInputMode(EAknEditorNumericInputMode);
+        editor->SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
+
+        editor->SetAknEditorFlags(EAknEditorFlagFixedCase
+                                  | EAknEditorFlagNoT9
+                                  | EAknEditorFlagUseSCTNumericCharmap
+                                  | EAknEditorFlagDeliverVirtualKeyEventsToApplication
+#ifdef RD_JAVA_S60_RELEASE_9_2
+                                  | EAknEditorFlagEnablePartialScreen
+#endif // RD_JAVA_S60_RELEASE_9_2                           
+                                 );
+
         if (iDecimalSeparator == ',')
         {
-            Editor().SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_WITH_COMMA_DIALOG);
+            editor->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_WITH_COMMA_DIALOG);
         }
         else
         {
-            Editor().SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_DIALOG);
+            editor->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_DECIMAL_MODE_DIALOG);
         }
     }
     break;
@@ -716,12 +718,12 @@
         editor->SetAknEditorAllowedInputModes(EAknEditorNumericInputMode);
         editor->SetAknEditorInputMode(EAknEditorNumericInputMode);
         editor->SetAknEditorNumericKeymap(EAknEditorAlphanumericNumberModeKeymap);
-#ifdef RD_SCALABLE_UI_V2
         editor->SetAknEditorFlags(EAknEditorFlagUseSCTNumericCharmap
-                                  | EAknEditorFlagDeliverVirtualKeyEventsToApplication);
-#else
-        editor->SetAknEditorFlags(EAknEditorFlagUseSCTNumericCharmap);
-#endif // RD_SCALABLE_UI_V2            
+                                  | EAknEditorFlagDeliverVirtualKeyEventsToApplication
+#ifdef RD_JAVA_S60_RELEASE_9_2
+                                  | EAknEditorFlagEnablePartialScreen
+#endif // RD_JAVA_S60_RELEASE_9_2                          
+                                 );
         editor->SetAknEditorSpecialCharacterTable(R_ESWT_CONSTRAINEDTEXT_PHONENUMBER_MODE_DIALOG);
     }
     break;
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcontrolbase.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtcontrolbase.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -418,6 +418,12 @@
     iDisplay.PostMouseEventL(iPeer, type, button, pos, stateMask);
 }
 
+EXPORT_C void ASwtControlBase::EnableFocusHighlight(TBool /*aEnable*/)
+{
+    // Method is used only on 9.2 for list controls (Lists, ListView,
+    // ListBox and Table)
+}
+
 TPoint ASwtControlBase::ComputeLocationToSet(const TPoint& aLocation)
 {
     ASSERT(!IsShell());
@@ -505,7 +511,7 @@
     delete this;
 }
 
-TRect ASwtControlBase::VisibleRect(TBool aVisibleBounds) const
+EXPORT_C TRect ASwtControlBase::VisibleRect(TBool aVisibleBounds) const
 {
     // WINDOW COORDINATES!
     if (!CoeControl().IsVisible())
@@ -1213,20 +1219,15 @@
 
 EXPORT_C void ASwtControlBase::HandleSizeChanged()
 {
-    if (iPrevSwtSize == GetWidgetSize() && iPrevCoeSize == CoeControl().Size())
+    if (iPrevCoeSize == CoeControl().Size())
     {
         return;
     }
 
-    if (iPrevSwtSize != GetWidgetSize())
-    {
-        iPrevSwtSize = GetWidgetSize();
-        TRAP_IGNORE(iDisplay.PostResizeEventL(iPeer));
-    }
-
     if (iPrevCoeSize != CoeControl().Size())
     {
         iPrevCoeSize = CoeControl().Size();
+        TRAP_IGNORE(iDisplay.PostResizeEventL(iPeer));
         HandleRectChanged();
     }
 }
@@ -1904,13 +1905,13 @@
     return CoeControl().Size();
 }
 
-EXPORT_C void ASwtControlBase::SetWidgetSize(const TSize& aNewSize)
+EXPORT_C void ASwtControlBase::SetWidgetSize(const TSize& aSize)
 {
     ASSERT(!IsShell());
 
     CCoeControl& coeCtrl = CoeControl();
     TRect oldRect(coeCtrl.Rect());
-    TRect newRect(coeCtrl.Position(), aNewSize);
+    TRect newRect(coeCtrl.Position(), aSize);
 
     if (newRect == oldRect)
     {
@@ -1963,7 +1964,7 @@
     }
 
     // Set and redraw new rect
-    coeCtrl.SetSize(aNewSize);
+    coeCtrl.SetSize(aSize);
     if (!(iStyle & KSwtStyleNoRedrawResize))
     {
         if (urgent)
@@ -2562,6 +2563,7 @@
 EXPORT_C void ASwtControlBase::HandlePointerEventL(const TPointerEvent& aPointerEvent)
 {
     CoeControl().HandlePointerEventL(aPointerEvent);
+    PostMouseEventL(aPointerEvent);
 }
 #else
 EXPORT_C void ASwtControlBase::HandlePointerEventL(const TPointerEvent& /*aPointerEvent*/)
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -17,6 +17,9 @@
 #include <avkon.rsg>
 #include <AknUtils.h>
 #include <AknDef.h>
+#ifdef RD_JAVA_S60_RELEASE_9_2
+#include <AknPriv.hrh>
+#endif
 #include <swtlaffacade.h>
 #if defined( RD_SCALABLE_UI_V2 )
 #include <swtbuttonproxy.h>
@@ -202,17 +205,10 @@
 // ---------------------------------------------------------------------------------------------
 //
 void CSwtDateEditor::FocusChanged(TDrawNow aDrawNow)
-{    
+{
     if (iEditor)
     {
         TRAP_IGNORE(PrepareForFocusChangeL());
-        
-        // Aparenlty this is the only way of forcing the VKB to close.
-        if (iEditor->IsFocused() && !IsFocused())
-        {
-            iDisplay.CoeEnv()->Fep()->HandleDestructionOfFocusedItem();
-        }
-        
         iEditor->SetFocus(IsFocused());
     }
 
@@ -225,6 +221,15 @@
 //
 void CSwtDateEditor::MakeVisible(TBool aVisible)
 {
+    // Close VKB. Do it here instead of FocusChange to avoid split input flicker.
+    if (iEditor->IsFocused() && !aVisible)
+    {
+        CCoeFep* fep = iDisplay.CoeEnv()->Fep();
+        if (fep)
+        {
+            fep->HandleDestructionOfFocusedItem();
+        }
+    }
     CCoeControl::MakeVisible(aVisible);
     FocusabilityChanged();
 }
@@ -534,9 +539,19 @@
 void CSwtDateEditor::SetDimmed(TBool aDimmed)
 {
     ASSERT(iEditor);
+
+    // Close VKB. Do it here instead of FocusChange to avoid split input flicker.
+    if (iEditor->IsFocused() && aDimmed)
+    {
+        CCoeFep* fep = iDisplay.CoeEnv()->Fep();
+        if (fep)
+        {
+            fep->HandleDestructionOfFocusedItem();
+        }
+    }
+
     CCoeControl::SetDimmed(aDimmed);
     iEditor->SetDimmed(aDimmed);
-
     FocusabilityChanged();
 }
 
@@ -570,6 +585,16 @@
         }
         SizeChanged();
     }
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    else if (aType == KAknSplitInputEnabled)
+    {
+        const MSwtShell* activeShell = iDisplay.UiUtils().GetActiveShell();
+        if (activeShell && activeShell->FocusControl() == this)
+        {
+            iDisplay.UiUtils().SetSplitInputEditor(this);
+        }
+    }
+#endif
 }
 
 // ---------------------------------------------------------------------------------------------
@@ -661,6 +686,12 @@
 void CSwtDateEditor::PositionChanged()
 {
     HandlePositionChanged();
+    // Notify change to UiUtils if this is an editor open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.AdjustSplitInputShellPos();
+    }
 }
 
 // ---------------------------------------------------------------------------------------------
@@ -983,6 +1014,13 @@
         iEditor->SetDimmed(IsDimmed());
         RetrieveDefaultFontL();
         iEditor->SetSkinTextColorL(EAknsCIQsnTextColorsCG6);
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+        if (iEditor->SupportsFeature(CEikMfne::EPartialScreenInput))
+        {
+            iEditor->SetFeature(CEikMfne::EPartialScreenInput, ETrue);
+        }
+#endif
     }
     ActivateL();
 }
@@ -1106,6 +1144,51 @@
     return EFalse;
 }
 
+
+void CSwtDateEditor::SetBounds(const TRect& aRect)
+{
+    // Divert the job to UiUtils if this is an editor open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.SetSplitInputViewSize(aRect.Size());
+        SetLocation(aRect.iTl);
+    }
+    else
+    {
+        ASwtControlBase::SetBounds(aRect);
+    }
+}
+
+void CSwtDateEditor::SetWidgetSize(const TSize& aSize)
+{
+    // Divert the job to UiUtils if this is an editor open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.SetSplitInputViewSize(aSize);
+    }
+    else
+    {
+        ASwtControlBase::SetWidgetSize(aSize);
+    }
+}
+
+TSwtPeer CSwtDateEditor::Dispose()
+{
+    // Close VKB.
+    if (iEditor->IsFocused())
+    {
+        CCoeFep* fep = iDisplay.CoeEnv()->Fep();
+        if (fep)
+        {
+            fep->HandleDestructionOfFocusedItem();
+        }
+    }
+    return ASwtControlBase::Dispose();
+}
+
+
 // ---------------------------------------------------------------------------------------------
 // CSwtDateEditor::HandlePointerEventL
 // ---------------------------------------------------------------------------------------------
@@ -1116,15 +1199,16 @@
     TBool hit = ETrue;
 
 #ifdef RD_JAVA_S60_RELEASE_9_2
+    TBool isActiveSplitEditor = iDisplay.UiUtils().SplitInputEditor() == this;
     TBool pressed = iPressed;
     hit = Rect().Contains(aPointerEvent.iPosition);
 
     if (aPointerEvent.iType == TPointerEvent::EButton1Down)
-        iPressed = ETrue;
+        iPressed = !isActiveSplitEditor;
     else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
         iPressed = EFalse;
     else if (aPointerEvent.iType == TPointerEvent::EDrag)
-        iPressed = hit;
+        iPressed = hit && !isActiveSplitEditor;
 #endif
 
     if (!(aPointerEvent.iType == TPointerEvent::EButton1Up
@@ -1153,6 +1237,8 @@
     if (pressed != iPressed)
         Redraw();
 #endif
+
+    PostMouseEventL(aPointerEvent);
 }
 
 // ---------------------------------------------------------------------------------------------
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdecorations.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdecorations.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -620,23 +620,9 @@
 // CSwtDecorations::SetMaximized
 // ---------------------------------------------------------------------------
 //
-void CSwtDecorations::SetMaximized(TBool aMaximized)
+void CSwtDecorations::SetMaximized(TBool /*aMaximized*/)
 {
-    ASSERT(aMaximized != iIsMaximized);
-
-    if (aMaximized)
-    {
-        // Set bounds so as to cover the parent's client area
-        iNormalBounds = GetBounds();
-        TRect newBounds(iParent->Control()->ClientRect().Size());
-        SetBounds(newBounds);
-    }
-    else
-    {
-        SetBounds(iNormalBounds);
-    }
-
-    iIsMaximized = aMaximized;
+    // Nothing to do, unsupported feature
 }
 
 // ---------------------------------------------------------------------------
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdisplaybase.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdisplaybase.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -705,6 +705,12 @@
     iEventQueue->PushL(new(ELeave) CSwtCloseEvent(aPeer, aDispatched));
 }
 
+void ASwtDisplayBase::PostShowFocusedControlEventL(TSwtPeer aPeer)
+{
+    ASSERT_NATIVEUITHREAD();
+    iEventQueue->PushL(new(ELeave) CSwtShowFocusedControlEvent(aPeer));
+}
+
 TInt ASwtDisplayBase::ApplicationUid()
 {
     return iApplicationUid;
@@ -1148,7 +1154,20 @@
         // Forward delayed pointer event
         TPointerEvent event(iLongTapPointerEvent);
         event.iType = TPointerEvent::EButton1Up;
-        iLongTapControl->HandlePointerEventL(event); // revert
+
+        MSwtShell* shell = iLongTapControl->ShellInterface();
+        if (shell)
+        {
+            // The Shells do not process (forward event to children
+            // or send mouse event to Java) the pointer if revert is on.
+            // Therefore reset early to let Shell send the mouse event.
+            CancelLongTapAnimation();
+            shell->Control()->HandlePointerEventL(event); // revert
+        }
+        else
+        {
+            iLongTapControl->HandlePointerEventL(event); // revert
+        }
     }
 
     // Just to clear the flags.
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtevents.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtevents.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -1384,3 +1384,30 @@
                        "(ILjava/lang/String;)V", static_cast<jint>(Type()), selectedText);
 }
 
+// -----------------------------------------------------------------------------
+// CSwtShowFocusedControlEvent::CSwtShowFocusedControlEvent
+// -----------------------------------------------------------------------------
+//
+CSwtShowFocusedControlEvent::CSwtShowFocusedControlEvent(TSwtPeer aPeer)
+        : CSwtEvent(aPeer)
+{
+}
+
+// -----------------------------------------------------------------------------
+// CSwtShowFocusedControlEvent::Type
+// -----------------------------------------------------------------------------
+//
+TSwtEventType CSwtShowFocusedControlEvent::Type() const
+{
+    return ESwtEventShowFocusedControl;
+}
+
+// -----------------------------------------------------------------------------
+// CSwtShowFocusedControlEvent::DoDispatch
+// -----------------------------------------------------------------------------
+//
+void CSwtShowFocusedControlEvent::DoDispatch(JNIEnv* aJniEnv)
+{
+    TBool failed;
+    CallVoidJavaMethod(failed, aJniEnv, Peer(), "handleShowFocusedControlEvent", "()V");
+}
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtgrid.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtgrid.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -258,6 +258,14 @@
     CleanupStack::Pop();
 }
 
+// ---------------------------------------------------------------------------
+// CSwtGrid::ForwardPointerEvent
+// ---------------------------------------------------------------------------
+//
+void CSwtGrid::ForwardPointerEventL(const TPointerEvent& aPointerEvent)
+{
+    CEikListBox::HandlePointerEventL(aPointerEvent);
+}
 
 // ---------------------------------------------------------------------------
 // CSwtGrid::DoHandleScrollEventL
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swthyperlink.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swthyperlink.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -486,6 +486,8 @@
     default:
         break;
     }
+
+    PostMouseEventL(aPointerEvent);
 }
 
 // ---------------------------------------------------------------------------
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlink.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlink.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -1198,6 +1198,8 @@
         break;
     }
     }
+
+    PostMouseEventL(aPointerEvent);
 }
 
 // ---------------------------------------------------------------------------
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistbase.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistbase.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -535,8 +535,9 @@
     MSwtDisplay& aDisplay,
     TSwtPeer aPeer,
     MSwtComposite& aParent,
-    TInt aStyle) :
-        ASwtScrollableBase(aDisplay, aPeer, &aParent, aStyle)
+    TInt aStyle)
+        : ASwtScrollableBase(aDisplay, aPeer, &aParent, aStyle)
+        , iFlickScrollingOngoing(EFalse)
 {
 }
 
@@ -958,7 +959,32 @@
     // Deliver event to scrollbar
     if (iVScrollBarGrabsPointerEvents && vsb)
     {
-        vsb->HandlePointerEventL(aPointerEvent);
+        if (!iFlickScrollingOngoing
+                && aPointerEvent.iType == TPointerEvent::EButton1Down)
+        {
+            // Scrollbar was tapped after scrolling stopped
+            // by itself, so no need to redirect events
+            iScrollbarPointerEventToListbox = EFalse;
+        }
+
+        if (iScrollbarPointerEventToListbox)
+        {
+            // Stops kinetic scrolling when scrollbar is tapped
+            iList->HandlePointerEventL(aPointerEvent);
+            // Continue delivering events until button up appears to prevent
+            // some unexpected behavior in both scrollbar and listbox
+            switch (aPointerEvent.iType)
+            {
+            case TPointerEvent::EButton1Up:
+                iScrollbarPointerEventToListbox = EFalse;
+                break;
+            }
+        }
+        else
+        {
+            // Handles scrollbar behavior
+            vsb->HandlePointerEventL(aPointerEvent);
+        }
     }
 
     // Deliver event to list
@@ -1030,6 +1056,8 @@
     {
         iVScrollBarGrabsPointerEvents = EFalse;
     }
+
+    PostMouseEventL(aPointerEvent);
 }
 #else //RD_SCALABLE_UI_V2
 void CSwtListBase::HandlePointerEventL(
@@ -1069,6 +1097,9 @@
     ASSERT(iList);
 
     TBool isFocused = IsFocusControl();
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    EnableFocusHighlight(isFocused);
+#endif //RD_JAVA_S60_RELEASE_9_2
     iList->SetFocus(isFocused, aDrawNow);
     HandleFocusChanged(aDrawNow);
 }
@@ -1207,6 +1238,14 @@
 //
 void CSwtListBase::ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
 {
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    if (aType == EEventKeyDown)
+    {
+        // After panning focus highlight was disabled, so enabling again
+        EnableFocusHighlight(ETrue);
+    }
+#endif //RD_JAVA_S60_RELEASE_9_2
+
     // No items or not a normal key event
     if (iList->Model()->NumberOfItems() == 0 || aType != EEventKey)
     {
@@ -1370,6 +1409,22 @@
 }
 #endif
 
+#ifdef RD_JAVA_S60_RELEASE_9_2
+// ---------------------------------------------------------------------------
+// CSwtListBase::EnableFocusHighlight
+// From MSwtControl
+// ---------------------------------------------------------------------------
+//
+void CSwtListBase::EnableFocusHighlight(TBool aEnable)
+{
+    ASSERT(iList);
+    ASSERT(iList->View());
+
+    CSwtListBoxLists::EnableFocusHighlight(iList->View()->ItemDrawer(),
+                                           aEnable);
+}
+#endif //RD_JAVA_S60_RELEASE_9_2
+
 // ---------------------------------------------------------------------------
 // CSwtListBase::SbFrame
 // From ASwtScrollableBase
@@ -1525,6 +1580,8 @@
         return;
     }
 
+    UpdateFlickScrollingState(aEventType);
+
     switch (aEventType)
     {
         // On 5.0, drawing trough Java gives simply a better fps.
@@ -1558,3 +1615,21 @@
 }
 #endif //RD_SCALABLE_UI_V2
 
+// ---------------------------------------------------------------------------
+// CSwtListBase::UpdateFlickScrollingState
+// Updates flick scrolling status based on received listbox event.
+// ---------------------------------------------------------------------------
+//
+void CSwtListBase::UpdateFlickScrollingState(TListBoxEvent aEventType)
+{
+    switch (aEventType)
+    {
+    case EEventFlickStarted:
+        iFlickScrollingOngoing = ETrue;
+        iScrollbarPointerEventToListbox = ETrue;
+        break;
+    case EEventFlickStopped:
+        iFlickScrollingOngoing = EFalse;
+        break;
+    }
+}
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistbox.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistbox.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -140,6 +140,8 @@
     MSwtComposite& aParent,
     TInt aStyle)
         : ASwtScrollableBase(aDisplay, aPeer, &aParent, aStyle)
+        , iFlickScrollingOngoing(EFalse)
+
 {
 }
 
@@ -343,7 +345,32 @@
     // Deliver event to scrollbar
     if (iVScrollBarGrabsPointerEvents && vsb)
     {
-        vsb->HandlePointerEventL(aPointerEvent);
+        if (!iFlickScrollingOngoing
+                && aPointerEvent.iType == TPointerEvent::EButton1Down)
+        {
+            // Scrollbar was tapped after scrolling stopped
+            // by itself, so no need to redirect events
+            iScrollbarPointerEventToListbox = EFalse;
+        }
+
+        if (iScrollbarPointerEventToListbox)
+        {
+            // Stops kinetic scrolling when scrollbar is tapped
+            iList->HandlePointerEventL(aPointerEvent);
+            // Continue delivering events until button up appears to prevent
+            // some unexpected behavior in both scrollbar and listbox
+            switch (aPointerEvent.iType)
+            {
+            case TPointerEvent::EButton1Up:
+                iScrollbarPointerEventToListbox = EFalse;
+                break;
+            }
+        }
+        else
+        {
+            // Handles scrollbar behavior
+            vsb->HandlePointerEventL(aPointerEvent);
+        }
     }
 
     // Deliver event to list
@@ -415,6 +442,8 @@
     {
         iVScrollBarGrabsPointerEvents = EFalse;
     }
+
+    PostMouseEventL(aPointerEvent);
 }
 #else //RD_SCALABLE_UI_V2
 void CSwtListBox::HandlePointerEventL(
@@ -472,6 +501,9 @@
     // This gets called before contained list is created.
     if (iList)
     {
+#ifdef RD_JAVA_S60_RELEASE_9_2
+        EnableFocusHighlight(isFocused);
+#endif //RD_JAVA_S60_RELEASE_9_2
         iList->SetFocus(isFocused, aDrawNow);
     }
     HandleFocusChanged(aDrawNow);
@@ -645,6 +677,14 @@
 //
 void CSwtListBox::ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
 {
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    if (aType == EEventKeyDown)
+    {
+        // After panning focus highlight was disabled, so enabling again
+        EnableFocusHighlight(ETrue);
+    }
+#endif //RD_JAVA_S60_RELEASE_9_2
+
     // No items or not a normal key event
     if (iList->Model()->NumberOfItems() == 0 || aType != EEventKey)
     {
@@ -818,6 +858,22 @@
 }
 #endif
 
+#ifdef RD_JAVA_S60_RELEASE_9_2
+// ---------------------------------------------------------------------------
+// CSwtListBox::EnableFocusHighlight
+// From MSwtControl
+// ---------------------------------------------------------------------------
+//
+void CSwtListBox::EnableFocusHighlight(TBool aEnable)
+{
+    ASSERT(iList);
+    ASSERT(iList->View());
+
+    CSwtListBoxLists::EnableFocusHighlight(iList->View()->ItemDrawer(),
+                                           aEnable);
+}
+#endif //RD_JAVA_S60_RELEASE_9_2
+
 // ---------------------------------------------------------------------------
 // CSwtListBox::Scrollable
 // From MSwtListBox
@@ -1330,6 +1386,8 @@
         return;
     }
 
+    UpdateFlickScrollingState(aEventType);
+
     switch (aEventType)
     {
         // On 5.0, drawing trough Java gives simply a better fps.
@@ -2480,3 +2538,22 @@
     }
 }
 #endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
+
+// ---------------------------------------------------------------------------
+// CSwtTableListBox::UpdateFlickScrollingState
+// Updates flick scrolling status based on received listbox event.
+// ---------------------------------------------------------------------------
+//
+void CSwtListBox::UpdateFlickScrollingState(TListBoxEvent aEventType)
+{
+    switch (aEventType)
+    {
+    case EEventFlickStarted:
+        iFlickScrollingOngoing = ETrue;
+        iScrollbarPointerEventToListbox = ETrue;
+        break;
+    case EEventFlickStopped:
+        iFlickScrollingOngoing = EFalse;
+        break;
+    }
+}
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistboxlists.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistboxlists.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -505,6 +505,31 @@
     }
 }
 
+#ifdef RD_JAVA_S60_RELEASE_9_2
+// ---------------------------------------------------------------------------
+// CSwtListBoxLists::EnableFocusHighlight
+// ---------------------------------------------------------------------------
+//
+void CSwtListBoxLists::EnableFocusHighlight(CListItemDrawer* aItemDrawer,
+        TBool aEnable)
+{
+    if (aItemDrawer)
+    {
+        TInt disabledHighlight =
+            aItemDrawer->Flags() & CListItemDrawer::EDisableHighlight;
+
+        if (aEnable && disabledHighlight)
+        {
+            aItemDrawer->ClearFlags(CListItemDrawer::EDisableHighlight);
+        }
+        else if (!aEnable && !disabledHighlight)
+        {
+            aItemDrawer->SetFlags(CListItemDrawer::EDisableHighlight);
+        }
+    }
+}
+#endif //RD_JAVA_S60_RELEASE_9_2
+
 // The compiler does not automatically instantiate templates defined in other
 // files. Because of this, code written will often produce undefined symbol
 // errors when compiled with the compiler. You need to tell the compiler which
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistview.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistview.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -143,7 +143,9 @@
         iWidthOfSpaceBetweenItems(0),
         iHeightOfSpaceBetweenItems(0),
         iDensity(EMediumListViewDensity),   // must match Java-side default
-        iIsGridCellLayoutNeeded(EFalse)
+        iIsGridCellLayoutNeeded(EFalse),
+        iFlickScrollingOngoing(EFalse)
+
 {
     // Default to horizontal layout orientation (vertical scrollbar)
     //if( iStyle & KSwtStyleVertical )
@@ -1620,8 +1622,11 @@
 //
 void CSwtListView::FocusChanged(TDrawNow aDrawNow)
 {
-    TBool focused = IsFocused();
-    iGrid->SetFocus(focused);
+    TBool isFocused = IsFocused();
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    EnableFocusHighlight(isFocused);
+#endif //RD_JAVA_S60_RELEASE_9_2
+    iGrid->SetFocus(isFocused);
     HandleFocusChanged(aDrawNow);
 }
 
@@ -2653,6 +2658,14 @@
 //
 void CSwtListView::ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
 {
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    if (aType == EEventKeyDown)
+    {
+        // After panning focus highlight was disabled, so enabling again
+        EnableFocusHighlight(ETrue);
+    }
+#endif //RD_JAVA_S60_RELEASE_9_2
+
     if (GetItemCount() == 0)
     {
         iGrid->OfferKeyEventL(aKeyEvent, aType);
@@ -3040,6 +3053,8 @@
         return;
     }
 
+    UpdateFlickScrollingState(aEventType);
+
     switch (aEventType)
     {
         // On 5.0, drawing trough Java gives simply a better fps.
@@ -3492,7 +3507,32 @@
     // Deliver event to scrollbar
     if (iVScrollBarGrabsPointerEvents && vsb)
     {
-        vsb->HandlePointerEventL(aPointerEvent);
+        if (!iFlickScrollingOngoing
+                && aPointerEvent.iType == TPointerEvent::EButton1Down)
+        {
+            // Scrollbar was tapped after scrolling stopped
+            // by itself, so no need to redirect events
+            iScrollbarPointerEventToListbox = EFalse;
+        }
+
+        if (iScrollbarPointerEventToListbox)
+        {
+            // Stops kinetic scrolling when scrollbar is tapped
+            iGrid->ForwardPointerEventL(aPointerEvent);
+            // Continue delivering events until button up appears to prevent
+            // some unexpected behavior in both scrollbar and listbox
+            switch (aPointerEvent.iType)
+            {
+            case TPointerEvent::EButton1Up:
+                iScrollbarPointerEventToListbox = EFalse;
+                break;
+            }
+        }
+        else
+        {
+            // Handles scrollbar behavior
+            vsb->HandlePointerEventL(aPointerEvent);
+        }
     }
 
     // Deliver event to list
@@ -3574,6 +3614,8 @@
     {
         iVScrollBarGrabsPointerEvents = EFalse;
     }
+
+    PostMouseEventL(aPointerEvent);
 }
 
 // ---------------------------------------------------------------------------
@@ -3587,6 +3629,36 @@
 }
 #endif // RD_SCALABLE_UI_V2
 
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+// ---------------------------------------------------------------------------
+// CSwtListView::EnableFocusHighlight
+// From MSwtControl
+// ---------------------------------------------------------------------------
+//
+void CSwtListView::EnableFocusHighlight(TBool aEnable)
+{
+    ASSERT(iGrid);
+    ASSERT(iGrid->View());
+
+    CListItemDrawer* itemDrawer = iGrid->View()->ItemDrawer();
+    if (itemDrawer)
+    {
+        TInt disabledHighlight =
+            itemDrawer->Flags() & CListItemDrawer::EDisableHighlight;
+
+        if (aEnable && disabledHighlight)
+        {
+            itemDrawer->ClearFlags(CListItemDrawer::EDisableHighlight);
+        }
+        else if (!aEnable && !disabledHighlight)
+        {
+            itemDrawer->SetFlags(CListItemDrawer::EDisableHighlight);
+        }
+    }
+}
+#endif //RD_JAVA_S60_RELEASE_9_2
+
 #ifdef RD_JAVA_ADVANCED_TACTILE_FEEDBACK
 void CSwtListView::DoControlSpecificFeedback(
     const TBool& aFirstTap,
@@ -3609,3 +3681,21 @@
 }
 #endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
 
+// ---------------------------------------------------------------------------
+// CSwtTableListBox::UpdateFlickScrollingState
+// Updates flick scrolling status based on received listbox event.
+// ---------------------------------------------------------------------------
+//
+void CSwtListView::UpdateFlickScrollingState(TListBoxEvent aEventType)
+{
+    switch (aEventType)
+    {
+    case EEventFlickStarted:
+        iFlickScrollingOngoing = ETrue;
+        iScrollbarPointerEventToListbox = ETrue;
+        break;
+    case EEventFlickStopped:
+        iFlickScrollingOngoing = EFalse;
+        break;
+    }
+}
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtmenuarranger.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtmenuarranger.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -1222,7 +1222,8 @@
 {
     if (aCommandId == EAknSoftkeyOptions
             && IsOptionsCommandAdded()
-            && !EikMenuBar()->IsDisplayed())
+            && !EikMenuBar()->IsDisplayed()
+            && !iDisplay.UiUtils().SplitInputView())
     {
         TryDisplayMenuBarL(EFalse);
     }
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtmobileshell.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtmobileshell.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -216,7 +216,7 @@
         utils.UpdateStatusPaneL();
     }
 
-    CCoeControl::SetRect(DefaultBounds());
+    DoSetRect(DefaultBounds());
 }
 
 // ---------------------------------------------------------------------------
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtshell.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtshell.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -29,10 +29,7 @@
 static const TInt KSwtMainPainVarietySmallSpLandscape = 9;
 static const TInt KSwtMainPainVarietySmallSpLandscapePen = 4;
 
-// Area bottom pane varieties
-static const TInt KSwtAreaBottomPaneVarietyPortrait = 0;
 #ifdef RD_JAVA_S60_RELEASE_9_2
-static const TInt KSwtAreaBottomPaneVarietyLandscape = 2;
 static const TInt KSwtRoundCornerBgColorDiff = 50;
 #endif // RD_JAVA_S60_RELEASE_9_2
 
@@ -134,7 +131,7 @@
     window.SetPointerGrab(ETrue);
 #endif //RD_SCALABLE_UI_V2
 
-    CCoeControl::SetRect(DefaultBounds());
+    DoSetRect(DefaultBounds());
     SetMinimumSize(TSize());
     UiUtils().RegisterShellL(*this);
 
@@ -209,6 +206,28 @@
 }
 
 // ---------------------------------------------------------------------------
+// CSwtShell::DoSetRect
+// Note that calling SetRect on the Shell does not cause a PositionChanged!
+// ---------------------------------------------------------------------------
+//
+void CSwtShell::DoSetRect(const TRect& aRect)
+{
+    // Divert the job to UiUtils if this is the Shell of an editor open for
+    // split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    MSwtControl* splitInputView = utils.SplitInputView();
+    if (splitInputView && (&(splitInputView->GetShell())) == this)
+    {
+        utils.SetSplitInputShellPos(aRect.iTl);
+        CCoeControl::SetSize(aRect.Size());
+    }
+    else
+    {
+        CCoeControl::SetRect(aRect);
+    }
+}
+
+// ---------------------------------------------------------------------------
 // CSwtShell::SwtHandleResourceChangeL
 // From CSwtComposite
 // ---------------------------------------------------------------------------
@@ -225,7 +244,7 @@
             {
                 bg->SetRect(iDisplay.Device().Bounds());
             }
-            CCoeControl::SetRect(DefaultBounds());
+            DoSetRect(DefaultBounds());
         }
     }
 
@@ -394,27 +413,15 @@
             capturingControl->SetSwtFocus(KSwtFocusByPointer);
         }
         capturingControl->HandlePointerEventL(aPointerEvent);
-        capturingControl->PostMouseEventL(aPointerEvent);
         iDisplay.TryDetectLongTapL(aPointerEvent);
         return;
     }
 
-    MSwtControl* ctrl = NULL;
-
-    if (aPointerEvent.iType == TPointerEvent::EButton1Up)
-        ctrl = iDisplay.UiUtils().GetPointerGrabbingControl();
-
     if (!iDisplay.RevertPointerEvent())
     {
         CSwtComposite::HandlePointerEventL(aPointerEvent);
     }
 
-    if (aPointerEvent.iType != TPointerEvent::EButton1Up)
-        ctrl = iDisplay.UiUtils().GetPointerGrabbingControl();
-
-    if (ctrl)
-        ctrl->PostMouseEventL(aPointerEvent);
-
     iDisplay.TryDetectLongTapL(aPointerEvent);
 }
 #else
@@ -590,6 +597,17 @@
     }
 }
 
+void CSwtShell::SizeChanged()
+{
+    CSwtDecorations::SizeChanged();
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    MSwtControl* splitInputView = utils.SplitInputView();
+    if (splitInputView && (&(splitInputView->GetShell())) == this)
+    {
+        utils.AdjustSplitInputShellPos();
+    }
+}
+
 // ---------------------------------------------------------------------------
 // CSwtShell::Draw
 // From MCoeControlBackground
@@ -626,7 +644,7 @@
 }
 
 // ---------------------------------------------------------------------------
-// CSwtShell::DoSetFocus
+// CSwtShell::SetSwtFocus
 // From MSwtControl
 // ---------------------------------------------------------------------------
 //
@@ -710,22 +728,7 @@
         return;
     }
 
-    TPoint originalLocation(GetLocation());
-    iPosition = aPoint;
-
-    Window().SetPosition(aPoint);
-
-    // Post the MoveEvent if the location changed.
-    if (GetLocation() != originalLocation)
-    {
-        PositionChanged();
-    }
-
-    // Drawing after everything else.
-    if (!(iStyle & KSwtStyleNoRedrawResize))
-    {
-        Redraw();
-    }
+    DoSetLocation(aPoint);
 }
 
 // ---------------------------------------------------------------------------
@@ -743,12 +746,16 @@
 
     TSize checkedSize(Max(aSize.iWidth, iMinSize.iWidth),
                       Max(aSize.iHeight, iMinSize.iHeight));
-    SetSize(checkedSize);
+
+    if (Size() != checkedSize)
+    {
+        SetSize(checkedSize);
 
-    // Drawing only after everything else.
-    if (!(iStyle & KSwtStyleNoRedrawResize))
-    {
-        Redraw();
+        // Drawing only after everything else.
+        if (!(iStyle & KSwtStyleNoRedrawResize))
+        {
+            Redraw();
+        }
     }
 }
 
@@ -765,22 +772,38 @@
         return;
     }
 
+    TBool changed = EFalse;
     TSize checkedSize(Max(aRect.Size().iWidth, iMinSize.iWidth),
                       Max(aRect.Size().iHeight, iMinSize.iHeight));
-    SetSize(checkedSize);
-
-    TPoint originalLocation(GetLocation());
-    iPosition = aRect.iTl;
-    Window().SetPosition(aRect.iTl);
-    if (GetLocation() != originalLocation)
+    if (Size() != checkedSize)
     {
-        PositionChanged();
+        SetSize(checkedSize);
+        changed = ETrue;
     }
 
-    // No need to recurse on the children, their positions within the
-    // window do not change
+    // Divert the job to UiUtils if this is the Shell of an editor open for
+    // split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    MSwtControl* splitInputView = utils.SplitInputView();
+    if (splitInputView && (&(splitInputView->GetShell())) == this)
+    {
+        utils.SetSplitInputShellPos(aRect.iTl);
+    }
+    else
+    {
+        if (aRect.iTl != iPosition)
+        {
+            iPosition = aRect.iTl;
+            Window().SetPosition(aRect.iTl);
+            PositionChanged();
+            changed = ETrue;
+        }
 
-    if (!(iStyle & KSwtStyleNoRedrawResize))
+        // No need to recurse on the children, their positions within the
+        // window do not change
+    }
+
+    if (changed && !(iStyle & KSwtStyleNoRedrawResize))
     {
         Redraw();
     }
@@ -976,26 +999,22 @@
     TRect newRect(TRect::EUninitialized);
     if (aMaximized)
     {
-        // Set bounds so as to cover the whole application area
-        RRegion clientRegion;
-        clientRegion.AddRect(iEikonEnv->EikAppUi()->ClientRect());
-        if (!IsMobileShell())
+        TRect screenRect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, screenRect);
+        TInt variety(0);
+        if (CSwtLafFacade::IsLandscapeOrientation())
         {
-            TInt variety(KSwtAreaBottomPaneVarietyPortrait);
-#ifdef RD_JAVA_S60_RELEASE_9_2
-            if (CSwtLafFacade::IsLandscapeOrientation())
-            {
-                variety = KSwtAreaBottomPaneVarietyLandscape;
-            }
-#endif // RD_JAVA_S60_RELEASE_9_2
-
-            clientRegion.SubRect(CSwtLafFacade::GetLayoutRect(
-                                     CSwtLafFacade::EAreaBottomPane,
-                                     iDisplay.Device().Bounds(),
-                                     variety).Rect());
+            variety = AknLayoutUtils::PenEnabled() ?
+                      KSwtMainPainVarietySmallSpLandscapePen :
+                      KSwtMainPainVarietySmallSpLandscape;
         }
-        newRect = clientRegion.BoundingRect();
-        clientRegion.Close();
+        else
+        {
+            variety = KSwtMainPainVarietyClassic;
+        }
+        TAknLayoutRect layoutRect = CSwtLafFacade::GetComposeAndLayoutRect(
+                                        CSwtLafFacade::EMainPaneCompose, screenRect, variety);
+        newRect = layoutRect.Rect();
         iNormalBounds.SetRect(iPosition, iSize);
     }
     else
@@ -1003,9 +1022,7 @@
         newRect = iNormalBounds;
     }
 
-    SetPosition(newRect.iTl);
-    SetSize(newRect.Size());
-
+    SetBounds(newRect);
     iIsMaximized = aMaximized;
     Redraw();
 }
@@ -1806,7 +1823,7 @@
         TRAP_IGNORE(utils.UpdateStatusPaneL());
     }
 
-    CCoeControl::SetRect(DefaultBounds());
+    DoSetRect(DefaultBounds());
 
     SetRedraw(ETrue);
 }
@@ -2090,6 +2107,42 @@
 }
 
 // ---------------------------------------------------------------------------
+// CSwtShell::DoSetLocation
+// From MSwtShell
+// ---------------------------------------------------------------------------
+//
+void CSwtShell::DoSetLocation(const TPoint& aPoint)
+{
+    if (aPoint == iPosition)
+    {
+        return;
+    }
+
+    // Divert the job to UiUtils if this is the Shell of an editor open for
+    // split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    MSwtControl* splitInputView = utils.SplitInputView();
+    if (splitInputView && (&(splitInputView->GetShell())) == this)
+    {
+        utils.SetSplitInputShellPos(aPoint);
+        return;
+    }
+
+    iPosition = aPoint;
+    Window().SetPosition(aPoint);
+
+    // Post the MoveEvent if the location changed.
+    PositionChanged();
+
+    // Drawing after everything else.
+    if (!(iStyle & KSwtStyleNoRedrawResize))
+    {
+        Redraw();
+    }
+}
+
+
+// ---------------------------------------------------------------------------
 // CSwtShell::HandleStatusPaneSizeChange
 // From MEikStatusPaneObserver
 // ---------------------------------------------------------------------------
@@ -2098,7 +2151,7 @@
 {
     if (iIsMaximized  && (!iParent))
     {
-        CCoeControl::SetRect(DefaultBounds());
+        DoSetRect(DefaultBounds());
     }
 }
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtslider.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtslider.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -589,6 +589,8 @@
         iFeedback->InstantFeedback(ETouchFeedbackSlider);
     }
 #endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
+
+    PostMouseEventL(aPointerEvent);
 }
 
 TInt CSwtSlider::CalcAlignedValue(const TPoint& aPoint)
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtsortedlist.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtsortedlist.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -503,6 +503,10 @@
     {
         CSwtListBase::HandlePointerEventL(aPointerEvent);
     }
+    else
+    {
+        PostMouseEventL(aPointerEvent);
+    }
 }
 #endif //RD_SCALABLE_UI_V2
 
@@ -531,6 +535,9 @@
     TBool isFocused = IsFocused();
     if (iList)
     {
+#ifdef RD_JAVA_S60_RELEASE_9_2
+        EnableFocusHighlight(isFocused);
+#endif //RD_JAVA_S60_RELEASE_9_2
         iList->SetFocus(isFocused, aDrawNow);
         if (iSearchField)
         {
@@ -595,6 +602,22 @@
     CSwtListBase::ProcessKeyEventL(aKeyEvent, aType);
 }
 
+#ifdef RD_JAVA_S60_RELEASE_9_2
+// ---------------------------------------------------------------------------
+// CSwtSortedList::EnableFocusHighlight
+// From MSwtControl
+// ---------------------------------------------------------------------------
+//
+void CSwtSortedList::EnableFocusHighlight(TBool aEnable)
+{
+    ASSERT(iList);
+    ASSERT(iList->View());
+
+    CSwtListBoxLists::EnableFocusHighlight(iList->View()->ItemDrawer(),
+                                           aEnable);
+}
+#endif //RD_JAVA_S60_RELEASE_9_2
+
 // ---------------------------------------------------------------------------
 // CSwtSortedList::DoPaint
 // From MSwtControl
@@ -924,8 +947,8 @@
         iSearchField->SetComponentsToInheritVisibility(ETrue);
 
         // Set search field to use only second column to get
-        // item text. Items use \t as column separators, see method 
-        // CSwtListBase::CreateItemTextLC() for details. 
+        // item text. Items use \t as column separators, see method
+        // CSwtListBase::CreateItemTextLC() for details.
         const int KItemTextColumnFlag = 2;
         iSearchField->SetListColumnFilterFlags(KItemTextColumnFlag);
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttable.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttable.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -441,7 +441,11 @@
 //
 void CSwtTable::FocusChanged(TDrawNow aDrawNow)
 {
-    iTableListBox->SetFocus(IsFocusControl());
+    TBool isFocused = IsFocusControl();
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    EnableFocusHighlight(isFocused);
+#endif //RD_JAVA_S60_RELEASE_9_2
+    iTableListBox->SetFocus(isFocused);
     HandleFocusChanged(aDrawNow);
 }
 
@@ -1739,9 +1743,9 @@
         TRAP_IGNORE
         (
             for (TInt i = 0; i < colCount; ++i)
-            {
-                PostColumnResizeEventL(iTableColumns[ i ]->JavaPeer());
-            }
+    {
+        PostColumnResizeEventL(iTableColumns[ i ]->JavaPeer());
+        }
         );
         Redraw();
     }
@@ -1976,6 +1980,13 @@
 //
 void CSwtTable::ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
 {
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    if (aType == EEventKeyDown)
+    {
+        // After panning focus highlight was disabled, so enabling again
+        EnableFocusHighlight(ETrue);
+    }
+#endif //RD_JAVA_S60_RELEASE_9_2
     iTableListBox->ProcessKeyEventL(aKeyEvent, aType);
 }
 
@@ -2157,6 +2168,36 @@
     );
 }
 
+#ifdef RD_JAVA_S60_RELEASE_9_2
+// ---------------------------------------------------------------------------
+// CSwtTable::EnableFocusHighlight
+// From MSwtControl
+// ---------------------------------------------------------------------------
+//
+void CSwtTable::EnableFocusHighlight(TBool aEnable)
+{
+    ASSERT(iTableListBox);
+    ASSERT(iTableListBox->View());
+
+    CListItemDrawer* itemDrawer = iTableListBox->View()->ItemDrawer();
+    if (itemDrawer)
+    {
+        TInt disabledHighlight =
+            itemDrawer->Flags() & CListItemDrawer::EDisableHighlight;
+
+        if (aEnable && disabledHighlight)
+        {
+            itemDrawer->ClearFlags(CListItemDrawer::EDisableHighlight);
+        }
+        else if (!aEnable && !disabledHighlight)
+        {
+            itemDrawer->SetFlags(CListItemDrawer::EDisableHighlight);
+        }
+    }
+}
+#endif //RD_JAVA_S60_RELEASE_9_2
+
+
 // ---------------------------------------------------------------------------
 // From ASwtScrollableBase
 // Scrollbar frame is created and owned by the listbox component.
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttablelistbox.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttablelistbox.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -668,8 +668,34 @@
     // Deliver event to scrollbar
     if (iVScrollBarGrabsPointerEvents && vsb)
     {
-        vsb->HandlePointerEventL(aPointerEvent);
+        if (!iFlickScrollingOngoing
+                && aPointerEvent.iType == TPointerEvent::EButton1Down)
+        {
+            // Scrollbar was tapped after scrolling stopped
+            // by itself, so no need to redirect events
+            iScrollbarPointerEventToListbox = EFalse;
+        }
+
+        if (iScrollbarPointerEventToListbox)
+        {
+            // Stops kinetic scrolling when scrollbar is tapped
+            CEikTextListBox::HandlePointerEventL(aPointerEvent);
+            // Continue delivering events until button up appears to prevent
+            // some unexpected behavior in both scrollbar and listbox
+            switch (aPointerEvent.iType)
+            {
+            case TPointerEvent::EButton1Up:
+                iScrollbarPointerEventToListbox = EFalse;
+                break;
+            }
+        }
+        else
+        {
+            // Handles scrollbar behavior
+            vsb->HandlePointerEventL(aPointerEvent);
+        }
     }
+
     if (iHScrollBarGrabsPointerEvents && hsb)
     {
         hsb->HandlePointerEventL(aPointerEvent);
@@ -869,6 +895,8 @@
         return;
     }
 
+    UpdateFlickScrollingState(aEventType);
+
     switch (aEventType)
     {
         // On 5.0, drawing trough Java gives simply a better fps.
@@ -1130,7 +1158,9 @@
 
 CSwtTableListBox::CSwtTableListBox(MSwtDisplay& aDisplay, CSwtTable &aTable)
         : iDisplay(aDisplay),
-        iTable(aTable)
+        iTable(aTable),
+        iFlickScrollingOngoing(EFalse)
+
 {
 }
 
@@ -1190,3 +1220,22 @@
 {
     return iTable.ClientRect().Width();
 }
+
+// ---------------------------------------------------------------------------
+// CSwtTableListBox::UpdateFlickScrollingState
+// Updates flick scrolling status based on received listbox event.
+// ---------------------------------------------------------------------------
+//
+void CSwtTableListBox::UpdateFlickScrollingState(TListBoxEvent aEventType)
+{
+    switch (aEventType)
+    {
+    case EEventFlickStarted:
+        iFlickScrollingOngoing = ETrue;
+        iScrollbarPointerEventToListbox = ETrue;
+        break;
+    case EEventFlickStopped:
+        iFlickScrollingOngoing = EFalse;
+        break;
+    }
+}
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttext.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttext.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -549,7 +549,11 @@
     }
 #ifdef RD_SCALABLE_UI_V2
     aknFlags |= EAknEditorFlagDeliverVirtualKeyEventsToApplication;
-#endif // RD_SCALABLE_UI_V2 
+#endif // RD_SCALABLE_UI_V2
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    aknFlags |= EAknEditorFlagEnablePartialScreen;
+#endif
 
     editor->SetAknEditorFlags(aknFlags);
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextbase.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -17,6 +17,11 @@
 #include <swtlaffacade.h>
 #include <AknUtils.h>
 #include <AknDef.h>
+#ifdef RD_JAVA_S60_RELEASE_9_2
+#include <AknPriv.hrh>
+#endif
+#include <aknappui.h>
+#include <akntouchpane.h>
 #include "swtscrollbar.h"
 #include "swtfont.h"
 #include "swttextbase.h"
@@ -297,6 +302,49 @@
     Redraw();
 }
 
+void CSwtTextBase::SetBounds(const TRect& aRect)
+{
+    // Divert the job to UiUtils if this is an editor open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.SetSplitInputViewSize(aRect.Size());
+        SetLocation(aRect.iTl);
+    }
+    else
+    {
+        ASwtScrollableBase::SetBounds(aRect);
+    }
+}
+
+void CSwtTextBase::SetWidgetSize(const TSize& aSize)
+{
+    // Divert the job to UiUtils if this is an editor open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.SetSplitInputViewSize(aSize);
+    }
+    else
+    {
+        ASwtScrollableBase::SetWidgetSize(aSize);
+    }
+}
+
+TSwtPeer CSwtTextBase::Dispose()
+{
+    // Close VKB.
+    if (iEditor->IsFocused())
+    {
+        CCoeFep* fep = iDisplay.CoeEnv()->Fep();
+        if (fep)
+        {
+            fep->HandleDestructionOfFocusedItem();
+        }
+    }
+    return ASwtScrollableBase::Dispose();
+}
+
 // ---------------------------------------------------------------------------
 // CSwtTextBase::ComputeDelta
 // ---------------------------------------------------------------------------
@@ -710,6 +758,16 @@
         return;
     }
 
+    // Close VKB. Do it here instead of FocusChange to avoid split input flicker.
+    if (iEditor->IsFocused() && !aVisible)
+    {
+        CCoeFep* fep = iDisplay.CoeEnv()->Fep();
+        if (fep)
+        {
+            fep->HandleDestructionOfFocusedItem();
+        }
+    }
+
     CCoeControl::MakeVisible(aVisible);
     if (iEditor)
     {
@@ -728,6 +786,7 @@
             }
         }
     }
+
     FocusabilityChanged();
 }
 
@@ -738,6 +797,16 @@
 //
 void CSwtTextBase::SetDimmed(TBool aDimmed)
 {
+    // Close VKB. Do it here instead of FocusChange to avoid split input flicker.
+    if (iEditor->IsFocused() && aDimmed)
+    {
+        CCoeFep* fep = iDisplay.CoeEnv()->Fep();
+        if (fep)
+        {
+            fep->HandleDestructionOfFocusedItem();
+        }
+    }
+
     CCoeControl::SetDimmed(aDimmed);
     if (iEditor)
     {
@@ -775,6 +844,16 @@
             ProcessFontUpdateL();
         }
     }
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    else if (aType == KAknSplitInputEnabled)
+    {
+        const MSwtShell* activeShell = iDisplay.UiUtils().GetActiveShell();
+        if (activeShell && activeShell->FocusControl() == this)
+        {
+            iDisplay.UiUtils().SetSplitInputEditor(this);
+        }
+    }
+#endif
 }
 
 // ---------------------------------------------------------------------------
@@ -801,6 +880,7 @@
     TBool hit = ETrue;
 
 #ifdef RD_JAVA_S60_RELEASE_9_2
+    TBool isActiveSplitEditor = iDisplay.UiUtils().SplitInputEditor() == this;
     hit = Rect().Contains(aPointerEvent.iPosition);
     TBool pressed = iPressed;
 #endif
@@ -815,7 +895,7 @@
 #ifdef RD_JAVA_S60_RELEASE_9_2
         else
         {
-            iPressed = ETrue;
+            iPressed = !isActiveSplitEditor;
         }
 #endif
     }
@@ -883,7 +963,7 @@
 #ifdef RD_JAVA_S60_RELEASE_9_2
     else if (aPointerEvent.iType == TPointerEvent::EDrag)
     {
-        iPressed = hit;
+        iPressed = hit && !iVScrollBarGrabsPointerEvents && !isActiveSplitEditor;
     }
 
     if (pressed != iPressed)
@@ -894,6 +974,8 @@
     // We got a pointer event, so any subsequent events should not be ignored.
     iIgnorePointerDown = EFalse;
 #endif // RD_JAVA_S60_RELEASE_9_2
+
+    PostMouseEventL(aPointerEvent);
 }
 #else //RD_SCALABLE_UI_V2
 void CSwtTextBase::HandlePointerEventL(
@@ -921,13 +1003,7 @@
             if (!IsFocused())
                 iIndicator->SetState(EStateNone);
         }
-        
-        // Aparenlty this is the only way of forcing the VKB to close.
-        if (iEditor->IsFocused() && !IsFocused())
-        {
-            iDisplay.CoeEnv()->Fep()->HandleDestructionOfFocusedItem();
-        }
-        
+
         iEditor->SetFocus(IsFocused());
     }
 
@@ -988,6 +1064,13 @@
 
     iEditor->SetRect(editorRect);
     HandlePositionChanged();
+
+    // Notify change to UiUtils if this is an editor open for split view editing.
+    MSwtUiUtils& utils = iDisplay.UiUtils();
+    if (utils.SplitInputView() == this)
+    {
+        utils.AdjustSplitInputShellPos();
+    }
 }
 
 // ---------------------------------------------------------------------------
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextextension.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttextextension.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -154,18 +154,19 @@
 
     TInt sct = R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG;
     TUint flags = 0;
+    CEikEdwin& edwin = Editor();
     if (iTypeStyle & EEmailAddress)
     {
         iMenu = CSwtControlMenu::NewL(iDisplay, NULL, 0);
         iMenu->SetObserver(this);
         iMenuItem = CSwtMenuItem::NewL(iDisplay, NULL, *iMenu, 0, 0, ESwtFetchEmail);
         // Email style implementation
-        Editor().SetMaxLength(KSWTTEXTEXTENSION_EMAIL_LENGTH);
-        Editor().SetAknEditorAllowedInputModes(EAknEditorAllInputModes);
-        Editor().SetAknEditorCurrentInputMode(EAknEditorAlphaInputMode);
-        Editor().SetAknEditorPermittedCaseModes(EAknEditorAllCaseModes);
-        Editor().SetAknEditorCase(EAknEditorLowerCase);
-        Editor().SetAknEditorCurrentCase(EAknEditorLowerCase);
+        edwin.SetMaxLength(KSWTTEXTEXTENSION_EMAIL_LENGTH);
+        edwin.SetAknEditorAllowedInputModes(EAknEditorAllInputModes);
+        edwin.SetAknEditorCurrentInputMode(EAknEditorAlphaInputMode);
+        edwin.SetAknEditorPermittedCaseModes(EAknEditorAllCaseModes);
+        edwin.SetAknEditorCase(EAknEditorLowerCase);
+        edwin.SetAknEditorCurrentCase(EAknEditorLowerCase);
         sct =  R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG;
         flags |= EEikEdwinNoLineOrParaBreaks|EAknEditorFlagNoT9;
         //Adding Non Midlet Commands
@@ -180,12 +181,12 @@
         iMenu->SetObserver(this);
         iMenuItem = CSwtMenuItem::NewL(iDisplay, NULL, *iMenu, 0, 0, ESwtFetchUrl);
         // Url type implementation
-        Editor().SetMaxLength(KSWTTEXTEXTENSION_URL_LENGTH);
-        Editor().SetAknEditorAllowedInputModes(EAknEditorAllInputModes);
-        Editor().SetAknEditorCurrentInputMode(EAknEditorAlphaInputMode);
-        Editor().SetAknEditorPermittedCaseModes(EAknEditorAllCaseModes);
-        Editor().SetAknEditorCase(EAknEditorLowerCase);
-        Editor().SetAknEditorCurrentCase(EAknEditorLowerCase);
+        edwin.SetMaxLength(KSWTTEXTEXTENSION_URL_LENGTH);
+        edwin.SetAknEditorAllowedInputModes(EAknEditorAllInputModes);
+        edwin.SetAknEditorCurrentInputMode(EAknEditorAlphaInputMode);
+        edwin.SetAknEditorPermittedCaseModes(EAknEditorAllCaseModes);
+        edwin.SetAknEditorCase(EAknEditorLowerCase);
+        edwin.SetAknEditorCurrentCase(EAknEditorLowerCase);
         sct = R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG;
         flags |= EEikEdwinNoLineOrParaBreaks|EAknEditorFlagNoT9;
         //Adding Non Midlet Commands
@@ -206,13 +207,19 @@
         //NonPredictive type implementation
         flags |= EAknEditorFlagNoT9;
     }
+
 #ifdef RD_SCALABLE_UI_V2
     flags |= EAknEditorFlagDeliverVirtualKeyEventsToApplication;
 #endif // RD_SCALABLE_UI_V2 
-    Editor().SetAknEditorFlags(flags);
-    Editor().SetAknEditorSpecialCharacterTable(sct);
-    // make changes take effect
-    TRAP_IGNORE(Editor().NotifyEditorStateObserverOfStateChangeL());
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    flags |= EAknEditorFlagEnablePartialScreen;
+#endif
+
+    edwin.SetAknEditorFlags(flags);
+    edwin.SetAknEditorSpecialCharacterTable(sct);
+
+    TRAP_IGNORE(edwin.NotifyEditorStateObserverOfStateChangeL());
 }
 
 
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttree.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttree.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -417,6 +417,8 @@
         feedback->EnableFeedbackForControl(iTree, ETrue);
     }
 #endif //RD_JAVA_ADVANCED_TACTILE_FEEDBACK
+
+    // The mouse event is posted to Java from CSwtComposite
 }
 
 MSwtComposite* CSwtTree::Composite()
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtuiutils.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtuiutils.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -24,6 +24,10 @@
 #include <AknUtils.h>
 #include <AknsDrawUtils.h>
 #include <AknTextDecorationMetrics.h>
+#ifdef RD_JAVA_S60_RELEASE_9_2
+#include <AknPriv.hrh>
+#include <aknappui.h>
+#endif
 #include <coreuiavkoneswt.h>
 #include <swtlaffacade.h>
 #include "eswtmobileextensions.h"
@@ -350,32 +354,6 @@
     }
 }
 
-
-// ---------------------------------------------------------------------------
-// CSwtUiUtils::SetPointerCaptureControl
-// ---------------------------------------------------------------------------
-//
-void CSwtUiUtils::SetPointerCaptureControl(MSwtControl* aControl)
-{
-    if (aControl)
-    {
-        iPointerCaptureControl = aControl;
-    }
-    else
-    {
-        iPointerCaptureControl = NULL;
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CSwtUiUtils::PointerCaptureControl
-// ---------------------------------------------------------------------------
-//
-MSwtControl* CSwtUiUtils::PointerCaptureControl()
-{
-    return iPointerCaptureControl;
-}
-
 // ---------------------------------------------------------------------------
 // CSwtUiUtils::SetNextFocusedControl
 // ---------------------------------------------------------------------------
@@ -559,6 +537,7 @@
     }
 
     // Title pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidTitle)));
     if (ctrl)
@@ -573,6 +552,7 @@
     }
 
     // Navi pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidNavi)));
     if (ctrl)
@@ -587,6 +567,7 @@
     }
 
     // Empty pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidEmpty)));
     if (ctrl)
@@ -601,6 +582,7 @@
     }
 
     // Indi pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidIndic)));
     if (ctrl)
@@ -615,6 +597,7 @@
     }
 
     // Clock pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidClock)));
     if (ctrl)
@@ -629,6 +612,7 @@
     }
 
     // Digital clock pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidDigitalClock)));
     if (ctrl)
@@ -643,6 +627,7 @@
     }
 
     // Signal pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidSignal)));
     if (ctrl)
@@ -657,6 +642,7 @@
     }
 
     // Battery pane priority.
+    ctrl = NULL;
     TRAP_IGNORE(ctrl = iStatusPane->ContainerControlL(
                            TUid::Uid(EEikStatusPaneUidBattery)));
     if (ctrl)
@@ -847,6 +833,10 @@
     return *iInlineFont;
 }
 
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::HideIndicator
+// ---------------------------------------------------------------------------
+//
 void CSwtUiUtils::HideIndicator(TInt aId)
 {
     TUid uid = TUid::Uid(aId);
@@ -862,6 +852,10 @@
     }
 }
 
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::HideIndicators
+// ---------------------------------------------------------------------------
+//
 void CSwtUiUtils::HideIndicators()
 {
     if (!iStatusPane)
@@ -876,6 +870,52 @@
 }
 
 // ---------------------------------------------------------------------------
+// CSwtUiUtils::DoSetSplitInputShellPos
+// ---------------------------------------------------------------------------
+//
+void CSwtUiUtils::DoSetSplitInputShellPos(const TPoint& aPos)
+{
+    MSwtShell& shell = iSplitInputView->GetShell();
+    MSwtControl* temp = iSplitInputView;
+    iSplitInputView = 0; // stop recursion.
+    shell.DoSetLocation(aPos);
+    iSplitInputView = temp;
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::DoSetSplitInputViewSize
+// ---------------------------------------------------------------------------
+//
+void CSwtUiUtils::DoSetSplitInputViewSize(const TSize& aSize)
+{
+    MSwtControl* temp = iSplitInputView;
+    iSplitInputView = 0; // stop recursion.
+    temp->SetWidgetSize(aSize);
+    iSplitInputView = temp;
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::ScrolledCompositeAncestor
+// ---------------------------------------------------------------------------
+//
+MSwtControl* CSwtUiUtils::ScrolledCompositeAncestor(const MSwtControl& aControl) const
+{
+    MSwtComposite* parent = aControl.GetParent();
+    const MSwtControl* control = &aControl;
+    while (parent)
+    {
+        if (parent->ScrolledCompositeContent() == control)
+        {
+            return parent->Control();
+        }
+        control = parent->Control();
+        parent = parent->Control()->GetParent();
+    }
+
+    return 0;
+}
+
+// ---------------------------------------------------------------------------
 // CSwtUiUtils::GetSystemColor
 // From MSwtUiUtils
 // ---------------------------------------------------------------------------
@@ -1149,10 +1189,19 @@
     MSwtShell* topShell = TopMostTopShell();
     if (!topShell || topShell->FullScreenMode())
     {
-        if (iStatusPane->IsVisible())
+        if (iSplitInputEditor)
         {
-            iStatusPane->SetObserver(NULL);
-            iStatusPane->MakeVisible(EFalse);
+            // Split input editing is ongoing and the status pane is hidden.
+            // Cache the new status pane visibility for when the split input ends.
+            iSplitInputSPVisible = EFalse;
+        }
+        else
+        {
+            if (iStatusPane->IsVisible())
+            {
+                iStatusPane->SetObserver(NULL);
+                iStatusPane->MakeVisible(EFalse);
+            }
         }
         return;
     }
@@ -1261,7 +1310,16 @@
     iStatusPane->SetObserver(NULL);
     if (!topShell || style == MSwtShell::EStyleNoStatusPane)
     {
-        iStatusPane->MakeVisible(EFalse);
+        if (iSplitInputEditor)
+        {
+            // Split input editing is ongoing and the status pane is hidden.
+            // Cache the new status pane visibility for when the split input ends.
+            iSplitInputSPVisible = EFalse;
+        }
+        else
+        {
+            iStatusPane->MakeVisible(EFalse);
+        }
     }
     else
     {
@@ -1273,22 +1331,35 @@
         {
             iStatusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_SMALL_WITH_SIGNAL_PANE);
         }
-        iStatusPane->MakeVisible(ETrue);
 
-        java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonEswt::getInstance().getJavaUiAppUi();
-        if (appUi && appUi->hidesIndicators())
+        if (iSplitInputEditor)
+        {
+            // Split input editing is ongoing and the status pane is hidden.
+            // Cache the new status pane visibility for when the split input ends.
+            iSplitInputSPVisible = ETrue;
+        }
+        else
         {
-            HideIndicators();
-        }
+            iStatusPane->MakeVisible(ETrue);
 
-        // The above relies on DrawDeferred which is too slow for some cases.
-        // For instance, the pane must draw immediately when the app draws the
-        // first time otherwise the startup screenshot will miss the pane.
-        iStatusPane->DrawNow();
+            java::ui::CoreUiAvkonAppUi* appUi = java::ui::CoreUiAvkonEswt::getInstance().getJavaUiAppUi();
+            if (appUi && appUi->hidesIndicators())
+            {
+                HideIndicators();
+            }
+
+            // The above relies on DrawDeferred which is too slow for some cases.
+            // For instance, the pane must draw immediately when the app draws the
+            // first time otherwise the startup screenshot will miss the pane.
+            iStatusPane->DrawNow();
+        }
     }
 
     // This will cause HandleStatusPaneSizeChange notifications again
-    iStatusPane->SetObserver(this);
+    if (!iSplitInputEditor)
+    {
+        iStatusPane->SetObserver(this);
+    }
 
     // Shells are trusted to have the correct size already.
 }
@@ -1544,6 +1615,12 @@
             shell->Control()->CoeControl().HandleResourceChange(aType);
         }
     }
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    if (aType == KAknSplitInputDisabled)
+    {
+        SetSplitInputEditor(0);
+    }
+#endif
 }
 
 // ---------------------------------------------------------------------------
@@ -1676,6 +1753,215 @@
 }
 
 // ---------------------------------------------------------------------------
+// CSwtUiUtils::SetPointerCaptureControl
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+void CSwtUiUtils::SetPointerCaptureControl(MSwtControl* aControl)
+{
+    if (aControl)
+    {
+        iPointerCaptureControl = aControl;
+    }
+    else
+    {
+        iPointerCaptureControl = NULL;
+    }
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::PointerCaptureControl
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+MSwtControl* CSwtUiUtils::PointerCaptureControl()
+{
+    return iPointerCaptureControl;
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::SetSplitInputEditor
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+void CSwtUiUtils::SetSplitInputEditor(MSwtControl* aEditor)
+{
+    if (iSplitInputEditor == aEditor)
+    {
+        // This can happen when pressing Enter in a multi line editor.
+        return;
+    }
+
+    CAknAppUi* appUi = (CAknAppUi*)iDisplay.CoeEnv()->EikAppUi();
+
+    if (aEditor)
+    {
+        MSwtShell& shell = aEditor->GetShell();
+        MSwtControl* view = ScrolledCompositeAncestor(*aEditor);
+        TBool editorSwitch(iSplitInputEditor != 0);
+        TBool keepView(view && view == iSplitInputView);
+        TBool keepShell(editorSwitch && ((&iSplitInputEditor->GetShell()) == (&shell)));
+
+        if (editorSwitch)
+        {
+            if (!keepShell)
+            {
+                // Move back the previous split input Shell keeping the SP hidden.
+                DoSetSplitInputShellPos(iSplitInputShellPos);
+            }
+            // Otherwise no need for the shell to restore its original
+            // position as it is going to be moved again right after this.
+
+            if (!keepView)
+            {
+                // Resize back the previous split input view
+                DoSetSplitInputViewSize(iSplitInputViewSize);
+            }
+        }
+
+        iSplitInputEditor = aEditor;
+        iSplitInputView = view;
+        if (!iSplitInputView)
+        {
+            iSplitInputView = iSplitInputEditor;
+        }
+
+        if (!editorSwitch || !keepShell)
+        {
+            iSplitInputShellPos = shell.Control()->GetLocation();
+        }
+
+        if (!editorSwitch)
+        {
+            iSplitInputSPVisible = iStatusPane->IsVisible();
+        }
+
+        if (iStatusPane->IsVisible())
+        {
+            // Hide the SP. The observer must be cleared before so that
+            // HandleStatusPaneSizeChange is not called on the Shell.
+            iStatusPane->SetObserver(NULL);
+            iStatusPane->MakeVisible(EFalse);
+        }
+
+        if (!keepView)
+        {
+            iSplitInputViewSize = TSize(0, 0);
+            SetSplitInputViewSize(iSplitInputView->GetWidgetSize());
+        }
+
+        if (!editorSwitch && view)
+        {
+            TRAP_IGNORE(iDisplay.PostShowFocusedControlEventL(view->JavaPeer()));
+        }
+    }
+    else
+    {
+        ASSERT(iSplitInputEditor);
+        if (iSplitInputSPVisible)
+        {
+            iStatusPane->MakeVisible(ETrue);
+            iStatusPane->SetObserver(this);
+        }
+        DoSetSplitInputShellPos(iSplitInputShellPos);
+        DoSetSplitInputViewSize(iSplitInputViewSize);
+        iSplitInputEditor = 0;
+        iSplitInputView = 0;
+    }
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::SetSplitInputEditor
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+MSwtControl* CSwtUiUtils::SplitInputEditor() const
+{
+    return iSplitInputEditor;
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::SetSplitInputEditor
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+MSwtControl* CSwtUiUtils::SplitInputView() const
+{
+    return iSplitInputView;
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::SetSplitInputShellPos
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+void CSwtUiUtils::SetSplitInputShellPos(const TPoint& aOriginalPos)
+{
+    iSplitInputShellPos = aOriginalPos;
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::SetSplitInputViewSize
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+void CSwtUiUtils::SetSplitInputViewSize(const TSize& aOriginalSize)
+{
+    if (aOriginalSize == iSplitInputViewSize)
+    {
+        return;
+    }
+
+    // Remember the size of the editor and resize it if needed
+    // to fit into remaining space above the vkb.
+    iSplitInputViewSize = aOriginalSize;
+    CAknAppUi* appUi = (CAknAppUi*)iDisplay.CoeEnv()->EikAppUi();
+    TRect appUiRect(appUi->ClientRect());
+    TSize size(iSplitInputViewSize);
+    if (size.iHeight > appUiRect.Height())
+    {
+        size.iHeight = appUiRect.Height();
+    }
+    DoSetSplitInputViewSize(size);
+    AdjustSplitInputShellPos();
+}
+
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::AdjustSplitInputShellPos
+// From MSwtUtils
+// ---------------------------------------------------------------------------
+//
+void CSwtUiUtils::AdjustSplitInputShellPos()
+{
+    if (!iSplitInputView)
+    {
+        return;
+    }
+
+    CAknAppUi *appUi = (CAknAppUi*)(iDisplay.CoeEnv()->EikAppUi());
+    TInt appUiHeight(appUi->ClientRect().Height());
+    MSwtShell & shell = iSplitInputView->GetShell();
+    TInt shellHeight(shell.Control()->GetWidgetSize().iHeight);
+    TRect rect(iSplitInputView->VisibleRect());
+    TInt y(-rect.iTl.iY + (appUiHeight - rect.Height()) / 2);
+    if (y < (appUiHeight - shellHeight))
+        y = appUiHeight - shellHeight;
+
+    if (!shell.GetParentShell())
+    {
+        if (y > 0)
+            y = 0;
+    }
+    else
+    {
+        if (y > iSplitInputShellPos.iY)
+            y = iSplitInputShellPos.iY;
+
+    }
+    DoSetSplitInputShellPos(TPoint(iSplitInputShellPos.iX, y));
+}
+
+// ---------------------------------------------------------------------------
 // CSwtUiUtils::HandleFreeRamEventL
 // From MSwtUiUtils
 // ---------------------------------------------------------------------------
@@ -1777,6 +2063,10 @@
     return NULL;
 }
 
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::SetShellFade
+// ---------------------------------------------------------------------------
+//
 void CSwtUiUtils::SetShellFade(MSwtShell* aShell, TBool aStatus)
 {
     if (CanBeFaded(aShell))
@@ -1793,7 +2083,12 @@
     }
 }
 
+// ---------------------------------------------------------------------------
+// CSwtUiUtils::CanBeFaded
+// ---------------------------------------------------------------------------
+//
 TBool CSwtUiUtils::CanBeFaded(MSwtShell* aShell) const
 {
     return (aShell && aShell->GetParentShell() && IsApplicationModal(*aShell));
 }
+
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/swt/custom/ScrolledComposite.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/src/org/eclipse/swt/custom/ScrolledComposite.java	Wed Jun 09 09:34:07 2010 +0300
@@ -734,7 +734,10 @@
         if (control == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
         if (control.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
         if (!contains(control)) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+        doShowControl(control, false);
+    }
 
+    private void doShowControl(Control control, boolean center) {
         Rectangle itemRect = getDisplay().map(control.getParent(), this, control.getBounds());
         Rectangle area = getClientArea();
         Point origin = getOrigin();
@@ -746,13 +749,21 @@
         {
             if (area.width < itemRect.x + itemRect.width) origin.x = Math.max(0, origin.x + itemRect.x + Math.min(itemRect.width, area.width) - area.width);
         }
-        if (itemRect.y < 0)
+        
+        if (center && itemRect.height <= area.height)
         {
-            origin.y = Math.max(0, origin.y + itemRect.y);
+            origin.y = origin.y + itemRect.y - (area.height - itemRect.height) / 2;
         }
         else
         {
-            if (area.height < itemRect.y + itemRect.height) origin.y = Math.max(0, origin.y + itemRect.y + Math.min(itemRect.height, area.height) - area.height);
+            if (itemRect.y < 0)
+            {
+                origin.y = Math.max(0, origin.y + itemRect.y);
+            }
+            else
+            {
+                if (area.height < itemRect.y + itemRect.height) origin.y = Math.max(0, origin.y + itemRect.y + Math.min(itemRect.height, area.height) - area.height);
+            }
         }
         setOrigin(origin);
     }
@@ -765,4 +776,10 @@
         int vSelection = vBar.getSelection();
         content.setLocation(location.x, -vSelection);
     }
+    
+    void handleShowFocusedControlEvent()
+    {
+        Control control = getDisplay().getFocusControl();
+        if (contains(control)) doShowControl(control, true);
+    }
 }
--- a/javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitInvoker.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitInvoker.java	Wed Jun 09 09:34:07 2010 +0300
@@ -88,6 +88,15 @@
      */
     public abstract boolean isNgaEnabled();
 
+
+    /**
+     * NGA specific change.
+     * LCDUI's client APIs (e.g M3G) can check are they on foreground or not. 
+     * @return <code>true</code> if MIDlet is on foreground.
+     * @since S60 9.2
+     */
+    public abstract boolean isForeground();
+    
     //
     // Image access
     //
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitObserverNGAExtension.java	Wed Jun 09 09:34:07 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+package com.nokia.mj.impl.rt.legacy;
+
+public interface ToolkitObserverNGAExtension extends ToolkitObserver
+{
+    /**
+     * Notification about MIDlet going to background or coming foreground.
+     * @param foreground    true, when MIDlet came to foreground
+     *                      false, when MIDlet was sent to background
+     */
+    void foregroundEvent(boolean foreground);
+}
\ No newline at end of file
--- a/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Toolkit.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/Toolkit.java	Wed Jun 09 09:34:07 2010 +0300
@@ -29,6 +29,7 @@
 import com.nokia.mj.impl.rt.legacy.MIDEventServer;
 import com.nokia.mj.impl.rt.legacy.NativeError;
 import com.nokia.mj.impl.rt.legacy.ToolkitObserver;
+import com.nokia.mj.impl.rt.legacy.ToolkitObserverNGAExtension;
 
 import com.nokia.mj.impl.rt.support.ApplicationUtils;
 import com.nokia.mj.impl.rt.support.ApplicationInfo;
@@ -553,9 +554,11 @@
                     break;
                 case EVENT_FOREGROUND:
                     iDisplay.handleForeground(true);
+                    notifyForeground(true);
                     break;
                 case EVENT_BACKGROUND:
                     iDisplay.handleForeground(false);
+                    notifyForeground(false);
                     break;
                 case EVENT_SET_CURRENT:
                     iDisplay.switchCurrent();
@@ -570,6 +573,23 @@
         }
     }
 
+    private synchronized void notifyForeground(boolean foreground)
+    {
+        if (null != iObservers)
+        {
+            final int lastIndex = iObservers.size() - 1;
+            for (int ii=lastIndex; ii>=0; ii--)
+            {
+                if (iObservers.elementAt(ii) instanceof ToolkitObserverNGAExtension)
+                {
+                    final ToolkitObserverNGAExtension observer = 
+                                (ToolkitObserverNGAExtension)iObservers.elementAt(ii);
+                    observer.foregroundEvent(foreground);
+                }
+            }
+        }
+    }
+
     private void handleCanvasGraphicsItemPainterEvent(CanvasGraphicsItemPainter aSource, int aEvent, int aParam0, int aParam1, int aParam2)
     {
         if (resetThread())
--- a/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/ToolkitInvoker.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/javalcdui/javasrc/javax/microedition/lcdui/ToolkitInvoker.java	Wed Jun 09 09:34:07 2010 +0300
@@ -287,5 +287,22 @@
         }
         return ((Graphics)aGraphics).iHandle;
     }
+    
+    /*
+     * @see com.nokia.mj.impl.rt.legacy.ToolkitInvoker#isForeground()
+     */	
+    public boolean isForeground()
+    {
+        Toolkit toolkit = getCurrentToolkit();
+        if (toolkit != null) 
+        {
+            Display display = toolkit.getDisplay();
+            if (display != null) 
+            {
+                return display.IsForeground();
+            }
+        }
+        return false;
+    }
 }
 
--- a/javauis/lcdui_akn/lcdui/inc/CMIDCanvas.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDCanvas.h	Wed Jun 09 09:34:07 2010 +0300
@@ -1040,7 +1040,7 @@
      *          returns EFalse.
      */
     TBool IsNetworkIndicatorEnabledL() const;
-    
+
 public:
     /**
      * Handles switching from foreground to
@@ -1048,7 +1048,7 @@
      * context and surfaces need to be relased.
      */
     void HandleForeground(TBool aForeground);
-    
+
 private:
     /** States of the first paint */
     enum TFirstPainState {
@@ -1068,7 +1068,7 @@
         EEglWindow,
         EEglPbuffer
     }  TEglType;
-    
+
 // from MAlfBufferProvider
 public:
     /**
@@ -1316,6 +1316,12 @@
      */
     const TDesC8& GetEglError(EGLint aErr);
 
+    /**
+     * Clears UI surface to transparent color
+     * @since S60 9.2
+     */
+    void ClearUiSurface(TBool aDrawing);
+
 #endif // RD_JAVA_NGA_ENABLED
 
 private: // data
@@ -1560,7 +1566,7 @@
 
     // Stores the control on which was press event generated
     MMIDCustomComponent* iPressedComponent;
-    
+
     /**
      * Flag incdicating the foreground status of canvas.
      * Set to EFalse when some other displayable is made current
@@ -1690,7 +1696,7 @@
      * All events, which started outside the canvas have to be ignored.
      */
     TBool iDragEventsStartedInside;
-    
+
     /**
      * Switched after any graphics have been sent to screen.
      * Those graphics should be really drawn on the screen.
--- a/javauis/lcdui_akn/lcdui/inc/CMIDTextBoxQueryDialog.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDTextBoxQueryDialog.h	Wed Jun 09 09:34:07 2010 +0300
@@ -283,6 +283,14 @@
     TBool IsNumberConversionNeeded();
 
     void HandleMinusCharEventL(MEikEdwinObserver::TEdwinEvent aEventType);
+
+    /**
+     * Prevents changes that would result in an illegal string
+     *
+     * @param TEdwinEvent aEventType
+     */
+    void HandleTextUpdateL(TEdwinEvent aEventType);
+
     TPtrC Read() const;
 
     void CreateNonMidletCommandsL();
@@ -394,6 +402,12 @@
      * Rect of Editor
      */
     TRect iEditorRect;
+
+    /**
+     * Used when ConstraintsValidForText decide
+     * whatever to test text using stric options or not
+     */
+    TBool iStrict;
 };
 
 
--- a/javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwinCustomDraw.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/inc/CMIDTextEditorEdwinCustomDraw.h	Wed Jun 09 09:34:07 2010 +0300
@@ -112,7 +112,7 @@
         const TDesC& aText,
         const TPoint& aTextOrigin,
         TInt aExtraPixels) const;
-    
+
 #ifdef RD_JAVA_S60_RELEASE_9_2
     /**
      * Called by the editor FW in order to draw the the content of
@@ -124,8 +124,8 @@
      * @param aLineInfo The line information.
      * @param aFormat The current character format.
      * @param aText The content to draw.
-     * @param aStart 
-     * @param aEnd 
+     * @param aStart
+     * @param aEnd
      * @param aTextOrigin The origin of the text.
      * @param aExtraPixels The amount of extra pixels.
      * @since S60 5.0
@@ -140,7 +140,7 @@
         const TPoint& aTextOrigin,
         TInt aExtraPixels) const;
 #endif
-    
+
     /**
      * Retrieves the system color for the specified color index.
      *
@@ -154,6 +154,16 @@
         TUint aColorIndex,
         TRgb aDefaultColor) const;
 
+private: // Own functions
+    /**
+     * Gets proper clipping rect used during scaling. Returned rect is
+     * intersection of canvas rect and iEditorRect.
+     *
+     * @return The proper clipping rect during scaling
+     * @since S60 5.0
+     */
+    const TRect GetClippingRectForScaling() const;
+
 private: // Data
 
     // Reference to the editor window. Used.
--- a/javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDCanvas.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -108,6 +108,7 @@
 // mixing 3D & 2D rendering
 #define KTransparentClearColor TRgb(0x000000, 0x0)
 #define KOpaqueClearColor      TRgb(0xFFFFFF, 0xFF)
+#define KOpaqueBlackColor      TRgb(0x000000, 255)
 
 #ifdef _DEBUG
 #define ASSERT_GL() AssertGL()
@@ -859,7 +860,8 @@
             {
                 CreatePBufferSurfaceL();
             }
-            // Draw all framebuffer content to EGL surface.
+            // Draw the whole framebuffer content (as a texture) on top of
+            // the EGL window surface.
             iUpperUpdateRect = TRect(Size());
             UpdateEglContent();
         }
@@ -1068,7 +1070,22 @@
     iEnv.ToLcduiObserver().RegisterControl(*this, this);
 #else
     iEnv.ToLcduiObserver().RegisterControl(*this);
-#endif
+#endif // RD_JAVA_NGA_ENABLED
+
+#ifdef RD_JAVA_NGA_ENABLED
+    if (iFirstPaintState != EFirstPaintOccurred &&
+        iDirectContents.Count() == 1)
+    {
+        // The first canvas paint using NGA might be interrupted
+        // by addition of the direct content.
+        // Invoking repaint event to restore the first paint.
+        TInt posPacked  = (iViewRect.iTl.iX << 16) | (iViewRect.iTl.iY);
+        TSize size = iViewRect.Size();
+        TInt sizePacked = (size.iWidth << 16) | (size.iHeight);
+        
+        PostEvent(EPaint, posPacked, sizePacked);
+    }
+#endif // RD_JAVA_NGA_ENABLED
 }
 
 
@@ -1541,8 +1558,7 @@
     {
         // In case direct content content was removed
         // from canvas, recreate pixel source here
-        if (!iAlfCompositionPixelSource &&
-                !IsEglAvailable())
+        if (!iAlfCompositionPixelSource && !IsEglAvailable())
         {
             InitPixelSourceL();
         }
@@ -1559,6 +1575,22 @@
         {
             DrawNow(aRect);
         }
+#ifdef RD_JAVA_NGA_ENABLED
+        iCoeEnv->WsSession().Finish();
+#endif
+        
+        if (iFirstPaintState == EFirstPaintInitiated ||
+            iFirstPaintState == EFirstPaintPrepared)
+        {
+            // NGA is not used, StartScreen can be informed now
+            if (iForeground)
+            {
+                // The canvas is current, therefore we can flush
+                // the graphics and take the start screen snapshot.
+                iFirstPaintState = EFirstPaintOccurred;
+                java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi()->stopStartScreen();
+            }
+        }
     }
 
     // This is needed to avoid artifacting after orientation switch.
@@ -1792,50 +1824,44 @@
         DEBUG("DrawWindow - Not scaled - BitBlt");
         gc.BitBlt(windowRect.iTl, iFrameBuffer, windowRect);
     }
-    else
-#ifdef RD_JAVA_NGA_ENABLED
-        if (IsDownScaling(iContentSize, iViewRect, iM3GContent))
-#else
-        if (IsDownScaling(iContentSize, iViewRect))
-#endif //RD_JAVA_NGA_ENABLED
-        {
-            DEBUG("DrawWindow - Downscaling - BitBlt");
-            gc.BitBlt(windowRect.iTl, iFrameBuffer, windowRect.Size());
-        }
-    // Upscaling
-        else if (iScaler)
-        {
-            iFrameBuffer->LockHeap();
-            TUint32* pixelData = iFrameBuffer->DataAddress();
-
-            // Scale the framebuffer content.
-            CFbsBitmap* map = iScaler->Process(
-                                  iFrameBuffer->DisplayMode(),
-                                  pixelData,
-                                  iContentSize.iWidth,
-                                  iContentSize.iHeight,
-                                  iFrameBuffer->SizeInPixels().iWidth - iContentSize.iWidth,
-                                  iViewRect.Width(),
-                                  iViewRect.Height());
-
-            iFrameBuffer->UnlockHeap();
-
-            if (map)
-            {
-                DEBUG("DrawWindow - Upscaling - BitBlt - map ok");
-                gc.BitBlt(windowRect.iTl, map, windowRect.Size());
-            }
-            else
-            {
-                DEBUG("DrawWindow - Upscaling - DrawBitmap - no map");
-                gc.DrawBitmap(windowRect, iFrameBuffer, iContentSize);
-            }
-        }
 
 #ifdef RD_JAVA_NGA_ENABLED
-    iCoeEnv->WsSession().Finish();
-#endif
-
+    else if (IsDownScaling(iContentSize, iViewRect, iM3GContent))
+#else
+    else if (IsDownScaling(iContentSize, iViewRect))
+#endif //RD_JAVA_NGA_ENABLED
+    {
+        DEBUG("DrawWindow - Downscaling - BitBlt");
+        gc.BitBlt(windowRect.iTl, iFrameBuffer, windowRect.Size());
+    }
+    // Upscaling
+    else if (iScaler)
+    {
+        iFrameBuffer->LockHeap();
+        TUint32* pixelData = iFrameBuffer->DataAddress();
+        // Scale the framebuffer content.
+        CFbsBitmap* map = iScaler->Process(
+                              iFrameBuffer->DisplayMode(),
+                              pixelData,
+                              iContentSize.iWidth,
+                              iContentSize.iHeight,
+                              iFrameBuffer->SizeInPixels().iWidth - iContentSize.iWidth,
+                              iViewRect.Width(),
+                              iViewRect.Height());
+
+        iFrameBuffer->UnlockHeap();
+
+        if (map)
+        {
+            DEBUG("DrawWindow - Upscaling - BitBlt - map ok");
+            gc.BitBlt(windowRect.iTl, map, windowRect.Size());
+        }
+        else
+        {
+            DEBUG("DrawWindow - Upscaling - DrawBitmap - no map");
+            gc.DrawBitmap(windowRect, iFrameBuffer, iContentSize);
+        }
+    }
     DEBUG("CMIDCanvas::DrawWindow --");
 }
 #endif // CANVAS_DOUBLE_BUFFER
@@ -2383,8 +2409,6 @@
             CustomComponentControl(KComponentMainControl)->
             SetFocus(ETrue);
         }
-        // Redraw the canvas after unfading
-        DrawDeferred();
 
 #ifdef RD_JAVA_NGA_ENABLED
         // To avoid situation when Canvas is redrawn but black area remains
@@ -2396,6 +2420,14 @@
                 DEBUG_INT("CMIDCanvas::FocusChanged - ActivatePixelSourceL error %d", err);
             }
         }
+        else
+        {
+            // Redraw the canvas after unfading
+            DrawDeferred();
+        }
+#else // !RD_JAVA_NGA_ENABLED
+        // Redraw the canvas after unfading
+        DrawDeferred();
 #endif // RD_JAVA_NGA_ENABLED
 
     }
@@ -2539,7 +2571,7 @@
     // This is needed to avoid artifacting after orientation switch.
     TBool landscape = Layout_Meta_Data::IsLandscapeOrientation();
 
-    if (iLandscape != landscape)
+    if (iLandscape != landscape && !iAlfCompositionPixelSource)
     {
         iLandscape = landscape;
         iWndUpdate = ETrue;
@@ -2554,10 +2586,14 @@
         {
             DrawWindow(aRect);
         }
-        else if (iAlfCompositionPixelSource)
+        else
         {
             CMIDCanvas* myself = const_cast<CMIDCanvas*>(this);
-            TRAP_IGNORE(myself->ActivatePixelSourceL());
+            myself->ClearUiSurface(ETrue);
+            if (iAlfCompositionPixelSource)
+            {
+                TRAP_IGNORE(myself->ActivatePixelSourceL());
+            }
         }
         iWndUpdate = EFalse;
     }
@@ -2659,23 +2695,24 @@
     TBool aUpdateRequired
 #endif // CANVAS_DIRECT_ACCESS
 ) :
-    CCoeControl()
-    ,iEnv(aEnv)
+        CCoeControl()
+        ,iEnv(aEnv)
 #ifdef CANVAS_DOUBLE_BUFFER
-    ,iFrameBuffer(NULL)
+        ,iFrameBuffer(NULL)
 #endif // CANVAS_DOUBLE_BUFFER
-    ,iIsGameCanvas((
-                       aComponentType == MMIDComponent::EGameCanvas ? ETrue : EFalse))
-    ,iFlags(EPostKeyEvents)
-    ,iFullScreen(EFalse)
-    ,iScalingOn(EFalse)
-    ,iS60SelectionKeyCompatibility(EFalse)
-    ,iRestoreContentWhenUnfaded(EFalse)
-    ,iLastFadeMessage(0)
+        ,iIsGameCanvas((
+                           aComponentType == MMIDComponent::EGameCanvas ? ETrue : EFalse))
+        ,iFlags(EPostKeyEvents)
+        ,iFullScreen(EFalse)
+        ,iScalingOn(EFalse)
+        ,iS60SelectionKeyCompatibility(EFalse)
+        ,iRestoreContentWhenUnfaded(EFalse)
+        ,iLastFadeMessage(0)
 #ifdef CANVAS_DIRECT_ACCESS
-    ,iDcDsaToStart(EFalse)
+        ,iDcDsaToStart(EFalse)
 #endif // CANVAS_DIRECT_ACCESS
-    ,iDragEventsStartedInside(EFalse)
+        ,iDragEventsStartedInside(EFalse)
+        ,iFirstPaintState(EFirstPaintNeverOccurred)
 {
     DEBUG("+ CMIDCanvas::CMIDCanvas - EDirectEnabled");
 
@@ -3552,6 +3589,7 @@
 
     if (iPixelSourceSuspended)
     {
+        ClearUiSurface(EFalse);
         iPixelSourceSuspended = EFalse;
         if (iFullScreen && iScalingOn)
         {
@@ -3561,13 +3599,35 @@
 }
 
 // ---------------------------------------------------------------------------
+// CMIDCanvas::ClearUiSurface
+// ---------------------------------------------------------------------------
+//
+void CMIDCanvas::ClearUiSurface(TBool aDrawing)
+{
+    if (!aDrawing)
+    {
+        Window().BeginRedraw();
+        ActivateGc();
+    }
+    CWindowGc& gc = SystemGc();
+    gc.SetBrushColor(KTransparentClearColor);
+    gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
+    gc.Clear();
+    if (!aDrawing)
+    {
+        DeactivateGc();
+        Window().EndRedraw();
+    }
+    iCoeEnv->WsSession().Finish();
+}
+
 // CMIDCanvas::SuspendPixelSource
 // ---------------------------------------------------------------------------
 //
 void CMIDCanvas::SuspendPixelSource()
 {
     NotifyMonitor();
-    if (iAlfCompositionPixelSource)
+    if (iAlfCompositionPixelSource && !iPixelSourceSuspended)
     {
         iAlfCompositionPixelSource->Suspend();
         iPixelSourceSuspended = ETrue;
@@ -4151,11 +4211,11 @@
             User::Leave(KErrUnknown);
         }
 
-        // Make framebuffer opaque
-        iFrameContext->SetBrushColor(KOpaqueClearColor);
+        // Clear with opaque black so that EDrawModeOR can be used in BitBlt()
+        iFrameContext->SetBrushColor(KOpaqueBlackColor);
         iFrameContext->SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
         iFrameContext->Clear();
-
+        iFrameContext->SetDrawMode(CGraphicsContext::EDrawModeOR);
         iFrameContext->BitBlt(TPoint(), bitmap);
         CleanupStack::PopAndDestroy();
         SetCurrentEglType(current);
--- a/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupControl.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDChoiceGroupControl.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -1170,9 +1170,12 @@
 {
     if (aText.Length())
     {
+        // Get color from skin
         TRgb rgb = AKN_LAF_COLOR(215);
+        TInt textColor = IsFocused() ? EAknsCIQsnTextColorsCG8 : EAknsCIQsnTextColorsCG6;
+
         AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
-                                  rgb,KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8);
+                                  rgb,KAknsIIDQsnTextColors, textColor);
         iPopupTextLayout.DrawText(SystemGc(), aText, ETrue, rgb);
     }
 }
--- a/javauis/lcdui_akn/lcdui/src/CMIDControlItem.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDControlItem.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -249,9 +249,14 @@
 void CMIDControlItem::SetLabelColor(CMIDItemLabel* aLabelControl)
 {
     TRgb color;
+        
+    TInt labelColor = (IsFocused() && 
+                       Type() != MMIDComponent::ECustomItem &&
+                       Type() != MMIDComponent::EImageItem) ? EAknsCIQsnTextColorsCG8 : EAknsCIQsnTextColorsCG6;
 
+    // Get color from skin
     if ((AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), color,
-                                   KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8) == KErrNone) && iLabelControl)
+                                   KAknsIIDQsnTextColors, labelColor) == KErrNone) && iLabelControl)
     {//data entry text color
         TRAP_IGNORE(aLabelControl->SetColorL(color));
     }
--- a/javauis/lcdui_akn/lcdui/src/CMIDDateFieldItem.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDDateFieldItem.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -243,8 +243,9 @@
     {
         iInitialised = EFalse;
     }
+
     // Text colour from skin
-    iEditor->SetSkinTextColorL(EAknsCIQsnTextColorsCG8);
+    iEditor->SetSkinTextColorL(EAknsCIQsnTextColorsCG6);
 }
 
 void CMIDDateFieldItem::SetInitialized(TInt aSetCurrentTime /* = ETrue */)
@@ -813,15 +814,18 @@
 {
     TBool focus = IsFocused();
 
-
     iEditor->SetFocus(focus);
     if (focus)
     {
+        // Text colour from skin - focused
+        iEditor->SetSkinTextColorL(EAknsCIQsnTextColorsCG8);
         TRAP_IGNORE(iUIManager->OpenNaviPaneControllerL()->PauseTickerL(
                         TICKER_PAUSE_INTERVAL, this));
     }
     else
     {
+        // Text colour from skin - unfocused
+        iEditor->SetSkinTextColorL(EAknsCIQsnTextColorsCG6);
         TRAP_IGNORE(iUIManager->OpenNaviPaneControllerL()->PauseTickerL(
                         0, this));
 #ifdef RD_SCALABLE_UI_V2
--- a/javauis/lcdui_akn/lcdui/src/CMIDFormPhysics.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDFormPhysics.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -141,8 +141,7 @@
     if (iPhysics)
     {
         TPoint drag(aLength);
-        iPhysics->StartFlick(drag, aDuration);
-        return ETrue;
+        return iPhysics->StartFlick(drag, aDuration);
     }
 
     PhysicEmulationEnded();
--- a/javauis/lcdui_akn/lcdui/src/CMIDItemLabel.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDItemLabel.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -472,7 +472,7 @@
     if (skin)
     {
         AknsUtils::GetCachedColor(skin, iDefaultColor, KAknsIIDQsnTextColors,
-                                  EAknsCIQsnTextColorsCG8);
+                                  EAknsCIQsnTextColorsCG6);
         iColor = iDefaultColor;
     }
 
--- a/javauis/lcdui_akn/lcdui/src/CMIDStringItem.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDStringItem.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -678,7 +678,7 @@
         // Same color - no matter if focused or not
         AknsUtils::GetCachedColor(
             AknsUtils::SkinInstance(), color,
-            KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8);
+            KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6);
         labelColor = color;
         contentColor = color;
     }
@@ -717,7 +717,7 @@
             // Item is not focused
             AknsUtils::GetCachedColor(
                 AknsUtils::SkinInstance(), labelColor,
-                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8);
+                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6);
             AknsUtils::GetCachedColor(
                 AknsUtils::SkinInstance(), contentColor,
                 KAknsIIDQsnHighlightColors, EAknsCIQsnHighlightColorsCG3);
@@ -743,7 +743,7 @@
         if (iButton)
         {
             iButton->SetTextColorIds(
-                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8);
+                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6);
         }
     }
 
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextBoxQueryDialog.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -88,6 +88,8 @@
 
     iConstraints = aConstraints;
     iLastCountLine = 0;
+    iStrict = ETrue;
+
     // if text is invalid according to constraints, throw IllegalArgumentException,
     // except for a PHONENUMBER which only has the invalid characters removed
     if ((iConstraints & MMIDTextField::EConstraintMask) != MMIDTextField::EPhoneNumber
@@ -221,11 +223,11 @@
     if ((iConstraints & MMIDTextField::EConstraintMask) == MMIDTextField::EPhoneNumber)
     {
     }
-    else if (!iEdwinUtils->ConstraintsValidForText(aText, iConstraints, ETrue))
+    else if (!iEdwinUtils->ConstraintsValidForText(aText, iConstraints, (iStrict ? ETrue : EFalse)))
     {
         User::Leave(KErrArgument);
     }
-    //
+    iStrict = ETrue;
 
     HBufC* buf = iEdwinUtils->ConvertToLocalizedLC(aText, iConstraints);
 
@@ -290,7 +292,6 @@
 
     temp = iEdwinUtils->ConvertToLocalizedLC(aText, iConstraints);
 
-
     if (IsNumberConversionNeeded())
     {
         TPtr ptr = temp->Des();
@@ -455,7 +456,6 @@
 void CMIDTextBoxQueryDialog::FocusChanged(TDrawNow aDrawNow)
 {
     CAknTextQueryDialog::FocusChanged(aDrawNow);
-    TBool isFocused = IsFocused();
     SetRightScrollBarPosition();
 }
 //
@@ -604,19 +604,13 @@
     //  End Enter Key
     //
 
-
     // msk: this is needed if MSK is not enabled on the device
     if ((aType == EEventKey) && (aKeyEvent.iScanCode == EStdKeyDevice3))
     {
-        iDisplayable->ShowOkOptionsMenuL();
-        return EKeyWasConsumed;
-    }
-
-
-    // msk: this is needed if MSK is not enabled on the device
-    if ((aType == EEventKey) && (aKeyEvent.iScanCode == EStdKeyDevice3))
-    {
-        iDisplayable->ShowOkOptionsMenuL();
+        if (iDisplayable && iDisplayable->ShowOkOptionsMenuL())
+        {
+            SetFocus(EFalse);
+        }
         return EKeyWasConsumed;
     }
 
@@ -684,11 +678,11 @@
     {
         CPlainText* res = iEditor->Text();
         TInt textLength = Size();
-        if (scanCode == EStdKeyMinus)
+        if (scanCode == EStdKeyMinus && textLength < iMaxSize)
         {
             res->InsertL(GetCaretPosition(), KMinusChar);
         }
-        else if (scanCode == EStdKeyFullStop)
+        else if (scanCode == EStdKeyFullStop && textLength < iMaxSize)
         {
             res->InsertL(GetCaretPosition(), KFullStopChar);
         }
@@ -699,6 +693,8 @@
         {
             SetCursorPositionL(GetCaretPosition() + 1);
         }
+
+        HandleTextUpdateL(MEikEdwinObserver::EEventTextUpdate);
     }
     //Error tone playing case1:
     //Play error tone if TextBox/TextField is read-only or maximum length has been reached.
@@ -767,64 +763,97 @@
 
 
     TKeyResponse response = EKeyWasNotConsumed;
+    TBool isFocused = IsFocused();
 
-    //Error tone playing case2:
-    //Play error tone if TextBox/TextField is read-only or maximum length has been reached.
-    //Here is handling of full keyboard keys(NOT 0...9) and all virtual keyboard keys.
-    //(Note: Virtual keyboard sends only EEventKey type events, not up or down events)
-    //(Note: Error tone is played when there is no text to be replaced i.e. no text has been painted)
-    if (!iEdwinUtils->IsNavigationKey(aKeyEvent) && !iEdwinUtils->IsHotKeyL(aKeyEvent, iCoeEnv) && !aKeyEvent.iCode == EKeyYes &&
-            (!iKeyEventsPending || (scanCode < KKeyQwerty0  || scanCode > KKeyQwerty9)))
+    // If there is no focus textbox should not consume keys
+    if (isFocused)
     {
-        if (iEditor->IsReadOnly() || (Size() >= iMaxSize && aKeyEvent.iCode != EKeyBackspace))
+        //Error tone playing case2:
+        //Play error tone if TextBox/TextField is read-only or maximum length has been reached.
+        //Here is handling of full keyboard keys(NOT 0...9) and all virtual keyboard keys.
+        //(Note: Virtual keyboard sends only EEventKey type events, not up or down events)
+        //(Note: Error tone is played when there is no text to be replaced i.e. no text has been painted)
+        if (!iEdwinUtils->IsNavigationKey(aKeyEvent) && !iEdwinUtils->IsHotKeyL(aKeyEvent, iCoeEnv) && !aKeyEvent.iCode == EKeyYes &&
+                (!iKeyEventsPending || (scanCode < KKeyQwerty0  || scanCode > KKeyQwerty9)))
+        {
+            if (iEditor->IsReadOnly() || (Size() >= iMaxSize && aKeyEvent.iCode != EKeyBackspace))
+            {
+                //SelectionLength() > 0 if text has been selected/painted
+                if (iEditor->SelectionLength() == 0)
+                {
+                    iAvkonAppUi->KeySounds()->PlaySound(EAvkonSIDErrorTone);
+                }
+                response = iEditor->OfferKeyEventL(aKeyEvent,aType);
+                return response;
+            }
+        }
+
+        TBool valid = EFalse;
+
+        if (iEdwinUtils->IsNavigationKey(aKeyEvent) || iEdwinUtils->IsHotKeyL(aKeyEvent, iCoeEnv))
         {
-            //SelectionLength() > 0 if text has been selected/painted
-            if (iEditor->SelectionLength() == 0)
+            HBufC* oldText = GetTextL();
+            CleanupStack::PushL(oldText);
+            TCursorSelection sel = iEditor->Selection();
+
+            response = CAknTextQueryDialog::OfferKeyEventL(aKeyEvent,aType);
+            valid = iEdwinUtils->ConstraintsValidForText(iEditor->Text()?Read():TPtrC(),iConstraints,EFalse);
+
+            if (!valid)
+            {
+                SetTextL(*oldText);
+                iEditor->HandleTextChangedL();
+                iEditor->SetSelectionL(sel.iCursorPos,sel.iAnchorPos);
+                response = EKeyWasConsumed;
+            }
+            CleanupStack::PopAndDestroy(oldText);
+
+            return response;
+        }
+        else
+        {
+            TBuf<1> key;
+            key.Append(TChar(aKeyEvent.iCode));
+            valid = iEdwinUtils->ConstraintsValidForInsertedTextL(iEditor->Text()?Read():TPtrC(),
+                    key,
+                    GetCaretPosition(),
+                    iConstraints,
+                    EFalse);
+            if (valid)
             {
-                iAvkonAppUi->KeySounds()->PlaySound(EAvkonSIDErrorTone);
+                response = iEditor->OfferKeyEventL(aKeyEvent,aType);
             }
-            response = iEditor->OfferKeyEventL(aKeyEvent,aType);
+            else
+            {
+                // If minus char was entered in full querty editor mode
+                if (IsConstraintSet(MMIDTextField::EDecimal) &&
+                        (aType == EEventKey) && iEditor && !iEditor->IsReadOnly() &&
+                        (TChar(aKeyEvent.iCode) == TChar('-') && scanCode != EStdKeyMinus))
+                {
+                    CPlainText* res = iEditor->Text();
+
+                    if (res && TChar(aKeyEvent.iCode) == TChar('-') &&
+                            Size() < iMaxSize)
+                    {
+                        res->InsertL(GetCaretPosition(), KMinusChar);
+                        // notify editor about the text changes
+                        iEditor->HandleTextChangedL();
+
+                        if (Size() < iMaxSize)
+                        {
+                            SetCursorPositionL(GetCaretPosition() + 1);
+                        }
+
+                        //Prevent changes that would result in an illegal string
+                        HandleTextUpdateL(MEikEdwinObserver::EEventTextUpdate);
+                    }
+                }
+
+            }
             return response;
         }
     }
-
-    TBool valid = EFalse;
-
-    if (iEdwinUtils->IsNavigationKey(aKeyEvent) || iEdwinUtils->IsHotKeyL(aKeyEvent, iCoeEnv))
-    {
-        HBufC* oldText = GetTextL();
-        CleanupStack::PushL(oldText);
-        TCursorSelection sel = iEditor->Selection();
-
-        response = CAknTextQueryDialog::OfferKeyEventL(aKeyEvent,aType);
-        valid = iEdwinUtils->ConstraintsValidForText(iEditor->Text()?Read():TPtrC(),iConstraints,EFalse);
-
-        if (!valid)
-        {
-            SetTextL(*oldText);
-            iEditor->HandleTextChangedL();
-            iEditor->SetSelectionL(sel.iCursorPos,sel.iAnchorPos);
-            response = EKeyWasConsumed;
-        }
-        CleanupStack::PopAndDestroy(oldText);
-
-        return response;
-    }
-    else
-    {
-        TBuf<1> key;
-        key.Append(TChar(aKeyEvent.iCode));
-        valid = iEdwinUtils->ConstraintsValidForInsertedTextL(iEditor->Text()?Read():TPtrC(),
-                key,
-                GetCaretPosition(),
-                iConstraints,
-                EFalse);
-        if (valid)
-        {
-            response = iEditor->OfferKeyEventL(aKeyEvent,aType);
-        }
-        return response;
-    }
+    return response;
 }
 
 #ifdef RD_SCALABLE_UI_V2
@@ -869,6 +898,23 @@
             iLastMultitapKey = 0;
         }
 
+        HandleTextUpdateL(MEikEdwinObserver::EEventTextUpdate);
+
+        if (iEditor && iEditor->TextLayout())
+        {
+            if (iLastCountLine != iEditor->TextLayout()->GetLineNumber(iEditor->TextLength() - 1))
+            {
+                iLastCountLine = iEditor->TextLayout()->GetLineNumber(iEditor->TextLength() - 1);
+                SetRightScrollBarPosition();
+            }
+        }
+    }
+}
+
+void CMIDTextBoxQueryDialog::HandleTextUpdateL(TEdwinEvent aEventType)
+{
+    if (aEventType == MEikEdwinObserver::EEventTextUpdate)
+    {
         TBool textChanged = EFalse;
         HBufC* res = NULL;
         TRAPD(err, { res = GetTextL();});
@@ -888,6 +934,7 @@
             TInt illegalCharPos = -1;
             TPtr16 ptr = res->Des();
             TInt minusPos = ptr.LocateReverse(TChar('-'));
+            iStrict = EFalse;
 
             // check if minus sign is inserted on incorrect place
             // (not at the beginning)
@@ -960,14 +1007,6 @@
         {
             iEditor->HandleTextChangedL();
         }
-        if (iEditor && iEditor->TextLayout())
-        {
-            if (iLastCountLine != iEditor->TextLayout()->GetLineNumber(iEditor->TextLength() - 1))
-            {
-                iLastCountLine = iEditor->TextLayout()->GetLineNumber(iEditor->TextLength() - 1);
-                SetRightScrollBarPosition();
-            }
-        }
     }
 }
 
@@ -1491,7 +1530,8 @@
 
 void CMIDTextBoxQueryDialog::SetRightScrollBarPosition()
 {
-    if (iEditor)
+    // Editor Rect should not be set with empty values
+    if (iEditor && iEditorRect.Height() != 0 && iEditorRect.Width() != 0)
     {
         iEditor->SetRect(iEditorRect);
     }
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextEditorEdwinCustomDraw.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -31,8 +31,8 @@
     const MLafEnv& aLafEnv,
     const MFormCustomDraw& aParentDraw,
     const CMIDTextEditorEdwin& aEdwin) :
-    CLafEdwinCustomDrawBase(aLafEnv, aEdwin),
-    iEdwin(aEdwin), iParentDraw(aParentDraw)
+        CLafEdwinCustomDrawBase(aLafEnv, aEdwin),
+        iEdwin(aEdwin), iParentDraw(aParentDraw)
 {
     DEBUG("CMIDTextEditorEdwinCustomDraw::CMIDTextEditorEdwinCustomDraw");
 }
@@ -76,7 +76,8 @@
         // Only drawing otherwise.
         if (iEdwin.IsScalingOn())
         {
-            aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+            aParam.iGc.SetClippingRect(GetClippingRectForScaling());
 
             iParentDraw.DrawBackground(aParam, aBackground, aDrawn);
 
@@ -103,7 +104,8 @@
     // Only drawing otherwise.
     if (iEdwin.IsScalingOn())
     {
-        aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+        aParam.iGc.SetClippingRect(GetClippingRectForScaling());
 
         iParentDraw.DrawLineGraphics(aParam, aLineInfo);
 
@@ -146,7 +148,7 @@
     // Only drawing otherwise.
     if (iEdwin.IsScalingOn())
     {
-        aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+        aParam.iGc.SetClippingRect(GetClippingRectForScaling());
 
         iParentDraw.DrawText(
             aParam,
@@ -204,7 +206,8 @@
     // Only drawing otherwise.
     if (iEdwin.IsScalingOn())
     {
-        aParam.iGc.SetClippingRect(iEdwin.GetOnScreenCanvasRect());
+
+        aParam.iGc.SetClippingRect(GetClippingRectForScaling());
 
         iParentDraw.DrawText(
             aParam,
@@ -258,4 +261,17 @@
     return ret;
 }
 
+// ---------------------------------------------------------------------------
+// CMIDTextEditorEdwinCustomDraw::GetClippingRectForScaling()
+// (other items were commented in the header file)
+// ---------------------------------------------------------------------------
+//
+const TRect CMIDTextEditorEdwinCustomDraw::GetClippingRectForScaling() const
+{
+    // It gets intersection of editor and canvas rectangles.
+    TRect rect = iEdwin.GetOnScreenCanvasRect();
+    rect.Intersection(iEdwin.Rect());
+    return rect;
+}
+
 // End of file
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextFieldEdwin.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextFieldEdwin.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -123,7 +123,7 @@
     }
     else
     { // skinning colour groups for editable text
-        skinTextColor = EAknsCIQsnTextColorsCG8;
+        skinTextColor = IsFocused() ? EAknsCIQsnTextColorsCG8 : EAknsCIQsnTextColorsCG6;
     }
 
     TRect parentRect = aRect;
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextFieldItem.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextFieldItem.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -342,7 +342,9 @@
         iTextField->SetFocus(EFalse);
     }
 
-    CMIDControlItem::FocusChanged(aDrawNow);
+    CMIDControlItem::FocusChanged(aDrawNow);    
+    // DoLayout and change text color when focused
+    SizeChanged();
 }
 
 void CMIDTextFieldItem::HandleCurrentL(TBool aCurrent)
--- a/javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -838,14 +838,14 @@
 // ---------------------------------------------------------------------------
 //
 CMIDUtils::CMIDUtils(MMIDEnv& aEnv, CMIDUIManager* aUIManager)
-    : iEnv(&aEnv)
-    , iUIManager(aUIManager)
-    , iScalingData()
-    , iQwertyMode(EFalse)
-    , iStickyKey(0)
-    , iLastScanCode(0)
-    , iModifier(0)
-    , iScalingDataInitialized(EFalse)
+        : iEnv(&aEnv)
+        , iUIManager(aUIManager)
+        , iScalingData()
+        , iQwertyMode(EFalse)
+        , iStickyKey(0)
+        , iLastScanCode(0)
+        , iModifier(0)
+        , iScalingDataInitialized(EFalse)
 {}
 
 CMIDUtils::~CMIDUtils()
@@ -1202,7 +1202,7 @@
 
 CMIDUtils::TScalingData CMIDUtils::GetScalingData()
 {
-	UpdateScalingData();
+    UpdateScalingData();
     return iScalingData;
 }
 
@@ -1215,7 +1215,13 @@
     iScalingDataInitialized = ETrue;
 
     // Get actual rect of screen without with eventual OSK.
-    TRect screenRect =iEnv->Current()->GetCanvasRectFromLaf();
+    // Empty rect is OK.
+    MMIDDisplayable* current = iEnv->Current();
+    TRect screenRect;
+    if (current)
+    {
+        screenRect = current->GetCanvasRectFromLaf();
+    }
 
     // Traslate of rect of screen into size
     data.iScreenSize = screenRect.Size();
--- a/javauis/lcdui_akn/lcduiphysicswrapper/src/CMIDPhysicsWrapper.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcduiphysicswrapper/src/CMIDPhysicsWrapper.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -129,8 +129,7 @@
     if (iPhysics)
     {
         TPoint drag(aLength);
-        iPhysics->StartPhysics(drag, aDuration);
-        return ETrue;
+        return iPhysics->StartPhysics(drag, aDuration);
     }
 
     PhysicEmulationEnded();
--- a/javauis/m3g_akn/javasrc/javax/microedition/m3g/Graphics3D.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/m3g_akn/javasrc/javax/microedition/m3g/Graphics3D.java	Wed Jun 09 09:34:07 2010 +0300
@@ -107,6 +107,7 @@
     private Rect viewport;
     private Rect clip;
     private boolean ngaEnabled = false;
+    private boolean foreground;
 
 
     //------------------------------------------------------------------
@@ -127,7 +128,9 @@
             }
             if (instance.graphics3D == null)
             {
+                // graphics3D must be assigned to interface before asking foreground status
                 instance.graphics3D = new Graphics3D();
+                instance.graphics3D.foreground = ToolkitInvoker.getToolkitInvoker().isForeground();
             }
             return instance.graphics3D;
         }
@@ -154,8 +157,8 @@
         this.viewport = new Rect();
         this.clip = new Rect();
         // Initializes NGA status - enabled or disabled
-        this.ngaEnabled = ToolkitInvoker.getToolkitInvoker().isNgaEnabled();
-    }
+        ngaEnabled = invoker.isNgaEnabled();
+     }
 
     /**
      *
@@ -182,99 +185,102 @@
      */
     public void bindTarget(java.lang.Object target, boolean depth, int flags)
     {
-        integrityCheck();
-        int eventSrcHandle = 0;
-        if (currentTarget != null)
-        {
-            throw new IllegalStateException();
-        }
-
-        if (target == null)
+        synchronized (Interface.getInstance()) 
         {
-            throw new NullPointerException();
-        }
-        try
-        {
-            // Bind event source. This need to be released.
-            eventSrcHandle = Interface.bindEventSource();
-            if (target instanceof Graphics)
+            integrityCheck();
+            int eventSrcHandle = 0;
+            if (currentTarget != null)
+            {
+                throw new IllegalStateException();
+            }
+
+            if (target == null)
+            {
+                throw new NullPointerException();
+            }
+            try
             {
-                Graphics g = (Graphics) target;
-                Platform.sync(g);
+                // Bind event source. This need to be released.
+                eventSrcHandle = Interface.bindEventSource();
+                if (target instanceof Graphics)
+                {
+                    Graphics g = (Graphics) target;
+                    Platform.sync(g);
+
+                    if (g.getClipWidth() > Defs.MAX_VIEWPORT_WIDTH ||
+                            g.getClipHeight() > Defs.MAX_VIEWPORT_HEIGHT)
+                    {
+                        throw new IllegalArgumentException();
+                    }
+
+                    offsetX = g.getTranslateX();
+                    offsetY = g.getTranslateY();
+
+                    ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
+
+                    // NGA specific change.
+                    if (ngaEnabled)
+                    {
+                        // If overwrite is set, there is no need
+                        // to update EGL surface with 2D content
+                        eglContentValid = (flags & OVERWRITE) > 0;
+
+                        // Clip and viewport are stored for later
+                        // checks regarding Background clear
+                        clip.x = g.getClipX() + offsetX;
+                        clip.y = g.getClipY() + offsetY;
+                        clip.width = g.getClipWidth();
+                        clip.height = g.getClipHeight();
 
-                if (g.getClipWidth() > Defs.MAX_VIEWPORT_WIDTH ||
-                        g.getClipHeight() > Defs.MAX_VIEWPORT_HEIGHT)
+                        viewport.x = clip.x;
+                        viewport.y = clip.y;
+                        viewport.width = clip.width;
+                        viewport.height = clip.height;
+
+                        isImageTarget = _bindGraphics(
+                                            eventSrcHandle,
+                                            handle,
+                                            invoker.graphicsGetHandle(g),
+                                            clip.x, clip.y,
+                                            clip.width, clip.height,
+                                            depth, flags,
+                                            isProperRenderer);
+                    }
+                    else
+                    {
+                        isImageTarget = _bindGraphics(
+                                            eventSrcHandle,
+                                            handle,
+                                            invoker.graphicsGetHandle(g),
+                                            g.getClipX() + offsetX, g.getClipY() + offsetY,
+                                            g.getClipWidth(), g.getClipHeight(),
+                                            depth, flags,
+                                            isProperRenderer);
+                    }
+                    currentTarget = g;
+                }
+                else if (target instanceof Image2D)
+                {
+                    Image2D img = (Image2D) target;
+
+                    offsetX = offsetY = 0;
+
+                    _bindImage(eventSrcHandle, handle, img.handle, depth, flags);
+                    currentTarget = img;
+                }
+                else
                 {
                     throw new IllegalArgumentException();
                 }
-
-                offsetX = g.getTranslateX();
-                offsetY = g.getTranslateY();
-
-                ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
-
-                // NGA specific change.
-                if (ngaEnabled)
-                {
-                    // If overwrite is set, there is no need
-                    // to update EGL surface with 2D content
-                    eglContentValid = (flags & OVERWRITE) > 0;
-
-                    // Clip and viewport are stored for later
-                    // checks regarding Background clear
-                    clip.x = g.getClipX() + offsetX;
-                    clip.y = g.getClipY() + offsetY;
-                    clip.width = g.getClipWidth();
-                    clip.height = g.getClipHeight();
-
-                    viewport.x = clip.x;
-                    viewport.y = clip.y;
-                    viewport.width = clip.width;
-                    viewport.height = clip.height;
-
-                    isImageTarget = _bindGraphics(
-                                        eventSrcHandle,
-                                        handle,
-                                        invoker.graphicsGetHandle(g),
-                                        clip.x, clip.y,
-                                        clip.width, clip.height,
-                                        depth, flags,
-                                        isProperRenderer);
-                }
-                else
-                {
-                    isImageTarget = _bindGraphics(
-                                        eventSrcHandle,
-                                        handle,
-                                        invoker.graphicsGetHandle(g),
-                                        g.getClipX() + offsetX, g.getClipY() + offsetY,
-                                        g.getClipWidth(), g.getClipHeight(),
-                                        depth, flags,
-                                        isProperRenderer);
-                }
-                currentTarget = g;
             }
-            else if (target instanceof Image2D)
-            {
-                Image2D img = (Image2D) target;
-
-                offsetX = offsetY = 0;
-
-                _bindImage(eventSrcHandle, handle, img.handle, depth, flags);
-                currentTarget = img;
-            }
-            else
+            finally
             {
-                throw new IllegalArgumentException();
+                // Release event source
+                Interface.releaseEventSource();
             }
+            hints = flags;
+            depthEnabled = depth;
         }
-        finally
-        {
-            // Release event source
-            Interface.releaseEventSource();
-        }
-        hints = flags;
-        depthEnabled = depth;
     }
 
     /**
@@ -282,44 +288,56 @@
      */
     public void releaseTarget()
     {
-        integrityCheck();
-        if (currentTarget == null)
-        {
-            return;
-        }
-        try
+        synchronized (Interface.getInstance()) 
         {
-            // Bind event source
-            int eventSrcHandle = Interface.bindEventSource();
-            if (currentTarget instanceof Graphics)
+            integrityCheck();
+            if (currentTarget == null)
             {
-                Graphics g = (Graphics) currentTarget;
-
-                ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
-
-                // NGA specific change.
-                if (ngaEnabled)
+                return;
+            }
+        
+            int eventSrcHandle = 0;
+        
+            try
+            {
+                // Bind event source
+                eventSrcHandle = Interface.bindEventSource();
+                if (currentTarget instanceof Graphics)
                 {
-                    updateEglContent();
+                    Graphics g = (Graphics) currentTarget;
+
+                    ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
+
+                    // NGA specific change.
+                    if (ngaEnabled)
+                    {
+                        updateEglContent();
+                    }
+                    _releaseGraphics(eventSrcHandle, handle,
+                                     invoker.graphicsGetHandle(g), isImageTarget, isProperRenderer);
                 }
-                _releaseGraphics(eventSrcHandle, handle,
-                                 invoker.graphicsGetHandle(g), isImageTarget, isProperRenderer);
-            }
-            else if (currentTarget instanceof Image2D)
-            {
-                _releaseImage(eventSrcHandle, handle);
+                else if (currentTarget instanceof Image2D)
+                {
+                    _releaseImage(eventSrcHandle, handle);
+                }
+                else
+                {
+                    throw new Error();
+                }
             }
-            else
+            finally
             {
-                throw new Error();
+                currentTarget = null;
+                        
+                if (ngaEnabled && !foreground && eventSrcHandle != 0)
+                {
+                    _freeGLESResources(eventSrcHandle, handle);
+                }
+
+                // Release event source
+                Interface.releaseEventSource();
             }
         }
-        finally
-        {
-            currentTarget = null;
-            // Release event source
-            Interface.releaseEventSource();
-        }
     }
 
     /**
@@ -730,6 +748,27 @@
         }
     }
 
+    void setForeground(boolean foreground) 
+    {
+        synchronized (Interface.getInstance())
+        {
+            this.foreground = foreground;
+            if (ngaEnabled &&
+                !foreground && 
+                currentTarget == null)
+            {
+                try 
+                {
+                    _freeGLESResources(Interface.bindEventSource(), handle);
+                }
+                finally
+                {
+                    Interface.releaseEventSource();
+                }
+            }
+        }
+    }
+    
     private native static int _ctor(int hInterface);
     private native static void _addRef(int hObject);
 
@@ -811,4 +850,6 @@
     private native static int _getTargetWidth(int graphicsHandle);
     private native static void _updateEglContent(int eventSourceHandle,
             int graphicsHandle);
+    private native static void _freeGLESResources(int eventSourceHandle, 
+            int handle);
 }
--- a/javauis/m3g_akn/javasrc/javax/microedition/m3g/Interface.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/m3g_akn/javasrc/javax/microedition/m3g/Interface.java	Wed Jun 09 09:34:07 2010 +0300
@@ -20,7 +20,7 @@
 import java.lang.ref.WeakReference;
 import java.util.Hashtable;
 import com.nokia.mj.impl.rt.legacy.ToolkitInvoker;
-import com.nokia.mj.impl.rt.legacy.ToolkitObserver;
+import com.nokia.mj.impl.rt.legacy.ToolkitObserverNGAExtension;
 import com.nokia.mj.impl.rt.support.Finalizer;
 import com.nokia.mj.impl.rt.legacy.MemoryUtil;
 
@@ -29,7 +29,7 @@
  * each MIDlet using the 3D API to keep track of Java-side object
  * lifetimes etc.
  */
-class Interface implements ToolkitObserver
+class Interface implements ToolkitObserverNGAExtension
 {
     //------------------------------------------------------------------
     // Static data
@@ -427,6 +427,17 @@
         }
         MemoryUtil.freeNativeMemory();
     }
+    
+    /*
+     * @see ToolkitObserverNGAExtension#foregroundEvent(boolean)
+     */
+    public void foregroundEvent(boolean foreground)
+    {
+        if (graphics3D != null)
+        {
+            graphics3D.setForeground(foreground);
+        }
+    }
 
     // Native constructor
     private static native int _ctor(int eventSrcHandle);
--- a/javauis/m3g_akn/src/jni/graphics3d.inl	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/m3g_akn/src/jni/graphics3d.inl	Wed Jun 09 09:34:07 2010 +0300
@@ -773,6 +773,22 @@
     eventSource->ExecuteV(&UpdateEglContent, cmidGraphics);
 }
 
+static void freeGLESResources(M3GRenderContext aHContext)
+{
+    m3gFreeGLESResources(aHContext);
+    eglReleaseThread();
+}
+
+JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1freeGLESResources
+(JNIEnv* aEnv, jclass, jint aEventSourceHandle, jint aHCtx)
+{
+    M3G_DO_LOCK
+    CJavaM3GEventSource* eventSource =
+        JavaUnhand<CJavaM3GEventSource>(aEventSourceHandle);
+    eventSource->ExecuteV(&freeGLESResources, (M3GRenderContext)aHCtx);
+    M3G_DO_UNLOCK(aEnv)
+}
+
 #else // !RD_JAVA_NGA_ENABLED 
 
 JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Graphics3D__1getTargetHeight
@@ -792,4 +808,9 @@
 {
 }  
   
+JNIEXPORT void JNICALL Java_javax_microedition_m3g_Graphics3D__1freeGLESResources
+(JNIEnv*, jclass, jint, jint)
+{
+}
+
 #endif // RD_JAVA_NGA_ENABLED
--- a/javauis/mmapi_akn/baseline/inc.emc/cmmaemcresolver.h	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/mmapi_akn/baseline/inc.emc/cmmaemcresolver.h	Wed Jun 09 09:34:07 2010 +0300
@@ -70,13 +70,6 @@
     void SetFileNameL(const TDesC* aFileName);
 
     /**
-     * Sets Mime Type
-     * @param aFileName File name to be set or NULL
-     */
-
-    void SetMimeTypeL(const TDesC* aFileName);
-
-    /**
      * Returns possible filename or NULL if not set
      * Ownership is transfered.
      * @return Content type or NULL if type is not available.
@@ -101,6 +94,8 @@
 private:
     ~CMMAEMCResolver();
 
+    void ConstructL();
+
 private:
 
     // Owned. Ownership can be transferred with ContentType method.
--- a/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/PlayerBase.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/PlayerBase.java	Wed Jun 09 09:34:07 2010 +0300
@@ -124,7 +124,7 @@
      * From Player
      * @see Player
      */
-    public void realize() throws MediaException
+    synchronized public void realize() throws MediaException
     {
         closeCheck();
         int state = getState();
@@ -149,7 +149,7 @@
      * From Player
      * @see Player
      */
-    public void prefetch() throws MediaException
+    synchronized public void prefetch() throws MediaException
     {
         realize();
 
@@ -170,7 +170,7 @@
      * interface Player
      * @see Player
      */
-    public void deallocate()
+    synchronized public void deallocate()
     {
         try
         {
@@ -197,7 +197,7 @@
      * interface Player
      * @see Player
      */
-    public void stop() throws MediaException
+    synchronized public void stop() throws MediaException
     {
         closeCheck();
         if (getState() == STARTED)
@@ -215,7 +215,7 @@
      * interface Player
      * @see Player
      */
-    public void close()
+    synchronized public void close()
     {
         /*
         Releases all resources and cease all activity.
--- a/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/PlayerImpl.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/PlayerImpl.java	Wed Jun 09 09:34:07 2010 +0300
@@ -261,7 +261,7 @@
      * From Player.
      * @see Player
      */
-    public void start() throws MediaException
+    synchronized public void start() throws MediaException
     {
         prefetch();
 
--- a/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/SourcePlayer.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/SourcePlayer.java	Wed Jun 09 09:34:07 2010 +0300
@@ -116,7 +116,7 @@
      * interface Player
      * @see Player
      */
-    public void close()
+    synchronized public void close()
     {
         super.close();
         // close threads from SourceStreamReaders
--- a/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/control/RecordControl.java	Wed Jun 09 09:34:07 2010 +0300
@@ -158,7 +158,7 @@
      * <code>stream</code> is null.
      *
      */
-    public void setRecordStream(OutputStream aStream)
+    synchronized public void setRecordStream(OutputStream aStream)
     {
         checkState();
         if (null == aStream)
@@ -236,7 +236,7 @@
      * @exception SecurityException Thrown if the caller does not
      * have security permission to set the record location.
      */
-    public void setRecordLocation(String aLocator)
+    synchronized public void setRecordLocation(String aLocator)
     throws IOException, MediaException
     {
         checkState();
@@ -307,7 +307,7 @@
      *
      * @return The content type of the media.
      */
-    public String getContentType()
+    synchronized public String getContentType()
     {
         checkState();
         return _getContentType(iEventSource, iControlHandle);
@@ -346,7 +346,7 @@
      * has not been called.
      * </ul>
      */
-    public void startRecord()
+    synchronized public void startRecord()
     {
         checkState();
         // Ignore if startRecord is called when the recording has already started
@@ -390,7 +390,7 @@
      * and a <i>RECORD_STOPPED</i> event will be delivered through the
      * <code>PlayerListener</code>.
      */
-    public void stopRecord()
+    synchronized public void stopRecord()
     {
         checkState();
         // If stopRecord is called when the recording has already stopped,
@@ -522,7 +522,7 @@
      * @exception MediaException Thrown if setting the record
      * size limit is not supported.
      */
-    public int setRecordSizeLimit(int aSize) throws MediaException
+    synchronized public int setRecordSizeLimit(int aSize) throws MediaException
     {
         checkState();
         if (aSize <= 0)
@@ -589,7 +589,7 @@
      * <code>setRecordStream</code> must be called.
      *
      */
-    public void reset() throws IOException
+    synchronized public void reset() throws IOException
     {
         checkState();
         if (null == iOutputStreamWriter)
--- a/javauis/mmapi_akn/baseline/src.emc/cmmaemcresolver.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/mmapi_akn/baseline/src.emc/cmmaemcresolver.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -34,13 +34,20 @@
 
 CMMAEMCResolver* CMMAEMCResolver::NewLC()
 {
-    DEBUG("MMA:CMMAEMCResolver :: NewLC ++");
+    DEBUG("MMA:CMMAEMCResolver :: NewLC +");
     CMMAEMCResolver* self = new(ELeave)CMMAEMCResolver();
     CleanupStack::PushL(self);
-    DEBUG("MMA:CMMAEMCResolver :: NewLC --");
+    self->ConstructL();
+    DEBUG("MMA:CMMAEMCResolver :: NewLC -");
     return self;
 }
 
+void CMMAEMCResolver::ConstructL()
+{
+    iContentType = HBufC::NewL(KContentTypeMaxLength);
+    iMimeType = HBufC8::NewL(KContentTypeMaxLength);
+}
+
 CMMAEMCResolver::~CMMAEMCResolver()
 {
     delete iContentType;
@@ -52,19 +59,19 @@
 
 HBufC* CMMAEMCResolver::ContentTypeOwnership()
 {
-    DEBUG("MMA:CMMAEMCResolver :: ContentTypeOwnership ++");
+    DEBUG("MMA:CMMAEMCResolver :: ContentTypeOwnership +");
     HBufC* ct = iContentType;
     iContentType = NULL;
-    DEBUG("MMA:CMMAEMCResolver :: ContentTypeOwnership --");
+    DEBUG("MMA:CMMAEMCResolver :: ContentTypeOwnership -");
     return ct;
 }
 
 HBufC8* CMMAEMCResolver::MimeTypeOwnership()
 {
-    DEBUG("MMA:CMMAEMCResolver :: MimeTypeOwnership ++");
+    DEBUG("MMA:CMMAEMCResolver :: MimeTypeOwnership +");
     HBufC8* mt = iMimeType;
     iMimeType = NULL;
-    DEBUG("MMA:CMMAEMCResolver :: MimeTypeOwnership --");
+    DEBUG("MMA:CMMAEMCResolver :: MimeTypeOwnership -");
     return mt;
 }
 
@@ -75,7 +82,7 @@
 
 void CMMAEMCResolver::SetFileNameL(const TDesC* aFileName)
 {
-    DEBUG("MMA:CMMAEMCResolver :: SetFileNameL ++");
+    DEBUG("MMA:CMMAEMCResolver :: SetFileNameL +");
     HBufC* fn = NULL;
     if (aFileName)
     {
@@ -83,54 +90,22 @@
     }
     delete iFileName;
     iFileName = fn;
-    DEBUG("MMA:CMMAEMCResolver :: SetFileNameL --");
+    DEBUG("MMA:CMMAEMCResolver :: SetFileNameL -");
 }
 
 HBufC* CMMAEMCResolver::FileNameOwnership()
 {
-    DEBUG("MMA:CMMAEMCResolver :: FileNameOwnership ++");
+    DEBUG("MMA:CMMAEMCResolver :: FileNameOwnership +");
     HBufC* fn = iFileName;
     iFileName = NULL;
-    DEBUG("MMA:CMMAEMCResolver :: FileNameOwnership --");
+    DEBUG("MMA:CMMAEMCResolver :: FileNameOwnership -");
     return fn;
 }
 
-void CMMAEMCResolver::SetMimeTypeL(const TDesC* aFileName)
-{
-    DEBUG("MMA:CMMAEMCResolver :: SetMimeTypeL +");
-    if (iContentType)
-    {
-        delete iContentType;
-        iContentType = NULL;
-    }
-    iContentType = HBufC::NewL(KContentTypeMaxLength);
-    TBuf8<KContentTypeMaxLength> mimeType;
-    ResolveContentTypeL(*aFileName,mimeType);
-    iContentType->Des().Copy(mimeType);
-    iMimeType = HBufC8::NewL(mimeType.Length());        //8 bit Descriptor of iContentType
-    iMimeType->Des().Copy(mimeType);
-
-    DEBUG("MMA:CMMAEMCResolver :: SetMimeTypeL -");
-}
-
 void CMMAEMCResolver::ResolveContentTypeL()
 {
     DEBUG("MMA:CMMAEMCResolver::ResolveContentTypeL +");
 
-    if (iContentType)
-    {
-        delete iContentType;
-        iContentType = NULL;
-    }
-    if (iMimeType)
-    {
-        delete iMimeType;
-        iMimeType = NULL;
-    }
-
-    iContentType = HBufC::NewL(KContentTypeMaxLength);
-    iMimeType = HBufC8::NewL(KContentTypeMaxLength);
-
     if (iFileName->Right(4).Compare(KAacFileExtension()) == 0)
     {
         iContentType->Des().Copy(KMimetypeAAC);
@@ -249,7 +224,6 @@
     DEBUG("MMA:CMMAEMCResolver :: GetSupportedContentTypesL -");
 }
 
-// EMC - II
 void CMMAEMCResolver::SetSourceInfoL(const HBufC8* aHeaderData)
 {
     iHeaderData = aHeaderData;
@@ -325,5 +299,5 @@
 
     return match;
 }
-//
+
 //  END OF FILE
--- a/javauis/mmapi_akn/baseline/src/cmmaaudioplayer.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/mmapi_akn/baseline/src/cmmaaudioplayer.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -262,7 +262,7 @@
         }
     }
 
-    if (err ==  KErrDied && aEvent.iEventType == KMMFEventCategoryPlaybackComplete)
+    if (err ==  KErrDied && aEvent.iEventType == KMMFEventCategoryPlaybackComplete && err == KErrInUse)
     {
 
         // basically pausing the playback
@@ -282,7 +282,7 @@
         }
     }
 
-    if (err != KErrNone && err != KErrDied)
+    if (err != KErrNone && err != KErrDied && err != KErrInUse)
     {
         ErrorPlaybackComplete(err);
     }