mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Set executable permissions to AAPT2 binary if it is not executable
This commit is contained in:
Binary file not shown.
@@ -33,25 +33,14 @@ import com.itsaky.androidide.models.ConstantsBridge;
|
||||
import com.itsaky.androidide.utils.DialogUtils;
|
||||
|
||||
public class SplashActivity extends StudioActivity {
|
||||
private ActivitySplashBinding binding;
|
||||
|
||||
private static final Handler mHandler = new Handler();
|
||||
private final Runnable mRunnable =
|
||||
new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
() -> {
|
||||
ConstantsBridge.SPLASH_TO_MAIN = true;
|
||||
startActivity(new Intent(SplashActivity.this, MainActivity.class));
|
||||
finish();
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected View bindLayout() {
|
||||
binding = ActivitySplashBinding.inflate(getLayoutInflater());
|
||||
return binding.getRoot();
|
||||
}
|
||||
private ActivitySplashBinding binding;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -59,6 +48,12 @@ public class SplashActivity extends StudioActivity {
|
||||
binding.splashText.setText(getString(R.string.msg_checking_storage_permissions));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStorageAlreadyGranted() {
|
||||
super.onStorageAlreadyGranted();
|
||||
proceed();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStorageGranted() {
|
||||
super.onStorageGranted();
|
||||
@@ -66,9 +61,9 @@ public class SplashActivity extends StudioActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStorageAlreadyGranted() {
|
||||
super.onStorageAlreadyGranted();
|
||||
proceed();
|
||||
protected View bindLayout() {
|
||||
binding = ActivitySplashBinding.inflate(getLayoutInflater());
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void proceed() {
|
||||
|
||||
Binary file not shown.
@@ -106,6 +106,10 @@ public class ToolsManager {
|
||||
ResourceUtils.copyFileFromAssets(
|
||||
getArchSpecificAsset("aapt2"), Environment.AAPT2.getAbsolutePath());
|
||||
}
|
||||
|
||||
if (!Environment.AAPT2.canExecute() && !Environment.AAPT2.setExecutable(true)) {
|
||||
LOG.error("Cannot set executable permissions to AAPT2 binary");
|
||||
}
|
||||
}
|
||||
|
||||
public static void extractLibHooks() {
|
||||
|
||||
Reference in New Issue
Block a user