diff options
author | adrianocrestani <adrianocrestani@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-22 05:39:18 +0000 |
---|---|---|
committer | adrianocrestani <adrianocrestani@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-22 05:39:18 +0000 |
commit | 089a74e73dd5c1547b03c7f21bd03c5c9c5d8b86 (patch) | |
tree | 9276348cef70558a6952052bdd2e285ea3c32afd /branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java | |
parent | a41d8e60baa255e304c2fc534c89611544a4c44e (diff) |
Fixing ContextClassLoader, which is not set by Android VM automatically
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@728615 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java')
-rw-r--r-- | branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java b/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java index 2bc8b3eb1d..9e5c782447 100644 --- a/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java +++ b/branches/sca-java-1.x/samples/calculator-android/src/calculator/android/CalculatorClient.java @@ -1,6 +1,9 @@ package calculator.android; +import java.io.FileDescriptor; +import java.net.InetAddress; import java.net.URL; +import java.security.Permission; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.service.ContributionService; @@ -23,6 +26,159 @@ public class CalculatorClient extends Activity { String calculationResult = "Error !"; try { + System.setSecurityManager(new SecurityManager() { + @Override + public void checkPermission(Permission permission) { + + } + + @Override + public void checkAccept(String host, int port) { + + } + + @Override + public void checkAccess(Thread thread) { + // TODO Auto-generated method stub + + } + @Override + public void checkAccess(ThreadGroup group) { + + } + + @Override + public void checkAwtEventQueueAccess() { + // TODO Auto-generated method stub + + } + @Override + public void checkConnect(String host, int port) { + + } + @Override + public void checkConnect(String host, int port, Object context) { + + } + @Override + public void checkCreateClassLoader() { + // TODO Auto-generated method stub + + } + @Override + public void checkDelete(String file) { + + } + @Override + public void checkExec(String cmd) { + // TODO Auto-generated method stub + + } + @Override + public void checkExit(int status) { + + } + @Override + public void checkLink(String libName) { + // TODO Auto-generated method stub + + } + @Override + public void checkListen(int port) { + // TODO Auto-generated method stub + + } + @Override + public void checkMemberAccess(Class<?> cls, int type) { + // TODO Auto-generated method stub + + } + @Override + public void checkMulticast(InetAddress maddr) { + // TODO Auto-generated method stub + + } + @Override + public void checkMulticast(InetAddress maddr, byte ttl) { + // TODO Auto-generated method stub + + } + @Override + public void checkPackageAccess(String packageName) { + // TODO Auto-generated method stub + + } + @Override + public void checkPackageDefinition(String packageName) { + // TODO Auto-generated method stub + + } + @Override + public void checkPermission(Permission permission, + Object context) { + // TODO Auto-generated method stub + + } + @Override + public void checkPrintJobAccess() { + // TODO Auto-generated method stub + + } + @Override + public void checkPropertiesAccess() { + // TODO Auto-generated method stub + + } + @Override + public void checkPropertyAccess(String key) { + // TODO Auto-generated method stub + + } + @Override + public void checkRead(FileDescriptor fd) { + // TODO Auto-generated method stub + + } + @Override + public void checkRead(String file) { + // TODO Auto-generated method stub + + } + @Override + public void checkRead(String file, Object context) { + // TODO Auto-generated method stub + + } + @Override + public void checkSecurityAccess(String target) { + // TODO Auto-generated method stub + + } + @Override + public void checkSetFactory() { + // TODO Auto-generated method stub + + } + @Override + public void checkSystemClipboardAccess() { + // TODO Auto-generated method stub + + } + + @Override + public void checkWrite(FileDescriptor fd) { + // TODO Auto-generated method stub + + } + @Override + public void checkWrite(String file) { + // TODO Auto-generated method stub + + } + + }); + + Thread.currentThread().setContextClassLoader(getClassLoader()); SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); |