|
|
@ -7,6 +7,7 @@ import android.content.res.Configuration; |
|
|
|
import android.graphics.Color; |
|
|
|
import android.os.Build; |
|
|
|
import android.os.Handler; |
|
|
|
import android.support.annotation.Nullable; |
|
|
|
import android.support.annotation.RequiresApi; |
|
|
|
import android.support.design.widget.NavigationView; |
|
|
|
import android.support.v4.app.Fragment; |
|
|
@ -56,6 +57,7 @@ import butterknife.OnClick; |
|
|
|
|
|
|
|
public class HomeActivityV2 extends BaseActivity implements HomeParentViewContractV2, HomeV2PresenterInterface.HomeV2ContractInterface { |
|
|
|
|
|
|
|
private static final int APP_UPDATE_REQUEST = 98463; |
|
|
|
@BindView(R.id.nav_drawer) |
|
|
|
NavigationView nav_drawer; |
|
|
|
@BindView(R.id.iv_help) |
|
|
@ -363,13 +365,15 @@ public class HomeActivityV2 extends BaseActivity implements HomeParentViewContra |
|
|
|
|
|
|
|
@Override |
|
|
|
public void showUpdateScreen(String build, String info, boolean isForceUpdate) { |
|
|
|
new Handler().postDelayed(()->{ |
|
|
|
Intent intent=new Intent(HomeActivityV2.this,AppUpdateActivity.class); |
|
|
|
intent.putExtra(AppUpdateActivity.APP_UPDATE_MESSAGE,info); |
|
|
|
intent.putExtra(AppUpdateActivity.APP_PLAY_STORE_BUILD_NUMBER,build); |
|
|
|
intent.putExtra(AppUpdateActivity.APP_UPDATE_IS_FORCE_UPDATE,isForceUpdate); |
|
|
|
startActivity(intent); |
|
|
|
},500); |
|
|
|
if(!this.presenter.shouldNotPromptAppUpdate()) { |
|
|
|
new Handler().postDelayed(() -> { |
|
|
|
Intent intent = new Intent(HomeActivityV2.this, AppUpdateActivity.class); |
|
|
|
intent.putExtra(AppUpdateActivity.APP_UPDATE_MESSAGE, info); |
|
|
|
intent.putExtra(AppUpdateActivity.APP_PLAY_STORE_BUILD_NUMBER, build); |
|
|
|
intent.putExtra(AppUpdateActivity.APP_UPDATE_IS_FORCE_UPDATE, isForceUpdate); |
|
|
|
startActivityForResult(intent, APP_UPDATE_REQUEST); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
@ -431,6 +435,16 @@ public class HomeActivityV2 extends BaseActivity implements HomeParentViewContra |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { |
|
|
|
super.onActivityResult(requestCode, resultCode, data); |
|
|
|
if(requestCode==APP_UPDATE_REQUEST&&resultCode==RESULT_OK) |
|
|
|
{ |
|
|
|
this.presenter.storeAppUpdateDecision(data.getBooleanExtra(AppUpdateActivity.APP_UPDATE_NOT_NOW_TEMPORARY,false)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onDestroy() { |
|
|
|