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

Commit ee19cfc3 authored by Hall Liu's avatar Hall Liu
Browse files

Fix lint errors in the streaming API

Fix the errors that cropped up when trying to upload the unhide CL in
MR1.

Bug: 30981736
Test: manual, with testapps
Change-Id: If4a9a5533a235a8cc56762ab7a9e32ec89440f1d
parent 8773730c
Loading
Loading
Loading
Loading
+17 −20
Original line number Diff line number Diff line
@@ -37822,11 +37822,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 {
@@ -38452,7 +38453,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
@@ -38463,36 +38463,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 {
@@ -38514,17 +38509,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
@@ -40993,11 +40993,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";
  }
@@ -41707,7 +41708,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
@@ -41718,36 +41718,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 {
@@ -41769,18 +41764,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;
  }
@@ -41795,6 +41792,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
@@ -37921,11 +37921,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 {
@@ -38551,7 +38552,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
@@ -38562,36 +38562,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 {
@@ -38613,17 +38608,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