Skip to content

Commit

Permalink
Fixed an issue where VR apps would not launch if there was an underly…
Browse files Browse the repository at this point in the history
…ing 2D activity
  • Loading branch information
threethan committed Aug 3, 2023
1 parent 63450db commit 4729b85
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Launcher/App/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 23
targetSdkVersion 33
versionCode 210
versionName "2.1.0"
versionCode 211
versionName "2.1.1"
}

compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import android.accessibilityservice.AccessibilityService;
import android.content.Intent;
import android.view.accessibility.AccessibilityEvent;

import java.lang.reflect.Array;

public class LauncherAccessibilityService extends AccessibilityService
{
public void onAccessibilityEvent(AccessibilityEvent event)
Expand All @@ -17,7 +14,14 @@ public void onAccessibilityEvent(AccessibilityEvent event)
if (exploreAccessibilityEventName.compareTo(eventText) == 0) {
Intent launchIntent = new Intent(this, MainActivity.class);

launchIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NEW_DOCUMENT | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
launchIntent.setFlags(
Intent.FLAG_ACTIVITY_NO_ANIMATION |
Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TOP |
Intent.FLAG_ACTIVITY_CLEAR_TASK |
Intent.FLAG_ACTIVITY_SINGLE_TOP
);

this.startActivity(launchIntent);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void runApp(Activity context, ApplicationInfo appInfo) {
public void run() {
context.startActivity(launchIntent);
}
}, 615);
}, 650);
} else {
context.startActivity(launchIntent);
}
Expand Down

0 comments on commit 4729b85

Please sign in to comment.