Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: webrtc/sdk/android/api/org/webrtc/DtmfSender.java

Issue 3003213002: Android: Add common function for adding/releasing native reference (Closed)
Patch Set: Rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/sdk/android/BUILD.gn ('k') | webrtc/sdk/android/api/org/webrtc/MediaSource.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 /** 64 /**
65 * @return The current value of the between-tone gap in ms. This value will be the value last set 65 * @return The current value of the between-tone gap in ms. This value will be the value last set
66 * via the insertDtmf() method, or the default value of 50 ms if inser tDtmf() was never 66 * via the insertDtmf() method, or the default value of 50 ms if inser tDtmf() was never
67 * called. 67 * called.
68 */ 68 */
69 public int interToneGap() { 69 public int interToneGap() {
70 return nativeInterToneGap(nativeDtmfSender); 70 return nativeInterToneGap(nativeDtmfSender);
71 } 71 }
72 72
73 public void dispose() { 73 public void dispose() {
74 free(nativeDtmfSender); 74 JniCommon.nativeReleaseRef(nativeDtmfSender);
75 } 75 }
76 76
77 private static native boolean nativeCanInsertDtmf(long nativeDtmfSender); 77 private static native boolean nativeCanInsertDtmf(long nativeDtmfSender);
78 private static native boolean nativeInsertDtmf( 78 private static native boolean nativeInsertDtmf(
79 long nativeDtmfSender, String tones, int duration, int interToneGap); 79 long nativeDtmfSender, String tones, int duration, int interToneGap);
80 private static native String nativeTones(long nativeDtmfSender); 80 private static native String nativeTones(long nativeDtmfSender);
81 private static native int nativeDuration(long nativeDtmfSender); 81 private static native int nativeDuration(long nativeDtmfSender);
82 private static native int nativeInterToneGap(long nativeDtmfSender); 82 private static native int nativeInterToneGap(long nativeDtmfSender);
83 private static native void free(long nativeDtmfSender);
84 }; 83 };
OLDNEW
« no previous file with comments | « webrtc/sdk/android/BUILD.gn ('k') | webrtc/sdk/android/api/org/webrtc/MediaSource.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698