Переглянути джерело

修复 ra image 无法编译的问题

Ray Zhang 7 роки тому
батько
коміт
47b2d97c60

+ 25 - 22
RA Image/app/app.iml

@@ -89,13 +89,11 @@
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
-      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
@@ -103,27 +101,32 @@
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
       <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/reports" />
       <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
     </content>
-    <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
+    <orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="com.android.support:animated-vector-drawable-25.3.1" level="project" />
-    <orderEntry type="library" name="__local_aars__:/Users/ray/Documents/code_ERPSuiteAndroid/RA Image/app/libs/core-2.3.0.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" name="com.android.support:support-core-ui-25.3.1" level="project" />
-    <orderEntry type="library" name="com.android.support:appcompat-v7-25.3.1" level="project" />
-    <orderEntry type="library" name="com.android.support:support-compat-25.3.1" level="project" />
-    <orderEntry type="library" name="__local_aars__:/Users/ray/Documents/code_ERPSuiteAndroid/RA Image/app/libs/httpmime-4.1.1.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" name="com.android.support.constraint:constraint-layout-solver:1.0.2@jar" level="project" />
-    <orderEntry type="library" name="com.android.support:support-core-utils-25.3.1" level="project" />
-    <orderEntry type="library" name="com.android.support.constraint:constraint-layout-1.0.2" level="project" />
-    <orderEntry type="library" name="com.android.support:support-vector-drawable-25.3.1" level="project" />
-    <orderEntry type="library" name="com.android.support:support-v4-25.3.1" level="project" />
-    <orderEntry type="library" name="com.android.support:support-fragment-25.3.1" level="project" />
-    <orderEntry type="library" name="com.android.support:recyclerview-v7-25.3.1" level="project" />
-    <orderEntry type="library" name="__local_aars__:/Users/ray/Documents/code_ERPSuiteAndroid/RA Image/app/libs/bcprov-jdk15on-157.jar:unspecified@jar" level="project" />
-    <orderEntry type="library" name="com.android.support:support-annotations:25.3.1@jar" level="project" />
-    <orderEntry type="library" name="com.android.support:support-media-compat-25.3.1" level="project" />
-    <orderEntry type="library" name="org.apache.http.legacy-android-25" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout-solver:1.0.2@jar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-v4-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.0@jar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-fragment-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout-1.0.2" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.core:runtime-1.1.0" level="project" />
+    <orderEntry type="library" name="Gradle: __local_aars__:/Users/ray/Documents/code_ERPSuiteAndroid/RA Image/app/libs/core-2.3.0.jar:unspecified@jar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-compat-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:appcompat-v7-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel-1.1.0" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core-1.1.0" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:recyclerview-v7-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: __local_aars__:/Users/ray/Documents/code_ERPSuiteAndroid/RA Image/app/libs/bcprov-jdk15on-157.jar:unspecified@jar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-media-compat-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-core-ui-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
+    <orderEntry type="library" name="Gradle: com.android.support:support-core-utils-27.1.1" level="project" />
+    <orderEntry type="library" name="Gradle: __local_aars__:/Users/ray/Documents/code_ERPSuiteAndroid/RA Image/app/libs/httpmime-4.1.1.jar:unspecified@jar" level="project" />
+    <orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" />
+    <orderEntry type="library" name="Gradle: org.apache.http.legacy-android-27" level="project" />
   </component>
 </module>

+ 9 - 13
RA Image/app/build.gradle

@@ -1,17 +1,14 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 25
-    buildToolsVersion "25.0.3"
-
+    compileSdkVersion 27
     defaultConfig {
         applicationId "com.usai.redant.raimage"
-        minSdkVersion 14
+        minSdkVersion 16
         targetSdkVersion 25
         versionCode 3
         versionName "1.06.34482"
     }
