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

Commit a0936c7b authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Fix lint errors in the streaming API" am: fa7e99dd am: ac9893bb am: 0d73e034

am: 23566e82

Change-Id: I5308524da670b829ef8da474bfaee5d60caa6d86
parents 8529200a 23566e82
Loading
Loading
Loading
Loading
+17 −20
Original line number Diff line number Diff line
@@ -39888,11 +39888,12 @@ package android.telephony {
  }
  public class MbmsStreamingManager {
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, int) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, int, android.os.Handler) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, android.os.Handler) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback) throws android.telephony.mbms.MbmsException;
    method public void dispose();
    method public void getStreamingServices(java.util.List<java.lang.String>) throws android.telephony.mbms.MbmsException;
    method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, android.telephony.mbms.StreamingServiceCallback) throws android.telephony.mbms.MbmsException;
    method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, android.telephony.mbms.StreamingServiceCallback, android.os.Handler) throws android.telephony.mbms.MbmsException;
  }
  public class NeighboringCellInfo implements android.os.Parcelable {
@@ -40532,7 +40533,6 @@ package android.telephony.mbms {
  }
  public static class MbmsException.GeneralErrors {
    ctor public MbmsException.GeneralErrors();
    field public static final int ERROR_CARRIER_CHANGE_NOT_ALLOWED = 207; // 0xcf
    field public static final int ERROR_IN_E911 = 204; // 0xcc
    field public static final int ERROR_MIDDLEWARE_NOT_YET_READY = 201; // 0xc9
@@ -40543,36 +40543,31 @@ package android.telephony.mbms {
  }
  public static class MbmsException.InitializationErrors {
    ctor public MbmsException.InitializationErrors();
    field public static final int ERROR_APP_PERMISSIONS_NOT_GRANTED = 102; // 0x66
    field public static final int ERROR_DUPLICATE_INITIALIZE = 101; // 0x65
    field public static final int ERROR_UNABLE_TO_INITIALIZE = 103; // 0x67
  }
  public static class MbmsException.StreamingErrors {
    ctor public MbmsException.StreamingErrors();
    field public static final int ERROR_CONCURRENT_SERVICE_LIMIT_REACHED = 301; // 0x12d
    field public static final int ERROR_DUPLICATE_START_STREAM = 303; // 0x12f
    field public static final int ERROR_UNABLE_TO_START_SERVICE = 302; // 0x12e
  }
  public class MbmsStreamingManagerCallback extends android.os.Binder {
  public class MbmsStreamingManagerCallback {
    ctor public MbmsStreamingManagerCallback();
    method public void error(int, java.lang.String) throws android.os.RemoteException;
    method public void middlewareReady() throws android.os.RemoteException;
    method public void streamingServicesUpdated(java.util.List<android.telephony.mbms.StreamingServiceInfo>) throws android.os.RemoteException;
    method public void onError(int, java.lang.String);
    method public void onMiddlewareReady();
    method public void onStreamingServicesUpdated(java.util.List<android.telephony.mbms.StreamingServiceInfo>);
  }
  public class ServiceInfo implements android.os.Parcelable {
    method public int describeContents();
  public class ServiceInfo {
    method public java.lang.String getClassName();
    method public java.util.List<java.util.Locale> getLocales();
    method public java.util.Map<java.util.Locale, java.lang.String> getNames();
    method public java.lang.String getServiceId();
    method public java.util.Date getSessionEndTime();
    method public java.util.Date getSessionStartTime();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.mbms.ServiceInfo> CREATOR;
  }
  public class StreamingService {
@@ -40594,17 +40589,19 @@ package android.telephony.mbms {
    field public static final int UNICAST_METHOD = 2; // 0x2
  }
  public class StreamingServiceCallback extends android.os.Binder {
  public class StreamingServiceCallback {
    ctor public StreamingServiceCallback();
    method public void broadcastSignalStrengthUpdated(int) throws android.os.RemoteException;
    method public void error(int, java.lang.String) throws android.os.RemoteException;
    method public void mediaDescriptionUpdated() throws android.os.RemoteException;
    method public void streamMethodUpdated(int) throws android.os.RemoteException;
    method public void streamStateUpdated(int, int) throws android.os.RemoteException;
    method public void onBroadcastSignalStrengthUpdated(int);
    method public void onError(int, java.lang.String);
    method public void onMediaDescriptionUpdated();
    method public void onStreamMethodUpdated(int);
    method public void onStreamStateUpdated(int, int);
    field public static final int SIGNAL_STRENGTH_UNAVAILABLE = -1; // 0xffffffff
  }
  public class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable {
  public final class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.mbms.StreamingServiceInfo> CREATOR;
  }
+18 −20
Original line number Diff line number Diff line
@@ -43327,11 +43327,12 @@ package android.telephony {
  }
  public class MbmsStreamingManager {
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, int) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, int, android.os.Handler) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, android.os.Handler) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback) throws android.telephony.mbms.MbmsException;
    method public void dispose();
    method public void getStreamingServices(java.util.List<java.lang.String>) throws android.telephony.mbms.MbmsException;
    method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, android.telephony.mbms.StreamingServiceCallback) throws android.telephony.mbms.MbmsException;
    method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, android.telephony.mbms.StreamingServiceCallback, android.os.Handler) throws android.telephony.mbms.MbmsException;
    field public static final java.lang.String MBMS_STREAMING_SERVICE_ACTION = "android.telephony.action.EmbmsStreaming";
  }
