Skip to content

Commit

Permalink
Moved window.clearFlags call to ShowSystemUiFunction.java to resolve …
Browse files Browse the repository at this point in the history
…issue mesmotronic#16 on Samsung Galaxy S3 Neo; added build.xml ant script by wastedabuser
  • Loading branch information
neilrackett committed May 23, 2015
1 parent 4578fb7 commit 7d8d190
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 11 deletions.
2 changes: 1 addition & 1 deletion android-jar/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-19
target=android-22
android.library=true
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,10 @@ public void init()
public void resetUi()
{
final View decorView = getDecorView();
final Window window = getWindow();

decorView.setOnFocusChangeListener(getOnFocusChangeListener());
decorView.setOnSystemUiVisibilityChangeListener(null);

window.clearFlags
(
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
| WindowManager.LayoutParams.FLAG_FULLSCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
);

init();

setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
package com.mesmotronic.ane.fullscreen.functions;

import android.os.Build;
import android.view.WindowManager;

import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
Expand All @@ -53,6 +54,13 @@ public FREObject call(FREContext context, FREObject[] args)
final FullScreenContext fsc = (FullScreenContext) context;

fsc.resetUi();

fsc.getWindow().clearFlags
(
WindowManager.LayoutParams.FLAG_FULLSCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
);
}
catch (Exception e0)
{
Expand Down
Binary file modified build/AndroidFullScreen.ane
Binary file not shown.
Binary file modified build/android/fullscreen-ane-jar.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion build/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

copy ..\android-jar\bin\fullscreen-ane-jar.jar android

adt ^
call adt ^
-package ^
-target ane ./AndroidFullScreen.ane extension.xml ^
-swc swc/fullscreen-ane-android.swc ^
Expand Down
7 changes: 7 additions & 0 deletions build/build.config.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = AndroidFullScreen
name.jar = fullscreen-ane-jar

flex.sdk = Your path to flex sdk for example i am using D:/programs/FlashDevelop/Apps/ascsdk/17.0.0
flex.sdk.ext = .bat

android.sdk = Your path to adt for example i am using D:/programs/adt-bundle-windows-x86_64-20131030/sdk/platforms/android-19
81 changes: 81 additions & 0 deletions build/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="Air Native Extension Build Scripts" default="all">

<!-- Config -->
<property file="build.config"/>

<!-- All -->
<target name="all" depends="android,swc,package" description="Full build of extension"/>

<!-- Android -->
<target name="android" description="Build Android Library">
<delete dir="../temp-java"/>
<mkdir dir="../temp-java"/>

<echo message="Using Java version ${ant.java.version}."/>

<javac source="1.6" srcdir="../android-jar/src" destdir="../temp-java" includeantruntime="false">
<src path="../android-jar/src"/>
<classpath>
<pathelement location="${android.sdk}/android.jar"/>
<pathelement location="${flex.sdk}/lib/android/FlashRuntimeExtensions.jar"/>
<!-- <pathelement location="../android-jar/libs/android-support-v4.jar"/> -->
</classpath>
</javac>

<delete file="android/${name.jar}.jar"/>
<jar basedir="../temp-java" destfile="android/${name.jar}.jar"/>
<!-- <copy file="../android-jar/libs/android-support-v4.jar" todir="../temp/android/"/> -->

<delete dir="../temp-java"/>
</target>

<!-- Actionscript -->
<target name="swc" description="Build SWC library">
<delete dir="../temp-swc/"/>
<mkdir dir="../temp-swc"/>

<fileset dir="../android-swc/src" casesensitive="yes" id="classfiles">
<include name="**/*.as"/>
</fileset>

<pathconvert property="classlist" refid="classfiles" pathsep=" " dirsep=".">
<regexpmapper from=".*src.(.*)\.as" to="\1"/>
</pathconvert>

<exec executable="${flex.sdk}/bin/compc${flex.sdk.ext}" failonerror="true">
<env key="AIR_SDK_HOME" value="${flex.sdk}"/>
<arg line='-source-path ../android-swc/src'/>
<arg line='-output ../temp-swc/${name}.swc'/>
<arg line='-swf-version=28'/>
<arg line='-external-library-path+="${flex.sdk}/frameworks/libs/air/airglobal.swc"'/>
<arg line='-include-classes ${classlist}'/>
</exec>

<unzip src="../temp-swc/${name}.swc" dest="../temp-swc" overwrite="true"/>
<copy file="../temp-swc/library.swf" todir="android" overwrite="true"/>
<copy file="../temp-swc/library.swf" todir="default" overwrite="true"/>

</target>

<!-- Package -->
<target name="package" description="Create the extension package">

<delete file="${name}.ane"/>

<exec executable="${flex.sdk}/bin/adt${flex.sdk.ext}" failonerror="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="ane"/>
<arg value="./${name}.ane"/>
<arg value="extension.xml"/>
<arg line="-swc ../temp-swc/${name}.swc"/>
<arg line="-platform Android-ARM -C android/ ."/>
<arg line="-platform Android-x86 -C android/ ."/>
<arg line="-platform default -C default/ ."/>
</exec>

<delete dir="../temp-swc/"/>
</target>

</project>

0 comments on commit 7d8d190

Please sign in to comment.