From eda8aa1f46d3bccb089fb5e8feea07d7fe6867a0 Mon Sep 17 00:00:00 2001 From: junyulai Date: Fri, 19 Oct 2018 21:14:30 +0800 Subject: [PATCH 1/7] Fix negative uid stats caused by 464xlat adjust when eBPF is on. When using xt_qtaguid to count per uid stats, NetworkStatsService needs to adjust the 464xlat traffic since iptables module would double count for ipv4 and ipv6 packet. But for eBPF, the per uid stats is collected in a different hook, so the adjustment on root uid would only be needed in tx direction. Bug: 112226716 Test: 1. Make ipv4 traffic in ipv6-only network and check data usage. 2. Make ipv4 traffic in a client which connect to ipv6-only hotspot. 3. runtest frameworks-net 4. cts-tradefed run cts -m CtsNetTestCases -t \ android.net.cts.TrafficStatsTest 5. cts-tradefed run cts -m CtsUsageStatsTestCases Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac Merged-In: Ic9a84f5446eddc943c255d5f3b89dad171f53cac (cherry picked from commit c33ac0d43b594f6154accf03ae7e3fd34dedc79d) --- core/java/android/net/NetworkStats.java | 24 ++++-- .../internal/net/NetworkStatsFactory.java | 9 ++- .../server/net/NetworkStatsService.java | 6 +- .../java/android/net/NetworkStatsTest.java | 78 +++++++++++++------ 4 files changed, 82 insertions(+), 35 deletions(-) diff --git a/core/java/android/net/NetworkStats.java b/core/java/android/net/NetworkStats.java index edf9bc1c6b390..4bcc2453689d4 100644 --- a/core/java/android/net/NetworkStats.java +++ b/core/java/android/net/NetworkStats.java @@ -776,14 +776,19 @@ public class NetworkStats implements Parcelable { * packet needs to be subtracted from the root UID on the base interface both for tx * and rx traffic (http://b/12249687, http:/b/33681750). * + * As for eBPF, the per uid stats is collected by different hook, the rx packets on base + * interface will not be counted. Thus, the adjustment on root uid is only needed in tx + * direction. + * *

This method will behave fine if {@code stackedIfaces} is an non-synchronized but add-only * {@code ConcurrentHashMap} * @param baseTraffic Traffic on the base interfaces. Will be mutated. * @param stackedTraffic Stats with traffic stacked on top of our ifaces. Will also be mutated. * @param stackedIfaces Mapping ipv6if -> ipv4if interface where traffic is counted on both. + * @param useBpfStats True if eBPF is in use. */ public static void apply464xlatAdjustments(NetworkStats baseTraffic, - NetworkStats stackedTraffic, Map stackedIfaces) { + NetworkStats stackedTraffic, Map stackedIfaces, boolean useBpfStats) { // Total 464xlat traffic to subtract from uid 0 on all base interfaces. // stackedIfaces may grow afterwards, but NetworkStats will just be resized automatically. final NetworkStats adjustments = new NetworkStats(0, stackedIfaces.size()); @@ -802,15 +807,20 @@ public class NetworkStats implements Parcelable { continue; } // Subtract any 464lat traffic seen for the root UID on the current base interface. + // However, for eBPF, the per uid stats is collected by different hook, the rx packets + // on base interface will not be counted. Thus, the adjustment on root uid is only + // needed in tx direction. adjust.iface = baseIface; - adjust.rxBytes = -(entry.rxBytes + entry.rxPackets * IPV4V6_HEADER_DELTA); + if (!useBpfStats) { + adjust.rxBytes = -(entry.rxBytes + entry.rxPackets * IPV4V6_HEADER_DELTA); + adjust.rxPackets = -entry.rxPackets; + } adjust.txBytes = -(entry.txBytes + entry.txPackets * IPV4V6_HEADER_DELTA); - adjust.rxPackets = -entry.rxPackets; adjust.txPackets = -entry.txPackets; adjustments.combineValues(adjust); - // For 464xlat traffic, xt_qtaguid only counts the bytes of the native IPv4 packet sent - // on the stacked interface with prefix "v4-" and drops the IPv6 header size after + // For 464xlat traffic, per uid stats only counts the bytes of the native IPv4 packet + // sent on the stacked interface with prefix "v4-" and drops the IPv6 header size after // unwrapping. To account correctly for on-the-wire traffic, add the 20 additional bytes // difference for all packets (http://b/12249687, http:/b/33681750). entry.rxBytes += entry.rxPackets * IPV4V6_HEADER_DELTA; @@ -829,8 +839,8 @@ public class NetworkStats implements Parcelable { * base and stacked traffic. * @param stackedIfaces Mapping ipv6if -> ipv4if interface where traffic is counted on both. */ - public void apply464xlatAdjustments(Map stackedIfaces) { - apply464xlatAdjustments(this, this, stackedIfaces); + public void apply464xlatAdjustments(Map stackedIfaces, boolean useBpfStats) { + apply464xlatAdjustments(this, this, stackedIfaces, useBpfStats); } /** diff --git a/core/java/com/android/internal/net/NetworkStatsFactory.java b/core/java/com/android/internal/net/NetworkStatsFactory.java index c4d08c7dc5d60..b3cf389c1bb94 100644 --- a/core/java/com/android/internal/net/NetworkStatsFactory.java +++ b/core/java/com/android/internal/net/NetworkStatsFactory.java @@ -113,11 +113,12 @@ public class NetworkStatsFactory { /** * Applies 464xlat adjustments with ifaces noted with {@link #noteStackedIface(String, String)}. - * @see NetworkStats#apply464xlatAdjustments(NetworkStats, NetworkStats, Map) + * @see NetworkStats#apply464xlatAdjustments(NetworkStats, NetworkStats, Map, boolean) */ public static void apply464xlatAdjustments(NetworkStats baseTraffic, - NetworkStats stackedTraffic) { - NetworkStats.apply464xlatAdjustments(baseTraffic, stackedTraffic, sStackedIfaces); + NetworkStats stackedTraffic, boolean useBpfStats) { + NetworkStats.apply464xlatAdjustments(baseTraffic, stackedTraffic, sStackedIfaces, + useBpfStats); } @VisibleForTesting @@ -263,7 +264,7 @@ public class NetworkStatsFactory { // No locking here: apply464xlatAdjustments behaves fine with an add-only ConcurrentHashMap. // TODO: remove this and only apply adjustments in NetworkStatsService. - stats.apply464xlatAdjustments(sStackedIfaces); + stats.apply464xlatAdjustments(sStackedIfaces, mUseBpfStats); return stats; } diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java index 9bf3874088d7c..17ab29d747905 100644 --- a/services/core/java/com/android/server/net/NetworkStatsService.java +++ b/services/core/java/com/android/server/net/NetworkStatsService.java @@ -1622,7 +1622,8 @@ public class NetworkStatsService extends INetworkStatsService.Stub { // fold tethering stats and operations into uid snapshot final NetworkStats tetherSnapshot = getNetworkStatsTethering(STATS_PER_UID); tetherSnapshot.filter(UID_ALL, ifaces, TAG_ALL); - NetworkStatsFactory.apply464xlatAdjustments(uidSnapshot, tetherSnapshot); + NetworkStatsFactory.apply464xlatAdjustments(uidSnapshot, tetherSnapshot, + mUseBpfTrafficStats); uidSnapshot.combineAllValues(tetherSnapshot); final TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService( @@ -1632,7 +1633,8 @@ public class NetworkStatsService extends INetworkStatsService.Stub { final NetworkStats vtStats = telephonyManager.getVtDataUsage(STATS_PER_UID); if (vtStats != null) { vtStats.filter(UID_ALL, ifaces, TAG_ALL); - NetworkStatsFactory.apply464xlatAdjustments(uidSnapshot, vtStats); + NetworkStatsFactory.apply464xlatAdjustments(uidSnapshot, vtStats, + mUseBpfTrafficStats); uidSnapshot.combineAllValues(vtStats); } diff --git a/tests/net/java/android/net/NetworkStatsTest.java b/tests/net/java/android/net/NetworkStatsTest.java index 8f18d072a0bbb..d6dbf5aaa9d88 100644 --- a/tests/net/java/android/net/NetworkStatsTest.java +++ b/tests/net/java/android/net/NetworkStatsTest.java @@ -39,6 +39,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import android.net.NetworkStats.Entry; import android.os.Process; import android.support.test.runner.AndroidJUnit4; import android.support.test.filters.SmallTest; @@ -785,7 +786,38 @@ public class NetworkStatsTest { ArrayMap stackedIface = new ArrayMap<>(); stackedIface.put(v4Iface, baseIface); - NetworkStats.Entry otherEntry = new NetworkStats.Entry( + // Ipv4 traffic sent/received by an app on stacked interface. + final NetworkStats.Entry appEntry = new NetworkStats.Entry( + v4Iface, appUid, SET_DEFAULT, TAG_NONE, + 30501490 /* rxBytes */, + 22401 /* rxPackets */, + 876235 /* txBytes */, + 13805 /* txPackets */, + 0 /* operations */); + + // Traffic measured for the root uid on the base interface if eBPF is in use. + // Incorrectly includes appEntry's bytes and packets, plus IPv4-IPv6 translation + // overhead (20 bytes per packet), only for TX traffic. + final NetworkStats.Entry ebpfRootUidEntry = new NetworkStats.Entry( + baseIface, rootUid, SET_DEFAULT, TAG_NONE, + 163577 /* rxBytes */, + 187 /* rxPackets */, + 1169942 /* txBytes */, + 13902 /* txPackets */, + 0 /* operations */); + + // Traffic measured for the root uid on the base interface if xt_qtaguid is in use. + // Incorrectly includes appEntry's bytes and packets, plus IPv4-IPv6 translation + // overhead (20 bytes per packet), in both directions. + final NetworkStats.Entry xtRootUidEntry = new NetworkStats.Entry( + baseIface, rootUid, SET_DEFAULT, TAG_NONE, + 31113087 /* rxBytes */, + 22588 /* rxPackets */, + 1169942 /* txBytes */, + 13902 /* txPackets */, + 0 /* operations */); + + final NetworkStats.Entry otherEntry = new NetworkStats.Entry( otherIface, appUid, SET_DEFAULT, TAG_NONE, 2600 /* rxBytes */, 2 /* rxPackets */, @@ -793,39 +825,41 @@ public class NetworkStatsTest { 3 /* txPackets */, 0 /* operations */); - NetworkStats stats = new NetworkStats(TEST_START, 3) - .addValues(v4Iface, appUid, SET_DEFAULT, TAG_NONE, - 30501490 /* rxBytes */, - 22401 /* rxPackets */, - 876235 /* txBytes */, - 13805 /* txPackets */, - 0 /* operations */) - .addValues(baseIface, rootUid, SET_DEFAULT, TAG_NONE, - 31113087, - 22588, - 1169942, - 13902, - 0) + final NetworkStats statsXt = new NetworkStats(TEST_START, 3) + .addValues(appEntry) + .addValues(xtRootUidEntry) .addValues(otherEntry); - stats.apply464xlatAdjustments(stackedIface); + final NetworkStats statsEbpf = new NetworkStats(TEST_START, 3) + .addValues(appEntry) + .addValues(ebpfRootUidEntry) + .addValues(otherEntry); - assertEquals(3, stats.size()); - assertValues(stats, 0, v4Iface, appUid, SET_DEFAULT, TAG_NONE, - METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, + statsXt.apply464xlatAdjustments(stackedIface, false); + statsEbpf.apply464xlatAdjustments(stackedIface, true); + + assertEquals(3, statsXt.size()); + assertEquals(3, statsEbpf.size()); + final NetworkStats.Entry expectedAppUid = new NetworkStats.Entry( + v4Iface, appUid, SET_DEFAULT, TAG_NONE, 30949510, 22401, 1152335, 13805, 0); - assertValues(stats, 1, baseIface, 0, SET_DEFAULT, TAG_NONE, - METERED_NO, ROAMING_NO, DEFAULT_NETWORK_NO, + final NetworkStats.Entry expectedRootUid = new NetworkStats.Entry( + baseIface, 0, SET_DEFAULT, TAG_NONE, 163577, 187, 17607, 97, 0); - assertEquals(otherEntry, stats.getValues(2, null)); + assertEquals(expectedAppUid, statsXt.getValues(0, null)); + assertEquals(expectedRootUid, statsXt.getValues(1, null)); + assertEquals(otherEntry, statsXt.getValues(2, null)); + assertEquals(expectedAppUid, statsEbpf.getValues(0, null)); + assertEquals(expectedRootUid, statsEbpf.getValues(1, null)); + assertEquals(otherEntry, statsEbpf.getValues(2, null)); } @Test @@ -850,7 +884,7 @@ public class NetworkStatsTest { .addValues(secondEntry); // Empty map: no adjustment - stats.apply464xlatAdjustments(new ArrayMap<>()); + stats.apply464xlatAdjustments(new ArrayMap<>(), false); assertEquals(2, stats.size()); assertEquals(firstEntry, stats.getValues(0, null)); From 273eb0918adbc7cd410a583b0d25c518b9b1e35e Mon Sep 17 00:00:00 2001 From: Varun Shah Date: Fri, 26 Oct 2018 17:03:23 -0700 Subject: [PATCH 2/7] RESTRICT AUTOMERGE: Added an app id security check in isAppForeground. ActivityManagerService#isAppForeground now checks if the caller has the permission to view if an app is in the foreground. Bug: 115384617 Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.ActivityManagerTest#testIsAppInForegroundNormal Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.ActivityManagerTest#testIsAppInForegroundMalicious Change-Id: I9602c89b2d40036e525c38960a08326dc74c6682 --- .../com/android/server/am/ActivityManagerService.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index d1496513a3b51..08983b40d4751 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -8781,6 +8781,14 @@ public class ActivityManagerService extends IActivityManager.Stub @Override public boolean isAppForeground(int uid) { + int callerUid = Binder.getCallingUid(); + if (UserHandle.isCore(callerUid) || callerUid == uid) { + return isAppForegroundInternal(uid); + } + return false; + } + + private boolean isAppForegroundInternal(int uid) { synchronized (this) { UidRecord uidRec = mActiveUids.get(uid); if (uidRec == null || uidRec.idle) { From ad02e59ac2cd3e6180e02fd60e6dedd8177c7b6e Mon Sep 17 00:00:00 2001 From: Varun Shah Date: Fri, 26 Oct 2018 17:03:23 -0700 Subject: [PATCH 3/7] RESTRICT AUTOMERGE: Added an app id security check in isAppForeground. ActivityManagerService#isAppForeground now checks if the caller has the permission to view if an app is in the foreground. Bug: 115384617 Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.ActivityManagerTest#testIsAppInForegroundNormal Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.ActivityManagerTest#testIsAppInForegroundMalicious Change-Id: I9602c89b2d40036e525c38960a08326dc74c6682 --- core/java/android/os/UserHandle.java | 13 +++++++++++++ .../android/server/am/ActivityManagerService.java | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index e8ebf6312cdd0..f36cf1ca2befb 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -131,6 +131,19 @@ public final class UserHandle implements Parcelable { } } + /** + * Whether a UID belongs to a system core component or not. + * @hide + */ + public static boolean isCore(int uid) { + if (uid >= 0) { + final int appId = getAppId(uid); + return appId < Process.FIRST_APPLICATION_UID; + } else { + return false; + } + } + /** * Returns the user for a given uid. * @param uid A uid for an application running in a particular user. diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index c4a968e4d86c2..a89015b7ac997 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -7846,6 +7846,14 @@ public class ActivityManagerService extends IActivityManager.Stub @Override public boolean isAppForeground(int uid) throws RemoteException { + int callerUid = Binder.getCallingUid(); + if (UserHandle.isCore(callerUid) || callerUid == uid) { + return isAppForegroundInternal(uid); + } + return false; + } + + private boolean isAppForegroundInternal(int uid) { synchronized (this) { UidRecord uidRec = mActiveUids.get(uid); if (uidRec == null || uidRec.idle) { From f5bc6f61b41f62d572bbe5a66797b1f5a8103676 Mon Sep 17 00:00:00 2001 From: junyulai Date: Thu, 8 Nov 2018 22:33:09 +0800 Subject: [PATCH 4/7] Change types of fields of network stats reported to framework. Currently, NetworkStats use int to handle uid, set and tag, while native side using unsigned int mixing with signed int with that. This commit make necessary changes in JNI part while libnetdbpf unifying the types of fields. Bug: 112226716 Bug: 119193941 Test: 1. manually reconnect vpn 2. update apps from playstore 3. atest libnetdbpf_test 4. runtest frameworks-net 5. cts-tradefed run cts -m CtsUsageStatsTestCases -t \ android.app.usage.cts.NetworkUsageStatsTest Change-Id: I6c27124db8292e2825fba51b8994f013897cb566 Merged-In: I6c27124db8292e2825fba51b8994f013897cb566 (cherry picked from commit bf7803eed8283d5a1caa2efe90aa449590ddb94f) --- core/jni/com_android_internal_net_NetworkStatsFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp index c15b7ee4fe04c..de3a78a61a7e8 100644 --- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp +++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp @@ -175,7 +175,7 @@ static int legacyReadNetworkStatsDetail(std::vector* lines, } } s.tag = rawTag >> 32; - if (limitTag != -1 && s.tag != limitTag) { + if (limitTag != -1 && s.tag != static_cast(limitTag)) { //ALOGI("skipping due to tag: %s", buffer); continue; } @@ -188,7 +188,7 @@ static int legacyReadNetworkStatsDetail(std::vector* lines, if (sscanf(pos, "%u %u %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64, &s.uid, &s.set, &s.rxBytes, &s.rxPackets, &s.txBytes, &s.txPackets) == 6) { - if (limitUid != -1 && limitUid != s.uid) { + if (limitUid != -1 && static_cast(limitUid) != s.uid) { //ALOGI("skipping due to uid: %s", buffer); continue; } From fa265ed97026e3b8675a2ccbf4035cad6dc1523f Mon Sep 17 00:00:00 2001 From: Guliz Tuncay Date: Wed, 16 Aug 2017 12:02:31 -0700 Subject: [PATCH 5/7] Select only preinstalled Spell Checker Services When we are setting a new spell checker as the default one in Secure.Settings, TSMS#findAvailSpellCheckerLocked can pick up any available spell checker service. This violates the principle that user should be warned whenever we are setting an untrusted spell checker service as the default service, since the warning dialog is never shown. Fixes: 64764051 Bug: 118694079 Test: Manually as follows: 0. Make sure AOSP keyboard is pre-installed. 1. adb shell settings put --user 0 secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService 2. tapas SampleSpellCheckerService 3. make -j 4. adb install --user 0 -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk 5. adb shell pm disable com.android.inputmethod.latin 6. adb shell settings get --user 0 secure selected_spell_checker -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService 7. adb reboot 8. adb shell settings get --user 0 secure selected_spell_checker -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService Change-Id: I298ffbcfa5e32f43753f54fbebc40a414a5c0f9e Merged-In: I298ffbcfa5e32f43753f54fbebc40a414a5c0f9e --- .../server/TextServicesManagerService.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/services/core/java/com/android/server/TextServicesManagerService.java b/services/core/java/com/android/server/TextServicesManagerService.java index 4b0d4be11b148..14fe6a271434c 100644 --- a/services/core/java/com/android/server/TextServicesManagerService.java +++ b/services/core/java/com/android/server/TextServicesManagerService.java @@ -183,7 +183,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { buildSpellCheckerMapLocked(mContext, mSpellCheckerList, mSpellCheckerMap, mSettings); SpellCheckerInfo sci = getCurrentSpellChecker(null); if (sci == null) { - sci = findAvailSpellCheckerLocked(null); + sci = findAvailSystemSpellCheckerLocked(null); if (sci != null) { // Set the current spell checker if there is one or more spell checkers // available. In this case, "sci" is the first one in the available spell @@ -227,7 +227,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE // Package modified || isPackageModified(packageName)) { - sci = findAvailSpellCheckerLocked(packageName); + sci = findAvailSystemSpellCheckerLocked(packageName); if (sci != null) { setCurrentSpellCheckerLocked(sci.getId()); } @@ -371,8 +371,16 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { mSpellCheckerBindGroups.clear(); } - private SpellCheckerInfo findAvailSpellCheckerLocked(String prefPackage) { - final int spellCheckersCount = mSpellCheckerList.size(); + private SpellCheckerInfo findAvailSystemSpellCheckerLocked(String prefPackage) { + // Filter the spell checker list to remove spell checker services that are not pre-installed + ArrayList spellCheckerList = new ArrayList<>(); + for (SpellCheckerInfo sci : mSpellCheckerList) { + if ((sci.getServiceInfo().applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { + spellCheckerList.add(sci); + } + } + + final int spellCheckersCount = spellCheckerList.size(); if (spellCheckersCount == 0) { Slog.w(TAG, "no available spell checker services found"); return null; @@ -382,7 +390,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { final SpellCheckerInfo sci = mSpellCheckerList.get(i); if (prefPackage.equals(sci.getPackageName())) { if (DBG) { - Slog.d(TAG, "findAvailSpellCheckerLocked: " + sci.getPackageName()); + Slog.d(TAG, "findAvailSystemSpellCheckerLocked: " + sci.getPackageName()); } return sci; } @@ -396,7 +404,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { final ArrayList suitableLocales = InputMethodUtils.getSuitableLocalesForSpellChecker(systemLocal); if (DBG) { - Slog.w(TAG, "findAvailSpellCheckerLocked suitableLocales=" + Slog.w(TAG, "findAvailSystemSpellCheckerLocked suitableLocales=" + Arrays.toString(suitableLocales.toArray(new Locale[suitableLocales.size()]))); } final int localeCount = suitableLocales.size(); From bcaedc102d006b36eec926c2ce059b57d2f26472 Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Fri, 16 Nov 2018 14:55:13 -0800 Subject: [PATCH 6/7] docs: Fixing typos. Doc is staged to: http://go/dac-stage/reference/android/media/audiofx/AudioEffect http://go/dac-stage/reference/android/media/audiofx/AudioEffect.OnControlStatusChangeListener http://go/dac-stage/reference/android/media/audiofx/AudioEffect.OnEnableStatusChangeListener Bug: 119656338 Change-Id: I813610941ae0f317944a75687f354cc9f66e8600 Exempt-From-Owner-Approval: Doc-only change Test: make ds-docs --- media/java/android/media/audiofx/AudioEffect.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/media/java/android/media/audiofx/AudioEffect.java b/media/java/android/media/audiofx/AudioEffect.java index 24c595f5594e6..5a1a1fca43206 100644 --- a/media/java/android/media/audiofx/AudioEffect.java +++ b/media/java/android/media/audiofx/AudioEffect.java @@ -982,7 +982,7 @@ public class AudioEffect { // -------------------- /** * The OnEnableStatusChangeListener interface defines a method called by the AudioEffect - * when a the enabled state of the effect engine was changed by the controlling application. + * when the enabled state of the effect engine was changed by the controlling application. */ public interface OnEnableStatusChangeListener { /** @@ -996,7 +996,7 @@ public class AudioEffect { /** * The OnControlStatusChangeListener interface defines a method called by the AudioEffect - * when a the control of the effect engine is gained or lost by the application + * when control of the effect engine is gained or lost by the application */ public interface OnControlStatusChangeListener { /** From 6fe332c07e488a11d44e8b3e57a0649b84be9cac Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Mon, 19 Nov 2018 13:16:40 -0800 Subject: [PATCH 7/7] docs: Removing @see link to hidden field Docs had contained a @see link to #FIRST_SDK_INT , but that field had a @hide directive, so the @see link resulted in an error message in the output. Doc staged to: http://go/dac-stage/reference/android/os/Build.VERSION#SDK_INT Bug: 80445154 Test: make ds-docs Change-Id: Id8d461c517bd4d8b3c49b61da37ec0a16768a63d Exempt-From-Owner-Approval: Doc-only change --- core/java/android/os/Build.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index de25fd214d48c..f86a6f6ce7d2e 100644 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -227,8 +227,6 @@ public class Build { * increase when the hardware manufacturer provides an OTA update. *

* Possible values are defined in {@link Build.VERSION_CODES}. - * - * @see #FIRST_SDK_INT */ public static final int SDK_INT = SystemProperties.getInt( "ro.build.version.sdk", 0);