| Chunk |
|---|
| Conflicting content |
|---|
reply.writeNoException();
reply.writeInt(result);
return true;
}
<<<<<<< HEAD
case KILL_APPLICATION_WITH_UID_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
String pkg = data.readString();
int uid = data.readInt();
killApplicationWithUid(pkg, uid);
return true;
}
case CLOSE_SYSTEM_DIALOGS_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
String reason = data.readString();
closeSystemDialogs(reason);
reply.writeNoException();
return true;
}
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
return super.onTransact(code, data, reply, flags); |
| Solution content |
|---|
reply.writeInt(result);
return true;
}
case KILL_APPLICATION_WITH_UID_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
String pkg = data.readString();
int uid = data.readInt();
killApplicationWithUid(pkg, uid);
reply.writeNoException();
return true;
}
case CLOSE_SYSTEM_DIALOGS_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
String reason = data.readString();
closeSystemDialogs(reason);
reply.writeNoException();
return true;
}
}
return super.onTransact(code, data, reply, flags); |
| File |
|---|
| ActivityManagerNative.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Case statement |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
Parcel data = Parcel.obtain();
data.recycle();
return result;
}
<<<<<<< HEAD
public void killApplicationWithUid(String pkg, int uid) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(pkg);
data.writeInt(uid);
mRemote.transact(KILL_APPLICATION_WITH_UID_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
public void closeSystemDialogs(String reason) throws RemoteException {
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(reason);
mRemote.transact(CLOSE_SYSTEM_DIALOGS_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
private IBinder mRemote;
} |
| Solution content |
|---|
data.recycle();
return result;
}
public void killApplicationWithUid(String pkg, int uid) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(pkg);
data.writeInt(uid);
mRemote.transact(KILL_APPLICATION_WITH_UID_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
public void closeSystemDialogs(String reason) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(reason);
mRemote.transact(CLOSE_SYSTEM_DIALOGS_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
private IBinder mRemote;
} |
| File |
|---|
| ActivityManagerNative.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
synchronized (mPackages) {
// Resources is app scale dependent.
ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale);
<<<<<<< HEAD
if (false) {
Log.w(TAG, "getTopLevelResources: " + resDir + " / "
+ compInfo.applicationScale);
}
WeakReference |
| Solution content |
|---|
synchronized (mPackages) {
// Resources is app scale dependent.
ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale);
if (false) {
Log.w(TAG, "getTopLevelResources: " + resDir + " / "
+ compInfo.applicationScale);
}
WeakReference |
| File |
|---|
| ActivityThread.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
//Log.i(TAG, "Resource: key=" + key + ", display metrics=" + metrics);
DisplayMetrics metrics = getDisplayMetricsLocked(false);
r = new Resources(assets, metrics, getConfiguration(), compInfo);
<<<<<<< HEAD
if (false) {
Log.i(TAG, "Created app resources " + resDir + " " + r + ": "
+ r.getConfiguration() + " appScale="
+ r.getCompatibilityInfo().applicationScale);
}
=======
//Log.i(TAG, "Created app resources " + r + ": " + r.getConfiguration());
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
// XXX need to remove entries when weak references go away
mActiveResources.put(key, new WeakReference |
| Solution content |
|---|
//Log.i(TAG, "Resource: key=" + key + ", display metrics=" + metrics);
DisplayMetrics metrics = getDisplayMetricsLocked(false);
r = new Resources(assets, metrics, getConfiguration(), compInfo);
if (false) {
Log.i(TAG, "Created app resources " + resDir + " " + r + ": "
+ r.getConfiguration() + " appScale="
+ r.getCompatibilityInfo().applicationScale);
}
// XXX need to remove entries when weak references go away
mActiveResources.put(key, new WeakReference |
| File |
|---|
| ActivityThread.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, boolean onlyIfNeeded)
throws RemoteException;
<<<<<<< HEAD
public void killApplicationWithUid(String pkg, int uid) throws RemoteException;
public void closeSystemDialogs(String reason) throws RemoteException;
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
/*
* Private non-Binder interfaces
*/ |
| Solution content |
|---|
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, boolean onlyIfNeeded)
throws RemoteException;
public void killApplicationWithUid(String pkg, int uid) throws RemoteException;
public void closeSystemDialogs(String reason) throws RemoteException;
/*
* Private non-Binder interfaces
*/ |
| File |
|---|
| IActivityManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method interface |
| Chunk |
|---|
| Conflicting content |
|---|
int REGISTER_ACTIVITY_WATCHER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+92;
int UNREGISTER_ACTIVITY_WATCHER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+93;
int START_ACTIVITY_IN_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+94;
<<<<<<< HEAD
int KILL_APPLICATION_WITH_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+95;
int CLOSE_SYSTEM_DIALOGS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+96;
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
} |
| Solution content |
|---|
int REGISTER_ACTIVITY_WATCHER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+92;
int UNREGISTER_ACTIVITY_WATCHER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+93;
int START_ACTIVITY_IN_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+94;
int KILL_APPLICATION_WITH_UID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+95;
int CLOSE_SYSTEM_DIALOGS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+96;
} |
| File |
|---|
| IActivityManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
return;
}
Log.d(LOG_TAG, "launching " + intent);
<<<<<<< HEAD
try {
// in global search mode, we send the activity straight to the original suggestion
// source. this is because GlobalSearch may not have permission to launch the
// intent, and to avoid the extra step of going through GlobalSearch.
if (mGlobalSearchMode) {
launchGlobalSearchIntent(intent);
} else {
// If the intent was created from a suggestion, it will always have an explicit
// component here.
Log.i(LOG_TAG, "Starting (as ourselves) " + intent.toURI());
getContext().startActivity(intent);
// If the search switches to a different activity,
// SearchDialogWrapper#performActivityResuming
// will handle hiding the dialog when the next activity starts, but for
// real in-app search, we still need to dismiss the dialog.
if (isInRealAppSearch()) {
dismiss();
}
}
} catch (RuntimeException ex) {
Log.e(LOG_TAG, "Failed launch activity: " + intent, ex);
=======
getContext().startActivity(intent);
// in global search mode, SearchDialogWrapper#performActivityResuming will handle hiding
// the dialog when the next activity starts, but for in-app search, we still need to
// dismiss the dialog.
if (!mGlobalSearchMode) {
dismiss();
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
}
|
| Solution content |
|---|
return;
}
Log.d(LOG_TAG, "launching " + intent);
try {
// in global search mode, we send the activity straight to the original suggestion
// source. this is because GlobalSearch may not have permission to launch the
// intent, and to avoid the extra step of going through GlobalSearch.
if (mGlobalSearchMode) {
launchGlobalSearchIntent(intent);
} else {
// If the intent was created from a suggestion, it will always have an explicit
// component here.
Log.i(LOG_TAG, "Starting (as ourselves) " + intent.toURI());
getContext().startActivity(intent);
// If the search switches to a different activity,
// SearchDialogWrapper#performActivityResuming
// will handle hiding the dialog when the next activity starts, but for
// real in-app search, we still need to dismiss the dialog.
if (isInRealAppSearch()) {
dismiss();
}
}
} catch (RuntimeException ex) {
Log.e(LOG_TAG, "Failed launch activity: " + intent, ex);
}
}
|
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Catch clause |
| Comment |
| If statement |
| Method invocation |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
import android.database.Cursor; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; <<<<<<< HEAD import android.graphics.drawable.DrawableContainer; ======= >>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff import android.graphics.drawable.StateListDrawable; import android.net.Uri; import android.os.Bundle; |
| Solution content |
|---|
import android.database.Cursor; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.DrawableContainer; import android.graphics.drawable.StateListDrawable; import android.net.Uri; import android.os.Bundle; |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private int mPreviousLength = 0;
public long getPostingDelay(CharSequence constraint) {
<<<<<<< HEAD
if (constraint == null) return 0;
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
long delay = constraint.length() < mPreviousLength ? DELETE_KEY_POST_DELAY : 0;
mPreviousLength = constraint.length();
return delay; |
| Solution content |
|---|
private int mPreviousLength = 0;
public long getPostingDelay(CharSequence constraint) {
if (constraint == null) return 0;
long delay = constraint.length() < mPreviousLength ? DELETE_KEY_POST_DELAY : 0;
mPreviousLength = constraint.length();
return delay; |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
public static final String ACTION_TTS_CHECK_TTS_DATA =
"android.intent.action.CHECK_TTS_DATA";
<<<<<<< HEAD
=======
/**
* Broadcast Action: The TextToSpeech synthesizer has completed processing
* all of the text in the speech queue.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_TTS_QUEUE_PROCESSING_COMPLETED =
"android.intent.action.TTS_QUEUE_PROCESSING_COMPLETED";
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
// ---------------------------------------------------------------------
// --------------------------------------------------------------------- |
| Solution content |
|---|
// ---------------------------------------------------------------------
// --------------------------------------------------------------------- |
| File |
|---|
| Intent.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public static final int FLAG_RESIZEABLE_FOR_SCREENS = 1<<12;
/**
<<<<<<< HEAD
* Value for {@link #flags}: true when the application knows how to
* accomodate different screen densities. Corresponds to
* {@link android.R.styleable#AndroidManifestSupportsScreens_anyDensity
* android:anyDensity}.
*/
public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 1<<13;
/**
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
* Value for {@link #flags}: this is false if the application has set
* its android:allowBackup to false, true otherwise.
* |
| Solution content |
|---|
public static final int FLAG_RESIZEABLE_FOR_SCREENS = 1<<12;
/**
* Value for {@link #flags}: true when the application knows how to
* accomodate different screen densities. Corresponds to
* {@link android.R.styleable#AndroidManifestSupportsScreens_anyDensity
* android:anyDensity}.
*/
public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 1<<13;
/**
* Value for {@link #flags}: this is false if the application has set
* its android:allowBackup to false, true otherwise.
* |
| File |
|---|
| ApplicationInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*
* {@hide}
*/
<<<<<<< HEAD
public static final int FLAG_ALLOW_BACKUP = 1<<14;
/**
=======
public static final int FLAG_ALLOW_BACKUP = 1<<13;
/**
* Indicates that the application supports any densities;
* {@hide}
*/
public static final int ANY_DENSITY = -1;
static final int[] ANY_DENSITIES_ARRAY = { ANY_DENSITY };
/**
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
* Flags associated with the application. Any combination of
* {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE},
* {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and |
| Solution content |
|---|
*
* {@hide}
*/
public static final int FLAG_ALLOW_BACKUP = 1<<14;
/**
* Flags associated with the application. Any combination of
* {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE},
* {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and |
| File |
|---|
| ApplicationInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array initializer |
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public void disableCompatibilityMode() {
flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |
<<<<<<< HEAD
FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS |
FLAG_SUPPORTS_SCREEN_DENSITIES);
=======
FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS);
supportsDensities = ANY_DENSITIES_ARRAY;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
} |
| Solution content |
|---|
*/
public void disableCompatibilityMode() {
flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |
FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS |
FLAG_SUPPORTS_SCREEN_DENSITIES);
}
} |
| File |
|---|
| ApplicationInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
int supportsNormalScreens = 1;
int supportsLargeScreens = 1;
int resizeable = 1;
<<<<<<< HEAD
int anyDensity = 1;
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
int outerDepth = parser.getDepth();
while ((type=parser.next()) != parser.END_DOCUMENT |
| Solution content |
|---|
int supportsNormalScreens = 1;
int supportsLargeScreens = 1;
int resizeable = 1;
int anyDensity = 1;
int outerDepth = parser.getDepth();
while ((type=parser.next()) != parser.END_DOCUMENT |
| File |
|---|
| PackageParser.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
XmlUtils.skipCurrentTag(parser);
<<<<<<< HEAD
=======
} else if (tagName.equals("supports-density")) {
sa = res.obtainAttributes(attrs,
com.android.internal.R.styleable.AndroidManifestSupportsDensity);
int density = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsDensity_density, -1);
sa.recycle();
if (density != -1 && !pkg.supportsDensityList.contains(density)) {
pkg.supportsDensityList.add(density);
}
XmlUtils.skipCurrentTag(parser);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
} else if (tagName.equals("supports-screens")) {
sa = res.obtainAttributes(attrs,
com.android.internal.R.styleable.AndroidManifestSupportsScreens); |
| Solution content |
|---|
XmlUtils.skipCurrentTag(parser);
} else if (tagName.equals("supports-screens")) {
sa = res.obtainAttributes(attrs,
com.android.internal.R.styleable.AndroidManifestSupportsScreens); |
| File |
|---|
| PackageParser.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
resizeable = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsScreens_resizeable,
supportsLargeScreens);
<<<<<<< HEAD
anyDensity = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsScreens_anyDensity,
anyDensity);
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
sa.recycle();
|
| Solution content |
|---|
resizeable = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsScreens_resizeable,
supportsLargeScreens);
anyDensity = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsScreens_anyDensity,
anyDensity);
sa.recycle();
|
| File |
|---|
| PackageParser.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
}
if (resizeable < 0 || (resizeable > 0
&& pkg.applicationInfo.targetSdkVersion
<<<<<<< HEAD
>= android.os.Build.VERSION_CODES.DONUT)) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS;
}
if (anyDensity < 0 || (anyDensity > 0
&& pkg.applicationInfo.targetSdkVersion
>= android.os.Build.VERSION_CODES.DONUT)) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES;
}
=======
>= android.os.Build.VERSION_CODES.CUR_DEVELOPMENT)) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS;
}
int densities[] = null;
int size = pkg.supportsDensityList.size();
if (size > 0) {
densities = pkg.supportsDensities = new int[size];
List |
| Solution content |
|---|
}
if (resizeable < 0 || (resizeable > 0
&& pkg.applicationInfo.targetSdkVersion
>= android.os.Build.VERSION_CODES.DONUT)) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS;
}
if (anyDensity < 0 || (anyDensity > 0
&& pkg.applicationInfo.targetSdkVersion
>= android.os.Build.VERSION_CODES.DONUT)) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES;
}
return pkg;
} |
| File |
|---|
| PackageParser.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
mCompatibilityFlags |= LARGE_SCREENS | CONFIGURED_LARGE_SCREENS;
<<<<<<< HEAD
}
if ((appInfo.flags & ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
mCompatibilityFlags |= EXPANDABLE | CONFIGURED_EXPANDABLE;
}
if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) {
applicationDensity = DisplayMetrics.DENSITY_DEVICE;
applicationScale = 1.0f;
applicationInvertedScale = 1.0f;
} else {
applicationDensity = DisplayMetrics.DENSITY_DEFAULT;
applicationScale = DisplayMetrics.DENSITY_DEVICE
/ (float) DisplayMetrics.DENSITY_DEFAULT;
applicationInvertedScale = 1.0f / applicationScale;
=======
}
if ((appInfo.flags & ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
mCompatibilityFlags |= EXPANDABLE | CONFIGURED_EXPANDABLE;
}
float packageDensityScale = -1.0f;
int packageDensity = 0;
if (appInfo.supportsDensities != null) {
int minDiff = Integer.MAX_VALUE;
for (int density : appInfo.supportsDensities) {
if (density == ApplicationInfo.ANY_DENSITY) {
packageDensity = DisplayMetrics.DENSITY_DEVICE;
packageDensityScale = 1.0f;
break;
}
int tmpDiff = Math.abs(DisplayMetrics.DENSITY_DEVICE - density);
if (tmpDiff == 0) {
packageDensity = DisplayMetrics.DENSITY_DEVICE;
packageDensityScale = 1.0f;
break;
}
// prefer higher density (appScale>1.0), unless that's only option.
if (tmpDiff < minDiff && packageDensityScale < 1.0f) {
packageDensity = density;
packageDensityScale = DisplayMetrics.DENSITY_DEVICE / (float) density;
minDiff = tmpDiff;
}
if (packageDensityScale > 0.0f) {
applicationDensity = packageDensity;
applicationScale = packageDensityScale;
} else {
applicationDensity = DisplayMetrics.DENSITY_DEFAULT;
applicationScale =
DisplayMetrics.DENSITY_DEVICE / (float) DisplayMetrics.DENSITY_DEFAULT;
}
applicationInvertedScale = 1.0f / applicationScale;
if (applicationScale != 1.0f) {
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
mCompatibilityFlags |= SCALING_REQUIRED;
}
} |
| Solution content |
|---|
if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
mCompatibilityFlags |= LARGE_SCREENS | CONFIGURED_LARGE_SCREENS;
}
if ((appInfo.flags & ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
mCompatibilityFlags |= EXPANDABLE | CONFIGURED_EXPANDABLE;
}
if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) {
applicationDensity = DisplayMetrics.DENSITY_DEVICE;
applicationScale = 1.0f;
applicationInvertedScale = 1.0f;
} else {
applicationDensity = DisplayMetrics.DENSITY_DEFAULT;
applicationScale = DisplayMetrics.DENSITY_DEVICE
/ (float) DisplayMetrics.DENSITY_DEFAULT;
applicationInvertedScale = 1.0f / applicationScale;
mCompatibilityFlags |= SCALING_REQUIRED;
}
} |
| File |
|---|
| CompatibilityInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| If statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* Returns the translator which translates the coordinates in compatibility mode.
* @param params the window's parameter
*/
public Translator getTranslator() {
return isScalingRequired() ? new Translator() : null;
=======
* Returns the translator which can translate the coordinates of the window.
* There are five different types of Translator.
* @param params the window's parameter
*/
public Translator getTranslator(WindowManager.LayoutParams params) {
if ( (mCompatibilityFlags & SCALING_EXPANDABLE_MASK)
== (EXPANDABLE|LARGE_SCREENS)) {
if (DBG) Log.d(TAG, "no translation required");
return null;
}
if (!isScalingRequired()) {
return null;
}
return new Translator();
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
/** |
| Solution content |
|---|
}
/**
* Returns the translator which translates the coordinates in compatibility mode.
* @param params the window's parameter
*/
public Translator getTranslator() {
return isScalingRequired() ? new Translator() : null;
}
/** |
| File |
|---|
| CompatibilityInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (DBG) Log.i("foo", "********************** resuming: " + activityId);
if (mSearchDialog == null) return;
mSearchDialog.activityResuming(activityId);
<<<<<<< HEAD
}
public void closingSystemDialogs(String reason) {
if (DBG) Log.i("foo", "********************** closing dialogs: " + reason);
if (mSearchDialog == null) return;
mSearchDialog.closingSystemDialogs(reason);
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
};
|
| Solution content |
|---|
if (DBG) Log.i("foo", "********************** resuming: " + activityId);
if (mSearchDialog == null) return;
mSearchDialog.activityResuming(activityId);
}
public void closingSystemDialogs(String reason) {
if (DBG) Log.i("foo", "********************** closing dialogs: " + reason);
if (mSearchDialog == null) return;
mSearchDialog.closingSystemDialogs(reason);
}
};
|
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* {@hide}
*/
<<<<<<< HEAD
public static final int DEFAULT_RATE = 100; // 1x
/**
* {@hide}
*/
public static final int DEFAULT_PITCH = 100;// 1x
/**
* {@hide}
*/
public static final int USE_DEFAULTS = 0; // false
/**
* {@hide}
*/
public static final String DEFAULT_SYNTH = "com.svox.pico";
// default values for rendering
public static final int DEFAULT_STREAM = AudioManager.STREAM_MUSIC;
=======
public static final int FALLBACK_TTS_DEFAULT_RATE = 100; // 1x
/**
* {@hide}
*/
public static final int FALLBACK_TTS_DEFAULT_PITCH = 100;// 1x
/**
* {@hide}
*/
public static final int FALLBACK_TTS_USE_DEFAULTS = 0; // false
/**
* {@hide}
*/
public static final String FALLBACK_TTS_DEFAULT_SYNTH = "com.svox.pico";
// default values for rendering
public static final int TTS_DEFAULT_STREAM = AudioManager.STREAM_MUSIC;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
// return codes for a TTS engine's check data activity
/** |
| Solution content |
|---|
/**
* {@hide}
*/
public static final int DEFAULT_RATE = 100; // 1x
/**
* {@hide}
*/
public static final int DEFAULT_PITCH = 100;// 1x
/**
* {@hide}
*/
public static final int USE_DEFAULTS = 0; // false
/**
* {@hide}
*/
public static final String DEFAULT_SYNTH = "com.svox.pico";
// default values for rendering
public static final int DEFAULT_STREAM = AudioManager.STREAM_MUSIC;
// return codes for a TTS engine's check data activity
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
// return codes for a TTS engine's check data activity
/**
* Indicates success when checking the installation status of the resources used by the
<<<<<<< HEAD
* text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
=======
* text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public static final int CHECK_VOICE_DATA_PASS = 1;
/** |
| Solution content |
|---|
// return codes for a TTS engine's check data activity
/**
* Indicates success when checking the installation status of the resources used by the
* text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
*/
public static final int CHECK_VOICE_DATA_PASS = 1;
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public static final int CHECK_VOICE_DATA_PASS = 1;
/**
* Indicates failure when checking the installation status of the resources used by the
<<<<<<< HEAD
* text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
=======
* text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public static final int CHECK_VOICE_DATA_FAIL = 0;
/** |
| Solution content |
|---|
public static final int CHECK_VOICE_DATA_PASS = 1;
/**
* Indicates failure when checking the installation status of the resources used by the
* text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
*/
public static final int CHECK_VOICE_DATA_FAIL = 0;
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public static final int CHECK_VOICE_DATA_FAIL = 0;
/**
* Indicates erroneous data when checking the installation status of the resources used by
<<<<<<< HEAD
* the text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
=======
* the text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public static final int CHECK_VOICE_DATA_BAD_DATA = -1;
/** |
| Solution content |
|---|
public static final int CHECK_VOICE_DATA_FAIL = 0;
/**
* Indicates erroneous data when checking the installation status of the resources used by
* the text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
*/
public static final int CHECK_VOICE_DATA_BAD_DATA = -1;
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public static final int CHECK_VOICE_DATA_BAD_DATA = -1;
/**
* Indicates missing resources when checking the installation status of the resources used
<<<<<<< HEAD
* by the text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
=======
* by the text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public static final int CHECK_VOICE_DATA_MISSING_DATA = -2;
/** |
| Solution content |
|---|
public static final int CHECK_VOICE_DATA_BAD_DATA = -1;
/**
* Indicates missing resources when checking the installation status of the resources used
* by the text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
*/
public static final int CHECK_VOICE_DATA_MISSING_DATA = -2;
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public static final int CHECK_VOICE_DATA_MISSING_DATA = -2;
/**
* Indicates missing storage volume when checking the installation status of the resources
<<<<<<< HEAD
* used by the text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
*/
public static final int CHECK_VOICE_DATA_MISSING_VOLUME = -3;
// intents to ask engine to install data or check its data
/**
* Broadcast Action: Triggers the platform Text-To-Speech engine to
* start the activity that installs the resource files on the device
* that are required for TTS to be operational. Since the installation
* of the data can be interrupted or declined by the user, the application
* shouldn't expect successful installation upon return from that intent,
* and if need be, should check installation status with
* {@link #ACTION_CHECK_TTS_DATA}.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_INSTALL_TTS_DATA =
"android.speech.tts.engine.INSTALL_TTS_DATA";
/**
* Broadcast Action: Starts the activity from the platform Text-To-Speech
* engine to verify the proper installation and availability of the
* resource files on the system. Upon completion, the activity will
* return one of the following codes:
* {@link #CHECK_VOICE_DATA_PASS},
* {@link #CHECK_VOICE_DATA_FAIL},
* {@link #CHECK_VOICE_DATA_BAD_DATA},
* {@link #CHECK_VOICE_DATA_MISSING_DATA}, or
* {@link #CHECK_VOICE_DATA_MISSING_VOLUME}.
*
|
| Solution content |
|---|
public static final int CHECK_VOICE_DATA_MISSING_DATA = -2;
/**
* Indicates missing storage volume when checking the installation status of the resources
* used by the text-to-speech engine with the {@link #ACTION_CHECK_TTS_DATA} intent.
*/
public static final int CHECK_VOICE_DATA_MISSING_VOLUME = -3;
// intents to ask engine to install data or check its data
/**
* Broadcast Action: Triggers the platform Text-To-Speech engine to
* start the activity that installs the resource files on the device
* that are required for TTS to be operational. Since the installation
* of the data can be interrupted or declined by the user, the application
* shouldn't expect successful installation upon return from that intent,
* and if need be, should check installation status with
* {@link #ACTION_CHECK_TTS_DATA}.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_INSTALL_TTS_DATA =
"android.speech.tts.engine.INSTALL_TTS_DATA";
/**
* Broadcast Action: Starts the activity from the platform Text-To-Speech
* engine to verify the proper installation and availability of the
* resource files on the system. Upon completion, the activity will
* return one of the following codes:
* {@link #CHECK_VOICE_DATA_PASS},
* {@link #CHECK_VOICE_DATA_FAIL},
* {@link #CHECK_VOICE_DATA_BAD_DATA},
* {@link #CHECK_VOICE_DATA_MISSING_DATA}, or
* {@link #CHECK_VOICE_DATA_MISSING_VOLUME}.
*
|
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* {@hide}
*/
<<<<<<< HEAD
public static final String KEY_PARAM_RATE = "rate";
/**
* {@hide}
*/
public static final String KEY_PARAM_LANGUAGE = "language";
/**
* {@hide}
*/
public static final String KEY_PARAM_COUNTRY = "country";
/**
* {@hide}
*/
public static final String KEY_PARAM_VARIANT = "variant";
=======
public static final String TTS_KEY_PARAM_RATE = "rate";
/**
* {@hide}
*/
public static final String TTS_KEY_PARAM_LANGUAGE = "language";
/**
* {@hide}
*/
public static final String TTS_KEY_PARAM_COUNTRY = "country";
/**
* {@hide}
*/
public static final String TTS_KEY_PARAM_VARIANT = "variant";
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
/**
* Parameter key to specify the audio stream type to be used when speaking text
* or playing back a file. |
| Solution content |
|---|
/**
* {@hide}
*/
public static final String KEY_PARAM_RATE = "rate";
/**
* {@hide}
*/
public static final String KEY_PARAM_LANGUAGE = "language";
/**
* {@hide}
*/
public static final String KEY_PARAM_COUNTRY = "country";
/**
* {@hide}
*/
public static final String KEY_PARAM_VARIANT = "variant";
/**
* Parameter key to specify the audio stream type to be used when speaking text
* or playing back a file. |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* Parameter key to specify the audio stream type to be used when speaking text
* or playing back a file.
*/
<<<<<<< HEAD
public static final String KEY_PARAM_STREAM = "streamType";
=======
public static final String TTS_KEY_PARAM_STREAM = "streamType";
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
/**
* Parameter key to identify an utterance in the completion listener after text has been
* spoken, a file has been played back or a silence duration has elapsed. |
| Solution content |
|---|
* Parameter key to specify the audio stream type to be used when speaking text
* or playing back a file.
*/
public static final String KEY_PARAM_STREAM = "streamType";
/**
* Parameter key to identify an utterance in the completion listener after text has been
* spoken, a file has been played back or a silence duration has elapsed. |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
* Parameter key to identify an utterance in the completion listener after text has been
* spoken, a file has been played back or a silence duration has elapsed.
*/
<<<<<<< HEAD
public static final String KEY_PARAM_UTTERANCE_ID = "utteranceId";
=======
public static final String TTS_KEY_PARAM_UTTERANCE_ID = "utteranceId";
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
// key positions in the array of cached parameters
/** |
| Solution content |
|---|
* Parameter key to identify an utterance in the completion listener after text has been
* spoken, a file has been played back or a silence duration has elapsed.
*/
public static final String KEY_PARAM_UTTERANCE_ID = "utteranceId";
// key positions in the array of cached parameters
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* {@hide}
*/
<<<<<<< HEAD
protected static final int PARAM_POSITION_RATE = 0;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_LANGUAGE = 2;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_COUNTRY = 4;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_VARIANT = 6;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_STREAM = 8;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_UTTERANCE_ID = 10;
/**
* {@hide}
*/
protected static final int NB_CACHED_PARAMS = 6;
=======
protected static final int TTS_PARAM_POSITION_RATE = 0;
/**
* {@hide}
*/
protected static final int TTS_PARAM_POSITION_LANGUAGE = 2;
/**
* {@hide}
*/
protected static final int TTS_PARAM_POSITION_COUNTRY = 4;
/**
* {@hide}
*/
protected static final int TTS_PARAM_POSITION_VARIANT = 6;
/**
* {@hide}
*/
protected static final int TTS_PARAM_POSITION_STREAM = 8;
/**
* {@hide}
*/
protected static final int TTS_PARAM_POSITION_UTTERANCE_ID = 10;
/**
* {@hide}
*/
protected static final int TTS_NB_CACHED_PARAMS = 6;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
/** |
| Solution content |
|---|
/**
* {@hide}
*/
protected static final int PARAM_POSITION_RATE = 0;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_LANGUAGE = 2;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_COUNTRY = 4;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_VARIANT = 6;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_STREAM = 8;
/**
* {@hide}
*/
protected static final int PARAM_POSITION_UTTERANCE_ID = 10;
/**
* {@hide}
*/
protected static final int NB_CACHED_PARAMS = 6;
}
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
mPackageName = mContext.getPackageName();
mInitListener = listener;
<<<<<<< HEAD
mCachedParams = new String[2*Engine.NB_CACHED_PARAMS]; // store key and value
mCachedParams[Engine.PARAM_POSITION_RATE] = Engine.KEY_PARAM_RATE;
mCachedParams[Engine.PARAM_POSITION_LANGUAGE] = Engine.KEY_PARAM_LANGUAGE;
mCachedParams[Engine.PARAM_POSITION_COUNTRY] = Engine.KEY_PARAM_COUNTRY;
mCachedParams[Engine.PARAM_POSITION_VARIANT] = Engine.KEY_PARAM_VARIANT;
mCachedParams[Engine.PARAM_POSITION_STREAM] = Engine.KEY_PARAM_STREAM;
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID] = Engine.KEY_PARAM_UTTERANCE_ID;
=======
mCachedParams = new String[2*Engine.TTS_NB_CACHED_PARAMS]; // store key and value
mCachedParams[Engine.TTS_PARAM_POSITION_RATE] = Engine.TTS_KEY_PARAM_RATE;
mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE] = Engine.TTS_KEY_PARAM_LANGUAGE;
mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY] = Engine.TTS_KEY_PARAM_COUNTRY;
mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT] = Engine.TTS_KEY_PARAM_VARIANT;
mCachedParams[Engine.TTS_PARAM_POSITION_STREAM] = Engine.TTS_KEY_PARAM_STREAM;
mCachedParams[Engine.TTS_PARAM_POSITION_UTTERANCE_ID] = Engine.TTS_KEY_PARAM_UTTERANCE_ID;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
mCachedParams[Engine.PARAM_POSITION_RATE + 1] =
String.valueOf(Engine.DEFAULT_RATE); |
| Solution content |
|---|
mPackageName = mContext.getPackageName();
mInitListener = listener;
mCachedParams = new String[2*Engine.NB_CACHED_PARAMS]; // store key and value
mCachedParams[Engine.PARAM_POSITION_RATE] = Engine.KEY_PARAM_RATE;
mCachedParams[Engine.PARAM_POSITION_LANGUAGE] = Engine.KEY_PARAM_LANGUAGE;
mCachedParams[Engine.PARAM_POSITION_COUNTRY] = Engine.KEY_PARAM_COUNTRY;
mCachedParams[Engine.PARAM_POSITION_VARIANT] = Engine.KEY_PARAM_VARIANT;
mCachedParams[Engine.PARAM_POSITION_STREAM] = Engine.KEY_PARAM_STREAM;
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID] = Engine.KEY_PARAM_UTTERANCE_ID;
mCachedParams[Engine.PARAM_POSITION_RATE + 1] =
String.valueOf(Engine.DEFAULT_RATE); |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| Attribute |
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
try {
mITts.addSpeech(mPackageName, text, packagename, resourceId);
<<<<<<< HEAD
return SUCCESS;
=======
return TTS_SUCCESS;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
} catch (RemoteException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - addSpeech", "RemoteException"); |
| Solution content |
|---|
}
try {
mITts.addSpeech(mPackageName, text, packagename, resourceId);
return SUCCESS;
} catch (RemoteException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - addSpeech", "RemoteException"); |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
return ERROR;
}
try {
<<<<<<< HEAD
mITts.addEarconFile(mPackageName, earcon, filename);
return SUCCESS;
=======
mITts.addSpeechFile(mPackageName, text, filename);
return TTS_SUCCESS;
} catch (RemoteException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - addSpeech", "RemoteException");
e.printStackTrace();
mStarted = false;
initTts();
} catch (NullPointerException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - addSpeech", "NullPointerException");
e.printStackTrace();
mStarted = false;
initTts();
} catch (IllegalStateException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - addSpeech", "IllegalStateException");
e.printStackTrace();
mStarted = false;
initTts();
}
return TTS_ERROR;
}
}
/**
* Adds a mapping between a string of text and a sound resource in a
* package.
*
* @see #TTS.playEarcon(String earcon, int queueMode, String[] params)
*
* @param earcon The name of the earcon
* Example: |
| Solution content |
|---|
return ERROR;
}
try {
mITts.addEarconFile(mPackageName, earcon, filename);
return SUCCESS;
} catch (RemoteException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - addEarcon", "RemoteException"); |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Catch clause |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Synchronized statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
try {
if ((params != null) && (!params.isEmpty())) {
<<<<<<< HEAD
String extra = params.get(Engine.KEY_PARAM_STREAM);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_STREAM + 1] = extra;
}
extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
=======
String extra = params.get(Engine.TTS_KEY_PARAM_STREAM);
if (extra != null) {
mCachedParams[Engine.TTS_PARAM_POSITION_STREAM + 1] = extra;
}
extra = params.get(Engine.TTS_KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.TTS_PARAM_POSITION_UTTERANCE_ID + 1] = extra;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
}
result = mITts.speak(mPackageName, text, queueMode, mCachedParams); |
| Solution content |
|---|
}
try {
if ((params != null) && (!params.isEmpty())) {
String extra = params.get(Engine.KEY_PARAM_STREAM);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_STREAM + 1] = extra;
}
extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
}
result = mITts.speak(mPackageName, text, queueMode, mCachedParams); |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
try {
if ((params != null) && (!params.isEmpty())) {
<<<<<<< HEAD
String extra = params.get(Engine.KEY_PARAM_STREAM);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_STREAM + 1] = extra;
}
extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
=======
String extra = params.get(Engine.TTS_KEY_PARAM_STREAM);
if (extra != null) {
mCachedParams[Engine.TTS_PARAM_POSITION_STREAM + 1] = extra;
}
extra = params.get(Engine.TTS_KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.TTS_PARAM_POSITION_UTTERANCE_ID + 1] = extra;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
}
result = mITts.playEarcon(mPackageName, earcon, queueMode, null); |
| Solution content |
|---|
}
try {
if ((params != null) && (!params.isEmpty())) {
String extra = params.get(Engine.KEY_PARAM_STREAM);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_STREAM + 1] = extra;
}
extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
}
result = mITts.playEarcon(mPackageName, earcon, queueMode, null); |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
try {
if ((params != null) && (!params.isEmpty())) {
<<<<<<< HEAD
String extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
=======
String extra = params.get(Engine.TTS_KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.TTS_PARAM_POSITION_UTTERANCE_ID + 1] = extra;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
}
result = mITts.playSilence(mPackageName, durationInMs, queueMode, mCachedParams); |
| Solution content |
|---|
}
try {
if ((params != null) && (!params.isEmpty())) {
String extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
}
result = mITts.playSilence(mPackageName, durationInMs, queueMode, mCachedParams); |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
try {
if (speechRate > 0) {
int rate = (int)(speechRate*100);
<<<<<<< HEAD
mCachedParams[Engine.PARAM_POSITION_RATE + 1] = String.valueOf(rate);
// the rate is not set here, instead it is cached so it will be associated
// with all upcoming utterances.
if (speechRate > 0.0f) {
result = SUCCESS;
} else {
result = ERROR;
}
}
} catch (NullPointerException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - setSpeechRate", "NullPointerException");
e.printStackTrace();
mStarted = false;
initTts();
} catch (IllegalStateException e) {
// TTS died; restart it.
=======
mCachedParams[Engine.TTS_PARAM_POSITION_RATE + 1] = String.valueOf(rate);
// the rate is not set here, instead it is cached so it will be associated
// with all upcoming utterances.
if (speechRate > 0.0f) {
result = TTS_SUCCESS;
} else {
result = TTS_ERROR;
}
}
} catch (NullPointerException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - setSpeechRate", "NullPointerException");
e.printStackTrace();
mStarted = false;
initTts();
} catch (IllegalStateException e) {
// TTS died; restart it.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
Log.e("TextToSpeech.java - setSpeechRate", "IllegalStateException");
e.printStackTrace();
mStarted = false; |
| Solution content |
|---|
try {
if (speechRate > 0) {
int rate = (int)(speechRate*100);
mCachedParams[Engine.PARAM_POSITION_RATE + 1] = String.valueOf(rate);
// the rate is not set here, instead it is cached so it will be associated
// with all upcoming utterances.
if (speechRate > 0.0f) {
result = SUCCESS;
} else {
result = ERROR;
}
}
} catch (NullPointerException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - setSpeechRate", "NullPointerException");
e.printStackTrace();
mStarted = false;
initTts();
} catch (IllegalStateException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - setSpeechRate", "IllegalStateException");
e.printStackTrace();
mStarted = false; |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| Catch clause |
| Comment |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* @param loc
* The locale describing the language to be used.
*
<<<<<<< HEAD
* @return code indicating the support status for the locale. See {@link #LANG_AVAILABLE},
* {@link #LANG_COUNTRY_AVAILABLE}, {@link #LANG_COUNTRY_VAR_AVAILABLE},
* {@link #LANG_MISSING_DATA} and {@link #LANG_NOT_SUPPORTED}.
=======
* @return code indicating the support status for the locale. See {@link #TTS_LANG_AVAILABLE},
* {@link #TTS_LANG_COUNTRY_AVAILABLE}, {@link #TTS_LANG_COUNTRY_VAR_AVAILABLE},
* {@link #TTS_LANG_MISSING_DATA} and {@link #TTS_LANG_NOT_SUPPORTED}.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public int setLanguage(Locale loc) {
synchronized (mStartLock) { |
| Solution content |
|---|
* @param loc
* The locale describing the language to be used.
*
* @return code indicating the support status for the locale. See {@link #LANG_AVAILABLE},
* {@link #LANG_COUNTRY_AVAILABLE}, {@link #LANG_COUNTRY_VAR_AVAILABLE},
* {@link #LANG_MISSING_DATA} and {@link #LANG_NOT_SUPPORTED}.
*/
public int setLanguage(Locale loc) {
synchronized (mStartLock) { |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
return result;
}
try {
<<<<<<< HEAD
mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1] = loc.getISO3Language();
mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1] = loc.getISO3Country();
mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] = loc.getVariant();
// the language is not set here, instead it is cached so it will be associated
// with all upcoming utterances. But we still need to report the language support,
// which is achieved by calling isLanguageAvailable()
result = mITts.isLanguageAvailable(
mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1],
mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1],
mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] );
=======
mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE + 1] = loc.getISO3Language();
mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY + 1] = loc.getISO3Country();
mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT + 1] = loc.getVariant();
result = mITts.setLanguage(mPackageName,
mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE + 1],
mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY + 1],
mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT + 1] );
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
} catch (RemoteException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - setLanguage", "RemoteException"); |
| Solution content |
|---|
return result;
}
try {
mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1] = loc.getISO3Language();
mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1] = loc.getISO3Country();
mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] = loc.getVariant();
// the language is not set here, instead it is cached so it will be associated
// with all upcoming utterances. But we still need to report the language support,
// which is achieved by calling isLanguageAvailable()
result = mITts.isLanguageAvailable(
mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1],
mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1],
mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] );
} catch (RemoteException e) {
// TTS died; restart it.
Log.e("TextToSpeech.java - setLanguage", "RemoteException"); |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| Comment |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* @param loc
* The Locale describing the language to be used.
*
<<<<<<< HEAD
* @return code indicating the support status for the locale. See {@link #LANG_AVAILABLE},
* {@link #LANG_COUNTRY_AVAILABLE}, {@link #LANG_COUNTRY_VAR_AVAILABLE},
* {@link #LANG_MISSING_DATA} and {@link #LANG_NOT_SUPPORTED}.
=======
* @return code indicating the support status for the locale. See {@link #TTS_LANG_AVAILABLE},
* {@link #TTS_LANG_COUNTRY_AVAILABLE}, {@link #TTS_LANG_COUNTRY_VAR_AVAILABLE},
* {@link #TTS_LANG_MISSING_DATA} and {@link #TTS_LANG_NOT_SUPPORTED}.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public int isLanguageAvailable(Locale loc) {
synchronized (mStartLock) { |
| Solution content |
|---|
* @param loc
* The Locale describing the language to be used.
*
* @return code indicating the support status for the locale. See {@link #LANG_AVAILABLE},
* {@link #LANG_COUNTRY_AVAILABLE}, {@link #LANG_COUNTRY_VAR_AVAILABLE},
* {@link #LANG_MISSING_DATA} and {@link #LANG_NOT_SUPPORTED}.
*/
public int isLanguageAvailable(Locale loc) {
synchronized (mStartLock) { |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
try {
if ((params != null) && (!params.isEmpty())) {
// no need to read the stream type here
<<<<<<< HEAD
String extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
}
if (mITts.synthesizeToFile(mPackageName, text, mCachedParams, filename)){
result = SUCCESS;
=======
String extra = params.get(Engine.TTS_KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.TTS_PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
}
if (mITts.synthesizeToFile(mPackageName, text, mCachedParams, filename)){
result = TTS_SUCCESS;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
} catch (RemoteException e) {
// TTS died; restart it. |
| Solution content |
|---|
try {
if ((params != null) && (!params.isEmpty())) {
// no need to read the stream type here
String extra = params.get(Engine.KEY_PARAM_UTTERANCE_ID);
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
}
if (mITts.synthesizeToFile(mPackageName, text, mCachedParams, filename)){
result = SUCCESS;
}
} catch (RemoteException e) {
// TTS died; restart it. |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* if they are not persistent between calls to the service.
*/
private void resetCachedParams() {
<<<<<<< HEAD
mCachedParams[Engine.PARAM_POSITION_STREAM + 1] =
String.valueOf(Engine.DEFAULT_STREAM);
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID+ 1] = "";
=======
mCachedParams[Engine.TTS_PARAM_POSITION_STREAM + 1] =
String.valueOf(Engine.TTS_DEFAULT_STREAM);
mCachedParams[Engine.TTS_PARAM_POSITION_UTTERANCE_ID+ 1] = "";
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
/** |
| Solution content |
|---|
* if they are not persistent between calls to the service.
*/
private void resetCachedParams() {
mCachedParams[Engine.PARAM_POSITION_STREAM + 1] =
String.valueOf(Engine.DEFAULT_STREAM);
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID+ 1] = "";
}
/** |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* @param listener
* The OnUtteranceCompletedListener
*
<<<<<<< HEAD
* @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
=======
* @return Code indicating success or failure. See TTS_ERROR and TTS_SUCCESS.
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public int setOnUtteranceCompletedListener(
final OnUtteranceCompletedListener listener) { |
| Solution content |
|---|
* @param listener
* The OnUtteranceCompletedListener
*
* @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
*/
public int setOnUtteranceCompletedListener(
final OnUtteranceCompletedListener listener) { |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
if (!mStarted) {
public int setOnUtteranceCompletedListener(
final OnUtteranceCompletedListener listener) {
synchronized (mStartLock) {
<<<<<<< HEAD
int result = ERROR;
=======
int result = TTS_ERROR;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
return result;
} |
| Solution content |
|---|
public int setOnUtteranceCompletedListener(
final OnUtteranceCompletedListener listener) {
synchronized (mStartLock) {
int result = ERROR;
if (!mStarted) {
return result;
} |
| File |
|---|
| TextToSpeech.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
widthPixels = 0;
heightPixels = 0;
density = DENSITY_DEVICE / (float) DENSITY_DEFAULT;
<<<<<<< HEAD
densityDpi = DENSITY_DEVICE;
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
scaledDensity = density;
xdpi = DENSITY_DEVICE;
ydpi = DENSITY_DEVICE; |
| Solution content |
|---|
widthPixels = 0;
heightPixels = 0;
density = DENSITY_DEVICE / (float) DENSITY_DEFAULT;
densityDpi = DENSITY_DEVICE;
scaledDensity = density;
xdpi = DENSITY_DEVICE;
ydpi = DENSITY_DEVICE; |
| File |
|---|
| DisplayMetrics.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
heightPixels = defaultHeight;
}
}
<<<<<<< HEAD
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
if (compatibilityInfo.isScalingRequired()) {
float invertedRatio = compatibilityInfo.applicationInvertedScale;
density *= invertedRatio; |
| Solution content |
|---|
heightPixels = defaultHeight;
}
}
if (compatibilityInfo.isScalingRequired()) {
float invertedRatio = compatibilityInfo.applicationInvertedScale;
density *= invertedRatio; |
| File |
|---|
| DisplayMetrics.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Blank |
| Chunk |
|---|
| Conflicting content |
|---|
private Canvas mCanvas;
// The display metrics used to provide the pseudo canvas size for applications
<<<<<<< HEAD
// running in compatibility mode. This is set to null for non compatibility mode.
private DisplayMetrics mCompatibleDisplayMetrics;
// A matrix to scale the matrix set by application. This is set to null for
// non compatibility mode.
private Matrix mCompatibleMatrix;
=======
// running in compatibility mode. This is set to null for regular mode.
private DisplayMetrics mDisplayMetrics;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
/**
* Exception thrown when a surface couldn't be created or resized |
| Solution content |
|---|
private Canvas mCanvas;
// The display metrics used to provide the pseudo canvas size for applications
// running in compatibility mode. This is set to null for non compatibility mode.
private DisplayMetrics mCompatibleDisplayMetrics;
// A matrix to scale the matrix set by application. This is set to null for
// non compatibility mode.
private Matrix mCompatibleMatrix;
/**
* Exception thrown when a surface couldn't be created or resized |
| File |
|---|
| Surface.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
=======
* {@hide}
*/
public Surface() {
<<<<<<< HEAD
mCanvas = new CompatibleCanvas();
}
/**
* A Canvas class that can handle the compatibility mode. This does two things differently.
*
|
| Solution content |
|---|
* {@hide}
*/
public Surface() {
mCanvas = new CompatibleCanvas();
}
/**
* A Canvas class that can handle the compatibility mode. This does two things differently.
*
|
| File |
|---|
| Surface.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Class declaration |
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
/**
/**
* Sets the display metrics used to provide canva's width/height in comaptibility mode.
*/
<<<<<<< HEAD
void setCompatibleDisplayMetrics(DisplayMetrics metrics, Translator translator) {
mCompatibleDisplayMetrics = metrics;
if (translator != null) {
float appScale = translator.applicationScale;
mCompatibleMatrix = new Matrix();
mCompatibleMatrix.setScale(appScale, appScale);
}
=======
void setCompatibleDisplayMetrics(DisplayMetrics metrics) {
mDisplayMetrics = metrics;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
|
| Solution content |
|---|
/**
* Sets the display metrics used to provide canva's width/height in comaptibility mode.
*/
void setCompatibleDisplayMetrics(DisplayMetrics metrics, Translator translator) {
mCompatibleDisplayMetrics = metrics;
if (translator != null) {
float appScale = translator.applicationScale;
mCompatibleMatrix = new Matrix();
mCompatibleMatrix.setScale(appScale, appScale);
}
}
/** |
| File |
|---|
| Surface.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
@Override
<<<<<<< HEAD
=======
public boolean dispatchTouchEvent(MotionEvent event) {
// SurfaceView uses pre-scaled size unless fixed size is requested. This hook
// scales the event back to the pre-scaled coordinates for such surface.
if (mScaled) {
MotionEvent scaledBack = MotionEvent.obtain(event);
mTranslator.translateEventInScreenToAppWindow(event);
try {
return super.dispatchTouchEvent(scaledBack);
} finally {
scaledBack.recycle();
}
} else {
return super.dispatchTouchEvent(event);
}
}
@Override
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
protected void dispatchDraw(Canvas canvas) {
// if SKIP_DRAW is cleared, draw() has already punched a hole
if ((mPrivateFlags & SKIP_DRAW) == SKIP_DRAW) { |
| Solution content |
|---|
}
@Override
protected void dispatchDraw(Canvas canvas) {
// if SKIP_DRAW is cleared, draw() has already punched a hole
if ((mPrivateFlags & SKIP_DRAW) == SKIP_DRAW) { |
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
mWindowType = type;
}
<<<<<<< HEAD
=======
boolean mScaled = false;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
private void updateWindow(boolean force) {
if (!mHaveFrame) {
return; |
| Solution content |
|---|
mWindowType = type;
}
private void updateWindow(boolean force) {
if (!mHaveFrame) {
return; |
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
int myHeight = mRequestedHeight;
if (myHeight <= 0) myHeight = getHeight();
<<<<<<< HEAD
=======
// Use original size if the app specified the size of the view,
// and let the flinger to scale up.
if (mRequestedWidth <= 0 && mTranslator != null) {
myWidth = (int) (myWidth * appScale + 0.5f);
myHeight = (int) (myHeight * appScale + 0.5f);
mScaled = true;
} else {
mScaled = false;
}
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
getLocationInWindow(mLocation);
final boolean creating = mWindow == null;
final boolean formatChanged = mFormat != mRequestedFormat; |
| Solution content |
|---|
int myHeight = mRequestedHeight;
if (myHeight <= 0) myHeight = getHeight();
getLocationInWindow(mLocation);
final boolean creating = mWindow == null;
final boolean formatChanged = mFormat != mRequestedFormat; |
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
attrs = mWindowAttributes;
Resources resources = mView.getContext().getResources();
CompatibilityInfo compatibilityInfo = resources.getCompatibilityInfo();
<<<<<<< HEAD
mTranslator = compatibilityInfo.getTranslator();
if (mTranslator != null || !compatibilityInfo.supportsScreen()) {
mSurface.setCompatibleDisplayMetrics(resources.getDisplayMetrics(),
mTranslator);
=======
mTranslator = compatibilityInfo.getTranslator(attrs);
if (mTranslator != null || !compatibilityInfo.supportsScreen()) {
mSurface.setCompatibleDisplayMetrics(resources.getDisplayMetrics());
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
boolean restore = false; |
| Solution content |
|---|
attrs = mWindowAttributes;
Resources resources = mView.getContext().getResources();
CompatibilityInfo compatibilityInfo = resources.getCompatibilityInfo();
mTranslator = compatibilityInfo.getTranslator();
if (mTranslator != null || !compatibilityInfo.supportsScreen()) {
mSurface.setCompatibleDisplayMetrics(resources.getDisplayMetrics(),
mTranslator);
}
boolean restore = false; |
| File |
|---|
| ViewRoot.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
static {
sCertificateMimeTypeMap = new HashSet |
| Solution content |
|---|
static {
sCertificateMimeTypeMap = new HashSet |
| File |
|---|
| LoadListener.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* Private hook into the on click event, dispatched from {@link PassThroughClickListener}
*/
private void onClickImpl() {
<<<<<<< HEAD
// If the dropdown is showing, bring it back in front of the soft
// keyboard when the user touches the text field.
if (mPopup.isShowing() && isInputMethodNotNeeded()) {
=======
// if drop down should always visible, bring it back in front of the soft
// keyboard when the user touches the text field
if (mDropDownAlwaysVisible
&& mPopup.isShowing()
&& mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED) {
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
ensureImeVisible();
}
} |
| Solution content |
|---|
* Private hook into the on click event, dispatched from {@link PassThroughClickListener}
*/
private void onClickImpl() {
// If the dropdown is showing, bring it back in front of the soft
// keyboard when the user touches the text field.
if (mPopup.isShowing() && isInputMethodNotNeeded()) {
ensureImeVisible();
}
} |
| File |
|---|
| AutoCompleteTextView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
showDropDown();
}
<<<<<<< HEAD
/**
* @hide internal used only here and SearchDialog
*/
public boolean isInputMethodNotNeeded() {
return mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
}
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
/**
* |
| Solution content |
|---|
mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
showDropDown();
}
/**
* @hide internal used only here and SearchDialog
*/
public boolean isInputMethodNotNeeded() {
return mPopup.getInputMethodMode() == PopupWindow.INPUT_METHOD_NOT_NEEDED;
}
/**
* |
| File |
|---|
| AutoCompleteTextView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Indicates that the bitmap was created for an unknown pixel density.
*
<<<<<<< HEAD
* @see Bitmap#getDensity()
* @see Bitmap#setDensity(int)
=======
* @see Bitmap#getDensityScale()
* @see Bitmap#setDensityScale(float)
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public static final int DENSITY_NONE = 0;
|
| Solution content |
|---|
/**
* Indicates that the bitmap was created for an unknown pixel density.
*
* @see Bitmap#getDensity()
* @see Bitmap#setDensity(int)
*/
public static final int DENSITY_NONE = 0;
|
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*
* @see #getDensityScale()
* @return A scaling factor of the default density or {@link #DENSITY_NONE}
* if the scaling factor is unknown.
*
<<<<<<< HEAD
* @see #setDensity(int)
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#densityDpi
* @see #DENSITY_NONE
=======
* @see #setDensityScale(float)
* @see #isAutoScalingEnabled()
* @see #setAutoScalingEnabled(boolean)
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#density
* @see #DENSITY_SCALE_UNKNOWN
*/
public float getDensityScale() {
return mDensityScale;
}
/**
* |
| Solution content |
|---|
* @return A scaling factor of the default density or {@link #DENSITY_NONE}
* if the scaling factor is unknown.
*
* @see #setDensity(int)
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#densityDpi
* @see #DENSITY_NONE
*/
public int getDensity() {
return mDensity; |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
* @param density The density scaling factor to use with this bitmap or
* {@link #DENSITY_NONE} if the density is unknown.
*
<<<<<<< HEAD
* @see #getDensity()
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#densityDpi
* @see #DENSITY_NONE
=======
* @return True if the bitmap must be scaled at drawing time, false otherwise.
*
* @see #setAutoScalingEnabled(boolean)
* @see #getDensityScale()
* @see #setDensityScale(float)
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public void setDensity(int density) {
mDensity = density; |
| Solution content |
|---|
* @param density The density scaling factor to use with this bitmap or
* {@link #DENSITY_NONE} if the density is unknown.
*
* @see #getDensity()
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#densityDpi
* @see #DENSITY_NONE
*/
public void setDensity(int density) {
mDensity = density; |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public void setDensity(int density) {
mDensity = density;
}
<<<<<<< HEAD
=======
/**
* |
| Solution content |
|---|
public void setDensity(int density) {
mDensity = density;
}
/**
* Sets the nine patch chunk.
* |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
canvas.setBitmap(bitmap);
canvas.drawBitmap(source, srcR, dstR, paint);
<<<<<<< HEAD
=======
// The new bitmap was created from a known bitmap source so assume that
// they use the same density scale
bitmap.mDensityScale = source.mDensityScale;
bitmap.mAutoScaling = source.mAutoScaling;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
return bitmap;
}
|
| Solution content |
|---|
canvas.setBitmap(bitmap);
canvas.drawBitmap(source, srcR, dstR, paint);
return bitmap;
}
|
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* Convenience method that returns the width of this bitmap divided
* by the density scale factor.
*
<<<<<<< HEAD
* @param targetDensity The density of the target canvas of the bitmap.
* @return The scaled width of this bitmap, according to the density scale factor.
*/
public int getScaledWidth(int targetDensity) {
return scaleFromDensity(getWidth(), mDensity, targetDensity);
=======
* @param canvas The Canvas the bitmap will be drawn to.
* @return The scaled width of this bitmap, according to the density scale factor.
*/
public int getScaledWidth(Canvas canvas) {
final float scale = mDensityScale;
if (!mAutoScaling || scale < 0) {
return getWidth();
}
return (int)(getWidth() * canvas.getDensityScale() / scale);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
/** |
| Solution content |
|---|
* Convenience method that returns the width of this bitmap divided
* by the density scale factor.
*
* @param targetDensity The density of the target canvas of the bitmap.
* @return The scaled width of this bitmap, according to the density scale factor.
*/
public int getScaledWidth(int targetDensity) {
return scaleFromDensity(getWidth(), mDensity, targetDensity);
}
/** |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* @param metrics The target display metrics.
* Convenience method that returns the height of this bitmap divided
* by the density scale factor.
*
<<<<<<< HEAD
* @param targetDensity The density of the target canvas of the bitmap.
* @return The scaled height of this bitmap, according to the density scale factor.
*/
public int getScaledHeight(int targetDensity) {
return scaleFromDensity(getHeight(), mDensity, targetDensity);
=======
* @param canvas The Canvas the bitmap will be drawn to.
* @return The scaled height of this bitmap, according to the density scale factor.
*/
public int getScaledHeight(Canvas canvas) {
final float scale = mDensityScale;
if (!mAutoScaling || scale < 0) {
return getHeight();
}
return (int)(getHeight() * canvas.getDensityScale() / scale);
}
/**
* Convenience method that returns the width of this bitmap divided
* by the density scale factor.
*
* @param metrics The target display metrics.
* @return The scaled width of this bitmap, according to the density scale factor.
*/
public int getScaledWidth(DisplayMetrics metrics) {
final float scale = mDensityScale;
if (!mAutoScaling || scale < 0) {
return getWidth();
}
return (int)(getWidth() * metrics.density / scale);
}
/**
* Convenience method that returns the height of this bitmap divided
* by the density scale factor.
*
* @return The scaled height of this bitmap, according to the density scale factor.
*/
public int getScaledHeight(DisplayMetrics metrics) {
final float scale = mDensityScale;
if (!mAutoScaling || scale < 0) {
return getHeight();
}
return (int)(getHeight() * metrics.density / scale);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
/** |
| Solution content |
|---|
* Convenience method that returns the height of this bitmap divided
* by the density scale factor.
*
* @param targetDensity The density of the target canvas of the bitmap.
* @return The scaled height of this bitmap, according to the density scale factor.
*/
public int getScaledHeight(int targetDensity) {
return scaleFromDensity(getHeight(), mDensity, targetDensity);
}
/** |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Comment |
| If statement |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* will fill in the density associated with the resource. The other
* functions will leave it as-is and no density will be applied.
*
<<<<<<< HEAD
* @see #inTargetDensity
* @see #inScreenDensity
* @see #inScaled
* @see Bitmap#setDensity(int)
* @see android.util.DisplayMetrics#densityDpi
=======
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#density
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public int inDensity;
|
| Solution content |
|---|
* will fill in the density associated with the resource. The other
* functions will leave it as-is and no density will be applied.
*
* @see #inTargetDensity
* @see #inScreenDensity
* @see #inScaled
* @see Bitmap#setDensity(int)
* @see android.util.DisplayMetrics#densityDpi
*/
public int inDensity;
|
| File |
|---|
| BitmapFactory.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
public int inDensity;
/**
<<<<<<< HEAD
* The pixel density of the destination this bitmap will be drawn to.
* This is used in conjunction with {@link #inDensity} and
* {@link #inScaled} to determine if and how to scale the bitmap before
* returning it.
*
* |
| Solution content |
|---|
public int inDensity;
/**
* The pixel density of the destination this bitmap will be drawn to.
* This is used in conjunction with {@link #inDensity} and
* {@link #inScaled} to determine if and how to scale the bitmap before
* returning it.
*
* |
| File |
|---|
| BitmapFactory.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
}
} else {
opts = new Options();
}
<<<<<<< HEAD
if (opts.inDensity == 0 && value != null) {
final int density = value.density;
if (density == TypedValue.DENSITY_DEFAULT) {
opts.inDensity = DisplayMetrics.DENSITY_DEFAULT;
} else if (density != TypedValue.DENSITY_NONE) {
opts.inDensity = density;
=======
Bitmap bm = decodeStream(is, pad, opts);
if (bm != null && res != null && value != null) {
final int density = value.density;
if (density == TypedValue.DENSITY_NONE) {
return bm;
}
byte[] np = bm.getNinePatchChunk();
final boolean isNinePatch = np != null && NinePatch.isNinePatchChunk(np);
if (opts.inDensity == 0) {
opts.inDensity = density == TypedValue.DENSITY_DEFAULT ?
DisplayMetrics.DENSITY_DEFAULT : density;
}
float scale = opts.inDensity / (float) DisplayMetrics.DENSITY_DEFAULT;
if (opts.inScaled || isNinePatch) {
bm.setDensityScale(1.0f);
bm.setAutoScalingEnabled(false);
// Assume we are going to prescale for the screen
scale = res.getDisplayMetrics().density / scale;
if (scale != 1.0f) {
// TODO: This is very inefficient and should be done in native by Skia
final Bitmap oldBitmap = bm;
bm = Bitmap.createScaledBitmap(oldBitmap, (int) (bm.getWidth() * scale + 0.5f),
(int) (bm.getHeight() * scale + 0.5f), true);
oldBitmap.recycle();
if (isNinePatch) {
np = nativeScaleNinePatch(np, scale, pad);
bm.setNinePatchChunk(np);
}
bm.setDensityScale(scale);
bm.setAutoScalingEnabled(true);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
}
|
| Solution content |
|---|
opts = new Options();
}
if (opts.inDensity == 0 && value != null) {
final int density = value.density;
if (density == TypedValue.DENSITY_DEFAULT) {
opts.inDensity = DisplayMetrics.DENSITY_DEFAULT;
} else if (density != TypedValue.DENSITY_NONE) {
opts.inDensity = density;
}
}
|
| File |
|---|
| BitmapFactory.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* @return Returns the current target density of the canvas, which is used
* to determine the scaling factor when drawing a bitmap into it.
*
<<<<<<< HEAD
* @see #setDensity(int)
* @see Bitmap#getDensity()
=======
* @see #setDensityScale(float)
* @see Bitmap#getDensityScale()
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public int getDensity() {
return mDensity; |
| Solution content |
|---|
* @return Returns the current target density of the canvas, which is used
* to determine the scaling factor when drawing a bitmap into it.
*
* @see #setDensity(int)
* @see Bitmap#getDensity()
*/
public int getDensity() {
return mDensity; |
| File |
|---|
| Canvas.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* the target density of the canvas itself, as well as the density of its
* backing bitmap via {@link Bitmap#setDensity(int) Bitmap.setDensity(int)}.
*
<<<<<<< HEAD
* @param density The new target density of the canvas, which is used
* to determine the scaling factor when drawing a bitmap into it. Use
* {@link Bitmap#DENSITY_NONE} to disable bitmap scaling.
*
* @see #getDensity()
* @see Bitmap#setDensity(int)
=======
* @see #getDensityScale()
* @see Bitmap#setDensityScale(float)
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
*/
public void setDensity(int density) {
if (mBitmap != null) { |
| Solution content |
|---|
* the target density of the canvas itself, as well as the density of its
* backing bitmap via {@link Bitmap#setDensity(int) Bitmap.setDensity(int)}.
*
* @param density The new target density of the canvas, which is used
* to determine the scaling factor when drawing a bitmap into it. Use
* {@link Bitmap#DENSITY_NONE} to disable bitmap scaling.
*
* @see #getDensity()
* @see Bitmap#setDensity(int)
*/
public void setDensity(int density) {
if (mBitmap != null) { |
| File |
|---|
| Canvas.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
private native String getPkcs12PrivateKey(int handle);
private native String popPkcs12CertificateStack(int handle);
private native void freePkcs12Handle(int handle);
<<<<<<< HEAD
private native String generateCertificateRequest(int bits, String challenge);
=======
private native String generateCertificateRequest(int bits, String subject);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
private native boolean isPkcs12Keystore(byte[] data);
private native int generateX509Certificate(byte[] data);
private native boolean isCaCertificate(int handle); |
| Solution content |
|---|
private native String getPkcs12PrivateKey(int handle);
private native String popPkcs12CertificateStack(int handle);
private native void freePkcs12Handle(int handle);
private native String generateCertificateRequest(int bits, String challenge);
private native boolean isPkcs12Keystore(byte[] data);
private native int generateX509Certificate(byte[] data);
private native boolean isCaCertificate(int handle); |
| File |
|---|
| CertTool.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method interface |
| Chunk |
|---|
| Conflicting content |
|---|
*/
private int speak(String callingApp, String text, int queueMode, ArrayList |
| Solution content |
|---|
*/
private int speak(String callingApp, String text, int queueMode, ArrayList |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/
private int playEarcon(String callingApp, String earcon, int queueMode,
ArrayList |
| Solution content |
|---|
*/
private int playEarcon(String callingApp, String earcon, int queueMode,
ArrayList |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
* Stops all speech output and removes any utterances still in the queue for the calling app.
*/
private int stop(String callingApp) {
<<<<<<< HEAD
int result = TextToSpeech.ERROR;
boolean speechQueueAvailable = false;
try{
speechQueueAvailable =
speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT, TimeUnit.MILLISECONDS);
=======
int result = TextToSpeech.TTS_ERROR;
boolean speechQueueAvailable = false;
try{
// If the queue is locked for more than 1 second,
// something has gone very wrong with processSpeechQueue.
speechQueueAvailable = speechQueueLock.tryLock(1000, TimeUnit.MILLISECONDS);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
if (speechQueueAvailable) {
Log.i("TtsService", "Stopping");
for (int i = mSpeechQueue.size() - 1; i > -1; i--){ |
| Solution content |
|---|
* Stops all speech output and removes any utterances still in the queue for the calling app.
*/
private int stop(String callingApp) {
int result = TextToSpeech.ERROR;
boolean speechQueueAvailable = false;
try{
speechQueueAvailable =
speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT, TimeUnit.MILLISECONDS);
if (speechQueueAvailable) {
Log.i("TtsService", "Stopping");
for (int i = mSpeechQueue.size() - 1; i > -1; i--){ |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
mIsSpeaking = false;
mCurrentSpeechItem = null;
} else {
result = TextToSpeech.SUCCESS;
=======
result = TextToSpeech.TTS_SUCCESS;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
Log.i("TtsService", "Stopped");
} |
| Solution content |
|---|
mIsSpeaking = false;
mCurrentSpeechItem = null;
} else {
result = TextToSpeech.SUCCESS;
}
Log.i("TtsService", "Stopped");
} |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* Stops all speech output and removes any utterances still in the queue globally.
*/
private int stopAll(String callingApp) {
<<<<<<< HEAD
int result = TextToSpeech.ERROR;
boolean speechQueueAvailable = false;
try{
speechQueueAvailable =
speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT, TimeUnit.MILLISECONDS);
=======
int result = TextToSpeech.TTS_ERROR;
boolean speechQueueAvailable = false;
try{
// If the queue is locked for more than 1 second,
// something has gone very wrong with processSpeechQueue.
speechQueueAvailable = speechQueueLock.tryLock(1000, TimeUnit.MILLISECONDS);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
if (speechQueueAvailable) {
for (int i = mSpeechQueue.size() - 1; i > -1; i--){
if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE){ |
| Solution content |
|---|
* Stops all speech output and removes any utterances still in the queue globally.
*/
private int stopAll(String callingApp) {
int result = TextToSpeech.ERROR;
boolean speechQueueAvailable = false;
try{
speechQueueAvailable =
speechQueueLock.tryLock(SPEECHQUEUELOCK_TIMEOUT, TimeUnit.MILLISECONDS);
if (speechQueueAvailable) {
for (int i = mSpeechQueue.size() - 1; i > -1; i--){
if (mSpeechQueue.get(i).mType != SpeechItem.TEXT_TO_FILE){ |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
mIsSpeaking = false;
mCurrentSpeechItem = null;
} else {
<<<<<<< HEAD
result = TextToSpeech.SUCCESS;
=======
result = TextToSpeech.TTS_SUCCESS;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
Log.i("TtsService", "Stopped all");
} |
| Solution content |
|---|
mIsSpeaking = false;
mCurrentSpeechItem = null;
} else {
result = TextToSpeech.SUCCESS;
}
Log.i("TtsService", "Stopped all");
} |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (params != null){
for (int i = 0; i < params.size() - 1; i = i + 2){
String param = params.get(i);
<<<<<<< HEAD
if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
=======
if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_UTTERANCE_ID)){
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
utteranceId = params.get(i+1);
}
} |
| Solution content |
|---|
if (params != null){
for (int i = 0; i < params.size() - 1; i = i + 2){
String param = params.get(i);
if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
utteranceId = params.get(i+1);
}
} |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
private int playSilence(String callingApp, long duration, int queueMode,
ArrayList |
| Solution content |
|---|
private int playSilence(String callingApp, long duration, int queueMode,
ArrayList |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (speechItem.mParams != null){
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
<<<<<<< HEAD
if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
=======
if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_UTTERANCE_ID)){
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
utteranceId = speechItem.mParams.get(i+1);
}
} |
| Solution content |
|---|
if (speechItem.mParams != null){
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
utteranceId = speechItem.mParams.get(i+1);
}
} |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| TypeDeclarationStatement |
| Chunk |
|---|
| Conflicting content |
|---|
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
if (param != null) {
<<<<<<< HEAD
if (param.equals(TextToSpeech.Engine.KEY_PARAM_RATE)) {
speechRate = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_LANGUAGE)){
language = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_COUNTRY)){
country = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_VARIANT)){
variant = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
utteranceId = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_STREAM)) {
=======
if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_RATE)) {
speechRate = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_LANGUAGE)){
language = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_COUNTRY)){
country = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_VARIANT)){
variant = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_UTTERANCE_ID)){
utteranceId = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_STREAM)) {
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
try {
streamType
= Integer.parseInt(speechItem.mParams.get(i + 1)); |
| Solution content |
|---|
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
if (param != null) {
if (param.equals(TextToSpeech.Engine.KEY_PARAM_RATE)) {
speechRate = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_LANGUAGE)){
language = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_COUNTRY)){
country = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_VARIANT)){
variant = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
utteranceId = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_STREAM)) {
try {
streamType
= Integer.parseInt(speechItem.mParams.get(i + 1)); |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| TypeDeclarationStatement |
| Chunk |
|---|
| Conflicting content |
|---|
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
if (param != null) {
<<<<<<< HEAD
if (param.equals(TextToSpeech.Engine.KEY_PARAM_RATE)) {
speechRate = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_LANGUAGE)){
language = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_COUNTRY)){
country = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_VARIANT)){
variant = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
=======
if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_RATE)) {
speechRate = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_LANGUAGE)){
language = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_COUNTRY)){
country = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_VARIANT)){
variant = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_UTTERANCE_ID)){
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
utteranceId = speechItem.mParams.get(i+1);
}
} |
| Solution content |
|---|
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
if (param != null) {
if (param.equals(TextToSpeech.Engine.KEY_PARAM_RATE)) {
speechRate = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_LANGUAGE)){
language = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_COUNTRY)){
country = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_VARIANT)){
variant = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
utteranceId = speechItem.mParams.get(i+1);
}
} |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| TypeDeclarationStatement |
| Chunk |
|---|
| Conflicting content |
|---|
}
for (int i = 0; i < paramList.size() - 1; i = i + 2) {
String param = paramList.get(i);
<<<<<<< HEAD
if ((param != null) && (param.equals(TextToSpeech.Engine.KEY_PARAM_STREAM))) {
=======
if ((param != null) && (param.equals(TextToSpeech.Engine.TTS_KEY_PARAM_STREAM))) {
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
try {
streamType = Integer.parseInt(paramList.get(i + 1));
} catch (NumberFormatException e) { |
| Solution content |
|---|
}
for (int i = 0; i < paramList.size() - 1; i = i + 2) {
String param = paramList.get(i);
if ((param != null) && (param.equals(TextToSpeech.Engine.KEY_PARAM_STREAM))) {
try {
streamType = Integer.parseInt(paramList.get(i + 1));
} catch (NumberFormatException e) { |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (cb != null) {
mCallbacks.register(cb);
mCallbacksMap.put(packageName, cb);
<<<<<<< HEAD
return TextToSpeech.SUCCESS;
}
return TextToSpeech.ERROR;
=======
return TextToSpeech.TTS_SUCCESS;
}
return TextToSpeech.TTS_ERROR;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
public int unregisterCallback(String packageName, ITtsCallback cb) { |
| Solution content |
|---|
if (cb != null) {
mCallbacks.register(cb);
mCallbacksMap.put(packageName, cb);
return TextToSpeech.SUCCESS;
}
return TextToSpeech.ERROR;
}
public int unregisterCallback(String packageName, ITtsCallback cb) { |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
if (cb != null) {
mCallbacksMap.remove(packageName);
mCallbacks.unregister(cb);
<<<<<<< HEAD
return TextToSpeech.SUCCESS;
return TextToSpeech.ERROR;
=======
return TextToSpeech.TTS_SUCCESS;
}
return TextToSpeech.TTS_ERROR;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
/** |
| Solution content |
|---|
if (cb != null) {
mCallbacksMap.remove(packageName);
mCallbacks.unregister(cb);
return TextToSpeech.SUCCESS;
}
return TextToSpeech.ERROR;
}
/** |
| File |
|---|
| TtsService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
L2tpIpsecPskProfile p = getProfile();
// IPSEC
<<<<<<< HEAD
DaemonProxy ipsec = startDaemon(IPSEC);
ipsec.sendCommand(serverIp, L2tpService.L2TP_PORT, p.getPresharedKey());
ipsec.closeControlSocket();
=======
AndroidServiceProxy ipsecService = startService(IPSEC_DAEMON);
ipsecService.sendCommand(serverIp, L2tpService.L2TP_PORT,
p.getPresharedKey());
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
sleep(2000); // 2 seconds
|
| Solution content |
|---|
L2tpIpsecPskProfile p = getProfile();
// IPSEC
DaemonProxy ipsec = startDaemon(IPSEC);
ipsec.sendCommand(serverIp, L2tpService.L2TP_PORT, p.getPresharedKey());
ipsec.closeControlSocket();
sleep(2000); // 2 seconds
|
| File |
|---|
| L2tpIpsecPskService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
protected void connect(String serverIp, String username, String password)
throws IOException {
// IPSEC
<<<<<<< HEAD
DaemonProxy ipsec = startDaemon(IPSEC);
ipsec.sendCommand(serverIp, L2tpService.L2TP_PORT,
=======
AndroidServiceProxy ipsecService = startService(IPSEC_DAEMON);
ipsecService.sendCommand(serverIp, L2tpService.L2TP_PORT,
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
getUserkeyPath(), getUserCertPath(), getCaCertPath());
ipsec.closeControlSocket();
|
| Solution content |
|---|
protected void connect(String serverIp, String username, String password)
throws IOException {
// IPSEC
DaemonProxy ipsec = startDaemon(IPSEC);
ipsec.sendCommand(serverIp, L2tpService.L2TP_PORT,
getUserkeyPath(), getUserCertPath(), getCaCertPath());
ipsec.closeControlSocket();
|
| File |
|---|
| L2tpIpsecService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
VpnServiceBinder mContext;
private VpnState mState = VpnState.IDLE;
<<<<<<< HEAD
private Throwable mError;
=======
private boolean mInError;
private VpnConnectingError mError;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
// connection settings
private String mOriginalDns1; |
| Solution content |
|---|
VpnServiceBinder mContext;
private VpnState mState = VpnState.IDLE;
private Throwable mError;
// connection settings
private String mOriginalDns1; |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
return InetAddress.getByName(hostName).getHostAddress();
}
<<<<<<< HEAD
=======
/**
* Sets the system property. The method is blocked until the value is
* settled in.
* @param name the name of the property
* @param value the value of the property
* @throws IOException if it fails to set the property within 2 seconds
*/
protected void setSystemProperty(String name, String value)
throws IOException {
SystemProperties.set(name, value);
for (int i = 0; i < 5; i++) {
String v = SystemProperties.get(name);
if (v.equals(value)) {
return;
} else {
Log.d(TAG, "sys_prop: wait for " + name + " to settle in");
sleep(400);
}
}
throw new IOException("Failed to set system property: " + name);
}
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
void setContext(VpnServiceBinder context, E profile) {
mContext = context;
mProfile = profile; |
| Solution content |
|---|
return InetAddress.getByName(hostName).getHostAddress();
}
void setContext(VpnServiceBinder context, E profile) {
mContext = context;
mProfile = profile; |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
return true;
} catch (Throwable e) {
Log.e(TAG, "onConnect()", e);
<<<<<<< HEAD
onError(e);
=======
mError = newConnectingError(e);
onError();
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
return false;
}
} |
| Solution content |
|---|
return true;
} catch (Throwable e) {
Log.e(TAG, "onConnect()", e);
onError(e);
return false;
}
} |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
mDaemonHelper.stopAll();
} catch (Throwable e) {
Log.e(TAG, "onDisconnect()", e);
<<<<<<< HEAD
} finally {
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
onFinalCleanUp();
}
} |
| Solution content |
|---|
mDaemonHelper.stopAll();
} catch (Throwable e) {
Log.e(TAG, "onDisconnect()", e);
} finally {
onFinalCleanUp();
}
} |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Other |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
private void waitUntilConnectedOrTimedout() {
<<<<<<< HEAD
sleep(2000); // 2 seconds
for (int i = 0; i < 60; i++) {
if (mState != VpnState.CONNECTING) {
break;
} else if (VPN_IS_UP.equals(
SystemProperties.get(VPN_STATUS))) {
onConnected();
return;
} else if (mDaemonHelper.anySocketError()) {
return;
}
sleep(500); // 0.5 second
}
synchronized (VpnService.this) {
if (mState == VpnState.CONNECTING) {
Log.d(TAG, " connecting timed out !!");
onError(new IOException("Connecting timed out"));
=======
// Run this in the background thread to not block UI
new Thread(new Runnable() {
public void run() {
sleep(2000); // 2 seconds
for (int i = 0; i < 60; i++) {
if (VPN_IS_UP.equals(SystemProperties.get(VPN_STATUS))) {
onConnected();
return;
} else if (mState != VpnState.CONNECTING) {
break;
}
sleep(500); // 0.5 second
synchronized (VpnService.this) {
if (mState == VpnState.CONNECTING) {
Log.d(TAG, " connecting timed out !!");
mError = newConnectingError(
new IOException("Connecting timed out"));
onError();
}
}
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
}).start();
} |
| Solution content |
|---|
}
private void waitUntilConnectedOrTimedout() {
sleep(2000); // 2 seconds
for (int i = 0; i < 60; i++) {
if (mState != VpnState.CONNECTING) {
break;
} else if (VPN_IS_UP.equals(
SystemProperties.get(VPN_STATUS))) {
onConnected();
return;
} else if (mDaemonHelper.anySocketError()) {
return;
}
sleep(500); // 0.5 second
}
synchronized (VpnService.this) {
if (mState == VpnState.CONNECTING) {
Log.d(TAG, " connecting timed out !!");
onError(new IOException("Connecting timed out"));
}
}
} |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| For statement |
| Method invocation |
| Synchronized statement |
| Chunk |
|---|
| Conflicting content |
|---|
mContext.stopSelf();
}
<<<<<<< HEAD
private boolean anyError() {
return (mError != null);
=======
private VpnConnectingError newConnectingError(Throwable e) {
return new VpnConnectingError(
(e instanceof UnknownHostException)
? VpnManager.VPN_ERROR_UNKNOWN_SERVER
: VpnManager.VPN_ERROR_CONNECTION_FAILED);
}
private synchronized void onOneServiceGone() {
switch (mState) {
case IDLE:
case DISCONNECTING:
break;
default:
onError();
}
}
private synchronized void onAllServicesGone() {
switch (mState) {
case IDLE:
break;
case DISCONNECTING:
// daemons are gone; now clean up everything
onFinalCleanUp();
break;
default:
onError();
}
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
private void restoreOriginalDnsProperties() { |
| Solution content |
|---|
mContext.stopSelf();
}
private boolean anyError() {
return (mError != null);
}
private void restoreOriginalDnsProperties() { |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method declaration |
| Method signature |
| Return statement |
| Switch statement |
| Chunk |
|---|
| Conflicting content |
|---|
private void broadcastConnectivity(VpnState s) {
VpnManager m = new VpnManager(mContext);
<<<<<<< HEAD
Throwable err = mError;
if ((s == VpnState.IDLE) && (err != null)) {
if (err instanceof UnknownHostException) {
m.broadcastConnectivity(mProfile.getName(), s,
VpnManager.VPN_ERROR_UNKNOWN_SERVER);
} else if (err instanceof VpnConnectingError) {
m.broadcastConnectivity(mProfile.getName(), s,
((VpnConnectingError) err).getErrorCode());
} else {
m.broadcastConnectivity(mProfile.getName(), s,
VpnManager.VPN_ERROR_CONNECTION_FAILED);
}
=======
if ((s == VpnState.IDLE) && (mError != null)) {
m.broadcastConnectivity(mProfile.getName(), s,
mError.getErrorCode());
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
} else {
m.broadcastConnectivity(mProfile.getName(), s);
} |
| Solution content |
|---|
private void broadcastConnectivity(VpnState s) {
VpnManager m = new VpnManager(mContext);
Throwable err = mError;
if ((s == VpnState.IDLE) && (err != null)) {
if (err instanceof UnknownHostException) {
m.broadcastConnectivity(mProfile.getName(), s,
VpnManager.VPN_ERROR_UNKNOWN_SERVER);
} else if (err instanceof VpnConnectingError) {
m.broadcastConnectivity(mProfile.getName(), s,
((VpnConnectingError) err).getErrorCode());
} else {
m.broadcastConnectivity(mProfile.getName(), s,
VpnManager.VPN_ERROR_CONNECTION_FAILED);
}
} else {
m.broadcastConnectivity(mProfile.getName(), s);
} |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
private boolean isLocalIpChanged() {
// TODO
if (!isDnsIntact()) {
Log.w(TAG, " local IP changed");
return true;
} else {
return false;
}
}
private boolean isDnsIntact() {
String dns1 = SystemProperties.get(DNS1);
if (!mVpnDns1.equals(dns1)) {
Log.w(TAG, " dns being overridden by: " + dns1);
return false;
} else {
return true;
}
}
=======
private void checkDnsProperties() {
String dns1 = SystemProperties.get(DNS1);
if (!mVpnDns1.equals(dns1)) {
Log.w(TAG, " dns being overridden by: " + dns1);
onError();
}
}
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
protected void sleep(int ms) {
try {
Thread.currentThread().sleep(ms); |
| Solution content |
|---|
}
}
private boolean isLocalIpChanged() {
// TODO
if (!isDnsIntact()) {
Log.w(TAG, " local IP changed");
return true;
} else {
return false;
}
}
private boolean isDnsIntact() {
String dns1 = SystemProperties.get(DNS1);
if (!mVpnDns1.equals(dns1)) {
Log.w(TAG, " dns being overridden by: " + dns1);
return false;
} else {
return true;
}
}
protected void sleep(int ms) {
try {
Thread.currentThread().sleep(ms); |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
return false;
}
<<<<<<< HEAD
private int getResultFromSocket(DaemonProxy s) {
try {
return s.getResultFromSocket();
} catch (IOException e) {
return -1;
}
=======
//@Override
public void error(ProcessProxy p, Throwable e) {
Log.e(TAG, "service error: " + p.getName(), e);
if (e instanceof VpnConnectingError) {
mError = (VpnConnectingError) e;
}
commonCallback((AndroidServiceProxy) p);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
synchronized boolean anySocketError() { |
| Solution content |
|---|
return false;
}
private int getResultFromSocket(DaemonProxy s) {
try {
return s.getResultFromSocket();
} catch (IOException e) {
return -1;
}
}
synchronized boolean anySocketError() { |
| File |
|---|
| VpnService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
};
<<<<<<< HEAD
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
}
@Override
=======
public void onStart (Intent intent, int startId) {
super.onStart(intent, startId);
setForeground(true);
android.util.Log.d("VpnServiceBinder", "becomes a foreground service");
}
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
public IBinder onBind(Intent intent) {
return mBinder;
} |
| Solution content |
|---|
}
};
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
}
@Override
public IBinder onBind(Intent intent) {
return mBinder;
} |
| File |
|---|
| VpnServiceBinder.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
private synchronized void disconnect() {
private synchronized boolean connect(final VpnProfile p,
final String username, final String password) {
if (mService != null) return false;
<<<<<<< HEAD
new Thread(new Runnable() {
public void run() {
mService = createService(p);
mService.onConnect(username, password);
}
}).start();
return true;
}
if (mService == null) return;
new Thread(new Runnable() {
public void run() {
mService.onDisconnect();
android.util.Log.d("VpnServiceBinder", "becoming background");
setForeground(false);
}
}).start();
}
=======
mService = createService(p);
return mService.onConnect(username, password);
}
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
private synchronized void checkStatus(VpnProfile p) {
if ((mService == null)
|| (!p.getName().equals(mService.mProfile.getName()))) { |
| Solution content |
|---|
private synchronized boolean connect(final VpnProfile p,
final String username, final String password) {
if (mService != null) return false;
new Thread(new Runnable() {
public void run() {
mService = createService(p);
mService.onConnect(username, password);
}
}).start();
return true;
}
private synchronized void disconnect() {
if (mService == null) return;
new Thread(new Runnable() {
public void run() {
mService.onDisconnect();
android.util.Log.d("VpnServiceBinder", "becoming background");
setForeground(false);
}
}).start();
}
private synchronized void checkStatus(VpnProfile p) {
if ((mService == null)
|| (!p.getName().equals(mService.mProfile.getName()))) { |
| File |
|---|
| VpnServiceBinder.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method declaration |
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
private NotificationRecord mSoundNotification;
private AsyncPlayer mSound;
private boolean mSystemReady;
<<<<<<< HEAD
private int mDisabledNotifications;
=======
private int mDisabledNotifications = StatusBarManager.DISABLE_NOTIFICATION_ALERTS;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
private NotificationRecord mVibrateNotification;
private Vibrator mVibrator = new Vibrator(); |
| Solution content |
|---|
private NotificationRecord mSoundNotification;
private AsyncPlayer mSound;
private boolean mSystemReady;
private int mDisabledNotifications;
private NotificationRecord mVibrateNotification;
private Vibrator mVibrator = new Vibrator(); |
| File |
|---|
| NotificationManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
if (ps.pkg != null) {
pw.print(" dataDir="); pw.println(ps.pkg.applicationInfo.dataDir);
pw.print(" targetSdk="); pw.println(ps.pkg.applicationInfo.targetSdkVersion);
<<<<<<< HEAD
pw.print(" supportsScreens=[");
boolean first = true;
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("medium");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("large");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("small");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("resizeable");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("anyDensity");
}
=======
pw.print(" densities="); pw.println(ps.pkg.supportsDensityList);
ArrayList |
| Solution content |
|---|
if (ps.pkg != null) {
pw.print(" dataDir="); pw.println(ps.pkg.applicationInfo.dataDir);
pw.print(" targetSdk="); pw.println(ps.pkg.applicationInfo.targetSdkVersion);
pw.print(" supportsScreens=[");
boolean first = true;
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("medium");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("large");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("small");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("resizeable");
}
if ((ps.pkg.applicationInfo.flags &
ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) {
if (!first) pw.print(", ");
first = false;
pw.print("anyDensity");
}
}
pw.println("]");
pw.print(" timeStamp="); pw.println(ps.getTimeStampStr()); |
| File |
|---|
| PackageManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// This is an updated system app with versions in both system
// and data partition. Just let the most recent version
// take precedence.
<<<<<<< HEAD
Log.w(TAG, "Trying to update system app code path from " +
p.codePathString + " to " + codePath.toString());
=======
return p;
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
} else {
// Let the app continue with previous uid if code path changes.
reportSettingsProblem(Log.WARN, |
| Solution content |
|---|
// This is an updated system app with versions in both system
// and data partition. Just let the most recent version
// take precedence.
Log.w(TAG, "Trying to update system app code path from " +
p.codePathString + " to " + codePath.toString());
} else {
// Let the app continue with previous uid if code path changes.
reportSettingsProblem(Log.WARN, |
| File |
|---|
| PackageManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
"Package " + name + " codePath changed from " + p.codePath
+ " to " + codePath + "; Retaining data and using new code from " +
codePath);
<<<<<<< HEAD
=======
p.codePath = codePath;
p.resourcePath = resourcePath;
p.codePathString = codePath.toString();
p.resourcePathString = resourcePath.toString();
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
} else if (p.sharedUser != sharedUser) {
reportSettingsProblem(Log.WARN, |
| Solution content |
|---|
"Package " + name + " codePath changed from " + p.codePath
+ " to " + codePath + "; Retaining data and using new code from " +
codePath);
}
} else if (p.sharedUser != sharedUser) {
reportSettingsProblem(Log.WARN, |
| File |
|---|
| PackageManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (sharedUser != null) {
p.userId = sharedUser.userId;
} else if (MULTIPLE_APPLICATION_UIDS) {
<<<<<<< HEAD
// Clone the setting here for disabled system packages
PackageSetting dis = mDisabledSysPackages.get(name);
if (dis != null) {
// For disabled packages a new setting is created
// from the existing user id. This still has to be
// added to list of user id's
// Copy signatures from previous setting
if (dis.signatures.mSignatures != null) {
p.signatures.mSignatures = dis.signatures.mSignatures.clone();
}
p.userId = dis.userId;
// Clone permissions
p.grantedPermissions = new HashSet |
| Solution content |
|---|
if (sharedUser != null) {
p.userId = sharedUser.userId;
} else if (MULTIPLE_APPLICATION_UIDS) {
// Clone the setting here for disabled system packages
PackageSetting dis = mDisabledSysPackages.get(name);
if (dis != null) {
// For disabled packages a new setting is created
// from the existing user id. This still has to be
// added to list of user id's
// Copy signatures from previous setting
if (dis.signatures.mSignatures != null) {
p.signatures.mSignatures = dis.signatures.mSignatures.clone();
}
p.userId = dis.userId;
// Clone permissions
p.grantedPermissions = new HashSet |
| File |
|---|
| PackageManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
ServiceManager.getService(Context.SEARCH_SERVICE));
}
<<<<<<< HEAD
=======
// Checks that the search UI is visible.
private void assertSearchVisible() {
SearchManager searchManager = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE);
assertTrue("SearchManager thinks search UI isn't visible when it should be",
searchManager.isVisible());
}
// Checks that the search UI is not visible.
private void assertSearchNotVisible() {
SearchManager searchManager = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE);
assertFalse("SearchManager thinks search UI is visible when it shouldn't be",
searchManager.isVisible());
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
/**
* The goal of this test is to confirm that we can obtain
* a search manager interface. |
| Solution content |
|---|
ServiceManager.getService(Context.SEARCH_SERVICE));
}
/**
* The goal of this test is to confirm that we can obtain
* a search manager interface. |
| File |
|---|
| SearchManagerTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
searchManager.startSearch("test search string", false, SEARCHABLE_ACTIVITY, null, false);
searchManager.stopSearch();
<<<<<<< HEAD
searchManager.startSearch("test search string", true, SEARCHABLE_ACTIVITY, null, false);
searchManager.stopSearch();
=======
assertSearchNotVisible();
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
}
} |
| Solution content |
|---|
searchManager.startSearch("test search string", false, SEARCHABLE_ACTIVITY, null, false);
searchManager.stopSearch();
searchManager.startSearch("test search string", true, SEARCHABLE_ACTIVITY, null, false);
searchManager.stopSearch();
}
} |
| File |
|---|
| SearchManagerTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import android.content.pm.PackageManager;
import android.content.res.CompatibilityInfo;
import android.util.DisplayMetrics;
<<<<<<< HEAD
import android.util.Log;
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
public class DpiTestActivity extends Activity {
public DpiTestActivity() { |
| Solution content |
|---|
import android.content.pm.PackageManager;
import android.content.res.CompatibilityInfo;
import android.util.DisplayMetrics;
import android.util.Log;
public class DpiTestActivity extends Activity {
public DpiTestActivity() { |
| File |
|---|
| DpiTestActivity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
// be doing it.
Application app = ActivityThread.currentActivityThread().getApplication();
ApplicationInfo ai = app.getPackageManager().getApplicationInfo(
<<<<<<< HEAD
"com.google.android.test.dpi", 0);
=======
"com.google.android.test.dpi",
PackageManager.GET_SUPPORTS_DENSITIES);
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
if (noCompat) {
ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS |
| Solution content |
|---|
// be doing it.
Application app = ActivityThread.currentActivityThread().getApplication();
ApplicationInfo ai = app.getPackageManager().getApplicationInfo(
"com.google.android.test.dpi", 0);
if (noCompat) {
ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS |
| File |
|---|
| DpiTestActivity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Other |
| Chunk |
|---|
| Conflicting content |
|---|
ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS
<<<<<<< HEAD
| ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES;
=======
| ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS;
ai.supportsDensities = new int[] { ApplicationInfo.ANY_DENSITY };
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
app.getResources().setCompatibilityInfo(new CompatibilityInfo(ai));
}
} catch (PackageManager.NameNotFoundException e) { |
| Solution content |
|---|
ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS
| ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES;
app.getResources().setCompatibilityInfo(new CompatibilityInfo(ai));
}
} catch (PackageManager.NameNotFoundException e) { |
| File |
|---|
| DpiTestActivity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
addLabelToRoot(root, "No-dpi resource drawable");
addChildToRoot(root, layout);
<<<<<<< HEAD
layout = new LinearLayout(this);
addNinePatchResourceDrawable(layout, R.drawable.smlnpatch120dpi);
addNinePatchResourceDrawable(layout, R.drawable.smlnpatch160dpi);
addNinePatchResourceDrawable(layout, R.drawable.smlnpatch240dpi);
addLabelToRoot(root, "Prescaled 9-patch resource drawable");
addChildToRoot(root, layout);
=======
>>>>>>> a8675f67e33bc7337d148358783b0fd138b501ff
setContentView(scrollWrap(root));
}
|
| Solution content |
|---|
addLabelToRoot(root, "No-dpi resource drawable");
addChildToRoot(root, layout);
layout = new LinearLayout(this);
addNinePatchResourceDrawable(layout, R.drawable.smlnpatch120dpi);
addNinePatchResourceDrawable(layout, R.drawable.smlnpatch160dpi);
addNinePatchResourceDrawable(layout, R.drawable.smlnpatch240dpi);
addLabelToRoot(root, "Prescaled 9-patch resource drawable");
addChildToRoot(root, layout);
setContentView(scrollWrap(root));
}
|
| File |
|---|
| DpiTestActivity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |