mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
fix: make the default launcher entry a real activity so Red Magic Game Space can add the app
This commit is contained in:
1 parent
f61525162d
commit
fac51b3400
2 files changed
+19
-4
No files matched your search
@@ -83,17 +83,18 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity-alias
|
||||
<!-- Red Magic Game Space only lists apps whose launcher entry is a real activity, not an alias. -->
|
||||
<activity
|
||||
android:name=".LauncherDark"
|
||||
android:targetActivity=".MainActivity"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:exported="true">
|
||||
android:exported="true"
|
||||
android:theme="@android:style/Theme.NoDisplay">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.CAR_LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity-alias>
|
||||
</activity>
|
||||
|
||||
<activity-alias
|
||||
android:name=".LauncherLight"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.droiddeck.launcher
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
|
||||
class LauncherDark : Activity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
startActivity(Intent(intent).setClass(this, MainActivity::class.java)
|
||||
.setFlags(intent.flags and (Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK).inv()))
|
||||
finish()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user