Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fe3c09a authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Improve new Cast bindings

parent 718b9071
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -40,23 +40,19 @@ public class WebImage extends AutoSafeParcelable {
    @SafeParceled(4)
    private final int height = 0;

    public Uri getUrl()
    {
    public Uri getUrl() {
        return uri;
    }

    public int getWidth()
    {
    public int getWidth() {
        return width;
    }

    public int getHeight()
    {
    public int getHeight() {
        return height;
    }

    public String toString()
    {
    public String toString() {
        return String.format("Image %dx%d %s", new Object[]{Integer.valueOf(width), Integer.valueOf(height), uri.toString()});
    }
}
+10 −0
Original line number Diff line number Diff line
package com.google.android.gms.cast.framework;

import com.google.android.gms.dynamic.IObjectWrapper;

interface IAppVisibilityListener {
    IObjectWrapper getThisObject() = 0;
    void onAppEnteredForeground() = 1;
    void onAppEnteredBackground() = 2;
    int getSupportedVersion() = 3;
}
 No newline at end of file
+5 −1
Original line number Diff line number Diff line
package com.google.android.gms.cast.framework;

interface ICastConnectionController {

    void joinApplication(String applicationId, String sessionId) = 0;
    //void launchApplication(String applicationId, LaunchOptions options) = 1;
    void stopApplication(String sessionId) = 2;
    //void unknown(int i) = 3;
    int getSupportedVersion() = 4;
}
 No newline at end of file
+7 −7
Original line number Diff line number Diff line
package com.google.android.gms.cast.framework;

import com.google.android.gms.cast.framework.IAppVisibilityListener;
import com.google.android.gms.cast.framework.ISessionManager;
import com.google.android.gms.cast.framework.IDiscoveryManager;
import com.google.android.gms.dynamic.IObjectWrapper;
@@ -7,14 +8,13 @@ import com.google.android.gms.dynamic.IObjectWrapper;
interface ICastContext {
    Bundle getMergedSelectorAsBundle() = 0;
    boolean isApplicationVisible() = 1;
    //void removeAppVisibilityListener(IAppVisibilityListener listener) = 2;
    //void addAppVisibilityListener(IAppVisibilityListener listener) = 3;
    void addVisibilityChangeListener(IAppVisibilityListener listener) = 2;
    void removeVisibilityChangeListener(IAppVisibilityListener listener) = 3;
    ISessionManager getSessionManagerImpl() = 4;
    IDiscoveryManager getDiscoveryManagerImpl() = 5;

    void destroy() = 6;
    void onActivityResumed(in IObjectWrapper activity) = 7;
    void onActivityPaused(in IObjectWrapper activity) = 8;
    void destroy() = 6; // deprecated?
    void onActivityResumed(in IObjectWrapper activity) = 7; // deprecated?
    void onActivityPaused(in IObjectWrapper activity) = 8; // deprecated?
    IObjectWrapper getWrappedThis() = 9;
    void unknown(String s1, in Map m1) = 10; // TODO
    void setReceiverApplicationId(String receiverApplicationId, in Map/*<String, IBinder>*/ sessionProvidersByCategory) = 10;
}
+1 −0
Original line number Diff line number Diff line
@@ -5,4 +5,5 @@ import com.google.android.gms.dynamic.IObjectWrapper;
interface ICastStateListener {
    IObjectWrapper getWrappedThis() = 0;
    void onCastStateChanged(int newState) = 1;
    int getSupportedVersion() = 2;
}
Loading