Java Code Examples for android.os.Parcel#enforceInterface()
The following examples show how to use
android.os.Parcel#enforceInterface() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdvertisingId.java From unity-ads-android with Apache License 2.0 | 6 votes |
@SuppressWarnings("NullableProblems") public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case 1: data.enforceInterface(ADVERTISING_ID_SERVICE_NAME); String str1 = getId(); reply.writeNoException(); reply.writeString(str1); return true; case 2: data.enforceInterface(ADVERTISING_ID_SERVICE_NAME); boolean bool1 = 0 != data.readInt(); boolean bool2 = getEnabled(bool1); reply.writeNoException(); reply.writeInt(bool2 ? 1 : 0); return true; } return super.onTransact(code, data, reply, flags); }
Example 2
Source File: IWatchFaceService.java From AndroidWear-OpenWear with MIT License | 6 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case 1598968902: reply.writeString("android.support.wearable.watchface.IWatchFaceService"); return true; case 1: data.enforceInterface("android.support.wearable.watchface.IWatchFaceService"); WatchFaceStyle _arg0; if (0 != data.readInt()) { _arg0 = WatchFaceStyle.CREATOR.createFromParcel(data); } else { _arg0 = null; } setStyle(_arg0); reply.writeNoException(); return true; } return super.onTransact(code, data, reply, flags); }
Example 3
Source File: CommonClock.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
@Override protected boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case METHOD_CBK_ON_TIMELINE_CHANGED: data.enforceInterface(DESCRIPTOR); long timelineId = data.readLong(); synchronized (mListenerLock) { if (null != mTimelineChangedListener) mTimelineChangedListener.onTimelineChanged(timelineId); } return true; } return super.onTransact(code, data, reply, flags); }
Example 4
Source File: IStatService.java From MiPushFramework with GNU General Public License v3.0 | 5 votes |
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { switch (i) { case 1: parcel.enforceInterface("com.xiaomi.xmsf.push.service.IStatService"); insertEvent(parcel.readString()); parcel2.writeNoException(); return true; case 1598968902: parcel2.writeString("com.xiaomi.xmsf.push.service.IStatService"); return true; default: return super.onTransact(i, parcel, parcel2, i2); } }
Example 5
Source File: IPostMessageService.java From Telegram with GNU General Public License v2.0 | 5 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { ICustomTabsCallback _arg0; switch(code) { case 2: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); Bundle _arg11; if(0 != data.readInt()) { _arg11 = Bundle.CREATOR.createFromParcel(data); } else { _arg11 = null; } this.onMessageChannelReady(_arg0, _arg11); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); String _arg1 = data.readString(); Bundle _arg2; if(0 != data.readInt()) { _arg2 = Bundle.CREATOR.createFromParcel(data); } else { _arg2 = null; } this.onPostMessage(_arg0, _arg1, _arg2); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.IPostMessageService"); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 6
Source File: IPostMessageService.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { ICustomTabsCallback _arg0; switch(code) { case 2: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); Bundle _arg11; if(0 != data.readInt()) { _arg11 = Bundle.CREATOR.createFromParcel(data); } else { _arg11 = null; } this.onMessageChannelReady(_arg0, _arg11); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); String _arg1 = data.readString(); Bundle _arg2; if(0 != data.readInt()) { _arg2 = Bundle.CREATOR.createFromParcel(data); } else { _arg2 = null; } this.onPostMessage(_arg0, _arg1, _arg2); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.IPostMessageService"); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 7
Source File: RemoteSSO$Stub.java From MiBandDecompiled with Apache License 2.0 | 5 votes |
public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) { switch (i) { default: return super.onTransact(i, parcel, parcel1, j); case 1598968902: parcel1.writeString("com.sina.sso.RemoteSSO"); return true; case 1: // '\001' parcel.enforceInterface("com.sina.sso.RemoteSSO"); String s2 = getPackageName(); parcel1.writeNoException(); parcel1.writeString(s2); return true; case 2: // '\002' parcel.enforceInterface("com.sina.sso.RemoteSSO"); String s1 = getActivityName(); parcel1.writeNoException(); parcel1.writeString(s1); return true; case 3: // '\003' parcel.enforceInterface("com.sina.sso.RemoteSSO"); String s = getLoginUserName(); parcel1.writeNoException(); parcel1.writeString(s); return true; } }
Example 8
Source File: BookManagerImpl.java From android-art-res with Apache License 2.0 | 5 votes |
@Override public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case INTERFACE_TRANSACTION: { reply.writeString(DESCRIPTOR); return true; } case TRANSACTION_getBookList: { data.enforceInterface(DESCRIPTOR); List<Book> result = this.getBookList(); reply.writeNoException(); reply.writeTypedList(result); return true; } case TRANSACTION_addBook: { data.enforceInterface(DESCRIPTOR); Book arg0; if ((0 != data.readInt())) { arg0 = Book.CREATOR.createFromParcel(data); } else { arg0 = null; } this.addBook(arg0); reply.writeNoException(); return true; } } return super.onTransact(code, data, reply, flags); }
Example 9
Source File: IHttpService.java From MiPushFramework with GNU General Public License v3.0 | 5 votes |
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { switch (i) { case 1: parcel.enforceInterface("com.xiaomi.xmsf.push.service.IHttpService"); String doHttpPost = doHttpPost(parcel.readString(), parcel.readHashMap(getClass().getClassLoader())); parcel2.writeNoException(); parcel2.writeString(doHttpPost); return true; case 1598968902: parcel2.writeString("com.xiaomi.xmsf.push.service.IHttpService"); return true; default: return super.onTransact(i, parcel, parcel2, i2); } }
Example 10
Source File: BookManagerImpl.java From VirtualAPK with Apache License 2.0 | 5 votes |
@Override public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case INTERFACE_TRANSACTION: { reply.writeString(DESCRIPTOR); return true; } case TRANSACTION_getBookList: { data.enforceInterface(DESCRIPTOR); List<Book> result = this.getBookList(); reply.writeNoException(); reply.writeTypedList(result); return true; } case TRANSACTION_addBook: { data.enforceInterface(DESCRIPTOR); Book arg0; if ((0 != data.readInt())) { arg0 = Book.CREATOR.createFromParcel(data); } else { arg0 = null; } this.addBook(arg0); reply.writeNoException(); return true; } } return super.onTransact(code, data, reply, flags); }
Example 11
Source File: IDownloadService.java From letv with Apache License 2.0 | 5 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case 1: data.enforceInterface(DESCRIPTOR); synRemoveDownload(data.readLong()); reply.writeNoException(); return true; case 1598968902: reply.writeString(DESCRIPTOR); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 12
Source File: IPostMessageService.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { ICustomTabsCallback _arg0; switch(code) { case 2: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); Bundle _arg11; if(0 != data.readInt()) { _arg11 = Bundle.CREATOR.createFromParcel(data); } else { _arg11 = null; } this.onMessageChannelReady(_arg0, _arg11); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); String _arg1 = data.readString(); Bundle _arg2; if(0 != data.readInt()) { _arg2 = Bundle.CREATOR.createFromParcel(data); } else { _arg2 = null; } this.onPostMessage(_arg0, _arg1, _arg2); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.IPostMessageService"); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 13
Source File: IPostMessageService.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { ICustomTabsCallback _arg0; switch(code) { case 2: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); Bundle _arg11; if(0 != data.readInt()) { _arg11 = Bundle.CREATOR.createFromParcel(data); } else { _arg11 = null; } this.onMessageChannelReady(_arg0, _arg11); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.IPostMessageService"); _arg0 = ICustomTabsCallback.Stub.asInterface(data.readStrongBinder()); String _arg1 = data.readString(); Bundle _arg2; if(0 != data.readInt()) { _arg2 = Bundle.CREATOR.createFromParcel(data); } else { _arg2 = null; } this.onPostMessage(_arg0, _arg1, _arg2); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.IPostMessageService"); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 14
Source File: AIDLActivity.java From letv with Apache License 2.0 | 4 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case 1: data.enforceInterface(DESCRIPTOR); onResult(data.readInt(), data.readString()); reply.writeNoException(); return true; case 2: data.enforceInterface(DESCRIPTOR); onResLoadBalance(data.readInt(), data.readString()); reply.writeNoException(); return true; case 3: data.enforceInterface(DESCRIPTOR); onResInitDevice(data.readInt(), data.readString()); reply.writeNoException(); return true; case 4: data.enforceInterface(DESCRIPTOR); onResDevices(data.readInt(), data.readString()); reply.writeNoException(); return true; case 5: data.enforceInterface(DESCRIPTOR); onResPush(data.readInt(), data.readString()); reply.writeNoException(); return true; case 6: data.enforceInterface(DESCRIPTOR); onError(data.readString()); reply.writeNoException(); return true; case 7: data.enforceInterface(DESCRIPTOR); quit(); reply.writeNoException(); return true; case 1598968902: reply.writeString(DESCRIPTOR); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 15
Source File: ICdeBinder.java From letv with Apache License 2.0 | 4 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { String _result; long _result2; switch (code) { case 1: data.enforceInterface(DESCRIPTOR); boolean _result3 = isCdeReady(); reply.writeNoException(); reply.writeInt(_result3 ? 1 : 0); return true; case 2: data.enforceInterface(DESCRIPTOR); _result = getCdeVersion(); reply.writeNoException(); reply.writeString(_result); return true; case 3: data.enforceInterface(DESCRIPTOR); _result2 = getCdePort(); reply.writeNoException(); reply.writeLong(_result2); return true; case 4: data.enforceInterface(DESCRIPTOR); _result = getCacheUrlWithData(data.readString(), data.readString(), data.readString(), data.readString()); reply.writeNoException(); reply.writeString(_result); return true; case 5: data.enforceInterface(DESCRIPTOR); _result2 = getStateLastReceiveSpeed(data.readString()); reply.writeNoException(); reply.writeLong(_result2); return true; case 6: data.enforceInterface(DESCRIPTOR); _result2 = getStateUrgentReceiveSpeed(data.readString()); reply.writeNoException(); reply.writeLong(_result2); return true; case 7: data.enforceInterface(DESCRIPTOR); _result2 = getStateTotalDuration(data.readString()); reply.writeNoException(); reply.writeLong(_result2); return true; case 8: data.enforceInterface(DESCRIPTOR); _result2 = getStateDownloadedDuration(data.readString()); reply.writeNoException(); reply.writeLong(_result2); return true; case 9: data.enforceInterface(DESCRIPTOR); double _result4 = getStateDownloadedPercent(data.readString()); reply.writeNoException(); reply.writeDouble(_result4); return true; case 10: data.enforceInterface(DESCRIPTOR); setChannelSeekPosition(data.readString(), data.readDouble()); reply.writeNoException(); return true; case 11: data.enforceInterface(DESCRIPTOR); int _result5 = getUpgradePercentage(); reply.writeNoException(); reply.writeInt(_result5); return true; case 12: data.enforceInterface(DESCRIPTOR); startUpgrade(); reply.writeNoException(); return true; case 13: data.enforceInterface(DESCRIPTOR); notifyNetworkChanged(data.readInt(), data.readString()); reply.writeNoException(); return true; case 1598968902: reply.writeString(DESCRIPTOR); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 16
Source File: ICustomTabsCallback.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { String _arg0; Bundle _arg1; switch(code) { case 2: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); int _arg02 = data.readInt(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onNavigationEvent(_arg02, _arg1); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.extraCallback(_arg0, _arg1); reply.writeNoException(); return true; case 4: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); Bundle _arg01; if(0 != data.readInt()) { _arg01 = Bundle.CREATOR.createFromParcel(data); } else { _arg01 = null; } this.onMessageChannelReady(_arg01); reply.writeNoException(); return true; case 5: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onPostMessage(_arg0, _arg1); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.ICustomTabsCallback"); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 17
Source File: ICustomTabsCallback.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { String _arg0; Bundle _arg1; switch(code) { case 2: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); int _arg02 = data.readInt(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onNavigationEvent(_arg02, _arg1); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.extraCallback(_arg0, _arg1); reply.writeNoException(); return true; case 4: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); Bundle _arg01; if(0 != data.readInt()) { _arg01 = Bundle.CREATOR.createFromParcel(data); } else { _arg01 = null; } this.onMessageChannelReady(_arg01); reply.writeNoException(); return true; case 5: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onPostMessage(_arg0, _arg1); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.ICustomTabsCallback"); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 18
Source File: ICustomTabsCallback.java From Telegram with GNU General Public License v2.0 | 4 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { String _arg0; Bundle _arg1; switch(code) { case 2: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); int _arg02 = data.readInt(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onNavigationEvent(_arg02, _arg1); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.extraCallback(_arg0, _arg1); reply.writeNoException(); return true; case 4: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); Bundle _arg01; if(0 != data.readInt()) { _arg01 = Bundle.CREATOR.createFromParcel(data); } else { _arg01 = null; } this.onMessageChannelReady(_arg01); reply.writeNoException(); return true; case 5: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onPostMessage(_arg0, _arg1); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.ICustomTabsCallback"); return true; default: return super.onTransact(code, data, reply, flags); } }
Example 19
Source File: ICustomTabsCallback.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { String _arg0; Bundle _arg1; switch(code) { case 2: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); int _arg02 = data.readInt(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onNavigationEvent(_arg02, _arg1); reply.writeNoException(); return true; case 3: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.extraCallback(_arg0, _arg1); reply.writeNoException(); return true; case 4: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); Bundle _arg01; if(0 != data.readInt()) { _arg01 = Bundle.CREATOR.createFromParcel(data); } else { _arg01 = null; } this.onMessageChannelReady(_arg01); reply.writeNoException(); return true; case 5: data.enforceInterface("android.support.customtabs.ICustomTabsCallback"); _arg0 = data.readString(); if(0 != data.readInt()) { _arg1 = Bundle.CREATOR.createFromParcel(data); } else { _arg1 = null; } this.onPostMessage(_arg0, _arg1); reply.writeNoException(); return true; case 1598968902: reply.writeString("android.support.customtabs.ICustomTabsCallback"); return true; default: return super.onTransact(code, data, reply, flags); } }