UX: modify the size of progress dialog shown when stop trace with error
authorgreatim <jaewon81.lim@samsung.com>
Tue, 21 Jul 2015 04:01:34 +0000 (13:01 +0900)
committerwoojin Jung <woojin2.jung@samsung.com>
Tue, 21 Jul 2015 16:06:23 +0000 (01:06 +0900)
modify the size of progress dialog shown when stop trace with error

Change-Id: Icef945310b40a7989d6498b6bbac273b4749292e
Signed-off-by: greatim <jaewon81.lim@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/control/StopTraceManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/UserErrorWarningLabels.properties

index aab9289..b95ffff 100644 (file)
@@ -77,7 +77,15 @@ public class StopTraceManager implements Runnable {
                                        progressDlg.setProgressInfo(AnalyzerLabels.DLG_PLEASE_WAIT);
                                        if (!error.isSuccess()) {
                                                progressDlg.setProgressStyle(ProgressDialog.PROGRESS_STYLE_WARNING);
-                                               progressDlg.setProgressWarningMessage(error.getMessage());
+                                               String errorMessage = error.getMessage();
+                                               if (errorMessage.length() > 240) {
+                                                       progressDlg.setWarnigDialogType(ProgressDialog.DIALOG_TYPE_LARGE);
+                                               } else if (errorMessage.length() > 120) {
+                                                       progressDlg.setWarnigDialogType(ProgressDialog.DIALOG_TYPE_MIDDLE);
+                                               } else {
+                                                       progressDlg.setWarnigDialogType(ProgressDialog.DIALOG_TYPE_SMALL);
+                                               }
+                                               progressDlg.setProgressWarningMessage(errorMessage);
                                                progressDlg.setOkListener(new DACustomButtonClickEventListener() {
                                                        @Override
                                                        public void handleClickEvent(DACustomButton button) {
index 3d75822..d0c731c 100755 (executable)
@@ -172,7 +172,7 @@ TABLE_COLUMN_LIBNAME=Library
 TABLE_COLUMN_PARAMETERS=Parameters
 TABLE_COLUMN_RETURN=Return
 
-HEAP_MEMORY_WARNING_PRE=The profiling was stop for out of memory.\nIf you want to use more memory, increase the -xmx value in the\n
+HEAP_MEMORY_WARNING_PRE=If you want to use more memory, increase the -Xmx value in the 
 HEAP_MEMORY_WARNING_POST=/dynamic-analyzer.ini file.
 
 TIME_MS=ms
index 1986069..1ba8f8e 100644 (file)
@@ -18,7 +18,7 @@ ERROR_DOWNLOAD_FILE_FAILED=Downloading file is failed.
 ERROR_FAILED_OPERATION=Operation is failed.
 ERROR_INTERNAL_REASON=Failed by internal reason.\nPlease try again or restart DA.
 ERROR_BY_UNKNOWN_REASON=Failed by unknown reason.
-ERROR_OUT_OF_MEMORY=Out of memory in Dynamic Analyzer.\nIf you want to use more memory, increase the -xmx value\nof the dynamic-analyzer.ini file in Dynamic Analyzer installed directory.\n
+ERROR_OUT_OF_MEMORY=Out of memory in Dynamic Analyzer.
 ERROR_START_TRACE_FAILED=Cannot start trace.\nCurrent application may not be available for trace.
 
 ERROR_NONEXIST_BINARY=Binary does not exist in device.
@@ -32,4 +32,4 @@ WARNING_FILE_NOT_FOUND=File cannot be found.
 WARNING_RUNNING_PROCESS_LIMIT=Only some limited features (System, Function profiling / sampling) can be worked in Running process tracing.
 WARNING_OVERHEAD_EXPLODE=Tracing overhead is too heavy to show the accurate \nresult. Please except some features in Settings to \nreduce overhead.
 
-WARNING_USER_CANCEL=Operation is canceled by user.
\ No newline at end of file
+WARNING_USER_CANCEL=Operation is canceled by user.