Commit c1d9b600 by sikang

remove remoteConfig

parent d01fa264
...@@ -103,7 +103,7 @@ dependencies { ...@@ -103,7 +103,7 @@ dependencies {
//firebase cloud message //firebase cloud message
api 'com.google.firebase:firebase-messaging:17.3.2' api 'com.google.firebase:firebase-messaging:17.3.2'
//firebase remoteConfig //firebase remoteConfig
api 'com.google.firebase:firebase-config:16.0.0' // api 'com.google.firebase:firebase-config:16.0.0'
//facebook accountKit SDK //facebook accountKit SDK
......
...@@ -8,8 +8,6 @@ import android.view.View; ...@@ -8,8 +8,6 @@ import android.view.View;
import com.appsflyer.AppsFlyerLib; import com.appsflyer.AppsFlyerLib;
import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseApp;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings;
import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator; import com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator;
import com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator; import com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator;
...@@ -24,7 +22,6 @@ import org.litepal.LitePal; ...@@ -24,7 +22,6 @@ import org.litepal.LitePal;
import cn.fraudmetrix.octopus.aspirit.main.OctopusManager; import cn.fraudmetrix.octopus.aspirit.main.OctopusManager;
import tech.starwin.network.Gateway; import tech.starwin.network.Gateway;
import tech.starwin.utils.TrackEventHelper;
import tech.starwin.utils.PreferencesManager; import tech.starwin.utils.PreferencesManager;
import tech.starwin.utils.ScreenAutoSize; import tech.starwin.utils.ScreenAutoSize;
import tech.starwin.utils.collection.UploadManager; import tech.starwin.utils.collection.UploadManager;
...@@ -135,14 +132,14 @@ public class LibConfig { ...@@ -135,14 +132,14 @@ public class LibConfig {
/** /**
* init FirebaseRemoteConfig * init FirebaseRemoteConfig
*/ */
private static void initFirebaseRemoteConfig() { // private static void initFirebaseRemoteConfig() {
FirebaseRemoteConfig.getInstance().setConfigSettings( // FirebaseRemoteConfig.getInstance().setConfigSettings(
new FirebaseRemoteConfigSettings.Builder() // new FirebaseRemoteConfigSettings.Builder()
.setDeveloperModeEnabled(LibConfig.DEBUG) // .setDeveloperModeEnabled(LibConfig.DEBUG)
.build() // .build()
); // );
TrackEventHelper.fetchRemoteConfig(); // TrackEventHelper.fetchRemoteConfig();
} // }
/** /**
......
...@@ -67,6 +67,8 @@ public class BitmapUtils { ...@@ -67,6 +67,8 @@ public class BitmapUtils {
*/ */
public static Bitmap loadBitmapCenterByPath(String path, int width, int height) { public static Bitmap loadBitmapCenterByPath(String path, int width, int height) {
Bitmap bitmap = loadBitmapByPath(path, width, height);//先按比例缩小到最小倍数,然后加载图片到内存 Bitmap bitmap = loadBitmapByPath(path, width, height);//先按比例缩小到最小倍数,然后加载图片到内存
if (bitmap == null)
return null;
bitmap = scaleBitmap(bitmap, width, height);//再将加载好的图片缩放到指定大小 bitmap = scaleBitmap(bitmap, width, height);//再将加载好的图片缩放到指定大小
return cropBitmapCenter(bitmap, width, height); return cropBitmapCenter(bitmap, width, height);
} }
...@@ -76,6 +78,7 @@ public class BitmapUtils { ...@@ -76,6 +78,7 @@ public class BitmapUtils {
* 按指定尺寸加载SD卡 中的图片(指定宽高保持比例缩放) * 按指定尺寸加载SD卡 中的图片(指定宽高保持比例缩放)
*/ */
public static Bitmap loadBitmapByPath(String path, float width, float height) { public static Bitmap loadBitmapByPath(String path, float width, float height) {
try {
int degree = readPictureDegree(path); int degree = readPictureDegree(path);
BitmapFactory.Options options = new BitmapFactory.Options(); BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;//不加载bitmap到内存中 options.inJustDecodeBounds = true;//不加载bitmap到内存中
...@@ -95,6 +98,10 @@ public class BitmapUtils { ...@@ -95,6 +98,10 @@ public class BitmapUtils {
Bitmap bitmap = BitmapFactory.decodeFile(path, options); Bitmap bitmap = BitmapFactory.decodeFile(path, options);
//把图片旋转为正的方向 //把图片旋转为正的方向
return rotateBitmap(bitmap, degree); return rotateBitmap(bitmap, degree);
} catch (NullPointerException e) {
return null;
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment