summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Kilbourn <tkilbourn@google.com>2015-06-05 15:52:05 -0700
committerTim Kilbourn <tkilbourn@google.com>2015-06-08 16:52:36 +0000
commit72285e5600fad17c42730d6f84164d8425d4d43c (patch)
treefbca74d82c613b81242ceecf721f2a6d4bbaf735
parent2ea838d539ec13215554e40303a757ea4a1f3d39 (diff)
downloadframeworks_base-72285e5600fad17c42730d6f84164d8425d4d43c.zip
frameworks_base-72285e5600fad17c42730d6f84164d8425d4d43c.tar.gz
frameworks_base-72285e5600fad17c42730d6f84164d8425d4d43c.tar.bz2
API review: Update hasMic to hasMicrophone.
Also make the SearchEvent constructor available for testing. Bug: 21572283 Bug: 21572676 Change-Id: I35cfd88b45aeb97b6ccf83aeb46b0ecc4bbc0947
-rw-r--r--api/current.txt3
-rw-r--r--api/system-current.txt3
-rw-r--r--core/java/android/view/InputDevice.java16
-rw-r--r--core/java/android/view/SearchEvent.java2
4 files changed, 13 insertions, 11 deletions
diff --git a/api/current.txt b/api/current.txt
index e61253e..8fbd593 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -34879,7 +34879,7 @@ package android.view {
method public int getVendorId();
method public android.os.Vibrator getVibrator();
method public boolean[] hasKeys(int...);
- method public boolean hasMic();
+ method public boolean hasMicrophone();
method public boolean isVirtual();
method public boolean supportsSource(int);
method public void writeToParcel(android.os.Parcel, int);
@@ -35770,6 +35770,7 @@ package android.view {
}
public class SearchEvent {
+ ctor public SearchEvent(android.view.InputDevice);
method public android.view.InputDevice getInputDevice();
}
diff --git a/api/system-current.txt b/api/system-current.txt
index 8c9ed2e..f7f335d 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -37144,7 +37144,7 @@ package android.view {
method public int getVendorId();
method public android.os.Vibrator getVibrator();
method public boolean[] hasKeys(int...);
- method public boolean hasMic();
+ method public boolean hasMicrophone();
method public boolean isVirtual();
method public boolean supportsSource(int);
method public void writeToParcel(android.os.Parcel, int);
@@ -38035,6 +38035,7 @@ package android.view {
}
public class SearchEvent {
+ ctor public SearchEvent(android.view.InputDevice);
method public android.view.InputDevice getInputDevice();
}
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index 1ee4780..f39d1f5 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -56,7 +56,7 @@ public final class InputDevice implements Parcelable {
private final int mKeyboardType;
private final KeyCharacterMap mKeyCharacterMap;
private final boolean mHasVibrator;
- private final boolean mHasMic;
+ private final boolean mHasMicrophone;
private final boolean mHasButtonUnderPad;
private final ArrayList<MotionRange> mMotionRanges = new ArrayList<MotionRange>();
@@ -358,7 +358,7 @@ public final class InputDevice implements Parcelable {
// Called by native code.
private InputDevice(int id, int generation, int controllerNumber, String name, int vendorId,
int productId, String descriptor, boolean isExternal, int sources, int keyboardType,
- KeyCharacterMap keyCharacterMap, boolean hasVibrator, boolean hasMic,
+ KeyCharacterMap keyCharacterMap, boolean hasVibrator, boolean hasMicrophone,
boolean hasButtonUnderPad) {
mId = id;
mGeneration = generation;
@@ -372,7 +372,7 @@ public final class InputDevice implements Parcelable {
mKeyboardType = keyboardType;
mKeyCharacterMap = keyCharacterMap;
mHasVibrator = hasVibrator;
- mHasMic = hasMic;
+ mHasMicrophone = hasMicrophone;
mHasButtonUnderPad = hasButtonUnderPad;
mIdentifier = new InputDeviceIdentifier(descriptor, vendorId, productId);
}
@@ -390,7 +390,7 @@ public final class InputDevice implements Parcelable {
mKeyboardType = in.readInt();
mKeyCharacterMap = KeyCharacterMap.CREATOR.createFromParcel(in);
mHasVibrator = in.readInt() != 0;
- mHasMic = in.readInt() != 0;
+ mHasMicrophone = in.readInt() != 0;
mHasButtonUnderPad = in.readInt() != 0;
mIdentifier = new InputDeviceIdentifier(mDescriptor, mVendorId, mProductId);
@@ -723,8 +723,8 @@ public final class InputDevice implements Parcelable {
* Reports whether the device has a built-in microphone.
* @return Whether the device has a built-in microphone.
*/
- public boolean hasMic() {
- return mHasMic;
+ public boolean hasMicrophone() {
+ return mHasMicrophone;
}
/**
@@ -861,7 +861,7 @@ public final class InputDevice implements Parcelable {
out.writeInt(mKeyboardType);
mKeyCharacterMap.writeToParcel(out, flags);
out.writeInt(mHasVibrator ? 1 : 0);
- out.writeInt(mHasMic ? 1 : 0);
+ out.writeInt(mHasMicrophone ? 1 : 0);
out.writeInt(mHasButtonUnderPad ? 1 : 0);
final int numRanges = mMotionRanges.size();
@@ -907,7 +907,7 @@ public final class InputDevice implements Parcelable {
description.append(" Has Vibrator: ").append(mHasVibrator).append("\n");
- description.append(" Has mic: ").append(mHasMic).append("\n");
+ description.append(" Has mic: ").append(mHasMicrophone).append("\n");
description.append(" Sources: 0x").append(Integer.toHexString(mSources)).append(" (");
appendSourceDescriptionIfApplicable(description, SOURCE_KEYBOARD, "keyboard");
diff --git a/core/java/android/view/SearchEvent.java b/core/java/android/view/SearchEvent.java
index ef51e7d..643cc3e 100644
--- a/core/java/android/view/SearchEvent.java
+++ b/core/java/android/view/SearchEvent.java
@@ -25,7 +25,7 @@ public class SearchEvent {
private InputDevice mInputDevice;
- /** @hide */
+ /** Create a new search event. */
public SearchEvent(InputDevice inputDevice) {
mInputDevice = inputDevice;
}