@@ -44089,7 +44090,6 @@ package android.telephony.mbms {
  }
  public static class MbmsException.GeneralErrors {
    ctor public MbmsException.GeneralErrors();
    field public static final int ERROR_CARRIER_CHANGE_NOT_ALLOWED = 207; // 0xcf
    field public static final int ERROR_IN_E911 = 204; // 0xcc
    field public static final int ERROR_MIDDLEWARE_NOT_YET_READY = 201; // 0xc9
@@ -44100,36 +44100,31 @@ package android.telephony.mbms {
  }
  public static class MbmsException.InitializationErrors {
    ctor public MbmsException.InitializationErrors();
    field public static final int ERROR_APP_PERMISSIONS_NOT_GRANTED = 102; // 0x66
    field public static final int ERROR_DUPLICATE_INITIALIZE = 101; // 0x65
    field public static final int ERROR_UNABLE_TO_INITIALIZE = 103; // 0x67
  }
  public static class MbmsException.StreamingErrors {
    ctor public MbmsException.StreamingErrors();
    field public static final int ERROR_CONCURRENT_SERVICE_LIMIT_REACHED = 301; // 0x12d
    field public static final int ERROR_DUPLICATE_START_STREAM = 303; // 0x12f
    field public static final int ERROR_UNABLE_TO_START_SERVICE = 302; // 0x12e
  }
  public class MbmsStreamingManagerCallback extends android.os.Binder {
  public class MbmsStreamingManagerCallback {
    ctor public MbmsStreamingManagerCallback();
    method public void error(int, java.lang.String) throws android.os.RemoteException;
    method public void middlewareReady() throws android.os.RemoteException;
    method public void streamingServicesUpdated(java.util.List<android.telephony.mbms.StreamingServiceInfo>) throws android.os.RemoteException;
    method public void onError(int, java.lang.String);
    method public void onMiddlewareReady();
    method public void onStreamingServicesUpdated(java.util.List<android.telephony.mbms.StreamingServiceInfo>);
  }
  public class ServiceInfo implements android.os.Parcelable {
    method public int describeContents();
  public class ServiceInfo {
    method public java.lang.String getClassName();
    method public java.util.List<java.util.Locale> getLocales();
    method public java.util.Map<java.util.Locale, java.lang.String> getNames();
    method public java.lang.String getServiceId();
    method public java.util.Date getSessionEndTime();
    method public java.util.Date getSessionStartTime();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.mbms.ServiceInfo> CREATOR;
  }
  public class StreamingService {
@@ -44151,18 +44146,20 @@ package android.telephony.mbms {
    field public static final int UNICAST_METHOD = 2; // 0x2
  }
  public class StreamingServiceCallback extends android.os.Binder {
  public class StreamingServiceCallback {
    ctor public StreamingServiceCallback();
    method public void broadcastSignalStrengthUpdated(int) throws android.os.RemoteException;
    method public void error(int, java.lang.String) throws android.os.RemoteException;
    method public void mediaDescriptionUpdated() throws android.os.RemoteException;
    method public void streamMethodUpdated(int) throws android.os.RemoteException;
    method public void streamStateUpdated(int, int) throws android.os.RemoteException;
    method public void onBroadcastSignalStrengthUpdated(int);
    method public void onError(int, java.lang.String);
    method public void onMediaDescriptionUpdated();
    method public void onStreamMethodUpdated(int);
    method public void onStreamStateUpdated(int, int);
    field public static final int SIGNAL_STRENGTH_UNAVAILABLE = -1; // 0xffffffff
  }
  public class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable {
  public final class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable {
    ctor public StreamingServiceInfo(java.util.Map<java.util.Locale, java.lang.String>, java.lang.String, java.util.List<java.util.Locale>, java.lang.String, java.util.Date, java.util.Date);
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.mbms.StreamingServiceInfo> CREATOR;
  }
@@ -44177,6 +44174,7 @@ package android.telephony.mbms.vendor {
    method public android.net.Uri getPlaybackUri(int, java.lang.String) throws android.os.RemoteException;
    method public int getStreamingServices(int, java.util.List<java.lang.String>) throws android.os.RemoteException;
    method public int initialize(android.telephony.mbms.MbmsStreamingManagerCallback, int) throws android.os.RemoteException;
    method public void onAppCallbackDied(int, int);
    method public int startStreaming(int, java.lang.String, android.telephony.mbms.StreamingServiceCallback) throws android.os.RemoteException;
    method public void stopStreaming(int, java.lang.String) throws android.os.RemoteException;
  }
+17 −20
Original line number Diff line number Diff line
@@ -40147,11 +40147,12 @@ package android.telephony {
  }
  public class MbmsStreamingManager {
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, int) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, int, android.os.Handler) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback, android.os.Handler) throws android.telephony.mbms.MbmsException;
    method public static android.telephony.MbmsStreamingManager create(android.content.Context, android.telephony.mbms.MbmsStreamingManagerCallback) throws android.telephony.mbms.MbmsException;
    method public void dispose();
    method public void getStreamingServices(java.util.List<java.lang.String>) throws android.telephony.mbms.MbmsException;
    method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, android.telephony.mbms.StreamingServiceCallback) throws android.telephony.mbms.MbmsException;
    method public android.telephony.mbms.StreamingService startStreaming(android.telephony.mbms.StreamingServiceInfo, android.telephony.mbms.StreamingServiceCallback, android.os.Handler) throws android.telephony.mbms.MbmsException;
  }
  public class NeighboringCellInfo implements android.os.Parcelable {
@@ -40791,7 +40792,6 @@ package android.telephony.mbms {
  }
  public static class MbmsException.GeneralErrors {
    ctor public MbmsException.GeneralErrors();
    field public static final int ERROR_CARRIER_CHANGE_NOT_ALLOWED = 207; // 0xcf
    field public static final int ERROR_IN_E911 = 204; // 0xcc
    field public static final int ERROR_MIDDLEWARE_NOT_YET_READY = 201; // 0xc9
@@ -40802,36 +40802,31 @@ package android.telephony.mbms {
  }
  public static class MbmsException.InitializationErrors {
    ctor public MbmsException.InitializationErrors();
    field public static final int ERROR_APP_PERMISSIONS_NOT_GRANTED = 102; // 0x66
    field public static final int ERROR_DUPLICATE_INITIALIZE = 101; // 0x65
    field public static final int ERROR_UNABLE_TO_INITIALIZE = 103; // 0x67
  }
  public static class MbmsException.StreamingErrors {
    ctor public MbmsException.StreamingErrors();
    field public static final int ERROR_CONCURRENT_SERVICE_LIMIT_REACHED = 301; // 0x12d
    field public static final int ERROR_DUPLICATE_START_STREAM = 303; // 0x12f
    field public static final int ERROR_UNABLE_TO_START_SERVICE = 302; // 0x12e
  }
  public class MbmsStreamingManagerCallback extends android.os.Binder {
  public class MbmsStreamingManagerCallback {
    ctor public MbmsStreamingManagerCallback();
    method public void error(int, java.lang.String) throws android.os.RemoteException;
    method public void middlewareReady() throws android.os.RemoteException;
    method public void streamingServicesUpdated(java.util.List<android.telephony.mbms.StreamingServiceInfo>) throws android.os.RemoteException;
    method public void onError(int, java.lang.String);
    method public void onMiddlewareReady();
    method public void onStreamingServicesUpdated(java.util.List<android.telephony.mbms.StreamingServiceInfo>);
  }
  public class ServiceInfo implements android.os.Parcelable {
    method public int describeContents();
  public class ServiceInfo {
    method public java.lang.String getClassName();
    method public java.util.List<java.util.Locale> getLocales();
    method public java.util.Map<java.util.Locale, java.lang.String> getNames();
    method public java.lang.String getServiceId();
    method public java.util.Date getSessionEndTime();
    method public java.util.Date getSessionStartTime();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.mbms.ServiceInfo> CREATOR;
  }
  public class StreamingService {
@@ -40853,17 +40848,19 @@ package android.telephony.mbms {
    field public static final int UNICAST_METHOD = 2; // 0x2
  }
  public class StreamingServiceCallback extends android.os.Binder {
  public class StreamingServiceCallback {
    ctor public StreamingServiceCallback();
    method public void broadcastSignalStrengthUpdated(int) throws android.os.RemoteException;
    method public void error(int, java.lang.String) throws android.os.RemoteException;
    method public void mediaDescriptionUpdated() throws android.os.RemoteException;
    method public void streamMethodUpdated(int) throws android.os.RemoteException;
    method public void streamStateUpdated(int, int) throws android.os.RemoteException;
    method public void onBroadcastSignalStrengthUpdated(int);
    method public void onError(int, java.lang.String);
    method public void onMediaDescriptionUpdated();
    method public void onStreamMethodUpdated(int);
    method public void onStreamStateUpdated(int, int);
    field public static final int SIGNAL_STRENGTH_UNAVAILABLE = -1; // 0xffffffff
  }
  public class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable {
  public final class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable {
    method public int describeContents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.mbms.StreamingServiceInfo> CREATOR;
  }
+49 −17

File changed.

Preview size limit exceeded, changes collapsed.

+72 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License
 */

package android.telephony.mbms;

import android.os.Handler;
import android.os.RemoteException;
import android.telephony.mbms.IMbmsStreamingManagerCallback;
import android.telephony.mbms.MbmsStreamingManagerCallback;
import android.telephony.mbms.StreamingServiceInfo;

import java.util.List;

/** @hide */
public class InternalStreamingManagerCallback extends IMbmsStreamingManagerCallback.Stub {
    private final Handler mHandler;
    private final MbmsStreamingManagerCallback mAppCallback;

    public InternalStreamingManagerCallback(MbmsStreamingManagerCallback appCallback,
            Handler handler) {
        mAppCallback = appCallback;
        mHandler = handler;
    }

    @Override
    public void error(int errorCode, String message) throws RemoteException {
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mAppCallback.onError(errorCode, message);
            }
        });
    }

    @Override
    public void streamingServicesUpdated(List<StreamingServiceInfo> services)
            throws RemoteException {
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mAppCallback.onStreamingServicesUpdated(services);
            }
        });
    }

    @Override
    public void middlewareReady() throws RemoteException {
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                mAppCallback.onMiddlewareReady();
            }
        });
    }

    public Handler getHandler() {
        return mHandler;
    }
}
Loading