Pārlūkot izejas kodu

修改部分sonar扫描严重

wuyong3 6 gadi atpakaļ
vecāks
revīzija
24b25ecb85

+ 3 - 1
display-client/src/com/ai/ipu/display/MainActivity.java

@ -26,6 +26,7 @@ import android.annotation.SuppressLint;
26 26
import android.graphics.Rect;
27 27
import android.os.Bundle;
28 28
import android.util.DisplayMetrics;
29
import android.util.Log;
29 30
import android.view.View;
30 31
31 32
public class MainActivity extends TemplateMainActivity {
@ -168,6 +169,7 @@ public class MainActivity extends TemplateMainActivity {
168 169
		switch (id) {
169 170
		case 0://插件:基础界面
170 171
			mobileUI.openPage("Basic", null);
172
			break;
171 173
		case 1://插件:相机
172 174
			mobileUI.openPage("Basic", null);
173 175
			break;
@ -224,7 +226,7 @@ public class MainActivity extends TemplateMainActivity {
224 226
		try {
225 227
			AssetsUtil.copyAssetsDir("share",AppInfoUtil.getSdcardPath()+"/share");
226 228
		} catch (Exception e) {
227
			e.printStackTrace();
229
			Log.e(getClass().getSimpleName(), e.getMessage());
228 230
		}
229 231
	}
230 232
	

+ 7 - 7
ipu-count-test/src/com/ai/ipu/count/test/TestActivity.java

@ -49,7 +49,7 @@ public class TestActivity extends Activity {
49 49
					bean.sayBye();
50 50
				} catch (Exception e) {
51 51
					// TODO Auto-generated catch block
52
					e.printStackTrace();
52
					Log.e(TAG, e.getMessage(), e);
53 53
				}
54 54
			}
55 55
		});
@ -71,7 +71,7 @@ public class TestActivity extends Activity {
71 71
					Log.d(TAG, "返回结果:" + result);
72 72
				} catch (Exception e) {
73 73
					// TODO Auto-generated catch block
74
					e.printStackTrace();
74
					Log.e(TAG, e.getMessage(), e);
75 75
				}
76 76
			}
77 77
		});
@ -92,7 +92,7 @@ public class TestActivity extends Activity {
92 92
					Log.d(TAG, "返回结果:" + bean.sayHello(""));
93 93
				} catch (Exception e) {
94 94
					// TODO Auto-generated catch block
95
					e.printStackTrace();
95
					Log.e(TAG, e.getMessage(), e);
96 96
				}
97 97
			}
98 98
		});
@ -112,7 +112,7 @@ public class TestActivity extends Activity {
112 112
					bean.sayBye();
113 113
				} catch (Exception e) {
114 114
					// TODO Auto-generated catch block
115
					Log.e(TAG, e.getMessage());
115
					Log.e(TAG, e.getMessage(), e);
116 116
				}
117 117
			}
118 118
		});
@ -162,7 +162,7 @@ public class TestActivity extends Activity {
162 162
                try {
163 163
                    IpuCount.send("Hello UDP");
164 164
                } catch (PackageManager.NameNotFoundException e) {
165
                    e.printStackTrace();
165
                    Log.e(TAG, e.getMessage(), e);
166 166
                }
167 167
            }
168 168
		});
@ -191,7 +191,7 @@ public class TestActivity extends Activity {
191 191
                try {
192 192
                    IpuCount.sendDevice("设备日志");
193 193
                } catch (PackageManager.NameNotFoundException e) {
194
                    e.printStackTrace();
194
                    Log.e(TAG, e.getMessage());
195 195
                }
196 196
            }
197 197
        });
@ -205,7 +205,7 @@ public class TestActivity extends Activity {
205 205
                try {
206 206
                    IpuCount.sendPlugin(SystemClock.currentThreadTimeMillis(),"Plugin Action");
207 207
                } catch (PackageManager.NameNotFoundException e) {
208
                    e.printStackTrace();
208
                    Log.e(TAG, e.getMessage());
209 209
                }
210 210
            }
211 211
        });

+ 2 - 2
ipu-count-test/src/com/ai/ipu/count/test/TestUDPServer.java

@ -45,11 +45,11 @@ public class TestUDPServer implements Runnable {
45 45
					dSocket.receive(dPacket);
46 46
					Log.i("msg sever received", new String(dPacket.getData()));
47 47
				} catch (IOException e) {
48
					e.printStackTrace();
48
					Log.e(getClass().getSimpleName(), e.getMessage(), e);
49 49
				}
50 50
			}
