mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-14 15:17:02 -04:00
Remove freeform launch part
This commit is contained in:
parent
35a0b66ec1
commit
cf0db09ea9
@ -353,17 +353,8 @@ public class MinecraftDownloaderTask extends AsyncTask<String, String, Throwable
|
|||||||
// mainIntent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
|
// mainIntent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
|
||||||
mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
||||||
mainIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
mainIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
||||||
if (LauncherPreferences.PREF_FREEFORM) {
|
|
||||||
DisplayMetrics dm = new DisplayMetrics();
|
|
||||||
mActivity.getWindowManager().getDefaultDisplay().getMetrics(dm);
|
|
||||||
|
|
||||||
ActivityOptions options = (ActivityOptions) ActivityOptions.class.getMethod("makeBasic").invoke(null);
|
|
||||||
Rect freeformRect = new Rect(0, 0, dm.widthPixels / 2, dm.heightPixels / 2);
|
|
||||||
options.getClass().getDeclaredMethod("setLaunchBounds", Rect.class).invoke(options, freeformRect);
|
|
||||||
mActivity.startActivity(mainIntent, options.toBundle());
|
|
||||||
} else {
|
|
||||||
mActivity.startActivity(mainIntent);
|
mActivity.startActivity(mainIntent);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
Tools.showError(mActivity, e);
|
Tools.showError(mActivity, e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user