Android Open Source - tunnel_player_workaround Local Service Binder






From Project

Back to project page tunnel_player_workaround.

License

The source code is released under:

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...

If you think the Android project tunnel_player_workaround listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.h6ah4i.android.utils;
//from w w w . jav  a 2s .  co  m
import java.lang.ref.WeakReference;

import android.os.Binder;

public class LocalServiceBinder<T> extends Binder {
    @SuppressWarnings("unused")
    private static final String TAG = "LocalServiceBinder";
    private final WeakReference<T> mService;

    public LocalServiceBinder(T service) {
        mService = new WeakReference<T>(service);
    }

    public T getService() {
        return mService.get();
    }
}




Java Source Code List

com.h6ah4i.android.example.tunnelplayerworkaround.MainActivity.java
com.h6ah4i.android.example.tunnelplayerworkaround.SimpleVisualizerView.java
com.h6ah4i.android.music_player.MediaPlayerLocalService.java
com.h6ah4i.android.utils.LocalServiceBinder.java