Skip to content

Commit

Permalink
CHG: [droid] wraps native activity in a java class
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Mar 14, 2013
1 parent 740be0a commit 9bcc05a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/android/packaging/xbmc/AndroidManifest.xml
Expand Up @@ -32,7 +32,7 @@
This will take care of integrating with our NDK code.
-->
<activity
android:name="android.app.NativeActivity"
android:name=".Main"
android:configChanges="orientation|keyboardHidden"
android:finishOnTaskLaunch="true"
android:label="XBMC"
Expand Down
19 changes: 19 additions & 0 deletions tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java
@@ -0,0 +1,19 @@
package org.xbmc.xbmc;

import android.app.NativeActivity;
import android.content.Intent;
import android.os.Bundle;

public class Main extends NativeActivity
{
public Main()
{
super();
}

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
}
4 changes: 2 additions & 2 deletions tools/android/packaging/xbmc/src/org/xbmc/xbmc/Splash.java
Expand Up @@ -238,7 +238,7 @@ private boolean CheckCpuFeature(String feat) {
protected void startXBMC() {
// Run XBMC
Intent intent = new Intent();
intent.setClass(this, android.app.NativeActivity.class);
intent.setClass(this, org.xbmc.xbmc.Main.class);
startActivity(intent);
finish();
}
Expand All @@ -254,7 +254,7 @@ public void onCreate(Bundle savedInstanceState) {
.getRunningTasks(Integer.MAX_VALUE);
for (RunningTaskInfo task : tasks)
if (task.topActivity.toString().equalsIgnoreCase(
"ComponentInfo{org.xbmc.xbmc/android.app.NativeActivity}")) {
"ComponentInfo{org.xbmc.xbmc/org.xbmc.xbmc.Main}")) {
// XBMC already running; just activate it
startXBMC();
return;
Expand Down

0 comments on commit 9bcc05a

Please sign in to comment.