-
     buildTypes {
         release {
             minifyEnabled true
@@ -28,15 +25,14 @@ android {
 
 dependencies {
     //    compile 'com.android.support:support-v4:18.0.0'
-    compile files('libs/core-2.3.0.jar')
-    compile files('libs/httpmime-4.1.1.jar')
-    compile files('libs/bcprov-jdk15on-157.jar')
-
+    api files('libs/core-2.3.0.jar')
+    api files('libs/httpmime-4.1.1.jar')
+    api files('libs/bcprov-jdk15on-157.jar')
     //    compile 'org.bouncycastle.bcprov-jdk15on.1.57.org.bouncycastle:bcprov-jdk15on:1.57'
-    compile 'com.android.support:appcompat-v7:25.3.1'
-    compile 'com.android.support:support-v4:25.3.1'
-    compile 'com.android.support.constraint:constraint-layout:1.0.2'
-    compile 'com.android.support:recyclerview-v7:25.3.1'
+    api 'com.android.support:appcompat-v7:27.1.1'
+    api 'com.android.support:support-v4:27.1.1'
+    api 'com.android.support.constraint:constraint-layout:1.0.2'
+    api 'com.android.support:recyclerview-v7:27.1.1'
 }
 android {
     useLibrary 'org.apache.http.legacy'

+ 0 - 506
RA Image/app/src/main/java/com/usai/redant/raimage/UploadService.java

@@ -542,512 +542,6 @@ public class UploadService extends Service
                 }
 
 
-            }
-        }
-    };
-    public class MyBinder extends Binder {
-        /**
-         * 获取当前Service的实例
-         *
-         * @return
-         */
-        public UploadService getService() {
-            return UploadService.this;
-        }
-    }
-
-    @Override
-    public void onCreate() {
-
-        Log.d("_SERVICE", "create upload Service!!!");
-//		if (uploadThread == null)
-//		{
-//			uploadThread = new UploadThread();
-//			Log.d("", "create upload thread!!!");
-//			// upleadThread.start();
-//
-//		}
-
-
-        // 初始化异常捕获器
-        CrashHandler.getSharedInstance().init(getApplicationContext());
-        CrashHandler.getSharedInstance().preserver = new CrashHandler.InfoPreserver() {
-            @Override
-            public void saveUserInformation() {
-                if (uploadManager != null) {
-                    uploadManager.saveTasks();
-                }
-            }
-
-            @Override
-            public void handleCrashInfo(String deviceInfo, String exception) {
-                dbgUtil.fileLog("============================ app crash ============================");
-                dbgUtil.fileLog("DEVICE");
-                dbgUtil.fileLog(deviceInfo);
-                dbgUtil.fileLog("EXCEPTION");
-                dbgUtil.fileLog(exception);
-                dbgUtil.fileLog("=============================== end ===============================");
-                Log.d("_SERVICE", "Device Info: " + deviceInfo);
-                Log.d("_SERVICE", "Crash Info: " + exception);
-            }
-        };
-
-        IntentFilter msgFilter = new IntentFilter();
-
-        msgFilter.addAction("REDANT.POP.MODIFY_QUEUE");
-//		msgFilter.addAction("REDANT.POP.GPS_ON");
-//		msgFilter.addAction("REDANT.POP.GPS_OFF");
-//		msgFilter.addAction("REDANT.POP.REQUEST_LOCATION");
-        msgFilter.addAction("REDANT.POP.RESET_LOCATION");
-        msgFilter.addAction("REDANT.POP.QUERY_UPLOAD_STATE");
-        msgFilter.addAction("REDANT.RAImage.ADD_TASK");
-        msgFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
-        msgFilter.addAction("REDANT.POP.RETRY_UPLOAD");
-
-        registerReceiver(uploadReceiver, msgFilter);
-        // registerReceiver(uploadReceiver,
-        // new IntentFilter("modify upload queue"));
-
-//		locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
-
-//		locationListener = new LocationListener()
-//		{
-//
-//			// Provider的状态在可用、暂时不可用和无服务三个状态直接切换时触发此函数
-//			@Override
-//			public void onStatusChanged(String provider, int status,
-//					Bundle extras)
-//			{
-//
-//			}
-//
-//			// Provider被enable时触发此函数,比如GPS被打开
-//			@Override
-//			public void onProviderEnabled(String provider)
-//			{
-//
-//			}
-//
-//			// Provider被disable时触发此函数,比如GPS被关闭
-//			@Override
-//			public void onProviderDisabled(String provider)
-//			{
-//
-//			}
-//
-//			// 当坐标改变时触发此函数,如果Provider传进相同的坐标,它就不会被触发
-//			@Override
-//			public void onLocationChanged(Location location)
-//			{
-//				// if (location != null)
-//				// {
-//				// location_changed = true;
-//				// Log.d("Map",
-//				// "Location changed : Lat: " + location.getLatitude()
-//				// + " Lng: " + location.getLongitude());
-//				// }
-//			}
-//		};
-
-        super.onCreate();
-
-    }
-
-    @Override
-    public void onDestroy() {
-        Log.e("_SERVICE", "onDestroy: ");
-        uploadManager.saveTasks();
-    }
-//	void gps_off()
-//	{
-//		locationManager.removeUpdates(locationListener);
-//	}
-//
-//	void gps_on()
-//	{
-//		if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
-//		{
-//
-////            RedAntApplication.getInstance()
-//
-////            if(!RAUtil.checkPermission(this.getApplicationContext(),"android.permission.ACCESS_FINE_LOCATION"))
-////                return;
-//
-//
-//
-//			locationManager.requestLocationUpdates(
-//					LocationManager.GPS_PROVIDER, 60 * 1000, 50,
-//					locationListener);
-//
-//		}
-//		else if (locationManager
-//				.isProviderEnabled(LocationManager.NETWORK_PROVIDER))
-//		{
-//
-//			locationManager.requestLocationUpdates(
-//					LocationManager.NETWORK_PROVIDER, 30 * 1000, 50,
-//					locationListener);
-//
-//		}
-//	}
-
-//	void update_location()
-//	{
-//
-//		Location location = null;
-//		if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
-//		{
-//
-//			location = locationManager
-//					.getLastKnownLocation(LocationManager.GPS_PROVIDER);
-//
-//		}
-//		else if (locationManager
-//				.isProviderEnabled(LocationManager.NETWORK_PROVIDER))
-//		{
-//
-//			location = locationManager
-//					.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
-//
-//		}
-//
-//		SharedPreferences pref = RedAntApplication.getInstance()
-//				.getSharedPreferences("RA Image", 0);
-//
-//		SharedPreferences.Editor editor = pref.edit();
-//		if (location != null)
-//		{
-//
-//			editor.putFloat("Lat", (float) location.getLatitude());
-//			editor.putFloat("Lon", (float) location.getLongitude());
-//
-//		}
-//		editor.commit();
-//
-//	}
-//
-//	void check_location()
-//	{
-//
-//		Location location = null;
-//		if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
-//		{
-//
-//			location = locationManager
-//					.getLastKnownLocation(LocationManager.GPS_PROVIDER);
-//
-//		}
-//		else if (locationManager
-//				.isProviderEnabled(LocationManager.NETWORK_PROVIDER))
-//		{
-//
-//			location = locationManager
-//					.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
-//
-//		}
-//
-//		SharedPreferences pref = RedAntApplication.getInstance()
-//				.getSharedPreferences("RA Image", 0);
-//		double lat = pref.getFloat("Lat", 9999);
-//		double lon = pref.getFloat("Lon", 9999);
-//
-//		// SharedPreferences.Editor editor = pref.edit();
-//		if (location != null)
-//		{
-//			float[] result = new float[1];
-//			if (lat != 9999 && lon != 9999)
-//			{
-//				Location.distanceBetween(lat, lon, location.getLatitude(),
-//						location.getLongitude(), result);
-//				if (result[0] > 1000)
-//				{
-//					sendBroadcast(new Intent("REDANT.POP.STATION_CHANGE"));
-//					return;
-//				}
-//				else
-//				{
-//					sendBroadcast(new Intent("REDANT.POP.STATION_NOT_CHANGE"));
-//					return;
-//				}
-//			}
-//			sendBroadcast(new Intent("REDANT.POP.STATION_NOT_CHANGE"));
-//			return;
-//			// new Location();
-//			//
-//			// Location.distanceBetween(lat, lon, endLatitude, endLongitude,
-//			// results)
-//			//
-//			// editor.putFloat("Lat", (float) location.getLatitude());
-//			// editor.putFloat("Lon", (float) location.getLongitude());
-//
-//		}
-//		else
-//		{
-//			sendBroadcast(new Intent("REDANT.POP.STATION_NOT_CHANGE"));
-//			return;
-//		}
-//		// editor.commit();
-//
-//		// Log.d("location:", "lat:" + latitude + "lon:" + longitude);
-//	}
-
-    // void loadlist()
-    // {
-    //
-    // }
-
-//	public class UploadThread extends Thread
-//	{
-//		@Override
-//		public void run()
-//		{
-//
-//			Log.d("", "upload thread running");
-//
-//			super.run();
-//			doupload();
-//			Log.d("", "upload thread stop");
-//
-//		}
-//
-//		private void doupload()
-//		{
-//			boolean error = false;
-//			boolean didupload = false;
-//			// int verifyresult = Network.VerifyUser(RedAntApplication.user,
-//			// RedAntApplication.password);
-//			// if (verifyresult == Network.RESULT_TRUE)
-//			// {
-//			SQLiteDatabase dbr = dbUtil.OpenDB(UploadService.this, null, false);
-//			Cursor cursor = dbr.query("pics", new String[] { "_id", "pid",
-//					"local_path", "picker", "server" }, "err_code!="
-//					+ Network.AP_UPLOAD_SUCCESS+" and err_code!="+ Network.RESULT_LOCALFILE_ERROR+" and try_count<3 ", null, null, null, "_id", null);
-//			while (cursor.moveToNext())
-//			{
-//				didupload = true;
-//				if (queue_changed)
-//				{
-//					queue_changed = false;
-//					dbUtil.CloseCursor(cursor);
-//					cursor = dbr.query("pics", new String[] { "_id", "pid",
-//							"local_path", "picker", "server" }, "err_code!="
-//							+ Network.AP_UPLOAD_SUCCESS+" and err_code!="+ Network.RESULT_LOCALFILE_ERROR +" and try_count<3 ", null, null, null,
-//							"_id", null);
-//					if (!cursor.moveToNext())
-//						break;
-//
-//				}
-//				int _id = cursor.getInt(0);
-//				String pid = cursor.getString(1);
-//				String path = cursor.getString(2);
-//				String picker = cursor.getString(3);
-//				String server = cursor.getString(4);
-//
-//				String encryptUser = "";
-//
-//				try
-//				{
-//					encryptUser = AES.encrypt("apexu", picker);
-//
-//				}
-//				catch (Exception e1)
-//				{
-//					// TODO Auto-generated catch block
-//					e1.printStackTrace();
-//				}
-//
-//				Cursor cursor_user = dbr.query("users",
-//						new String[] { "pass" }, "name='" + encryptUser + "'",
-//						null, null, null, "_id", null);
-//				String pass = "";
-//				if (cursor_user.moveToNext())
-//					pass = cursor_user.getString(0);
-//				try
-//				{
-//					pass = AES.decrypt("apexp", pass);
-//				}
-//				catch (Exception e)
-//				{
-//					// TODO Auto-generated catch block
-//					e.printStackTrace();
-//				}
-//
-//				int uploadresult = Network.UploadImage(path, picker, pass, pid,
-//						server);
-//				if (uploadresult == Network.RESULT_TRUE)
-//				{
-//
-//					RedAntApplication.writeLock.lock();
-//
-//					// write sql process
-//					SQLiteDatabase dbw = dbUtil.OpenDB(UploadService.this,
-//							null, true);
-//					// String sql = "update pics set err_code ="
-//					// + Network.AP_UPLOAD_SUCCESS + " where _id="
-//					// + _id;
-//					String sql = "delete from pics  where _id=" + _id;
-//					dbw.execSQL(sql);
-//
-//					String timeStamp = new SimpleDateFormat("yyyy_MM_dd")
-//							.format(new Date());
-//
-//					File storageDir = new File(Environment
-//							.getExternalStorageDirectory().getPath()
-//							+ "/redant/pop/done/" + timeStamp);
-//
-//					if (!storageDir.exists())
-//						storageDir.mkdirs();
-//
-//					File pic = new File(path);
-//					// pic.delete();
-//
-//					dbUtil.CloseDB(dbw);
-//					RedAntApplication.writeLock.unlock();
-//					dbgUtil.fileLog("upload success move file "
-//							+ pic.getName()
-//							+ " to "
-//							+ Environment.getExternalStorageDirectory()
-//									.getPath() + "/redant/pop/done/"
-//							+ timeStamp + File.separator);
-//					pic.renameTo(new File(Environment
-//							.getExternalStorageDirectory().getPath()
-//							+ "/redant/pop/done/"
-//							+ timeStamp
-//							+ File.separator
-//							+ pic.getName()));
-//
-//
-//				}
-//				else
-//				{
-//					error = true;
-//					RedAntApplication.writeLock.lock();
-//
-//					{
-//						// write sql process
-//						SQLiteDatabase dbw = dbUtil.OpenDB(UploadService.this,
-//								null, true);
-//						String sql = "update pics set err_code ="
-//								+ uploadresult + ", try_count = try_count+1 where _id=" + _id;
-//
-//						dbw.execSQL(sql);
-//						dbUtil.CloseDB(dbw);
-//					}
-//					RedAntApplication.writeLock.unlock();
-//					dbgUtil.fileLog("upload failed pid:" + pid + " file:"
-//							+ path + " server:" + server + " err_code:"
-//							+ uploadresult);
-//
-//				}
-//
-//				sendBroadcast(new Intent("REDANT.POP.UPDATE_QUEUE_VIEW"));
-//			}
-//
-//			dbUtil.CloseCursor(cursor);
-//			dbUtil.CloseDB(dbr);
-//
-//			// }
-//			// else
-//			// {
-//			// Log.d("upload thread", "user check failed!");
-//			//
-//			// sendBroadcast(new Intent("REDANT.POP.USER_CHECK_FAILED"));
-//			// }
-//
-//			if (queue_changed)
-//			{
-//				queue_changed = false;
-//				doupload();
-//			}
-//			if (didupload)
-//			{
-//				if (error)
-//				{
-//					sendBroadcast(new Intent(
-//							"REDANT.POP.FINISH_UPLOAD_QUEUE_WITH_ERROR"));
-//					RedAntApplication.startalarm();
-//				}
-//				else
-//				{
-//					sendBroadcast(new Intent("REDANT.POP.FINISH_UPLOAD_QUEUE"));
-//					RedAntApplication.cancelalarm();
-//				}
-//			}
-//		}
-//	}
-
-    private BroadcastReceiver uploadReceiver = new BroadcastReceiver() {
-
-        public void onReceive(Context context, Intent intent) {
-            String action = intent
-                    .getAction();
-            // 如果捕捉到的action是ACTION_BATTERY_CHANGED
-
-            if ("REDANT.RAImage.ADD_TASK".equals(action)) {
-
-                ArrayList<Bundle> tasks = intent.getParcelableArrayListExtra("tasks");
-
-
-                uploadManager.addTasks(tasks);
-            } else if ("REDANT.RAImage.SAVE_TASK".equals(action)) {
-                uploadManager.stopAllTasks();
-            } else if (intent
-                    .getAction()
-                    .equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
-
-                ConnectivityManager connManager = (ConnectivityManager) context
-                        .getSystemService(Context.CONNECTIVITY_SERVICE);
-
-                NetworkInfo networkInfo = connManager
-                        .getActiveNetworkInfo();
-                if (networkInfo == null) {
-                    dbgUtil.Logd(
-                            "Current Network info",
-                            "can not get Active NetworkInfo!");
-                    return;
-                }
-                NetworkInfo.State netState = networkInfo
-                        .getState();
-                if (netState != NetworkInfo.State.CONNECTED) {
-                    dbgUtil.Logd(
-                            "Current Network info",
-                            "not Connected!State="
-                                    + netState);
-                    return;
-                } else {
-                    int iconntype = -1;
-                    iconntype = networkInfo
-                            .getType();
-                    SharedPreferences pref = RedAntApplication
-                            .getInstance()
-                            .getSharedPreferences(
-                                    "UploadManager",
-                                    0);
-
-
-                    boolean
-                            wifi_only
-                            = pref.getBoolean("wifi_only",
-                            false);
-
-                    if
-                            (wifi_only
-                            == true
-                            && iconntype !=
-                            ConnectivityManager.TYPE_WIFI
-                            && iconntype !=
-                            9/* earthnet */) {
-                        uploadManager.stopAllTasks();
-//															 dbgUtil.Log(Log.DEBUG,
-//															 "Current Network info",
-//															 "not allowed!Connection type="
-//															 +
-//															 networkInfo.getTypeName());
-                        return;
-                    }
-                }
-
-
             }
         }
     };

+ 1 - 1
RA Image/app/src/main/java/com/usai/util/dbgUtil.java

@@ -64,7 +64,7 @@ public class dbgUtil
 			dir.mkdirs();
 
 		Calendar c = Calendar.getInstance();
-		c.add(Calendar.MONDAY, -1);
+		c.add(Calendar.DAY_OF_MONTH, -1);
 
 		String newtime = new SimpleDateFormat("yyyy-MM-dd").format(c
 				.getTimeInMillis());

+ 7 - 1
RA Image/build.gradle

@@ -2,14 +2,20 @@
 buildscript {
     repositories {
         jcenter()
+
+        maven {
+            url 'https://maven.google.com'
+        }
+        google()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.0.1'
+        classpath 'com.android.tools.build:gradle:3.1.1'
     }
 }
 
 allprojects {
     repositories {
         jcenter()
+        google()
     }
 }

+ 14 - 0
RA Image/gradle.properties

@@ -0,0 +1,14 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+android.enableAapt2=false

+ 2 - 2
RA Image/gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,6 @@
-#Wed Jan 24 13:52:16 CST 2018
+#Tue Jun 19 15:10:11 CST 2018
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip