From 41fc91a34637a20d247b8a4228f67cf5050ceb80 Mon Sep 17 00:00:00 2001 From: Gun Kim Date: Thu, 7 Mar 2013 17:32:24 +0900 Subject: [PATCH] [Title] added ignoreList in RdsDeployer.java for incremetal signing & sonar [Type] [Module] [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] Change-Id: Ie0bbfe2db1f8860ca67c379b9a834c56b5f52c34 --- .../src/org/tizen/common/rds/RdsDeployer.java | 20 ++++++++++++++++++++ .../command/message/PkgcmdErrorMessages.properties | 2 +- .../common/sdb/command/message/PkgcmdErrorType.java | 8 ++------ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java b/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java index 6a1366a..f02fefc 100644 --- a/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java +++ b/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java @@ -65,6 +65,8 @@ public abstract class RdsDeployer implements Closeable{ protected IDevice device; protected RdsDeltaDetector deltaDetector; protected ISdbCommandHelper tizenCommand; + // ignoreList has a high priority better than interestList + protected List ignoreList = new ArrayList(); protected List interestList = new ArrayList(); private SyncService syncService; private final static String[] needAppOwnerArray = new String[] {"/data", "/shared/data", "/shared/trusted", "/setting"}; @@ -107,6 +109,10 @@ public abstract class RdsDeployer implements Closeable{ public void setInterestList( List list) { interestList = list; } + + public void setIgnoreList( List list) { + ignoreList = list; + } protected void partialInstall( List deltaInfoList ) throws CoreException { boolean isNeededInstall = false; @@ -114,10 +120,23 @@ public abstract class RdsDeployer implements Closeable{ String strRemotePath = null; String command = null; boolean isInteresting = false; + boolean isIgnore = false; Set needAppOwnerSet = new HashSet(); for ( DeltaResourceInfo node : deltaInfoList ) { isInteresting = false; + isIgnore = false; + + for ( DeltaResourceInfo ignore : ignoreList ) { + if ( node.getFullPath().startsWith(strProjectPath + ignore.getFullPath()) ) { + isIgnore = true; + break; + } + } + if ( isIgnore ) { + continue; + } + for ( DeltaResourceInfo interest : interestList ) { if ( node.getFullPath().startsWith(strProjectPath + interest.getFullPath()) ) { isInteresting = true; @@ -137,6 +156,7 @@ public abstract class RdsDeployer implements Closeable{ if ( !isInteresting ) { continue; } + if ( DeltaResourceInfo.TYPE_MODIFY.equals(node.getType()) ) { try { command = RdsDeployer.makeRdsLog(NLS.bind(RdsMessages.RDS_PUSH_LOG, node.getFullPath(), strRemotePath)); diff --git a/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorMessages.properties b/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorMessages.properties index 38c325b..264d1cb 100644 --- a/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorMessages.properties +++ b/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorMessages.properties @@ -20,4 +20,4 @@ ERROR_MENU_ICON_NOT_FOUND=Select a menu icon in manifest editor > Basic tab > Ic ERROR_FATAL_ERROR=Installation or uninstallation is not working temporarily. ERROR_OUT_OF_STORAGE=Guarantee storage for installation in device or emulator. ERROR_OUT_OF_MEMORY=Restart device or emulator. -ERROR_UNKNOWN=Unknown error \ No newline at end of file +ERROR_UNKNOWN=\nUnknown error\n\nSee the error log for more details. \ No newline at end of file diff --git a/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorType.java b/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorType.java index 38ddf58..4238a25 100644 --- a/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorType.java +++ b/org.tizen.common/src/org/tizen/common/sdb/command/message/PkgcmdErrorType.java @@ -26,7 +26,6 @@ package org.tizen.common.sdb.command.message; -import org.tizen.common.util.StringUtil; public class PkgcmdErrorType implements CommandErrorType { private final static String ERROR_MESSAGE_TEMPLATE = "error message: "; @@ -88,10 +87,7 @@ public class PkgcmdErrorType implements CommandErrorType { if (errorType == null ) { throw new CommandErrorException(PkgcmdErrorMessages.ERROR_UNKNOWN); } - else if (ErrorMessageType.SUCCESS.equals(errorType)) { - - } - else { + else if (!ErrorMessageType.SUCCESS.equals(errorType)) { throw new CommandErrorException(getMessage()); } } @@ -106,7 +102,7 @@ public class PkgcmdErrorType implements CommandErrorType { int endIdx = commandOutput.indexOf("\n", startIdx); if ( startIdx == -1 || endIdx == -1) { - return null; + return ""; } else { return commandOutput.substring(startIdx, endIdx); -- 2.7.4