diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2013-02-14 18:49:02 +0000 |
---|---|---|
committer | XpLoDWilD <xplodgui@gmail.com> | 2013-02-17 20:28:22 +0000 |
commit | 2806d8bfe0361daab80c43c9e2e38205b780237d (patch) | |
tree | 8b539c8ca1363827346183b240be58c7deb8dff0 /tvout | |
parent | 2bd22a00bd6c148ddbd453896b7639d9eb86ba26 (diff) | |
download | device_samsung_galaxys2-common-2806d8bfe0361daab80c43c9e2e38205b780237d.zip device_samsung_galaxys2-common-2806d8bfe0361daab80c43c9e2e38205b780237d.tar.gz device_samsung_galaxys2-common-2806d8bfe0361daab80c43c9e2e38205b780237d.tar.bz2 |
galaxys2: update for new kernel, cleanup, replicant camera hal
Camera HAL from: http://gitorious.org/replicant/device_samsung_galaxys2
Change-Id: I4191110be5b3368c608333d724f4217894dab4ac
Diffstat (limited to 'tvout')
-rw-r--r-- | tvout/Android.mk | 16 | ||||
-rw-r--r-- | tvout/AndroidManifest.xml | 24 | ||||
-rw-r--r-- | tvout/proguard.flags | 1 | ||||
-rw-r--r-- | tvout/src/android/hardware/Tvout.java | 102 | ||||
-rw-r--r-- | tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java | 12 | ||||
-rw-r--r-- | tvout/src/com/teamhacksung/tvout/TvOutService.java | 116 |
6 files changed, 0 insertions, 271 deletions
diff --git a/tvout/Android.mk b/tvout/Android.mk deleted file mode 100644 index c73e1cf..0000000 --- a/tvout/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional - -LOCAL_PROGUARD_FLAG_FILES := proguard.flags - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_PACKAGE_NAME := TvOut -LOCAL_CERTIFICATE := platform - -include $(BUILD_PACKAGE) - -# Use the folloing include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tvout/AndroidManifest.xml b/tvout/AndroidManifest.xml deleted file mode 100644 index 79d5745..0000000 --- a/tvout/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.teamhacksung.tvout" android:versionCode="1" - android:versionName="1.0"> - - <application android:label="TvOut"> - - <service android:exported="false" android:enabled="true" - android:name=".TvOutService"> - </service> - - <receiver android:name=".BootCompletedReceiver"> - <intent-filter> - <action android:name="android.intent.action.BOOT_COMPLETED" /> - <category android:name="android.intent.category.DEFAULT" /> - </intent-filter> - </receiver> - - </application> - - <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission> - <uses-permission android:name="android.permission.BROADCAST_STICKY"></uses-permission> - <uses-permission android:name="android.permission.FACTORY_TEST"></uses-permission> -</manifest> diff --git a/tvout/proguard.flags b/tvout/proguard.flags deleted file mode 100644 index 3725966..0000000 --- a/tvout/proguard.flags +++ /dev/null @@ -1 +0,0 @@ --dontshrink diff --git a/tvout/src/android/hardware/Tvout.java b/tvout/src/android/hardware/Tvout.java deleted file mode 100644 index f2fc3a8..0000000 --- a/tvout/src/android/hardware/Tvout.java +++ /dev/null @@ -1,102 +0,0 @@ -package android.hardware; - -import android.util.Log; - -public class Tvout { - private static final String TAG = "Tvout_java"; - - static { - System.loadLibrary("tvout_jni"); - } - - public Tvout() { - Log.i(TAG, "Tvout Initializing"); - _native_setup(); - } - - private native boolean _TvoutGetCableStatus(); - - private native boolean _TvoutGetStatus(); - - private native boolean _TvoutGetSubtitleStatus(); - - private native boolean _TvoutGetSuspendStatus(); - - private native boolean _TvoutPostSubtitle(String string, int param); - - private native boolean _TvoutPostSuspend(String string); - - private native boolean _TvoutSetCableStatus(boolean connected); - - private native boolean _TvoutSetOutputMode(int mode); - - private native boolean _TvoutSetResolution(int resolution); - - private native boolean _TvoutSetStatus(boolean enabled); - - private native boolean _TvoutSetSubtitleStatus(boolean enabled); - - private native boolean _TvoutSetSuspendStatus(boolean enabled); - - private native boolean _TvoutSetDefaultString(String string); - - private final native void _native_setup(); - - private final native void _release(); - - public boolean getCableStatus() { - return _TvoutGetCableStatus(); - } - - public boolean getStatus() { - return _TvoutGetStatus(); - } - - public boolean getSubtitleStatus() { - return _TvoutGetSubtitleStatus(); - } - - public boolean getSuspendStatus() { - return _TvoutGetSuspendStatus(); - } - - public boolean postSubtitle(String string, int paramInt) { - return _TvoutPostSubtitle(string, paramInt); - } - - public boolean postSuspend(String string) { - return _TvoutPostSuspend(string); - } - - public boolean setCableStatus(boolean connected) { - return _TvoutSetCableStatus(connected); - } - - public boolean setOutputMode(int mode) { - return _TvoutSetOutputMode(mode); - } - - public boolean setResolution(int resolution) { - return _TvoutSetResolution(resolution); - } - - public boolean setStatus(boolean enabled) { - return _TvoutSetStatus(enabled); - } - - public boolean setSubtitleStatus(boolean enabled) { - return _TvoutSetSubtitleStatus(enabled); - } - - public boolean setSuspendStatus(boolean enabled) { - return _TvoutSetSuspendStatus(enabled); - } - - public boolean setDefaultString(String string) { - return _TvoutSetDefaultString(string); - } - - public void release() { - _release(); - } -} diff --git a/tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java b/tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java deleted file mode 100644 index 5ed6af6..0000000 --- a/tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.teamhacksung.tvout; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; - -public class BootCompletedReceiver extends BroadcastReceiver { - @Override - public void onReceive(Context context, Intent intent) { - context.startService(new Intent(context, TvOutService.class)); - } -} diff --git a/tvout/src/com/teamhacksung/tvout/TvOutService.java b/tvout/src/com/teamhacksung/tvout/TvOutService.java deleted file mode 100644 index b633b3d..0000000 --- a/tvout/src/com/teamhacksung/tvout/TvOutService.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.teamhacksung.tvout; - -import android.app.Service; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.hardware.Tvout; -import android.nfc.Tag; -import android.os.IBinder; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.util.Log; - -public class TvOutService extends Service { - - public static final String TAG = "TvOutService_java"; - - private Tvout mTvOut; - private boolean mWasOn = false; // For enabling on screen on - - private BroadcastReceiver mReceiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - String action = intent.getAction(); - if (Intent.ACTION_HDMI_AUDIO_PLUG.equals(action)) { - getTvoutInstance(); - int state = intent.getIntExtra("state", 0); - if (state == 1 && !mTvOut.getStatus()) { - // Enable when cable is plugged - Log.i(TAG, "HDMI plugged"); - mWasOn = false; - enable(); - } else if (mTvOut.getStatus()) { - // Disable when cable is unplugged - Log.i(TAG, "HDMI unplugged"); - mWasOn = false; - disable(); - releaseTvout(); - } - } else if (Intent.ACTION_SCREEN_ON.equals(action)) { - if (mTvOut != null && mWasOn) { - Log.i(TAG, "Screen On - Resume TvOut stream"); - mWasOn = false; - mTvOut.setSuspendStatus(false); - } - } else if (Intent.ACTION_SCREEN_OFF.equals(action)) { - if (mTvOut != null && mTvOut.getStatus()) { - Log.i(TAG, "Screen Off - Pausing TvOut stream"); - mWasOn = true; - mTvOut.setSuspendStatus(true); - } - } - } - - }; - - @Override - public IBinder onBind(Intent intent) { - return null; - } - - @Override - public void onCreate() { - IntentFilter filter = new IntentFilter(Intent.ACTION_HDMI_AUDIO_PLUG); - filter.addAction(Intent.ACTION_SCREEN_OFF); - filter.addAction(Intent.ACTION_SCREEN_ON); - registerReceiver(mReceiver, filter); - Log.i(TAG, "Registered Receiver"); - } - - @Override - public int onStartCommand(Intent intent, int flags, int startId) { - return START_STICKY; - } - - private boolean getTvoutInstance() { - if (mTvOut != null) return true; - - try { - mTvOut = new Tvout(); - } catch (Exception e) { - return false; - } - - return true; - } - - private void releaseTvout() { - if (mTvOut != null) { - mTvOut.release(); - mTvOut = null; - } - } - - @Override - public void onDestroy() { - unregisterReceiver(mReceiver); - releaseTvout(); - super.onDestroy(); - } - - private void enable() { - if (mTvOut == null) return; - mTvOut.setStatus(true); - mTvOut.setCableStatus(true); - mTvOut.setSuspendStatus(false); - } - - private void disable() { - if (mTvOut == null) return; - mTvOut.setStatus(false); - mTvOut.setCableStatus(false); - } - -} |