Commit 5458e02f authored by feihuaduo's avatar feihuaduo

修复资源不复制的bug

parent 42b4e719
...@@ -57,6 +57,8 @@ public class MainActivity extends HomeActivity{ ...@@ -57,6 +57,8 @@ public class MainActivity extends HomeActivity{
mImageUpdater = new ImageUpdater(this); mImageUpdater = new ImageUpdater(this);
//动态权限 //动态权限
// ActivityCompat.requestPermissions(this, PERMISSIONS, 0); // ActivityCompat.requestPermissions(this, PERMISSIONS, 0);
//资源复制
checkRes();
} }
@SuppressLint({"StringFormatMatches", "StringFormatInvalid"}) @SuppressLint({"StringFormatMatches", "StringFormatInvalid"})
...@@ -69,8 +71,7 @@ public class MainActivity extends HomeActivity{ ...@@ -69,8 +71,7 @@ public class MainActivity extends HomeActivity{
// break; // break;
// } // }
// } // }
//资源复制
checkRes();
} }
private void checkRes() { private void checkRes() {
...@@ -126,6 +127,7 @@ public class MainActivity extends HomeActivity{ ...@@ -126,6 +127,7 @@ public class MainActivity extends HomeActivity{
protected void onDestroy() { protected void onDestroy() {
YGOStarter.onDestroy(this); YGOStarter.onDestroy(this);
super.onDestroy(); super.onDestroy();
if(mResCheckTask!=null)
mResCheckTask.unregisterMReceiver(); mResCheckTask.unregisterMReceiver();
} }
......
...@@ -46,7 +46,7 @@ public class PermissionUtil { ...@@ -46,7 +46,7 @@ public class PermissionUtil {
dialog.dismiss(); dialog.dismiss();
} }
}); });
dialog.show(); // dialog.show();
return dialog; return dialog;
} }
return null; return null;
...@@ -72,7 +72,7 @@ public class PermissionUtil { ...@@ -72,7 +72,7 @@ public class PermissionUtil {
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialogInterface) { public void onDismiss(DialogInterface dialogInterface) {
isNotificationPermission(context); isNotificationPermission(context).show();
} }
}); });
dialog.setRightButtonListener(new DialogInterface.OnClickListener() { dialog.setRightButtonListener(new DialogInterface.OnClickListener() {
......
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