51 51
		} catch (SocketException e) {
52
			e.printStackTrace();
52
			Log.e(getClass().getSimpleName(), e.getMessage(), e);
53 53
		}finally {
54 54
			if(dSocket != null){
55 55
				dSocket.close();

+ 2 - 0
ipu-open-platform/.gitignore

@ -3,3 +3,5 @@
3 3
/proguard-project.txt
4 4
/project.properties
5 5
/gen/
6
/.settings/
7
/bin/

+ 2 - 2
ipu-open-platform/src/com/ai/ipu/open_platform/HttpURLConnectionHelper.java

@ -103,12 +103,12 @@ public class HttpURLConnectionHelper {
103 103
				sb.append(line + "/n");
104 104
			}
105 105
		} catch (IOException e) {
106
			e.printStackTrace();
106
			Log.e(getClass().getSimpleName(), e.getMessage(), e);
107 107
		} finally {
108 108
			try {
109 109
				is.close();
110 110
			} catch (IOException e) {
111
				e.printStackTrace();
111
				Log.e(getClass().getSimpleName(), e.getMessage(), e);
112 112
			}
113 113
		}
114 114
		return sb.toString();

+ 0 - 2
ipu-share/.settings/org.eclipse.core.resources.prefs

@ -1,2 +0,0 @@
1
eclipse.preferences.version=1
2
encoding/<project>=UTF-8

+ 0 - 11
ipu-share/.settings/org.eclipse.jdt.core.prefs

@ -1,11 +0,0 @@
1
eclipse.preferences.version=1
2
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5
org.eclipse.jdt.core.compiler.compliance=1.6
6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11
org.eclipse.jdt.core.compiler.source=1.6

+ 0 - 34
ipu-share/bin/AndroidManifest.xml

@ -1,34 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
    package="com.ai.ipu.share"
4
    android:versionCode="1"
5
    android:versionName="1.0" >
6
7
    <uses-sdk
8
        android:minSdkVersion="8"
9
        android:targetSdkVersion="15" />
10
    
11
   <uses-permission android:name="android.permission.INTERNET"/>
12
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
13
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
14
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
15
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
16
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
17
    
18
    <application 
19
        android:allowBackup="true"
20
        android:icon="@drawable/ic_launcher"
21
        android:label="@string/app_name"
22
        android:theme="@style/AppTheme">
23
        <activity 
24
            android:name=".MainActivity">
25
            <intent-filter>
26
                <action android:name="android.intent.action.MAIN" />
27
                <category android:name="android.intent.category.LAUNCHER" />
28
            </intent-filter>
29
        </activity>
30
        
31
    </application>
32
    
33
  
34
</manifest>

+ 0 - 80
ipu-share/bin/R.txt

@ -1,80 +0,0 @@
1
int anim hyperspace_in 0x7f040000
2
int anim hyperspace_out 0x7f040001
3
int anim push_left_in 0x7f040002
4
int anim push_left_out 0x7f040003
5
int anim push_right_in 0x7f040004
6
int anim push_right_out 0x7f040005
7
int anim scale_action 0x7f040006
8
int anim shut_open_in 0x7f040007
9
int anim shut_open_out 0x7f040008
10
int dimen activity_horizontal_margin 0x7f080000
11
int dimen activity_vertical_margin 0x7f080001
12
int drawable audio_activity_dialog 0x7f020000
13
int drawable ic_launcher 0x7f020001
14
int drawable keyboard_key 0x7f020002
15
int drawable keyboard_normal_bg 0x7f020003
16
int drawable keyboard_normal_hl_bg 0x7f020004
17
int drawable keyboard_qwerty 0x7f020005
18
int drawable keyboard_sym_delete 0x7f020006
19
int drawable keyboard_sym_shift 0x7f020007
20
int drawable keyboard_sym_space 0x7f020008
21
int drawable keyboard_symbols 0x7f020009
22
int drawable nfc_bg 0x7f02000a
23
int drawable record_mic_normal 0x7f02000b
24
int drawable record_mic_press 0x7f02000c
25
int drawable screenlock_arrow 0x7f02000d
26
int drawable screenlock_line 0x7f02000e
27
int drawable screenlock_line_error 0x7f02000f
28
int drawable screenlock_line_semicircle 0x7f020010
29
int drawable screenlock_line_semicircle_error 0x7f020011
30
int drawable screenlock_round_click 0x7f020012
31
int drawable screenlock_round_click_error 0x7f020013
32
int drawable screenlock_round_original 0x7f020014
33
int drawable screenlock_welcome_bg 0x7f020015
34
int drawable share_apk_activity_dialog 0x7f020016
35
int id btn_qq_file 0x7f090002
36
int id btn_qq_text 0x7f090000
37
int id btn_wechat_file 0x7f090003
38
int id btn_wechat_text 0x7f090001
39
int id deviceListView 0x7f09000c
40
int id deviceNameTV 0x7f09000f
41
int id exit 0x7f09000d
42
int id forget_btn 0x7f090009
43
int id keyboard_view 0x7f090006
44
int id lock_view 0x7f090007
45
int id macAddressTV 0x7f090010
46
int id micButton 0x7f090005
47
int id notify 0x7f090008
48
int id recordLabel 0x7f090004
49
int id reset_btn 0x7f09000a
50
int id search 0x7f09000e
51
int id share 0x7f09000b
52
int layout activity_share 0x7f030000
53
int layout audio_recorder 0x7f030001
54
int layout keyboard 0x7f030002
55
int layout nfcard 0x7f030003
56
int layout screenlock_login_layout2 0x7f030004
57
int layout screenlock_reset_lock_layout 0x7f030005
58
int layout share_apk_activity 0x7f030006
59
int layout share_apk_device_list_item 0x7f030007
60
int raw beep 0x7f050000
61
int string action_settings 0x7f06000d
62
int string app_name 0x7f060000
63
int string hello_world 0x7f06000c
64
int string imgContentDesc 0x7f060003
65
int string pressTip 0x7f060002
66
int string recording 0x7f060001
67
int string sa_confirm_share 0x7f06000a
68
int string sa_exit 0x7f060009
69
int string sa_mac_address 0x7f060006
70
int string sa_search 0x7f060007
71
int string sa_searching 0x7f060008
72
int string sa_share 0x7f060005
73
int string sa_tip 0x7f06000b
74
int string tips 0x7f060004
75
int style AppBaseTheme 0x7f070004
76
int style AppTheme 0x7f070005
77
int style AudioDialogTheme 0x7f070000
78
int style CustomDialogTheme 0x7f070001
79
int style ShareApkDialogTheme 0x7f070002
80
int style SlidingMenuTheme 0x7f070003

BIN
ipu-share/bin/ipu-share.jar


+ 0 - 3
ipu-share/bin/jarlist.cache

@ -1,3 +0,0 @@
1
# cache for current jar dependency. DO NOT EDIT.
2
# format is <lastModified> <length> <SHA-1> <path>
3
# Encoding is UTF-8

BIN
ipu-share/bin/res/crunch/drawable-mdpi/ic_launcher.png


+ 0 - 6
ipu-share/gen/com/ai/ipu/share/BuildConfig.java

@ -1,6 +0,0 @@
1
/** Automatically generated file. DO NOT MODIFY */
2
package com.ai.ipu.share;
3
4
public final class BuildConfig {
5
    public final static boolean DEBUG = true;
6
}

+ 0 - 162
ipu-share/gen/com/ai/ipu/share/R.java

@ -1,162 +0,0 @@
1
/* AUTO-GENERATED FILE.  DO NOT MODIFY.
2
 *
3
 * This class was automatically generated by the
4
 * aapt tool from the resource data it found.  It
5
 * should not be modified by hand.
6
 */
7
8
package com.ai.ipu.share;
9
10
public final class R {
11
    public static final class anim {
12
        public static int hyperspace_in=0x7f040000;
13
        public static int hyperspace_out=0x7f040001;
14
        public static int push_left_in=0x7f040002;
15
        public static int push_left_out=0x7f040003;
16
        public static int push_right_in=0x7f040004;
17
        public static int push_right_out=0x7f040005;
18
        public static int scale_action=0x7f040006;
19
        public static int shut_open_in=0x7f040007;
20
        public static int shut_open_out=0x7f040008;
21
    }
22
    public static final class attr {
23
    }
24
    public static final class dimen {
25
        /**  Default screen margins, per the Android Design guidelines. 
26
27
         Example customization of dimensions originally defined in res/values/dimens.xml
28
         (such as screen margins) for screens with more than 820dp of available width. This
29
         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
30
    
31
         */
32
        public static int activity_horizontal_margin=0x7f080000;
33
        public static int activity_vertical_margin=0x7f080001;
34
    }
35
    public static final class drawable {
36
        public static int audio_activity_dialog=0x7f020000;
37
        public static int ic_launcher=0x7f020001;
38
        public static int keyboard_key=0x7f020002;
39
        public static int keyboard_normal_bg=0x7f020003;
40
        public static int keyboard_normal_hl_bg=0x7f020004;
41
        public static int keyboard_qwerty=0x7f020005;
42
        public static int keyboard_sym_delete=0x7f020006;
43
        public static int keyboard_sym_shift=0x7f020007;
44
        public static int keyboard_sym_space=0x7f020008;
45
        public static int keyboard_symbols=0x7f020009;
46
        public static int nfc_bg=0x7f02000a;
47
        public static int record_mic_normal=0x7f02000b;
48
        public static int record_mic_press=0x7f02000c;
49
        public static int screenlock_arrow=0x7f02000d;
50
        public static int screenlock_line=0x7f02000e;
51
        public static int screenlock_line_error=0x7f02000f;
52
        public static int screenlock_line_semicircle=0x7f020010;
53
        public static int screenlock_line_semicircle_error=0x7f020011;
54
        public static int screenlock_round_click=0x7f020012;
55
        public static int screenlock_round_click_error=0x7f020013;
56
        public static int screenlock_round_original=0x7f020014;
57
        public static int screenlock_welcome_bg=0x7f020015;
58
        public static int share_apk_activity_dialog=0x7f020016;
59
    }
60
    public static final class id {
61
        public static int btn_qq_file=0x7f090002;
62
        public static int btn_qq_text=0x7f090000;
63
        public static int btn_wechat_file=0x7f090003;
64
        public static int btn_wechat_text=0x7f090001;
65
        public static int deviceListView=0x7f09000c;
66
        public static int deviceNameTV=0x7f09000f;
67
        public static int exit=0x7f09000d;
68
        public static int forget_btn=0x7f090009;
69
        public static int keyboard_view=0x7f090006;
70
        public static int lock_view=0x7f090007;
71
        public static int macAddressTV=0x7f090010;
72
        public static int micButton=0x7f090005;
73
        public static int notify=0x7f090008;
74
        public static int recordLabel=0x7f090004;
75
        public static int reset_btn=0x7f09000a;
76
        public static int search=0x7f09000e;
77
        public static int share=0x7f09000b;
78
    }
79
    public static final class layout {
80
        public static int activity_share=0x7f030000;
81
        public static int audio_recorder=0x7f030001;
82
        public static int keyboard=0x7f030002;
83
        public static int nfcard=0x7f030003;
84
        public static int screenlock_login_layout2=0x7f030004;
85
        public static int screenlock_reset_lock_layout=0x7f030005;
86
        public static int share_apk_activity=0x7f030006;
87
        public static int share_apk_device_list_item=0x7f030007;
88
    }
89
    public static final class raw {
90
        public static int beep=0x7f050000;
91
    }
92
    public static final class string {
93
        public static int action_settings=0x7f06000d;
94
        public static int app_name=0x7f060000;
95
        public static int hello_world=0x7f06000c;
96
        public static int imgContentDesc=0x7f060003;
97
        public static int pressTip=0x7f060002;
98
        public static int recording=0x7f060001;
99
        public static int sa_confirm_share=0x7f06000a;
100
        public static int sa_exit=0x7f060009;
101
        public static int sa_mac_address=0x7f060006;
102
        public static int sa_search=0x7f060007;
103
        public static int sa_searching=0x7f060008;
104
        public static int sa_share=0x7f060005;
105
        public static int sa_tip=0x7f06000b;
106
        public static int tips=0x7f060004;
107
    }
108
    public static final class style {
109
        /** 
110
        Base application theme, dependent on API level. This theme is replaced
111
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
112
    
113
114
            Theme customizations available in newer API levels can go in
115
            res/values-vXX/styles.xml, while customizations related to
116
            backward-compatibility can go here.
117
        
118
119
        Base application theme for API 11+. This theme completely replaces
120
        AppBaseTheme from res/values/styles.xml on API 11+ devices.
121
    
122
 API 11 theme customizations can go here. 
123
124
        Base application theme for API 14+. This theme completely replaces
125
        AppBaseTheme from BOTH res/values/styles.xml and
126
        res/values-v11/styles.xml on API 14+ devices.
127
    
128
 API 14 theme customizations can go here. 
129
130
        Base application theme, dependent on API level. This theme is replaced
131
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
132
    
133
134
            Theme customizations available in newer API levels can go in
135
            res/values-vXX/styles.xml, while customizations related to
136
            backward-compatibility can go here.
137
        
138
139
        Base application theme for API 11+. This theme completely replaces
140
        AppBaseTheme from res/values/styles.xml on API 11+ devices.
141
    
142
 API 11 theme customizations can go here. 
143
144
        Base application theme for API 14+. This theme completely replaces
145
        AppBaseTheme from BOTH res/values/styles.xml and
146
        res/values-v11/styles.xml on API 14+ devices.
147
    
148
 API 14 theme customizations can go here. 
149
         */
150
        public static int AppBaseTheme=0x7f070004;
151
        /**  Application theme. 
152
 All customizations that are NOT specific to a particular API-level can go here. 
153
 Application theme. 
154
 All customizations that are NOT specific to a particular API-level can go here. 
155
         */
156
        public static int AppTheme=0x7f070005;
157
        public static int AudioDialogTheme=0x7f070000;
158
        public static int CustomDialogTheme=0x7f070001;
159
        public static int ShareApkDialogTheme=0x7f070002;
160
        public static int SlidingMenuTheme=0x7f070003;
161
    }
162
}