| Chunk |
|---|
| Conflicting content |
|---|
/*package*/ int mConfigChangeFlags;
/*package*/ Configuration mCurrentConfig;
private SearchManager mSearchManager;
<<<<<<< HEAD
=======
private Bundle mSearchDialogState = null;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private Window mWindow;
|
| Solution content |
|---|
/*package*/ int mConfigChangeFlags;
/*package*/ Configuration mCurrentConfig;
private SearchManager mSearchManager;
private Window mWindow;
|
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
/**
final void performRestoreInstanceState(Bundle savedInstanceState) {
onRestoreInstanceState(savedInstanceState);
restoreManagedDialogs(savedInstanceState);
<<<<<<< HEAD
=======
// Also restore the state of a search dialog (if any)
// TODO more generic than just this manager
Bundle searchState = savedInstanceState.getBundle(SAVED_SEARCH_DIALOG_KEY);
if (searchState != null) {
mSearchManager.restoreSearchDialog(searchState);
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
|
| Solution content |
|---|
final void performRestoreInstanceState(Bundle savedInstanceState) {
onRestoreInstanceState(savedInstanceState);
restoreManagedDialogs(savedInstanceState);
}
/** |
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (dialogState != null) {
// Calling onRestoreInstanceState() below will invoke dispatchOnCreate
// so tell createDialog() not to do it, otherwise we get an exception
<<<<<<< HEAD
final Dialog dialog = createDialog(dialogId, dialogState);
=======
final Dialog dialog = createDialog(dialogId, false);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mManagedDialogs.put(dialogId, dialog);
onPrepareDialog(dialogId, dialog);
dialog.onRestoreInstanceState(dialogState); |
| Solution content |
|---|
if (dialogState != null) {
// Calling onRestoreInstanceState() below will invoke dispatchOnCreate
// so tell createDialog() not to do it, otherwise we get an exception
final Dialog dialog = createDialog(dialogId, dialogState);
mManagedDialogs.put(dialogId, dialog);
onPrepareDialog(dialogId, dialog);
dialog.onRestoreInstanceState(dialogState); |
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
private Dialog createDialog(Integer dialogId, Bundle state) {
=======
private Dialog createDialog(Integer dialogId, boolean dispatchOnCreate) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
final Dialog dialog = onCreateDialog(dialogId);
if (dialog == null) {
throw new IllegalArgumentException("Activity#onCreateDialog did " |
| Solution content |
|---|
}
}
private Dialog createDialog(Integer dialogId, Bundle state) {
final Dialog dialog = onCreateDialog(dialogId);
if (dialog == null) {
throw new IllegalArgumentException("Activity#onCreateDialog did " |
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
throw new IllegalArgumentException("Activity#onCreateDialog did "
+ "not create a dialog for id " + dialogId);
}
<<<<<<< HEAD
dialog.dispatchOnCreate(state);
=======
if (dispatchOnCreate) dialog.dispatchOnCreate(null);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
return dialog;
}
|
| Solution content |
|---|
throw new IllegalArgumentException("Activity#onCreateDialog did "
+ "not create a dialog for id " + dialogId);
}
dialog.dispatchOnCreate(state);
return dialog;
}
|
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
final void performSaveInstanceState(Bundle outState) {
onSaveInstanceState(outState);
saveManagedDialogs(outState);
<<<<<<< HEAD
=======
// Also save the state of a search dialog (if any)
// TODO more generic than just this manager
// onPause() should always be called before this method, so mSearchManagerState
// should be up to date.
if (mSearchDialogState != null) {
outState.putBundle(SAVED_SEARCH_DIALOG_KEY, mSearchDialogState);
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
/** |
| Solution content |
|---|
final void performSaveInstanceState(Bundle outState) {
onSaveInstanceState(outState);
saveManagedDialogs(outState);
}
/** |
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public void onConfigurationChanged(Configuration newConfig) {
mCalled = true;
<<<<<<< HEAD
=======
// also update search dialog if showing
// TODO more generic than just this manager
mSearchManager.onConfigurationChanged(newConfig);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (mWindow != null) {
// Pass the configuration changed event to the window
mWindow.onConfigurationChanged(newConfig); |
| Solution content |
|---|
*/
public void onConfigurationChanged(Configuration newConfig) {
mCalled = true;
if (mWindow != null) {
// Pass the configuration changed event to the window
mWindow.onConfigurationChanged(newConfig); |
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
Dialog dialog = mManagedDialogs.get(id);
if (dialog == null) {
<<<<<<< HEAD
dialog = createDialog(id, null);
=======
dialog = createDialog(id, true);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mManagedDialogs.put(id, dialog);
}
|
| Solution content |
|---|
}
Dialog dialog = mManagedDialogs.get(id);
if (dialog == null) {
dialog = createDialog(id, null);
mManagedDialogs.put(id, dialog);
}
|
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public void startSearch(String initialQuery, boolean selectInitialQuery,
Bundle appSearchData, boolean globalSearch) {
<<<<<<< HEAD
ensureSearchManager();
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mSearchManager.startSearch(initialQuery, selectInitialQuery, getComponentName(),
appSearchData, globalSearch);
} |
| Solution content |
|---|
*/
public void startSearch(String initialQuery, boolean selectInitialQuery,
Bundle appSearchData, boolean globalSearch) {
ensureSearchManager();
mSearchManager.startSearch(initialQuery, selectInitialQuery, getComponentName(),
appSearchData, globalSearch);
} |
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (WINDOW_SERVICE.equals(name)) {
return mWindowManager;
} else if (SEARCH_SERVICE.equals(name)) {
<<<<<<< HEAD
ensureSearchManager();
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
return mSearchManager;
}
return super.getSystemService(name); |
| Solution content |
|---|
if (WINDOW_SERVICE.equals(name)) {
return mWindowManager;
} else if (SEARCH_SERVICE.equals(name)) {
ensureSearchManager();
return mSearchManager;
}
return super.getSystemService(name); |
| File |
|---|
| Activity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
reply.writeNoException();
return true;
}
<<<<<<< HEAD
case REGISTER_ACTIVITY_WATCHER_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IActivityWatcher watcher = IActivityWatcher.Stub.asInterface(
data.readStrongBinder());
registerActivityWatcher(watcher);
return true;
}
case UNREGISTER_ACTIVITY_WATCHER_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IActivityWatcher watcher = IActivityWatcher.Stub.asInterface(
data.readStrongBinder());
unregisterActivityWatcher(watcher);
return true;
}
case START_ACTIVITY_IN_PACKAGE_TRANSACTION:
{
data.enforceInterface(IActivityManager.descriptor);
int uid = data.readInt();
Intent intent = Intent.CREATOR.createFromParcel(data);
String resolvedType = data.readString();
IBinder resultTo = data.readStrongBinder();
String resultWho = data.readString();
int requestCode = data.readInt();
boolean onlyIfNeeded = data.readInt() != 0;
int result = startActivityInPackage(uid, intent, resolvedType,
resultTo, resultWho, requestCode, onlyIfNeeded);
reply.writeNoException();
reply.writeInt(result);
return true;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
return super.onTransact(code, data, reply, flags); |
| Solution content |
|---|
reply.writeNoException();
return true;
}
case REGISTER_ACTIVITY_WATCHER_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IActivityWatcher watcher = IActivityWatcher.Stub.asInterface(
data.readStrongBinder());
registerActivityWatcher(watcher);
return true;
}
case UNREGISTER_ACTIVITY_WATCHER_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IActivityWatcher watcher = IActivityWatcher.Stub.asInterface(
data.readStrongBinder());
unregisterActivityWatcher(watcher);
return true;
}
case START_ACTIVITY_IN_PACKAGE_TRANSACTION:
{
data.enforceInterface(IActivityManager.descriptor);
int uid = data.readInt();
Intent intent = Intent.CREATOR.createFromParcel(data);
String resolvedType = data.readString();
IBinder resultTo = data.readStrongBinder();
String resultWho = data.readString();
int requestCode = data.readInt();
boolean onlyIfNeeded = data.readInt() != 0;
int result = startActivityInPackage(uid, intent, resolvedType,
resultTo, resultWho, requestCode, onlyIfNeeded);
reply.writeNoException();
reply.writeInt(result);
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 |
|---|
data.recycle();
}
<<<<<<< HEAD
public void registerActivityWatcher(IActivityWatcher watcher)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(watcher != null ? watcher.asBinder() : null);
mRemote.transact(REGISTER_ACTIVITY_WATCHER_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
public void unregisterActivityWatcher(IActivityWatcher watcher)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(watcher != null ? watcher.asBinder() : null);
mRemote.transact(UNREGISTER_ACTIVITY_WATCHER_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
public int startActivityInPackage(int uid,
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, boolean onlyIfNeeded)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(uid);
intent.writeToParcel(data, 0);
data.writeString(resolvedType);
data.writeStrongBinder(resultTo);
data.writeString(resultWho);
data.writeInt(requestCode);
data.writeInt(onlyIfNeeded ? 1 : 0);
mRemote.transact(START_ACTIVITY_IN_PACKAGE_TRANSACTION, data, reply, 0);
reply.readException();
int result = reply.readInt();
reply.recycle();
data.recycle();
return result;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private IBinder mRemote;
} |
| Solution content |
|---|
data.recycle();
}
public void registerActivityWatcher(IActivityWatcher watcher)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(watcher != null ? watcher.asBinder() : null);
mRemote.transact(REGISTER_ACTIVITY_WATCHER_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
public void unregisterActivityWatcher(IActivityWatcher watcher)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(watcher != null ? watcher.asBinder() : null);
mRemote.transact(UNREGISTER_ACTIVITY_WATCHER_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
public int startActivityInPackage(int uid,
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, boolean onlyIfNeeded)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(uid);
intent.writeToParcel(data, 0);
data.writeString(resolvedType);
data.writeStrongBinder(resultTo);
data.writeString(resultWho);
data.writeInt(requestCode);
data.writeInt(onlyIfNeeded ? 1 : 0);
mRemote.transact(START_ACTIVITY_IN_PACKAGE_TRANSACTION, data, reply, 0);
reply.readException();
int result = reply.readInt();
reply.recycle();
data.recycle();
return result;
}
private IBinder mRemote;
} |
| File |
|---|
| ActivityManagerNative.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
}
<<<<<<< HEAD
/**
return metrics;
* Creates the top level Resources for applications with the given compatibility info.
*
* @param resDir the resource directory.
* @param compInfo the compability info. It will use the default compatibility info when it's
* null.
*/
Resources getTopLevelResources(String resDir, CompatibilityInfo compInfo) {
=======
Resources getTopLevelResources(String appDir, PackageInfo pkgInfo) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
synchronized (mPackages) {
// Resources is app scale dependent.
ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale); |
| Solution content |
|---|
return metrics;
}
/**
* Creates the top level Resources for applications with the given compatibility info.
*
* @param resDir the resource directory.
* @param compInfo the compability info. It will use the default compatibility info when it's
* null.
*/
Resources getTopLevelResources(String resDir, CompatibilityInfo compInfo) {
synchronized (mPackages) {
// Resources is app scale dependent.
ResourcesKey key = new ResourcesKey(resDir, compInfo.applicationScale); |
| File |
|---|
| ActivityThread.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
if (assets.addAssetPath(resDir) == 0) {
return null;
}
<<<<<<< HEAD
//Log.i(TAG, "Resource: key=" + key + ", display metrics=" + metrics);
DisplayMetrics metrics = getDisplayMetricsLocked(false);
r = new Resources(assets, metrics, getConfiguration(), compInfo);
=======
ApplicationInfo appInfo;
try {
appInfo = getPackageManager().getApplicationInfo(
pkgInfo.getPackageName(),
PackageManager.GET_SUPPORTS_DENSITIES);
} catch (RemoteException e) {
throw new AssertionError(e);
}
//Log.i(TAG, "Resource:" + appDir + ", display metrics=" + metrics);
DisplayMetrics metrics = getDisplayMetricsLocked(false);
r = new Resources(assets, metrics, getConfiguration(), appInfo);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
//Log.i(TAG, "Created app resources " + r + ": " + r.getConfiguration());
// XXX need to remove entries when weak references go away
mActiveResources.put(key, new WeakReference |
| Solution content |
|---|
if (assets.addAssetPath(resDir) == 0) {
return null;
}
//Log.i(TAG, "Resource: key=" + key + ", display metrics=" + metrics);
DisplayMetrics metrics = getDisplayMetricsLocked(false);
r = new Resources(assets, metrics, getConfiguration(), compInfo);
//Log.i(TAG, "Created app resources " + r + ": " + r.getConfiguration());
// 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 |
| Method invocation |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
private Resources mResources;
private ClassLoader mClassLoader;
private Application mApplication;
<<<<<<< HEAD
private CompatibilityInfo mCompatibilityInfo;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private final HashMap |
| Solution content |
|---|
private Resources mResources;
private ClassLoader mClassLoader;
private Application mApplication;
private CompatibilityInfo mCompatibilityInfo;
private final HashMap |
| File |
|---|
| ActivityThread.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
=======
mIncludeCode = true;
mClassLoader = systemContext.getClassLoader();
mResources = systemContext.getResources();
<<<<<<< HEAD
mCompatibilityInfo = new CompatibilityInfo(mApplicationInfo);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
public String getPackageName() { |
| Solution content |
|---|
mIncludeCode = true;
mClassLoader = systemContext.getClassLoader();
mResources = systemContext.getResources();
mCompatibilityInfo = new CompatibilityInfo(mApplicationInfo);
}
public String getPackageName() { |
| File |
|---|
| ActivityThread.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
=======
classname = "android.app.FullBackupAgent";
}
try {
<<<<<<< HEAD
IBinder binder = null;
try {
java.lang.ClassLoader cl = packageInfo.getClassLoader();
agent = (BackupAgent) cl.loadClass(data.appInfo.backupAgentName).newInstance();
// set up the agent's context
if (DEBUG_BACKUP) Log.v(TAG, "Initializing BackupAgent "
+ data.appInfo.backupAgentName);
ApplicationContext context = new ApplicationContext();
context.init(packageInfo, null, this);
context.setOuterContext(agent);
agent.attach(context);
agent.onCreate();
binder = agent.onBind();
mBackupAgents.put(packageName, agent);
} catch (Exception e) {
// If this is during restore, fail silently; otherwise go
// ahead and let the user see the crash.
Log.e(TAG, "Agent threw during creation: " + e);
if (data.backupMode != IApplicationThread.BACKUP_MODE_RESTORE) {
throw e;
}
// falling through with 'binder' still null
}
// tell the OS that we're live now
java.lang.ClassLoader cl = packageInfo.getClassLoader();
agent = (BackupAgent) cl.loadClass(data.appInfo.backupAgentName).newInstance();
} catch (Exception e) {
throw new RuntimeException("Unable to instantiate backup agent "
+ data.appInfo.backupAgentName + ": " + e.toString(), e);
}
// set up the agent's context
try {
if (DEBUG_BACKUP) Log.v(TAG, "Initializing BackupAgent "
+ data.appInfo.backupAgentName);
ApplicationContext context = new ApplicationContext();
context.init(packageInfo, null, this);
context.setOuterContext(agent);
agent.attach(context);
agent.onCreate();
// tell the OS that we're live now
IBinder binder = agent.onBind();
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
try {
ActivityManagerNative.getDefault().backupAgentCreated(packageName, binder);
} catch (RemoteException e) { |
| Solution content |
|---|
classname = "android.app.FullBackupAgent";
}
try {
IBinder binder = null;
try {
java.lang.ClassLoader cl = packageInfo.getClassLoader();
agent = (BackupAgent) cl.loadClass(data.appInfo.backupAgentName).newInstance();
// set up the agent's context
if (DEBUG_BACKUP) Log.v(TAG, "Initializing BackupAgent "
+ data.appInfo.backupAgentName);
ApplicationContext context = new ApplicationContext();
context.init(packageInfo, null, this);
context.setOuterContext(agent);
agent.attach(context);
agent.onCreate();
binder = agent.onBind();
mBackupAgents.put(packageName, agent);
} catch (Exception e) {
// If this is during restore, fail silently; otherwise go
// ahead and let the user see the crash.
Log.e(TAG, "Agent threw during creation: " + e);
if (data.backupMode != IApplicationThread.BACKUP_MODE_RESTORE) {
throw e;
}
// falling through with 'binder' still null
}
// tell the OS that we're live now
try {
ActivityManagerNative.getDefault().backupAgentCreated(packageName, binder);
} catch (RemoteException e) { |
| File |
|---|
| ActivityThread.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Cast expression |
| Catch clause |
| Comment |
| If statement |
| Method invocation |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
} catch (RemoteException e) {
// nothing to do.
}
<<<<<<< HEAD
=======
mBackupAgents.put(packageName, agent);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} catch (Exception e) {
throw new RuntimeException("Unable to create BackupAgent "
+ data.appInfo.backupAgentName + ": " + e.toString(), e); |
| Solution content |
|---|
} catch (RemoteException e) {
// nothing to do.
}
} catch (Exception e) {
throw new RuntimeException("Unable to create BackupAgent "
+ data.appInfo.backupAgentName + ": " + e.toString(), e); |
| File |
|---|
| ActivityThread.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
if (pi != null) {
ApplicationContext c = new ApplicationContext();
c.mRestricted = (flags & CONTEXT_RESTRICTED) == CONTEXT_RESTRICTED;
<<<<<<< HEAD
c.init(pi, null, mMainThread, mResources);
=======
c.init(pi, null, mMainThread);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (c.mResources != null) {
Resources newRes = c.mResources;
if (mResources.getCompatibilityInfo().applicationScale != |
| Solution content |
|---|
if (pi != null) {
ApplicationContext c = new ApplicationContext();
c.mRestricted = (flags & CONTEXT_RESTRICTED) == CONTEXT_RESTRICTED;
c.init(pi, null, mMainThread, mResources);
if (c.mResources != null) { |
| File |
|---|
| ApplicationContext.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
private void sendShowMessage() {
if (mShowMessage != null) {
// Obtain a new message so this dialog can be re-used
Message.obtain(mShowMessage).sendToTarget();
}
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// internal method to make sure mcreated is set properly without requiring
// users to call through to super in onCreate
void dispatchOnCreate(Bundle savedInstanceState) { |
| Solution content |
|---|
}
}
private void sendShowMessage() {
if (mShowMessage != null) {
// Obtain a new message so this dialog can be re-used
Message.obtain(mShowMessage).sendToTarget();
}
}
// internal method to make sure mcreated is set properly without requiring
// users to call through to super in onCreate
void dispatchOnCreate(Bundle savedInstanceState) { |
| File |
|---|
| Dialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
public void stopAppSwitches() throws RemoteException;
public void resumeAppSwitches() throws RemoteException;
<<<<<<< HEAD
public void registerActivityWatcher(IActivityWatcher watcher)
throws RemoteException;
public void unregisterActivityWatcher(IActivityWatcher watcher)
throws RemoteException;
public int startActivityInPackage(int uid,
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, boolean onlyIfNeeded)
throws RemoteException;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/*
* Private non-Binder interfaces
*/ |
| Solution content |
|---|
public void stopAppSwitches() throws RemoteException;
public void resumeAppSwitches() throws RemoteException;
public void registerActivityWatcher(IActivityWatcher watcher)
throws RemoteException;
public void unregisterActivityWatcher(IActivityWatcher watcher)
throws RemoteException;
public int startActivityInPackage(int uid,
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, boolean onlyIfNeeded)
throws RemoteException;
/*
* Private non-Binder interfaces
*/ |
| File |
|---|
| IActivityManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method interface |
| Chunk |
|---|
| Conflicting content |
|---|
int START_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+89;
int BACKUP_AGENT_CREATED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+90;
int UNBIND_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+91;
<<<<<<< HEAD
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;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} |
| Solution content |
|---|
int START_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+89;
int BACKUP_AGENT_CREATED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+90;
int UNBIND_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+91;
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;
} |
| File |
|---|
| IActivityManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
import android.content.ContentValues; import android.content.Context; import android.content.Intent; <<<<<<< HEAD ======= import android.content.IntentFilter; import android.content.ContentResolver; import android.content.ContentValues; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; |
| Solution content |
|---|
import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private static final String INSTANCE_KEY_STORED_APPDATA = "sData";
private static final String INSTANCE_KEY_PREVIOUS_COMPONENTS = "sPrev";
private static final String INSTANCE_KEY_USER_QUERY = "uQry";
<<<<<<< HEAD
// The extra key used in an intent to the speech recognizer for in-app voice search.
private static final String EXTRA_CALLING_PACKAGE = "calling_package";
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private static final int SEARCH_PLATE_LEFT_PADDING_GLOBAL = 12;
private static final int SEARCH_PLATE_LEFT_PADDING_NON_GLOBAL = 7; |
| Solution content |
|---|
private static final String INSTANCE_KEY_STORED_APPDATA = "sData";
private static final String INSTANCE_KEY_PREVIOUS_COMPONENTS = "sPrev";
private static final String INSTANCE_KEY_USER_QUERY = "uQry";
// The extra key used in an intent to the speech recognizer for in-app voice search.
private static final String EXTRA_CALLING_PACKAGE = "calling_package";
private static final int SEARCH_PLATE_LEFT_PADDING_GLOBAL = 12;
private static final int SEARCH_PLATE_LEFT_PADDING_NON_GLOBAL = 7; |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
// A weak map of drawables we've gotten from other packages, so we don't load them
// more than once.
<<<<<<< HEAD
private final WeakHashMap |
| Solution content |
|---|
// A weak map of drawables we've gotten from other packages, so we don't load them
// more than once.
private final WeakHashMap |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
=======
if (!globalSearch && mSearchable == null) {
globalSearch = true;
mSearchable = searchManager.getSearchableInfo(componentName, globalSearch);
<<<<<<< HEAD
// If we still get back null (i.e., there's not even a searchable info available
// for global search), then really give up.
if (mSearchable == null) {
// Unfortunately, we can't log here. it would be logspam every time the user
// clicks the "search" key on a non-search app.
return false;
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
// If there's not even a searchable info available for global search, then really give up. |
| Solution content |
|---|
if (!globalSearch && mSearchable == null) {
globalSearch = true;
mSearchable = searchManager.getSearchableInfo(componentName, globalSearch);
}
// If there's not even a searchable info available for global search, then really give up. |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public void onStop() {
super.onStop();
<<<<<<< HEAD
=======
// stop receiving broadcasts (throws exception if none registered)
try {
getContext().unregisterReceiver(mBroadcastReceiver);
} catch (RuntimeException e) {
// This is OK - it just means we didn't have any registered
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
closeSuggestionsAdapter();
// dump extra memory we're hanging on to |
| Solution content |
|---|
@Override
public void onStop() {
super.onStop();
closeSuggestionsAdapter();
// dump extra memory we're hanging on to |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
/**
* Save the minimal set of data necessary to recreate the search
*
<<<<<<< HEAD
* @return A bundle with the state of the dialog, or {@code null} if the search
* dialog is not showing.
=======
* @return A bundle with the state of the dialog.
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public Bundle onSaveInstanceState() { |
| Solution content |
|---|
/**
* Save the minimal set of data necessary to recreate the search
*
* @return A bundle with the state of the dialog, or {@code null} if the search
* dialog is not showing.
*/
@Override
public Bundle onSaveInstanceState() { |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*/
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
<<<<<<< HEAD
if (savedInstanceState == null) return;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
ComponentName launchComponent = savedInstanceState.getParcelable(INSTANCE_KEY_COMPONENT);
Bundle appSearchData = savedInstanceState.getBundle(INSTANCE_KEY_APPDATA);
boolean globalSearch = savedInstanceState.getBoolean(INSTANCE_KEY_GLOBALSEARCH); |
| Solution content |
|---|
*/
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
if (savedInstanceState == null) return;
ComponentName launchComponent = savedInstanceState.getParcelable(INSTANCE_KEY_COMPONENT);
Bundle appSearchData = savedInstanceState.getBundle(INSTANCE_KEY_APPDATA);
boolean globalSearch = savedInstanceState.getBoolean(INSTANCE_KEY_GLOBALSEARCH); |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
public void afterTextChanged(Editable s) {
<<<<<<< HEAD
if (mSearchable == null) {
return;
}
if (mSearchable.autoUrlDetect() && !mSearchAutoComplete.isPerformingCompletion()) {
=======
if (!mSearchAutoComplete.isPerformingCompletion()) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// The user changed the query, check if it is a URL and if so change the search
// button in the soft keyboard to the 'Go' button.
int options = (mSearchAutoComplete.getImeOptions() & (~EditorInfo.IME_MASK_ACTION)); |
| Solution content |
|---|
}
public void afterTextChanged(Editable s) {
if (mSearchable == null) {
return;
}
if (mSearchable.autoUrlDetect() && !mSearchAutoComplete.isPerformingCompletion()) {
// The user changed the query, check if it is a URL and if so change the search
// button in the soft keyboard to the 'Go' button.
int options = (mSearchAutoComplete.getImeOptions() & (~EditorInfo.IME_MASK_ACTION)); |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
&& event.getAction() == KeyEvent.ACTION_UP) {
v.cancelLongPress();
<<<<<<< HEAD
// If this is a url entered by the user & we displayed the 'Go' button which
// the user clicked, launch the url instead of using it as a search query.
if (mSearchable.autoUrlDetect() &&
(mSearchAutoCompleteImeOptions & EditorInfo.IME_MASK_ACTION)
== EditorInfo.IME_ACTION_GO) {
=======
// If this is a url entered by the user and we displayed the 'Go' button which
// the user clicked, launch the url instead of using it as a search query.
if ((mSearchAutoCompleteImeOptions & EditorInfo.IME_MASK_ACTION)
== EditorInfo.IME_ACTION_GO) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
Uri uri = Uri.parse(fixUrl(mSearchAutoComplete.getText().toString()));
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| Solution content |
|---|
&& event.getAction() == KeyEvent.ACTION_UP) {
v.cancelLongPress();
// If this is a url entered by the user & we displayed the 'Go' button which
// the user clicked, launch the url instead of using it as a search query.
if (mSearchable.autoUrlDetect() &&
(mSearchAutoCompleteImeOptions & EditorInfo.IME_MASK_ACTION)
== EditorInfo.IME_ACTION_GO) {
Uri uri = Uri.parse(fixUrl(mSearchAutoComplete.getText().toString()));
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
*
return false;
}
<<<<<<< HEAD
/**
* Report a click from an in app search result back to global search for shortcutting porpoises.
* @param c The cursor that is pointing to the clicked position.
* @param intent The intent that will be launched for the click.
*/
private void reportInAppClickToGlobalSearch(Cursor c, Intent intent) {
// for in app search, still tell global search via content provider
Uri uri = getClickReportingUri();
final ContentValues cv = new ContentValues();
cv.put(SearchManager.SEARCH_CLICK_REPORT_COLUMN_QUERY, mUserQuery);
final ComponentName source = mSearchable.getSearchActivity();
cv.put(SearchManager.SEARCH_CLICK_REPORT_COLUMN_COMPONENT, source.flattenToShortString());
// grab the intent columns from the intent we created since it has additional
// logic for falling back on the searchable default
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_ACTION, intent.getAction());
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_DATA, intent.getDataString());
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_COMPONENT_NAME,
intent.getStringExtra(SearchManager.COMPONENT_NAME_KEY));
// ensure the icons will work for global search
cv.put(SearchManager.SUGGEST_COLUMN_ICON_1,
wrapIconForPackage(
source,
getColumnString(c, SearchManager.SUGGEST_COLUMN_ICON_1)));
cv.put(SearchManager.SUGGEST_COLUMN_ICON_2,
wrapIconForPackage(
source,
getColumnString(c, SearchManager.SUGGEST_COLUMN_ICON_2)));
// the rest can be passed through directly
cv.put(SearchManager.SUGGEST_COLUMN_FORMAT,
getColumnString(c, SearchManager.SUGGEST_COLUMN_FORMAT));
cv.put(SearchManager.SUGGEST_COLUMN_TEXT_1,
getColumnString(c, SearchManager.SUGGEST_COLUMN_TEXT_1));
cv.put(SearchManager.SUGGEST_COLUMN_TEXT_2,
getColumnString(c, SearchManager.SUGGEST_COLUMN_TEXT_2));
cv.put(SearchManager.SUGGEST_COLUMN_QUERY,
getColumnString(c, SearchManager.SUGGEST_COLUMN_QUERY));
cv.put(SearchManager.SUGGEST_COLUMN_SHORTCUT_ID,
getColumnString(c, SearchManager.SUGGEST_COLUMN_SHORTCUT_ID));
// note: deliberately omitting background color since it is only for global search
// "more results" entries
mContext.getContentResolver().insert(uri, cv);
}
/**
=======
/**
* Report a click from an in app search result back to global search for shortcutting porpoises.
*
* @param c The cursor that is pointing to the clicked position.
* @param intent The intent that will be launched for the click.
*/
private void reportInAppClickToGlobalSearch(Cursor c, Intent intent) {
// for in app search, still tell global search via content provider
Uri uri = getClickReportingUri();
final ContentValues cv = new ContentValues();
cv.put(SearchManager.SEARCH_CLICK_REPORT_COLUMN_QUERY, mUserQuery);
final ComponentName source = mSearchable.getSearchActivity();
cv.put(SearchManager.SEARCH_CLICK_REPORT_COLUMN_COMPONENT, source.flattenToShortString());
// grab the intent columns from the intent we created since it has additional
// logic for falling back on the searchable default
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_ACTION, intent.getAction());
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_DATA, intent.getDataString());
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_COMPONENT_NAME,
intent.getStringExtra(SearchManager.COMPONENT_NAME_KEY));
// ensure the icons will work for global search
cv.put(SearchManager.SUGGEST_COLUMN_ICON_1,
wrapIconForPackage(
source,
getColumnString(c, SearchManager.SUGGEST_COLUMN_ICON_1)));
cv.put(SearchManager.SUGGEST_COLUMN_ICON_2,
wrapIconForPackage(
source,
getColumnString(c, SearchManager.SUGGEST_COLUMN_ICON_2)));
// the rest can be passed through directly
cv.put(SearchManager.SUGGEST_COLUMN_FORMAT,
getColumnString(c, SearchManager.SUGGEST_COLUMN_FORMAT));
cv.put(SearchManager.SUGGEST_COLUMN_TEXT_1,
getColumnString(c, SearchManager.SUGGEST_COLUMN_TEXT_1));
cv.put(SearchManager.SUGGEST_COLUMN_TEXT_2,
getColumnString(c, SearchManager.SUGGEST_COLUMN_TEXT_2));
cv.put(SearchManager.SUGGEST_COLUMN_QUERY,
getColumnString(c, SearchManager.SUGGEST_COLUMN_QUERY));
cv.put(SearchManager.SUGGEST_COLUMN_SHORTCUT_ID,
getColumnString(c, SearchManager.SUGGEST_COLUMN_SHORTCUT_ID));
// note: deliberately omitting background color since it is only for global search
// "more results" entries
mContext.getContentResolver().insert(uri, cv);
}
/**
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
* @return A URI appropriate for reporting a click.
*/
private Uri getClickReportingUri() { |
| Solution content |
|---|
*/
return false;
}
/**
* Report a click from an in app search result back to global search for shortcutting porpoises.
*
* @param c The cursor that is pointing to the clicked position.
* @param intent The intent that will be launched for the click.
private void reportInAppClickToGlobalSearch(Cursor c, Intent intent) {
// for in app search, still tell global search via content provider
Uri uri = getClickReportingUri();
final ContentValues cv = new ContentValues();
cv.put(SearchManager.SEARCH_CLICK_REPORT_COLUMN_QUERY, mUserQuery);
final ComponentName source = mSearchable.getSearchActivity();
cv.put(SearchManager.SEARCH_CLICK_REPORT_COLUMN_COMPONENT, source.flattenToShortString());
// grab the intent columns from the intent we created since it has additional
// logic for falling back on the searchable default
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_ACTION, intent.getAction());
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_DATA, intent.getDataString());
cv.put(SearchManager.SUGGEST_COLUMN_INTENT_COMPONENT_NAME,
intent.getStringExtra(SearchManager.COMPONENT_NAME_KEY));
// ensure the icons will work for global search
cv.put(SearchManager.SUGGEST_COLUMN_ICON_1,
wrapIconForPackage(
source,
getColumnString(c, SearchManager.SUGGEST_COLUMN_ICON_1)));
cv.put(SearchManager.SUGGEST_COLUMN_ICON_2,
wrapIconForPackage(
source,
getColumnString(c, SearchManager.SUGGEST_COLUMN_ICON_2)));
// the rest can be passed through directly
cv.put(SearchManager.SUGGEST_COLUMN_FORMAT,
getColumnString(c, SearchManager.SUGGEST_COLUMN_FORMAT));
cv.put(SearchManager.SUGGEST_COLUMN_TEXT_1,
getColumnString(c, SearchManager.SUGGEST_COLUMN_TEXT_1));
cv.put(SearchManager.SUGGEST_COLUMN_TEXT_2,
getColumnString(c, SearchManager.SUGGEST_COLUMN_TEXT_2));
cv.put(SearchManager.SUGGEST_COLUMN_QUERY,
getColumnString(c, SearchManager.SUGGEST_COLUMN_QUERY));
cv.put(SearchManager.SUGGEST_COLUMN_SHORTCUT_ID,
getColumnString(c, SearchManager.SUGGEST_COLUMN_SHORTCUT_ID));
// note: deliberately omitting background color since it is only for global search
// "more results" entries
mContext.getContentResolver().insert(uri, cv);
}
/**
* @return A URI appropriate for reporting a click.
*/
private Uri getClickReportingUri() { |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* Launches an intent, including any special intent handling. Doesn't dismiss the dialog
* since that will be handled in {@link SearchDialogWrapper#performActivityResuming}
=======
* Launches an intent and dismisses the search dialog (unless the intent
* is one of the special intents that modifies the state of the search dialog).
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
private void launchIntent(Intent intent) {
if (intent == null) { |
| Solution content |
|---|
}
/**
* Launches an intent, including any special intent handling. Doesn't dismiss the dialog
* since that will be handled in {@link SearchDialogWrapper#performActivityResuming}
*/
private void launchIntent(Intent intent) {
if (intent == null) { |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
if (handleSpecialIntent(intent)){
return;
}
<<<<<<< HEAD
Log.d(LOG_TAG, "launching " + intent);
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();
}
=======
dismiss();
getContext().startActivity(intent);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
/** |
| Solution content |
|---|
if (handleSpecialIntent(intent)){
return;
}
Log.d(LOG_TAG, "launching " + intent);
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();
}
}
/** |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return TextUtils.getTrimmedLength(getText()) == 0;
}
<<<<<<< HEAD
=======
/**
* We override this method to avoid replacing the query box text
* when a suggestion is clicked.
*/
@Override
protected void replaceText(CharSequence text) {
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* We override this method to avoid an extra onItemClick being called on the
* drop-down's OnItemClickListener by {@link AutoCompleteTextView#onKeyUp(int, KeyEvent)} |
| Solution content |
|---|
return TextUtils.getTrimmedLength(getText()) == 0;
}
/**
* We override this method to avoid replacing the query box text
* when a suggestion is clicked.
*/
@Override
protected void replaceText(CharSequence text) {
}
/**
* We override this method to avoid an extra onItemClick being called on the
* drop-down's OnItemClickListener by {@link AutoCompleteTextView#onKeyUp(int, KeyEvent)}
* when an item is clicked with the trackball.
*/
@Override
public void performCompletion() {
}
/**
* We override this method to be sure and show the soft keyboard if appropriate when
* the TextView has focus.
*/
@Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
if (hasWindowFocus) {
InputMethodManager inputManager = (InputMethodManager)
getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.showSoftInput(this, 0);
}
}
/**
* We override this method so that we can allow a threshold of zero, which ACTV does not.
*/
@Override
public boolean enoughToFilter() {
return mThreshold <= 0 || super.enoughToFilter();
}
/**
* {@link AutoCompleteTextView#onKeyPreIme(int, KeyEvent)}) dismisses the drop-down on BACK,
* so we must override this method to modify the BACK behavior.
*/
@Override
public boolean onKeyPreIme(int keyCode, KeyEvent event) {
if (mSearchDialog.mSearchable == null) {
return false;
}
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
if (mSearchDialog.backToPreviousComponent()) {
return true;
}
return false; // will dismiss soft keyboard if necessary
}
return false;
}
}
protected boolean handleBackKey(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
if (backToPreviousComponent()) {
return true;
}
cancel();
return true;
}
return false;
}
/**
* Implements OnItemClickListener
*/
public void onItemClick(AdapterView> parent, View view, int position, long id) {
if (DBG) Log.d(LOG_TAG, "onItemClick() position " + position);
launchSuggestion(position);
}
/**
* Implements OnItemSelectedListener
*/
public void onItemSelected(AdapterView> parent, View view, int position, long id) {
if (DBG) Log.d(LOG_TAG, "onItemSelected() position " + position);
// A suggestion has been selected, rewrite the query if possible,
// otherwise the restore the original query.
if (REWRITE_QUERIES) {
rewriteQueryFromSuggestion(position);
}
}
/**
* Implements OnItemSelectedListener
*/
public void onNothingSelected(AdapterView> parent) {
if (DBG) Log.d(LOG_TAG, "onNothingSelected()");
}
/**
* Query rewriting.
*/
private void rewriteQueryFromSuggestion(int position) {
Cursor c = mSuggestionsAdapter.getCursor();
if (c == null) {
return;
}
if (c.moveToPosition(position)) {
// Get the new query from the suggestion.
CharSequence newQuery = mSuggestionsAdapter.convertToString(c);
if (newQuery != null) {
// The suggestion rewrites the query.
if (DBG) Log.d(LOG_TAG, "Rewriting query to '" + newQuery + "'");
// Update the text field, without getting new suggestions.
setQuery(newQuery);
} else {
// The suggestion does not rewrite the query, restore the user's query.
if (DBG) Log.d(LOG_TAG, "Suggestion gives no rewrite, restoring user query.");
restoreUserQuery();
}
} else {
// We got a bad position, restore the user's query.
Log.w(LOG_TAG, "Bad suggestion position: " + position);
restoreUserQuery();
}
}
/**
* Restores the query entered by the user if needed.
*/
private void restoreUserQuery() {
if (DBG) Log.d(LOG_TAG, "Restoring query to '" + mUserQuery + "'");
setQuery(mUserQuery);
}
/**
* Sets the text in the query box, without updating the suggestions.
*/
private void setQuery(CharSequence query) {
mSearchAutoComplete.setText(query, false);
if (query != null) {
mSearchAutoComplete.setSelection(query.length());
}
}
/**
* Sets the text in the query box, updating the suggestions.
*/
private void setUserQuery(String query) {
if (query == null) {
query = "";
}
mUserQuery = query;
mSearchAutoComplete.setText(query);
mSearchAutoComplete.setSelection(query.length());
}
/**
* Debugging Support
*/
/**
* For debugging only, sample the millisecond clock and log it.
* Uses AtomicLong so we can use in multiple threads
*/
private AtomicLong mLastLogTime = new AtomicLong(SystemClock.uptimeMillis());
private void dbgLogTiming(final String caller) {
long millis = SystemClock.uptimeMillis();
long oldTime = mLastLogTime.getAndSet(millis);
long delta = millis - oldTime;
final String report = millis + " (+" + delta + ") ticks for Search keystroke in " + caller;
Log.d(LOG_TAG,report);
}
} |
| File |
|---|
| SearchDialog.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Intent extra data key: This key will be used for the extra populated by the
* {@link #SUGGEST_COLUMN_INTENT_EXTRA_DATA} column.
<<<<<<< HEAD
=======
*
* {@hide}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public final static String EXTRA_DATA_KEY = "intent_extra_data_key";
|
| Solution content |
|---|
/**
* Intent extra data key: This key will be used for the extra populated by the
* {@link #SUGGEST_COLUMN_INTENT_EXTRA_DATA} column.
*/
public final static String EXTRA_DATA_KEY = "intent_extra_data_key";
|
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* this element exists at the given row, this is the data that will be used when
* forming the suggestion's intent. If not provided, the Intent's extra data field will be null.
* This column allows suggestions to provide additional arbitrary data which will be included as
<<<<<<< HEAD
* an extra under the key {@link #EXTRA_DATA_KEY}.
=======
* an extra under the key EXTRA_DATA_KEY.
*
* @hide Pending API council approval.
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public final static String SUGGEST_COLUMN_INTENT_EXTRA_DATA = "suggest_intent_extra_data";
/** |
| Solution content |
|---|
* this element exists at the given row, this is the data that will be used when
* forming the suggestion's intent. If not provided, the Intent's extra data field will be null.
* This column allows suggestions to provide additional arbitrary data which will be included as
* an extra under the key {@link #EXTRA_DATA_KEY}.
*/
public final static String SUGGEST_COLUMN_INTENT_EXTRA_DATA = "suggest_intent_extra_data";
/** |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* Column name for suggestions cursor. Optional. This column is used to specify
* that a spinner should be shown in lieu of an icon2 while the shortcut of this suggestion
* is being refreshed.
<<<<<<< HEAD
=======
*
* @hide Pending API council approval.
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public final static String SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING =
"suggest_spinner_while_refreshing"; |
| Solution content |
|---|
* Column name for suggestions cursor. Optional. This column is used to specify
* that a spinner should be shown in lieu of an icon2 while the shortcut of this suggestion
* is being refreshed.
*/
public final static String SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING =
"suggest_spinner_while_refreshing"; |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* Intent action for starting a web search provider's settings activity.
* Web search providers should handle this intent if they have provider-specific
* settings to implement.
<<<<<<< HEAD
=======
*
* @hide Pending API council approval.
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public final static String INTENT_ACTION_WEB_SEARCH_SETTINGS
= "android.search.action.WEB_SEARCH_SETTINGS"; |
| Solution content |
|---|
* Intent action for starting a web search provider's settings activity.
* Web search providers should handle this intent if they have provider-specific
* settings to implement.
*/
public final static String INTENT_ACTION_WEB_SEARCH_SETTINGS
= "android.search.action.WEB_SEARCH_SETTINGS"; |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*
* Intent action broadcasted to inform that the searchables list or default have changed.
* Components should handle this intent if they cache any searchable data and wish to stay
* up to date on changes.
<<<<<<< HEAD
*/
public final static String INTENT_ACTION_SEARCHABLES_CHANGED
= "android.search.action.SEARCHABLES_CHANGED";
/**
* Intent action broadcasted to inform that the search settings have changed in some way.
* Either searchables have been enabled or disabled, or a different web search provider
* has been chosen.
*/
public final static String INTENT_ACTION_SEARCH_SETTINGS_CHANGED
= "android.search.action.SETTINGS_CHANGED";
=======
* @hide Pending API council approval.
*/
public final static String INTENT_ACTION_SEARCHABLES_CHANGED
= "android.search.action.SEARCHABLES_CHANGED";
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* If a suggestion has this value in {@link #SUGGEST_COLUMN_INTENT_ACTION}, |
| Solution content |
|---|
* Intent action broadcasted to inform that the searchables list or default have changed.
* Components should handle this intent if they cache any searchable data and wish to stay
* up to date on changes.
*/
public final static String INTENT_ACTION_SEARCHABLES_CHANGED
= "android.search.action.SEARCHABLES_CHANGED";
/**
* Intent action broadcasted to inform that the search settings have changed in some way.
* Either searchables have been enabled or disabled, or a different web search provider
* has been chosen.
*/
public final static String INTENT_ACTION_SEARCH_SETTINGS_CHANGED
= "android.search.action.SETTINGS_CHANGED";
/**
* If a suggestion has this value in {@link #SUGGEST_COLUMN_INTENT_ACTION}, |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
private final Context mContext;
<<<<<<< HEAD
private int mIdent;
// package private since they are used by the inner class SearchManagerCallback
=======
// package private since they are used by the inner class SearchManagerCallback
/* package */ boolean mIsShowing = false;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/* package */ final Handler mHandler;
/* package */ OnDismissListener mDismissListener = null;
/* package */ OnCancelListener mCancelListener = null; |
| Solution content |
|---|
private final Context mContext;
private int mIdent;
// package private since they are used by the inner class SearchManagerCallback
/* package */ final Handler mHandler;
/* package */ OnDismissListener mDismissListener = null;
/* package */ OnCancelListener mCancelListener = null; |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
mHandler = handler;
mService = ISearchManager.Stub.asInterface(
ServiceManager.getService(Context.SEARCH_SERVICE));
<<<<<<< HEAD
}
/*package*/ void setIdent(int ident) {
if (mIdent != 0) {
throw new IllegalStateException("mIdent already set");
}
mIdent = ident;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
/** |
| Solution content |
|---|
mHandler = handler;
mService = ISearchManager.Stub.asInterface(
ServiceManager.getService(Context.SEARCH_SERVICE));
}
/*package*/ void setIdent(int ident) {
if (mIdent != 0) {
throw new IllegalStateException("mIdent already set");
}
mIdent = ident;
}
/** |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
ComponentName launchActivity,
Bundle appSearchData,
boolean globalSearch) {
<<<<<<< HEAD
if (mIdent == 0) throw new IllegalArgumentException(
"Called from outside of an Activity context");
try {
// activate the search manager and start it up!
mService.startSearch(initialQuery, selectInitialQuery, launchActivity, appSearchData,
globalSearch, mSearchManagerCallback, mIdent);
=======
if (DBG) debug("startSearch(), mIsShowing=" + mIsShowing);
if (mIsShowing) return;
try {
mIsShowing = true;
// activate the search manager and start it up!
mService.startSearch(initialQuery, selectInitialQuery, launchActivity, appSearchData,
globalSearch, mSearchManagerCallback);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} catch (RemoteException ex) {
Log.e(TAG, "startSearch() failed: " + ex);
} |
| Solution content |
|---|
ComponentName launchActivity,
Bundle appSearchData,
boolean globalSearch) {
if (mIdent == 0) throw new IllegalArgumentException(
"Called from outside of an Activity context");
try {
// activate the search manager and start it up!
mService.startSearch(initialQuery, selectInitialQuery, launchActivity, appSearchData,
globalSearch, mSearchManagerCallback, mIdent);
} catch (RemoteException ex) {
Log.e(TAG, "startSearch() failed: " + ex);
} |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
* @see #startSearch
*/
public void stopSearch() {
<<<<<<< HEAD
if (DBG) debug("stopSearch()");
try {
mService.stopSearch();
} catch (RemoteException ex) {
=======
if (DBG) debug("stopSearch(), mIsShowing=" + mIsShowing);
if (!mIsShowing) return;
try {
mService.stopSearch();
// onDismiss will also clear this, but we do it here too since onDismiss() is
// called asynchronously.
mIsShowing = false;
} catch (RemoteException ex) {
Log.e(TAG, "stopSearch() failed: " + ex);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
|
| Solution content |
|---|
* @see #startSearch
*/
public void stopSearch() {
if (DBG) debug("stopSearch()");
try {
mService.stopSearch();
} catch (RemoteException ex) {
}
}
|
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Catch clause |
| Comment |
| If statement |
| Method invocation |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* @hide
*/
public boolean isVisible() {
<<<<<<< HEAD
if (DBG) debug("isVisible()");
try {
return mService.isVisible();
} catch (RemoteException e) {
Log.e(TAG, "isVisible() failed: " + e);
return false;
}
=======
if (DBG) debug("isVisible(), mIsShowing=" + mIsShowing);
return mIsShowing;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
|
| Solution content |
|---|
* @hide
*/
public boolean isVisible() {
if (DBG) debug("isVisible()");
try {
return mService.isVisible();
} catch (RemoteException e) {
Log.e(TAG, "isVisible() failed: " + e);
return false;
}
}
/** |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Return statement |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
private final Runnable mFireOnDismiss = new Runnable() {
public void run() {
if (DBG) debug("mFireOnDismiss");
<<<<<<< HEAD
if (mDismissListener != null) {
mDismissListener.onDismiss();
}
}
};
private final Runnable mFireOnCancel = new Runnable() {
public void run() {
if (DBG) debug("mFireOnCancel");
if (mCancelListener != null) {
mCancelListener.onCancel();
}
}
};
public void onDismiss() {
if (DBG) debug("onDismiss()");
mHandler.post(mFireOnDismiss);
}
public void onCancel() {
if (DBG) debug("onCancel()");
mHandler.post(mFireOnCancel);
=======
mIsShowing = false;
if (mDismissListener != null) {
mDismissListener.onDismiss();
}
}
};
private final Runnable mFireOnCancel = new Runnable() {
public void run() {
if (DBG) debug("mFireOnCancel");
// doesn't need to clear mIsShowing since onDismiss() always gets called too
if (mCancelListener != null) {
mCancelListener.onCancel();
}
}
};
public void onDismiss() {
if (DBG) debug("onDismiss()");
mHandler.post(mFireOnDismiss);
}
public void onCancel() {
if (DBG) debug("onCancel()");
mHandler.post(mFireOnCancel);
}
}
// TODO: remove the DialogInterface interfaces from SearchManager.
// This changes the public API, so I'll do it in a separate change.
public void onCancel(DialogInterface dialog) {
throw new UnsupportedOperationException();
}
public void onDismiss(DialogInterface dialog) {
throw new UnsupportedOperationException();
}
/**
* Saves the state of the search UI.
*
* @return A Bundle containing the state of the search dialog, or {@code null}
* if the search UI is not visible.
*
* @hide
*/
public Bundle saveSearchDialog() {
if (DBG) debug("saveSearchDialog(), mIsShowing=" + mIsShowing);
if (!mIsShowing) return null;
try {
return mService.onSaveInstanceState();
} catch (RemoteException ex) {
Log.e(TAG, "onSaveInstanceState() failed: " + ex);
return null;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
} |
| Solution content |
|---|
private final Runnable mFireOnDismiss = new Runnable() {
public void run() {
if (DBG) debug("mFireOnDismiss");
if (mDismissListener != null) {
mDismissListener.onDismiss();
}
}
};
private final Runnable mFireOnCancel = new Runnable() {
public void run() {
if (DBG) debug("mFireOnCancel");
if (mCancelListener != null) {
mCancelListener.onCancel();
}
}
};
public void onDismiss() {
if (DBG) debug("onDismiss()");
mHandler.post(mFireOnDismiss);
}
public void onCancel() {
if (DBG) debug("onCancel()");
mHandler.post(mFireOnCancel);
}
}
/**
* @deprecated This method is an obsolete internal implementation detail. Do not use.
*/
public void onCancel(DialogInterface dialog) {
throw new UnsupportedOperationException();
}
/**
* @deprecated This method is an obsolete internal implementation detail. Do not use.
*/
public void onDismiss(DialogInterface dialog) {
throw new UnsupportedOperationException();
}
/**
* Gets information about a searchable activity. This method is static so that it can
* be used from non-Activity contexts.
*
* @param componentName The activity to get searchable information for.
* @param globalSearch If |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Catch clause |
| Comment |
| If statement |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* @deprecated This method is an obsolete internal implementation detail. Do not use.
*/
public void onCancel(DialogInterface dialog) {
throw new UnsupportedOperationException();
}
/**
* @deprecated This method is an obsolete internal implementation detail. Do not use.
*/
public void onDismiss(DialogInterface dialog) {
throw new UnsupportedOperationException();
=======
* Restores the state of the search dialog.
*
* @param searchDialogState Bundle to read the state from.
*
* @hide
*/
public void restoreSearchDialog(Bundle searchDialogState) {
if (DBG) debug("restoreSearchDialog(" + searchDialogState + ")");
if (searchDialogState == null) return;
try {
mService.onRestoreInstanceState(searchDialogState);
} catch (RemoteException ex) {
Log.e(TAG, "onRestoreInstanceState() failed: " + ex);
}
}
/**
* Update the search dialog after a configuration change.
*
* @param newConfig The new configuration.
*
* @hide
*/
public void onConfigurationChanged(Configuration newConfig) {
if (DBG) debug("onConfigurationChanged(" + newConfig + "), mIsShowing=" + mIsShowing);
if (!mIsShowing) return;
try {
mService.onConfigurationChanged(newConfig);
} catch (RemoteException ex) {
Log.e(TAG, "onConfigurationChanged() failed:" + ex);
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
/** |
| Solution content |
|---|
/**
* @deprecated This method is an obsolete internal implementation detail. Do not use.
*/
public void onCancel(DialogInterface dialog) {
throw new UnsupportedOperationException();
}
/**
* @deprecated This method is an obsolete internal implementation detail. Do not use.
*/
public void onDismiss(DialogInterface dialog) {
throw new UnsupportedOperationException();
}
/** |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method declaration |
| Method signature |
| Throw statement |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
try {
* @hide because SearchableInfo is not part of the API.
*/
public List |
| Solution content |
|---|
* @hide because SearchableInfo is not part of the API.
*/
public List |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Catch clause |
| Comment |
| Method invocation |
| Method signature |
| Return statement |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
=======
* Returns a list of the searchable activities that handle web searches.
*
* @return a list of all searchable activities that handle
* {@link android.content.Intent#ACTION_WEB_SEARCH}.
*
* @hide because SearchableInfo is not part of the API.
*/
public List |
| Solution content |
|---|
}
/**
* Returns a list of the searchable activities that handle web searches.
*
* @return a list of all searchable activities that handle
* {@link android.content.Intent#ACTION_WEB_SEARCH}.
*
* @hide because SearchableInfo is not part of the API.
*/
public List |
| File |
|---|
| SearchManager.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Resources; import android.database.Cursor; <<<<<<< HEAD import android.graphics.drawable.ColorDrawable; ======= import android.graphics.Canvas; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.graphics.drawable.Drawable; import android.graphics.drawable.StateListDrawable; import android.net.Uri; |
| Solution content |
|---|
import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Resources; import android.database.Cursor; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.StateListDrawable; import android.net.Uri; |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Log; <<<<<<< HEAD import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; ======= import android.util.TypedValue; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.widget.ImageView; import android.widget.ResourceCursorAdapter; import android.widget.TextView; |
| Solution content |
|---|
import android.text.TextUtils; import android.util.Log; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ResourceCursorAdapter; import android.widget.TextView; |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private SearchDialog mSearchDialog;
private SearchableInfo mSearchable;
private Context mProviderContext;
<<<<<<< HEAD
private WeakHashMap |
| Solution content |
|---|
private SearchDialog mSearchDialog;
private SearchableInfo mSearchable;
private Context mProviderContext;
private WeakHashMap |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
private final Runnable mStartSpinnerRunnable;
private final Runnable mStopSpinnerRunnable;
<<<<<<< HEAD
/**
* The amount of time we delay in the filter when the user presses the delete key.
* @see Filter#setDelayer(android.widget.Filter.Delayer).
*/
private static final long DELETE_KEY_POST_DELAY = 500L;
public SuggestionsAdapter(Context context, SearchDialog searchDialog,
SearchableInfo searchable,
WeakHashMap |
| Solution content |
|---|
private final Runnable mStartSpinnerRunnable;
private final Runnable mStopSpinnerRunnable;
/**
* The amount of time we delay in the filter when the user presses the delete key.
* @see Filter#setDelayer(android.widget.Filter.Delayer).
*/
private static final long DELETE_KEY_POST_DELAY = 500L;
public SuggestionsAdapter(Context context, SearchDialog searchDialog,
SearchableInfo searchable,
WeakHashMap |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
mProviderContext = mSearchable.getProviderContext(mContext, activityContext);
mOutsideDrawablesCache = outsideDrawablesCache;
mBackgroundsCache = new SparseArray |
| Solution content |
|---|
mProviderContext = mSearchable.getProviderContext(mContext, activityContext);
mOutsideDrawablesCache = outsideDrawablesCache;
mBackgroundsCache = new SparseArray |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
mSearchDialog.setWorking(false);
}
};
<<<<<<< HEAD
// delay 500ms when deleting
getFilter().setDelayer(new Filter.Delayer() {
private int mPreviousLength = 0;
public long getPostingDelay(CharSequence constraint) {
long delay = constraint.length() < mPreviousLength ? DELETE_KEY_POST_DELAY : 0;
mPreviousLength = constraint.length();
return delay;
}
});
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
/** |
| Solution content |
|---|
mSearchDialog.setWorking(false);
}
};
// delay 500ms when deleting
getFilter().setDelayer(new Filter.Delayer() {
private int mPreviousLength = 0;
public long getPostingDelay(CharSequence constraint) {
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 |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
mIconName1Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_1);
mIconName2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_2);
mBackgroundColorCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_BACKGROUND_COLOR);
<<<<<<< HEAD
=======
}
}
/**
* Handle sending and receiving information associated with
* {@link DialogCursorProtocol#PRE_CLOSE}.
*
* @param cursor The cursor to call.
*/
private void callCursorPreClose(Cursor cursor) {
if (!mGlobalSearchMode) return;
final Bundle request = new Bundle();
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.PRE_CLOSE);
request.putInt(DialogCursorProtocol.PRE_CLOSE_SEND_MAX_DISPLAY_POS, mMaxDisplayed);
final Bundle response = cursor.respond(request);
mMaxDisplayed = -1;
}
@Override
public void notifyDataSetChanged() {
if (DBG) Log.d(LOG_TAG, "notifyDataSetChanged");
super.notifyDataSetChanged();
callCursorPostRefresh(mCursor);
// look out for the pending item we are supposed to scroll to
if (mListItemToSelect != NONE) {
mSearchDialog.setListSelection(mListItemToSelect);
mListItemToSelect = NONE;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
|
| Solution content |
|---|
mIconName1Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_1);
mIconName2Col = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_ICON_2);
mBackgroundColorCol = c.getColumnIndex(SearchManager.SUGGEST_COLUMN_BACKGROUND_COLOR);
}
}
|
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Attribute |
| Comment |
| If statement |
| Method declaration |
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Handle sending and receiving information associated with
<<<<<<< HEAD
* {@link DialogCursorProtocol#PRE_CLOSE}.
*
* @param cursor The cursor to call.
*/
private void callCursorPreClose(Cursor cursor) {
if (!mGlobalSearchMode) return;
final Bundle request = new Bundle();
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.PRE_CLOSE);
request.putInt(DialogCursorProtocol.PRE_CLOSE_SEND_MAX_DISPLAY_POS, mMaxDisplayed);
final Bundle response = cursor.respond(request);
mMaxDisplayed = -1;
}
@Override
public void notifyDataSetChanged() {
if (DBG) Log.d(LOG_TAG, "notifyDataSetChanged");
super.notifyDataSetChanged();
callCursorPostRefresh(mCursor);
// look out for the pending item we are supposed to scroll to
if (mListItemToSelect != NONE) {
mSearchDialog.setListSelection(mListItemToSelect);
mListItemToSelect = NONE;
}
}
/**
* Handle sending and receiving information associated with
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
* {@link DialogCursorProtocol#POST_REFRESH}.
*
* @param cursor The cursor to call. |
| Solution content |
|---|
/**
* Handle sending and receiving information associated with
* {@link DialogCursorProtocol#PRE_CLOSE}.
*
* @param cursor The cursor to call.
*/
private void callCursorPreClose(Cursor cursor) {
if (!mGlobalSearchMode) return;
final Bundle request = new Bundle();
request.putInt(DialogCursorProtocol.METHOD, DialogCursorProtocol.PRE_CLOSE);
request.putInt(DialogCursorProtocol.PRE_CLOSE_SEND_MAX_DISPLAY_POS, mMaxDisplayed);
final Bundle response = cursor.respond(request);
mMaxDisplayed = -1;
}
@Override
public void notifyDataSetChanged() {
if (DBG) Log.d(LOG_TAG, "notifyDataSetChanged");
super.notifyDataSetChanged();
callCursorPostRefresh(mCursor);
// look out for the pending item we are supposed to scroll to
if (mListItemToSelect != NONE) {
mSearchDialog.setListSelection(mListItemToSelect);
mListItemToSelect = NONE;
}
}
/**
* Handle sending and receiving information associated with
* {@link DialogCursorProtocol#POST_REFRESH}.
*
* @param cursor The cursor to call. |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
if (mBackgroundColorCol != -1) {
backgroundColor = cursor.getInt(mBackgroundColorCol);
}
<<<<<<< HEAD
Drawable background = getItemBackground(backgroundColor);
view.setBackgroundDrawable(background);
=======
((SuggestionItemView)view).setColor(backgroundColor);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
final boolean isHtml = mFormatCol > 0 && "html".equals(cursor.getString(mFormatCol));
setViewText(cursor, views.mText1, mText1Col, isHtml); |
| Solution content |
|---|
if (mBackgroundColorCol != -1) {
backgroundColor = cursor.getInt(mBackgroundColorCol);
}
Drawable background = getItemBackground(backgroundColor);
view.setBackgroundDrawable(background);
final boolean isHtml = mFormatCol > 0 && "html".equals(cursor.getString(mFormatCol));
setViewText(cursor, views.mText1, mText1Col, isHtml); |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
final boolean isHtml = mFormatCol > 0 && "html".equals(cursor.getString(mFormatCol));
setViewText(cursor, views.mText1, mText1Col, isHtml);
setViewText(cursor, views.mText2, mText2Col, isHtml);
<<<<<<< HEAD
if (views.mIcon1 != null) {
setViewDrawable(views.mIcon1, getIcon1(cursor));
}
if (views.mIcon2 != null) {
setViewDrawable(views.mIcon2, getIcon2(cursor));
}
}
/**
* Gets a drawable with no color when selected or pressed, and the given color when
* neither selected nor pressed.
*
* @return A drawable, or {@code null} if the given color is transparent.
*/
private Drawable getItemBackground(int backgroundColor) {
if (backgroundColor == 0) {
return null;
} else {
Drawable.ConstantState cachedBg = mBackgroundsCache.get(backgroundColor);
if (cachedBg != null) {
if (DBG) Log.d(LOG_TAG, "Background cache hit for color " + backgroundColor);
return cachedBg.newDrawable();
}
if (DBG) Log.d(LOG_TAG, "Creating new background for color " + backgroundColor);
ColorDrawable transparent = new ColorDrawable(0);
ColorDrawable background = new ColorDrawable(backgroundColor);
StateListDrawable newBg = new StateListDrawable();
newBg.addState(new int[]{android.R.attr.state_selected}, transparent);
newBg.addState(new int[]{android.R.attr.state_pressed}, transparent);
newBg.addState(new int[]{}, background);
mBackgroundsCache.put(backgroundColor, newBg.getConstantState());
return newBg;
}
=======
setViewIcon(cursor, views.mIcon1, mIconName1Col);
setViewIcon(cursor, views.mIcon2, mIconName2Col);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
private void setViewText(Cursor cursor, TextView v, int textCol, boolean isHtml) { |
| Solution content |
|---|
final boolean isHtml = mFormatCol > 0 && "html".equals(cursor.getString(mFormatCol));
setViewText(cursor, views.mText1, mText1Col, isHtml);
setViewText(cursor, views.mText2, mText2Col, isHtml);
if (views.mIcon1 != null) {
setViewDrawable(views.mIcon1, getIcon1(cursor));
}
if (views.mIcon2 != null) {
setViewDrawable(views.mIcon2, getIcon2(cursor));
}
}
/**
* Gets a drawable with no color when selected or pressed, and the given color when
* neither selected nor pressed.
*
* @return A drawable, or {@code null} if the given color is transparent.
*/
private Drawable getItemBackground(int backgroundColor) {
if (backgroundColor == 0) {
return null;
} else {
Drawable.ConstantState cachedBg = mBackgroundsCache.get(backgroundColor);
if (cachedBg != null) {
if (DBG) Log.d(LOG_TAG, "Background cache hit for color " + backgroundColor);
return cachedBg.newDrawable();
}
if (DBG) Log.d(LOG_TAG, "Creating new background for color " + backgroundColor);
ColorDrawable transparent = new ColorDrawable(0);
ColorDrawable background = new ColorDrawable(backgroundColor);
StateListDrawable newBg = new StateListDrawable();
newBg.addState(new int[]{android.R.attr.state_selected}, transparent);
newBg.addState(new int[]{android.R.attr.state_pressed}, transparent);
newBg.addState(new int[]{}, background);
mBackgroundsCache.put(backgroundColor, newBg.getConstantState());
return newBg;
}
}
private void setViewText(Cursor cursor, TextView v, int textCol, boolean isHtml) { |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
* is a drawable.
*/
}
}
<<<<<<< HEAD
private static boolean looksLikeHtml(String str) {
if (TextUtils.isEmpty(str)) return false;
for (int i = str.length() - 1; i >= 0; i--) {
char c = str.charAt(i);
if (c == '<' || c == '&') return true;
}
return false;
}
private Drawable getIcon1(Cursor cursor) {
if (mIconName1Col < 0) {
return null;
}
String value = cursor.getString(mIconName1Col);
Drawable drawable = getDrawableFromResourceValue(value);
if (drawable != null) {
return drawable;
}
return getDefaultIcon1(cursor);
}
private Drawable getIcon2(Cursor cursor) {
if (mIconName2Col < 0) {
return null;
}
String value = cursor.getString(mIconName2Col);
return getDrawableFromResourceValue(value);
}
/**
* Sets the drawable in an image view, makes sure the view is only visible if there
private void setViewDrawable(ImageView v, Drawable drawable) {
=======
private void setViewIcon(Cursor cursor, ImageView v, int iconNameCol) {
if (v == null) {
return;
}
if (iconNameCol < 0) {
return;
}
String value = cursor.getString(iconNameCol);
Drawable drawable = getDrawableFromResourceValue(value);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// Set the icon even if the drawable is null, since we need to clear any
// previous icon.
v.setImageDrawable(drawable); |
| Solution content |
|---|
}
}
private static boolean looksLikeHtml(String str) {
if (TextUtils.isEmpty(str)) return false;
for (int i = str.length() - 1; i >= 0; i--) {
char c = str.charAt(i);
if (c == '<' || c == '&') return true;
}
return false;
}
private Drawable getIcon1(Cursor cursor) {
if (mIconName1Col < 0) {
return null;
}
String value = cursor.getString(mIconName1Col);
Drawable drawable = getDrawableFromResourceValue(value);
if (drawable != null) {
return drawable;
}
return getDefaultIcon1(cursor);
}
private Drawable getIcon2(Cursor cursor) {
if (mIconName2Col < 0) {
return null;
}
String value = cursor.getString(mIconName2Col);
return getDrawableFromResourceValue(value);
}
/**
* Sets the drawable in an image view, makes sure the view is only visible if there
* is a drawable.
*/
private void setViewDrawable(ImageView v, Drawable drawable) {
// Set the icon even if the drawable is null, since we need to clear any
// previous icon.
v.setImageDrawable(drawable); |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method declaration |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
// First, check the cache.
<<<<<<< HEAD
Drawable.ConstantState cached = mOutsideDrawablesCache.get(drawableId);
if (cached != null) {
if (DBG) Log.d(LOG_TAG, "Found icon in cache: " + drawableId);
return cached.newDrawable();
=======
Drawable drawable = mOutsideDrawablesCache.get(drawableId);
if (drawable != null) {
if (DBG) Log.d(LOG_TAG, "Found icon in cache: " + drawableId);
return drawable;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
Drawable drawable = null; |
| Solution content |
|---|
}
// First, check the cache.
Drawable.ConstantState cached = mOutsideDrawablesCache.get(drawableId);
if (cached != null) {
if (DBG) Log.d(LOG_TAG, "Found icon in cache: " + drawableId);
return cached.newDrawable();
}
Drawable drawable = null; |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (drawable != null) {
mOutsideDrawablesCache.put(drawableId, drawable.getConstantState());
}
<<<<<<< HEAD
} catch (Resources.NotFoundException nfe) {
=======
} catch (NotFoundException nfe) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (DBG) Log.d(LOG_TAG, "Icon resource not found: " + drawableId);
// drawable = null;
} |
| Solution content |
|---|
if (drawable != null) {
mOutsideDrawablesCache.put(drawableId, drawable.getConstantState());
}
} catch (Resources.NotFoundException nfe) {
if (DBG) Log.d(LOG_TAG, "Icon resource not found: " + drawableId);
// drawable = null;
} |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Catch clause |
| Chunk |
|---|
| Conflicting content |
|---|
}
return drawable;
}
<<<<<<< HEAD
/**
* Gets the left-hand side icon that will be used for the current suggestion
* if the suggestion contains an icon column but no icon or a broken icon.
*
* @param cursor A cursor positioned at the current suggestion.
* @return A non-null drawable.
*/
private Drawable getDefaultIcon1(Cursor cursor) {
// First check the component that the suggestion is originally from
String c = getColumnString(cursor, SearchManager.SUGGEST_COLUMN_INTENT_COMPONENT_NAME);
if (c != null) {
ComponentName component = ComponentName.unflattenFromString(c);
if (component != null) {
Drawable drawable = getActivityIconWithCache(component);
if (drawable != null) {
return drawable;
}
} else {
Log.w(LOG_TAG, "Bad component name: " + c);
}
}
// Then check the component that gave us the suggestion
Drawable drawable = getActivityIconWithCache(mSearchable.getSearchActivity());
if (drawable != null) {
return drawable;
}
// Fall back to a default icon
return mContext.getPackageManager().getDefaultActivityIcon();
}
/**
* Gets the activity or application icon for an activity.
* Uses the local icon cache for fast repeated lookups.
*
* @param component Name of an activity.
* @return A drawable, or {@code null} if neither the activity nor the application
* has an icon set.
*/
private Drawable getActivityIconWithCache(ComponentName component) {
// First check the icon cache
String componentIconKey = component.flattenToShortString();
// Using containsKey() since we also store null values.
if (mOutsideDrawablesCache.containsKey(componentIconKey)) {
Drawable.ConstantState cached = mOutsideDrawablesCache.get(componentIconKey);
return cached == null ? null : cached.newDrawable();
// Then try the activity or application icon
Drawable drawable = getActivityIcon(component);
// Stick it in the cache so we don't do this lookup again.
Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState();
mOutsideDrawablesCache.put(componentIconKey, toCache);
return drawable;
}
/**
* Gets the activity or application icon for an activity.
*
* @param component Name of an activity.
* @return A drawable, or {@code null} if neither the acitivy or the application
* have an icon set.
*/
private Drawable getActivityIcon(ComponentName component) {
PackageManager pm = mContext.getPackageManager();
final ActivityInfo activityInfo;
try {
activityInfo = pm.getActivityInfo(component, PackageManager.GET_META_DATA);
} catch (NameNotFoundException ex) {
Log.w(LOG_TAG, ex.toString());
return null;
}
int iconId = activityInfo.getIconResource();
if (iconId == 0) return null;
String pkg = component.getPackageName();
Drawable drawable = pm.getDrawable(pkg, iconId, activityInfo.applicationInfo);
if (drawable == null) {
Log.w(LOG_TAG, "Invalid icon resource " + iconId + " for "
+ component.flattenToShortString());
return null;
}
return drawable;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* Gets the value of a string column by name.
* |
| Solution content |
|---|
*
return drawable;
}
/**
* Gets the left-hand side icon that will be used for the current suggestion
* if the suggestion contains an icon column but no icon or a broken icon.
*
* @param cursor A cursor positioned at the current suggestion.
* @return A non-null drawable.
*/
private Drawable getDefaultIcon1(Cursor cursor) {
// First check the component that the suggestion is originally from
String c = getColumnString(cursor, SearchManager.SUGGEST_COLUMN_INTENT_COMPONENT_NAME);
if (c != null) {
ComponentName component = ComponentName.unflattenFromString(c);
if (component != null) {
Drawable drawable = getActivityIconWithCache(component);
if (drawable != null) {
return drawable;
}
} else {
Log.w(LOG_TAG, "Bad component name: " + c);
}
}
// Then check the component that gave us the suggestion
Drawable drawable = getActivityIconWithCache(mSearchable.getSearchActivity());
if (drawable != null) {
return drawable;
}
// Fall back to a default icon
return mContext.getPackageManager().getDefaultActivityIcon();
}
/**
* Gets the activity or application icon for an activity.
* Uses the local icon cache for fast repeated lookups.
*
* @param component Name of an activity.
* @return A drawable, or {@code null} if neither the activity nor the application
* has an icon set.
*/
private Drawable getActivityIconWithCache(ComponentName component) {
// First check the icon cache
String componentIconKey = component.flattenToShortString();
// Using containsKey() since we also store null values.
if (mOutsideDrawablesCache.containsKey(componentIconKey)) {
Drawable.ConstantState cached = mOutsideDrawablesCache.get(componentIconKey);
return cached == null ? null : cached.newDrawable();
}
// Then try the activity or application icon
Drawable drawable = getActivityIcon(component);
// Stick it in the cache so we don't do this lookup again.
Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState();
mOutsideDrawablesCache.put(componentIconKey, toCache);
return drawable;
}
/**
* Gets the activity or application icon for an activity.
* @param component Name of an activity.
* @return A drawable, or {@code null} if neither the acitivy or the application
* have an icon set.
*/
private Drawable getActivityIcon(ComponentName component) {
PackageManager pm = mContext.getPackageManager();
final ActivityInfo activityInfo;
try {
activityInfo = pm.getActivityInfo(component, PackageManager.GET_META_DATA);
} catch (NameNotFoundException ex) {
Log.w(LOG_TAG, ex.toString());
return null;
}
int iconId = activityInfo.getIconResource();
if (iconId == 0) return null;
String pkg = component.getPackageName();
Drawable drawable = pm.getDrawable(pkg, iconId, activityInfo.applicationInfo);
if (drawable == null) {
Log.w(LOG_TAG, "Invalid icon resource " + iconId + " for "
+ component.flattenToShortString());
return null;
}
return drawable;
}
/**
* Gets the value of a string column by name.
* |
| File |
|---|
| SuggestionsAdapter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
public class BackupManager {
private static final String TAG = "BackupManager";
<<<<<<< HEAD
/** @hide TODO: REMOVE THIS */
public static final boolean EVEN_THINK_ABOUT_DOING_RESTORE = false;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private Context mContext;
private static IBackupManager sService;
|
| Solution content |
|---|
public class BackupManager {
private static final String TAG = "BackupManager";
/** @hide TODO: REMOVE THIS */
public static final boolean EVEN_THINK_ABOUT_DOING_RESTORE = false;
private Context mContext;
private static IBackupManager sService;
|
| File |
|---|
| BackupManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* {@link android.app.BackupAgent} subclass will be scheduled when you call this method.
*/
public void dataChanged() {
<<<<<<< HEAD
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
return;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
checkServiceBinder();
if (sService != null) {
try { |
| Solution content |
|---|
* {@link android.app.BackupAgent} subclass will be scheduled when you call this method.
*/
public void dataChanged() {
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
return;
}
checkServiceBinder();
if (sService != null) {
try { |
| File |
|---|
| BackupManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
* permission if the package named in the argument is not the caller's own.
*/
public static void dataChanged(String packageName) {
<<<<<<< HEAD
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
return;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
checkServiceBinder();
if (sService != null) {
try { |
| Solution content |
|---|
* permission if the package named in the argument is not the caller's own.
*/
public static void dataChanged(String packageName) {
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
return;
}
checkServiceBinder();
if (sService != null) {
try { |
| File |
|---|
| BackupManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
* {@hide}
*/
public IRestoreSession beginRestoreSession(String transport) {
<<<<<<< HEAD
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
return null;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
IRestoreSession binder = null;
checkServiceBinder();
if (sService != null) { |
| Solution content |
|---|
* {@hide}
*/
public IRestoreSession beginRestoreSession(String transport) {
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
return null;
}
IRestoreSession binder = null;
checkServiceBinder();
if (sService != null) { |
| File |
|---|
| BackupManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
// An existing server item has changed
// If serverSyncVersion is null, there is no edit URL;
// server won't let this change be written.
<<<<<<< HEAD
boolean recordChanged = (localSyncVersion == null) ||
(serverSyncVersion == null) ||
!serverSyncVersion.equals(localSyncVersion);
if (recordChanged) {
if (localSyncDirty) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "remote record " + serverSyncId
+ " conflicts with local _sync_id " + localSyncID
+ ", local _id " + localRowId);
}
conflict = true;
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"remote record " +
serverSyncId +
" updates local _sync_id " +
localSyncID + ", local _id " +
localRowId);
}
update = true;
}
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"Skipping update: localSyncVersion: " + localSyncVersion +
", serverSyncVersion: " + serverSyncVersion);
=======
// Just hold onto it, I guess, in case the server permissions
// change later.
if (serverSyncVersion != null) {
boolean recordChanged = (localSyncVersion == null) ||
!serverSyncVersion.equals(localSyncVersion);
if (recordChanged) {
if (localSyncDirty) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "remote record " + serverSyncId
+ " conflicts with local _sync_id " + localSyncID
+ ", local _id " + localRowId);
}
conflict = true;
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"remote record " +
serverSyncId +
" updates local _sync_id " +
localSyncID + ", local _id " +
localRowId);
}
update = true;
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
} else { |
| Solution content |
|---|
// An existing server item has changed
// If serverSyncVersion is null, there is no edit URL;
// server won't let this change be written.
boolean recordChanged = (localSyncVersion == null) ||
(serverSyncVersion == null) ||
!serverSyncVersion.equals(localSyncVersion);
if (recordChanged) {
if (localSyncDirty) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "remote record " + serverSyncId
+ " conflicts with local _sync_id " + localSyncID
+ ", local _id " + localRowId);
}
conflict = true;
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"remote record " +
serverSyncId +
" updates local _sync_id " +
localSyncID + ", local _id " +
localRowId);
}
update = true;
}
} else {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"Skipping update: localSyncVersion: " + localSyncVersion +
", serverSyncVersion: " + serverSyncVersion);
}
}
} else { |
| File |
|---|
| AbstractTableMerger.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* Broadcast Action: Indicates the battery is now okay after being low.
* This will be sent after {@link #ACTION_BATTERY_LOW} once the battery has
* gone back up to an okay state.
<<<<<<< HEAD
*
* |
| Solution content |
|---|
* Broadcast Action: Indicates the battery is now okay after being low.
* This will be sent after {@link #ACTION_BATTERY_LOW} once the battery has
* gone back up to an okay state.
*
* |
| File |
|---|
| Intent.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* Unlike ACTION_BATTERY_CHANGED, applications will be woken for this and so do not have to
* stay active to receive this notification. This action can be used to implement actions
* that wait until power is available to trigger.
<<<<<<< HEAD
*
* |
| Solution content |
|---|
* Unlike ACTION_BATTERY_CHANGED, applications will be woken for this and so do not have to
* stay active to receive this notification. This action can be used to implement actions
* that wait until power is available to trigger.
*
* |
| File |
|---|
| Intent.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* {@hide}
*/
public static final int ANY_DENSITY = -1;
<<<<<<< HEAD
static final int[] ANY_DENSITIES_ARRAY = { ANY_DENSITY };
=======
private static final int[] ANY_DENSITIES_ARRAY = { ANY_DENSITY };
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* Flags associated with the application. Any combination of |
| Solution content |
|---|
* {@hide}
*/
public static final int ANY_DENSITY = -1;
static final int[] ANY_DENSITIES_ARRAY = { ANY_DENSITY };
/**
* Flags associated with the application. Any combination of |
| File |
|---|
| ApplicationInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array initializer |
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
* @hide
*/
public void disableCompatibilityMode() {
<<<<<<< HEAD
flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |
FLAG_SUPPORTS_SMALL_SCREENS);
=======
flags |= FLAG_SUPPORTS_LARGE_SCREENS;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
supportsDensities = ANY_DENSITIES_ARRAY;
}
} |
| Solution content |
|---|
* @hide
*/
public void disableCompatibilityMode() {
flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |
FLAG_SUPPORTS_SMALL_SCREENS);
supportsDensities = ANY_DENSITIES_ARRAY;
}
} |
| File |
|---|
| ApplicationInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
return null;
<<<<<<< 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);
} else if (tagName.equals("supports-screens")) {
sa = res.obtainAttributes(attrs,
com.android.internal.R.styleable.AndroidManifestSupportsScreens);
// This is a trick to get a boolean and still able to detect
// if a value was actually set.
supportsSmallScreens = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsScreens_smallScreens,
supportsSmallScreens);
supportsNormalScreens = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsScreens_normalScreens,
supportsNormalScreens);
supportsLargeScreens = sa.getInteger(
com.android.internal.R.styleable.AndroidManifestSupportsScreens_largeScreens,
supportsLargeScreens);
sa.recycle();
XmlUtils.skipCurrentTag(parser);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} else {
Log.w(TAG, "Bad element under |
| Solution content |
|---|
mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
return null;
} else {
Log.w(TAG, "Bad element under |
| File |
|---|
| PackageParser.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
>= android.os.Build.VERSION_CODES.CUR_DEVELOPMENT)) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS;
}
<<<<<<< HEAD
int densities[] = null;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
int size = pkg.supportsDensityList.size();
if (size > 0) {
densities = pkg.supportsDensities = new int[size]; |
| Solution content |
|---|
>= android.os.Build.VERSION_CODES.CUR_DEVELOPMENT)) {
pkg.applicationInfo.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS;
}
int densities[] = null;
int size = pkg.supportsDensityList.size();
if (size > 0) {
densities = pkg.supportsDensities = new int[size]; |
| File |
|---|
| PackageParser.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
sa.recycle();
if (lname != null && !owner.usesLibraries.contains(lname)) {
<<<<<<< HEAD
owner.usesLibraries.add(lname.intern());
=======
owner.usesLibraries.add(lname);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
XmlUtils.skipCurrentTag(parser); |
| Solution content |
|---|
sa.recycle();
if (lname != null && !owner.usesLibraries.contains(lname)) {
owner.usesLibraries.add(lname.intern());
}
XmlUtils.skipCurrentTag(parser); |
| File |
|---|
| PackageParser.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import android.util.SparseArray; import android.util.TypedValue; import android.util.LongSparseArray; <<<<<<< HEAD import android.view.Display; ======= >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import java.io.IOException; import java.io.InputStream; |
| Solution content |
|---|
import android.util.SparseArray; import android.util.TypedValue; import android.util.LongSparseArray; import android.view.Display; import java.io.IOException; import java.io.InputStream; |
| File |
|---|
| Resources.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
=======
private final CompatibilityInfo mCompatibilityInfo;
/*package*/ final DisplayMetrics mMetrics = new DisplayMetrics();
PluralRules mPluralRule;
<<<<<<< HEAD
private CompatibilityInfo mCompatibilityInfo;
private Display mDefaultDisplay;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private static final LongSparseArray |
| Solution content |
|---|
/*package*/ final DisplayMetrics mMetrics = new DisplayMetrics();
PluralRules mPluralRule;
private CompatibilityInfo mCompatibilityInfo;
private Display mDefaultDisplay;
private static final LongSparseArray |
| File |
|---|
| Resources.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public Resources(AssetManager assets, DisplayMetrics metrics,
Configuration config) {
<<<<<<< HEAD
this(assets, metrics, config, (CompatibilityInfo) null);
}
/**
* Creates a new Resources object with CompatibilityInfo.
=======
this(assets, metrics, config, (ApplicationInfo) null);
}
/**
* Creates a new Resources object with ApplicationInfo.
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*
* @param assets Previously created AssetManager.
* @param metrics Current display metrics to consider when |
| Solution content |
|---|
*/
public Resources(AssetManager assets, DisplayMetrics metrics,
Configuration config) {
this(assets, metrics, config, (CompatibilityInfo) null);
}
/**
* Creates a new Resources object with CompatibilityInfo.
*
* @param assets Previously created AssetManager.
* @param metrics Current display metrics to consider when |
| File |
|---|
| Resources.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* selecting/computing resource values.
* @param config Desired device configuration to consider when
* selecting/computing resource values (optional).
<<<<<<< HEAD
* @param compInfo this resource's compatibility info. It will use the default compatibility
* info when it's null.
* @hide
*/
public Resources(AssetManager assets, DisplayMetrics metrics,
Configuration config, CompatibilityInfo compInfo) {
=======
* @param appInfo this resource's application info.
* @hide
*/
public Resources(AssetManager assets, DisplayMetrics metrics,
Configuration config, ApplicationInfo appInfo) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mAssets = assets;
mMetrics.setToDefaults();
<<<<<<< HEAD |
| Solution content |
|---|
* selecting/computing resource values.
* @param config Desired device configuration to consider when
* selecting/computing resource values (optional).
* @param compInfo this resource's compatibility info. It will use the default compatibility
* info when it's null.
* @hide
*/
public Resources(AssetManager assets, DisplayMetrics metrics,
Configuration config, CompatibilityInfo compInfo) {
mAssets = assets;
mMetrics.setToDefaults(); |
| File |
|---|
| Resources.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mAssets = assets;
mMetrics.setToDefaults();
<<<<<<< HEAD
if (compInfo == null) {
mCompatibilityInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
} else {
mCompatibilityInfo = compInfo;
=======
if (appInfo != null) {
mCompatibilityInfo = new CompatibilityInfo(appInfo);
if (DEBUG_CONFIG) {
Log.d(TAG, "compatibility for " + appInfo.packageName + " : " + mCompatibilityInfo);
}
} else {
mCompatibilityInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
updateConfiguration(config, metrics);
assets.ensureStringBlocks(); |
| Solution content |
|---|
mAssets = assets;
mMetrics.setToDefaults();
if (compInfo == null) {
mCompatibilityInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
} else {
mCompatibilityInfo = compInfo;
}
updateConfiguration(config, metrics);
assets.ensureStringBlocks(); |
| File |
|---|
| Resources.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
updateConfiguration(config, metrics);
assets.ensureStringBlocks();
if (mCompatibilityInfo.isScalingRequired()) {
<<<<<<< HEAD
=======
mPreloadedDrawables = emptySparseArray();
} else {
mPreloadedDrawables = sPreloadedDrawables;
}
}
/**
* Creates a new resources that uses the given compatibility info. Used to create
* a context for widgets using the container's compatibility info.
* {@see ApplicationContext#createPackageCotnext}.
* @hide
*/
public Resources(AssetManager assets, DisplayMetrics metrics,
Configuration config, CompatibilityInfo info) {
mAssets = assets;
mMetrics.setToDefaults();
mCompatibilityInfo = info;
updateConfiguration(config, metrics);
assets.ensureStringBlocks();
if (mCompatibilityInfo.isScalingRequired()) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mPreloadedDrawables = emptySparseArray();
} else {
mPreloadedDrawables = sPreloadedDrawables; |
| Solution content |
|---|
updateConfiguration(config, metrics);
assets.ensureStringBlocks();
if (mCompatibilityInfo.isScalingRequired()) {
mPreloadedDrawables = emptySparseArray();
} else {
mPreloadedDrawables = sPreloadedDrawables; |
| File |
|---|
| Resources.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
=======
* boolean (1 or 0).
*/
public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
<<<<<<< HEAD
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* Whether live web suggestions while the user types into search dialogs are
* enabled. Browsers and other search UIs should respect this, as it allows |
| Solution content |
|---|
* boolean (1 or 0).
*/
public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
/**
* Whether live web suggestions while the user types into search dialogs are
* enabled. Browsers and other search UIs should respect this, as it allows |
| File |
|---|
| Settings.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Blank |
| Chunk |
|---|
| Conflicting content |
|---|
* @hide
*/
public static final String BACKUP_TRANSPORT = "backup_transport";
<<<<<<< HEAD
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* Version for which the setup wizard was last shown. Bumped for
* each release when there is new setup information to show. |
| Solution content |
|---|
* @hide
*/
public static final String BACKUP_TRANSPORT = "backup_transport";
/**
* Version for which the setup wizard was last shown. Bumped for
* each release when there is new setup information to show. |
| File |
|---|
| Settings.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Blank |
| Chunk |
|---|
| Conflicting content |
|---|
public static final String GMAIL_NUM_RETRY_UPHILL_OP = "gmail_discard_error_uphill_op";
/**
<<<<<<< HEAD
* Controls if the protocol buffer version of the protocol will use a multipart request for
* attachment uploads. Value must be an integer where non-zero means true. Defaults to 0.
*/
public static final String GMAIL_USE_MULTIPART_PROTOBUF = "gmail_use_multipart_protobuf";
/**
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
* the transcoder URL for mobile devices.
*/
public static final String TRANSCODER_URL = "mobile_transcoder_url"; |
| Solution content |
|---|
public static final String GMAIL_NUM_RETRY_UPHILL_OP = "gmail_discard_error_uphill_op";
/**
* Controls if the protocol buffer version of the protocol will use a multipart request for
* attachment uploads. Value must be an integer where non-zero means true. Defaults to 0.
*/
public static final String GMAIL_USE_MULTIPART_PROTOBUF = "gmail_use_multipart_protobuf";
/**
* the transcoder URL for mobile devices.
*/
public static final String TRANSCODER_URL = "mobile_transcoder_url"; |
| File |
|---|
| Settings.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*/
"vending_pd_resend_frequency_ms";
/**
<<<<<<< HEAD
* Frequency in milliseconds at which we should cycle through the promoted applications
* on the home screen or the categories page.
public static final String VENDING_PROMO_REFRESH_FREQUENCY_MS =
"vending_promo_refresh_freq_ms";
/**
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
* URL that points to the legal terms of service to display in Settings.
* |
| Solution content |
|---|
"vending_pd_resend_frequency_ms";
/**
* Frequency in milliseconds at which we should cycle through the promoted applications
* on the home screen or the categories page.
*/
public static final String VENDING_PROMO_REFRESH_FREQUENCY_MS =
"vending_promo_refresh_freq_ms";
/**
* URL that points to the legal terms of service to display in Settings.
* |
| File |
|---|
| Settings.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
import android.app.IActivityWatcher; import android.app.ISearchManager; import android.app.ISearchManagerCallback; <<<<<<< HEAD ======= import android.app.SearchDialog; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.app.SearchManager; import android.content.BroadcastReceiver; import android.content.ComponentName; |
| Solution content |
|---|
import android.app.IActivityWatcher; import android.app.ISearchManager; import android.app.ISearchManagerCallback; import android.app.SearchManager; import android.content.BroadcastReceiver; import android.content.ComponentName; |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; <<<<<<< HEAD import android.os.Bundle; import android.os.Handler; import android.os.RemoteException; ======= import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.os.RemoteException; import android.os.SystemProperties; import android.text.TextUtils; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.util.Log; import java.util.List; |
| Solution content |
|---|
import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.Handler; import android.os.RemoteException; import android.util.Log; import java.util.List; |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import java.util.concurrent.FutureTask;
/**
<<<<<<< HEAD
* The search manager service handles the search UI, and maintains a registry of searchable
* activities.
*/
public class SearchManagerService extends ISearchManager.Stub {
// general debugging support
=======
* This is a simplified version of the Search Manager service. It no longer handles
* presentation (UI). Its function is to maintain the map & list of "searchable"
* items, which provides a mapping from individual activities (where a user might have
* invoked search) to specific searchable activities (where the search will be dispatched).
*/
public class SearchManagerService extends ISearchManager.Stub
implements DialogInterface.OnCancelListener, DialogInterface.OnDismissListener
{
// general debugging support
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private static final String TAG = "SearchManagerService";
private static final boolean DBG = false;
|
| Solution content |
|---|
/**
* The search manager service handles the search UI, and maintains a registry of searchable
* activities.
*/
public class SearchManagerService extends ISearchManager.Stub {
// general debugging support
private static final String TAG = "SearchManagerService";
private static final boolean DBG = false;
|
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Class signature |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
// Context that the service is running in.
private final Context mContext;
<<<<<<< HEAD
// This field is initialized in ensureSearchablesCreated(), and then never modified.
// Only accessed by ensureSearchablesCreated() and getSearchables()
private Searchables mSearchables;
// This field is initialized in ensureSearchDialogCreated(), and then never modified.
// Only accessed by ensureSearchDialogCreated() and getSearchDialog()
private SearchDialogWrapper mSearchDialog;
=======
private final Handler mHandler;
private boolean mSearchablesDirty;
private final Searchables mSearchables;
final SearchDialog mSearchDialog;
ISearchManagerCallback mCallback = null;
private final boolean mDisabledOnBoot;
private static final String DISABLE_SEARCH_PROPERTY = "dev.disablesearchdialog";
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* Initializes the Search Manager service in the provided system context. |
| Solution content |
|---|
/**
// Context that the service is running in.
private final Context mContext;
// This field is initialized in ensureSearchablesCreated(), and then never modified.
// Only accessed by ensureSearchablesCreated() and getSearchables()
private Searchables mSearchables;
// This field is initialized in ensureSearchDialogCreated(), and then never modified.
// Only accessed by ensureSearchDialogCreated() and getSearchDialog()
private SearchDialogWrapper mSearchDialog;
* Initializes the Search Manager service in the provided system context. |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
}
});
}
/**
*/
public SearchManagerService(Context context) {
mContext = context;
<<<<<<< HEAD
// call initialize() after all pending actions on the main system thread have finished
new Handler().post(new Runnable() {
public void run() {
initialize();
* Initializes the list of searchable activities and the search UI.
*/
void initialize() {
try {
ActivityManagerNative.getDefault().registerActivityWatcher(
mActivityWatcher);
} catch (RemoteException e) {
}
}
private synchronized void ensureSearchablesCreated() {
if (mSearchables != null) return; // already created
mSearchables = new Searchables(mContext);
mSearchables.buildSearchableList();
IntentFilter packageFilter = new IntentFilter();
packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
packageFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
packageFilter.addDataScheme("package");
mContext.registerReceiver(mPackageChangedReceiver, packageFilter);
}
private synchronized void ensureSearchDialogCreated() {
if (mSearchDialog != null) return;
mSearchDialog = new SearchDialogWrapper(mContext);
}
private synchronized Searchables getSearchables() {
ensureSearchablesCreated();
return mSearchables;
}
private synchronized SearchDialogWrapper getSearchDialog() {
ensureSearchDialogCreated();
return mSearchDialog;
}
/**
* Refreshes the "searchables" list when packages are added/removed.
=======
mHandler = new Handler();
mSearchablesDirty = true;
mSearchables = new Searchables(context);
mSearchDialog = new SearchDialog(context);
mSearchDialog.setOnCancelListener(this);
mSearchDialog.setOnDismissListener(this);
// Setup the infrastructure for updating and maintaining the list
// of searchable activities.
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
filter.addDataScheme("package");
mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
// After startup settles down, preload the searchables list,
// which will reduce the delay when the search UI is invoked.
mHandler.post(mRunUpdateSearchable);
// allows disabling of search dialog for stress testing runs
mDisabledOnBoot = !TextUtils.isEmpty(SystemProperties.get(DISABLE_SEARCH_PROPERTY));
}
/**
* Listens for intent broadcasts.
*
* The primary purpose here is to refresh the "searchables" list
* if packages are added/removed.
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
private BroadcastReceiver mPackageChangedReceiver = new BroadcastReceiver() {
@Override |
| Solution content |
|---|
*/
public SearchManagerService(Context context) {
mContext = context;
// call initialize() after all pending actions on the main system thread have finished
new Handler().post(new Runnable() {
public void run() {
initialize();
}
});
}
/**
* Initializes the list of searchable activities and the search UI.
*/
void initialize() {
try {
ActivityManagerNative.getDefault().registerActivityWatcher(
mActivityWatcher);
} catch (RemoteException e) {
}
}
private synchronized void ensureSearchablesCreated() {
if (mSearchables != null) return; // already created
mSearchables = new Searchables(mContext);
mSearchables.buildSearchableList();
IntentFilter packageFilter = new IntentFilter();
packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
packageFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
packageFilter.addDataScheme("package");
mContext.registerReceiver(mPackageChangedReceiver, packageFilter);
}
private synchronized void ensureSearchDialogCreated() {
if (mSearchDialog != null) return;
mSearchDialog = new SearchDialogWrapper(mContext);
}
private synchronized Searchables getSearchables() {
ensureSearchablesCreated();
return mSearchables;
}
private synchronized SearchDialogWrapper getSearchDialog() {
ensureSearchDialogCreated();
return mSearchDialog;
}
/**
* Refreshes the "searchables" list when packages are added/removed.
*/
private BroadcastReceiver mPackageChangedReceiver = new BroadcastReceiver() {
@Override |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method declaration |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
<<<<<<< HEAD
if (Intent.ACTION_PACKAGE_ADDED.equals(action) ||
Intent.ACTION_PACKAGE_REMOVED.equals(action) ||
Intent.ACTION_PACKAGE_CHANGED.equals(action)) {
if (DBG) Log.d(TAG, "Got " + action);
// Dismiss search dialog, since the search context may no longer be valid
getSearchDialog().stopSearch();
// Update list of searchable activities
getSearchables().buildSearchableList();
broadcastSearchablesChanged();
}
}
};
=======
// First, test for intents that matter at any time
if (action.equals(Intent.ACTION_PACKAGE_ADDED) ||
action.equals(Intent.ACTION_PACKAGE_REMOVED) ||
action.equals(Intent.ACTION_PACKAGE_CHANGED)) {
mSearchablesDirty = true;
mHandler.post(mRunUpdateSearchable);
return;
}
}
};
/**
* This runnable (for the main handler / UI thread) will update the searchables list.
*/
private Runnable mRunUpdateSearchable = new Runnable() {
public void run() {
updateSearchablesIfDirty();
}
};
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private IActivityWatcher.Stub mActivityWatcher = new IActivityWatcher.Stub() {
public void activityResuming(int activityId) throws RemoteException { |
| Solution content |
|---|
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (Intent.ACTION_PACKAGE_ADDED.equals(action) ||
Intent.ACTION_PACKAGE_REMOVED.equals(action) ||
Intent.ACTION_PACKAGE_CHANGED.equals(action)) {
if (DBG) Log.d(TAG, "Got " + action);
// Dismiss search dialog, since the search context may no longer be valid
getSearchDialog().stopSearch();
// Update list of searchable activities
getSearchables().buildSearchableList();
broadcastSearchablesChanged();
}
}
};
private IActivityWatcher.Stub mActivityWatcher = new IActivityWatcher.Stub() {
public void activityResuming(int activityId) throws RemoteException { |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Informs all listeners that the list of searchables has been updated.
*/
<<<<<<< HEAD
void broadcastSearchablesChanged() {
mContext.sendBroadcast(
new Intent(SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED));
=======
private void updateSearchables() {
if (DBG) debug("updateSearchables()");
mSearchables.buildSearchableList();
mSearchablesDirty = false;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
// |
| Solution content |
|---|
/**
* Informs all listeners that the list of searchables has been updated.
*/
void broadcastSearchablesChanged() {
mContext.sendBroadcast(
new Intent(SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED));
}
// |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
//
/**
<<<<<<< HEAD
* Returns the SearchableInfo for a given activity.
=======
* Updates the list of searchables if needed.
*/
private void updateSearchablesIfDirty() {
if (mSearchablesDirty) {
updateSearchables();
}
}
/**
* Returns the SearchableInfo for a given activity
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*
* @param launchActivity The activity from which we're launching this search.
* @param globalSearch If false, this will only launch the search that has been specifically |
| Solution content |
|---|
//
/**
* Returns the SearchableInfo for a given activity.
*
* @param launchActivity The activity from which we're launching this search.
* @param globalSearch If false, this will only launch the search that has been specifically |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
* @return Returns a SearchableInfo record describing the parameters of the search,
* or null if no searchable metadata was available.
*/
<<<<<<< HEAD
public SearchableInfo getSearchableInfo(final ComponentName launchActivity,
final boolean globalSearch) {
=======
public SearchableInfo getSearchableInfo(ComponentName launchActivity, boolean globalSearch) {
updateSearchablesIfDirty();
SearchableInfo si = null;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (globalSearch) {
return getSearchables().getDefaultSearchable();
} else { |
| Solution content |
|---|
if (globalSearch) {
* @return Returns a SearchableInfo record describing the parameters of the search,
* or null if no searchable metadata was available.
*/
public SearchableInfo getSearchableInfo(final ComponentName launchActivity,
final boolean globalSearch) {
return getSearchables().getDefaultSearchable();
} else { |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
Log.e(TAG, "getSearchableInfo(), activity == null");
return null;
}
<<<<<<< HEAD
return getSearchables().getSearchableInfo(launchActivity);
=======
si = mSearchables.getSearchableInfo(launchActivity);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
|
| Solution content |
|---|
Log.e(TAG, "getSearchableInfo(), activity == null");
return null;
}
return getSearchables().getSearchableInfo(launchActivity);
}
}
|
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* Returns a list of the searchable activities that can be included in global search.
*/
public List |
| Solution content |
|---|
* Returns a list of the searchable activities that can be included in global search.
*/
public List |
| File |
|---|
| SearchManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
private final boolean mAutoUrlDetect;
=======
private final int mSearchImeOptions;
private final boolean mIncludeInGlobalSearch;
private final boolean mQueryAfterZeroResults;
<<<<<<< HEAD
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private final String mSettingsDescription;
private final String mSuggestAuthority;
private final String mSuggestPath; |
| Solution content |
|---|
private final int mSearchImeOptions;
private final boolean mIncludeInGlobalSearch;
private final boolean mQueryAfterZeroResults;
private final boolean mAutoUrlDetect;
private final String mSettingsDescription;
private final String mSuggestAuthority;
private final String mSuggestPath; |
| File |
|---|
| SearchableInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
com.android.internal.R.styleable.Searchable_includeInGlobalSearch, false);
mQueryAfterZeroResults = a.getBoolean(
com.android.internal.R.styleable.Searchable_queryAfterZeroResults, false);
<<<<<<< HEAD
mAutoUrlDetect = a.getBoolean(
com.android.internal.R.styleable.Searchable_autoUrlDetect, false);
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mSettingsDescription = a.getString(
com.android.internal.R.styleable.Searchable_searchSettingsDescription); |
| Solution content |
|---|
com.android.internal.R.styleable.Searchable_includeInGlobalSearch, false);
mQueryAfterZeroResults = a.getBoolean(
com.android.internal.R.styleable.Searchable_queryAfterZeroResults, false);
mAutoUrlDetect = a.getBoolean(
com.android.internal.R.styleable.Searchable_autoUrlDetect, false);
mSettingsDescription = a.getString(
com.android.internal.R.styleable.Searchable_searchSettingsDescription); |
| File |
|---|
| SearchableInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
<<<<<<< HEAD
* Checks whether this searchable activity has auto URL detect turned on.
*
* @return The value of the |
| Solution content |
|---|
/**
}
}
/**
* Checks whether this searchable activity has auto URL detect turned on.
*
* @return The value of the |
| File |
|---|
| SearchableInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
mSettingsDescription = in.readString();
mSearchImeOptions = in.readInt();
mIncludeInGlobalSearch = in.readInt() != 0;
mQueryAfterZeroResults = in.readInt() != 0;
<<<<<<< HEAD
mAutoUrlDetect = in.readInt() != 0;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mSuggestAuthority = in.readString(); |
| Solution content |
|---|
mSearchImeOptions = in.readInt();
mIncludeInGlobalSearch = in.readInt() != 0;
mQueryAfterZeroResults = in.readInt() != 0;
mAutoUrlDetect = in.readInt() != 0;
mSettingsDescription = in.readString();
mSuggestAuthority = in.readString(); |
| File |
|---|
| SearchableInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
dest.writeInt(mSearchImeOptions);
dest.writeInt(mIncludeInGlobalSearch ? 1 : 0);
dest.writeInt(mQueryAfterZeroResults ? 1 : 0);
<<<<<<< HEAD
dest.writeInt(mAutoUrlDetect ? 1 : 0);
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
dest.writeString(mSettingsDescription);
dest.writeString(mSuggestAuthority); |
| Solution content |
|---|
dest.writeInt(mSearchImeOptions);
dest.writeInt(mIncludeInGlobalSearch ? 1 : 0);
dest.writeInt(mQueryAfterZeroResults ? 1 : 0);
dest.writeInt(mAutoUrlDetect ? 1 : 0);
dest.writeString(mSettingsDescription);
dest.writeString(mSuggestAuthority); |
| File |
|---|
| SearchableInfo.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
package android.server.search; import com.android.internal.app.ResolverActivity; <<<<<<< HEAD ======= import com.android.internal.R; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.app.SearchManager; import android.content.ComponentName; |
| Solution content |
|---|
package android.server.search; import com.android.internal.app.ResolverActivity; import android.app.SearchManager; import android.content.ComponentName; |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
for (int i = 0; i < webSearchInfoList.size(); ++i) {
ActivityInfo ai = webSearchInfoList.get(i).activityInfo;
ComponentName component = new ComponentName(ai.packageName, ai.name);
<<<<<<< HEAD
SearchableInfo searchable = newSearchablesMap.get(component);
if (searchable == null) {
Log.w(LOG_TAG, "did not find component in searchables: " + component);
} else {
newSearchablesForWebSearchList.add(searchable);
}
=======
newSearchablesForWebSearchList.add(newSearchablesMap.get(component));
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
|
| Solution content |
|---|
for (int i = 0; i < webSearchInfoList.size(); ++i) {
ActivityInfo ai = webSearchInfoList.get(i).activityInfo;
ComponentName component = new ComponentName(ai.packageName, ai.name);
SearchableInfo searchable = newSearchablesMap.get(component);
if (searchable == null) {
Log.w(LOG_TAG, "did not find component in searchables: " + component);
} else {
newSearchablesForWebSearchList.add(searchable);
}
}
}
|
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
// Find the default web search provider.
<<<<<<< HEAD
ComponentName webSearchActivity = getPreferredWebSearchActivity(mContext);
=======
ComponentName webSearchActivity = getPreferredWebSearchActivity();
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
SearchableInfo newDefaultSearchableForWebSearch = null;
if (webSearchActivity != null) {
newDefaultSearchableForWebSearch = newSearchablesMap.get(webSearchActivity); |
| Solution content |
|---|
}
// Find the default web search provider.
ComponentName webSearchActivity = getPreferredWebSearchActivity(mContext);
SearchableInfo newDefaultSearchableForWebSearch = null;
if (webSearchActivity != null) {
newDefaultSearchableForWebSearch = newSearchablesMap.get(webSearchActivity); |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
=======
mDefaultSearchable = newDefaultSearchable;
mDefaultSearchableForWebSearch = newDefaultSearchableForWebSearch;
}
<<<<<<< HEAD
// Inform all listeners that the list of searchables has been updated.
mContext.sendBroadcast(new Intent(SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED));
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
/** |
| Solution content |
|---|
mDefaultSearchable = newDefaultSearchable;
mDefaultSearchableForWebSearch = newDefaultSearchableForWebSearch;
}
}
/** |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* @param action Intent action for which this activity is to be set as preferred.
* @return true if component was detected and set as preferred activity, false if not.
*/
<<<<<<< HEAD
private static boolean setPreferredActivity(Context context,
ComponentName component, String action) {
Log.d(LOG_TAG, "Checking component " + component);
PackageManager pm = context.getPackageManager();
=======
private boolean setPreferredActivity(ComponentName component, String action) {
Log.d(LOG_TAG, "Checking component " + component);
PackageManager pm = mContext.getPackageManager();
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
ActivityInfo ai;
try {
ai = pm.getActivityInfo(component, 0); |
| Solution content |
|---|
* @param action Intent action for which this activity is to be set as preferred.
* @return true if component was detected and set as preferred activity, false if not.
*/
private static boolean setPreferredActivity(Context context,
ComponentName component, String action) {
Log.d(LOG_TAG, "Checking component " + component);
PackageManager pm = context.getPackageManager();
ActivityInfo ai;
try {
ai = pm.getActivityInfo(component, 0); |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return true;
}
<<<<<<< HEAD
private static ComponentName getPreferredWebSearchActivity(Context context) {
// Check if we have a preferred web search activity.
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
PackageManager pm = context.getPackageManager();
=======
public ComponentName getPreferredWebSearchActivity() {
// Check if we have a preferred web search activity.
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
PackageManager pm = mContext.getPackageManager();
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
ResolveInfo ri = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
if (ri == null || ri.activityInfo.name.equals(ResolverActivity.class.getName())) { |
| Solution content |
|---|
return true;
}
private static ComponentName getPreferredWebSearchActivity(Context context) {
// Check if we have a preferred web search activity.
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
PackageManager pm = context.getPackageManager();
ResolveInfo ri = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
if (ri == null || ri.activityInfo.name.equals(ResolverActivity.class.getName())) { |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// The components in the providers array are checked in the order of declaration so the
// first one has the highest priority. If the component exists in the system it is set
// as the preferred activity to handle intent action web search.
<<<<<<< HEAD
String[] preferredActivities = context.getResources().getStringArray(
com.android.internal.R.array.default_web_search_providers);
for (String componentName : preferredActivities) {
ComponentName component = ComponentName.unflattenFromString(componentName);
if (setPreferredActivity(context, component, Intent.ACTION_WEB_SEARCH)) {
=======
String[] preferredActivities = mContext.getResources().getStringArray(
com.android.internal.R.array.default_web_search_providers);
for (String componentName : preferredActivities) {
ComponentName component = ComponentName.unflattenFromString(componentName);
if (setPreferredActivity(component, Intent.ACTION_WEB_SEARCH)) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
return component;
}
} |
| Solution content |
|---|
// The components in the providers array are checked in the order of declaration so the
// first one has the highest priority. If the component exists in the system it is set
// as the preferred activity to handle intent action web search.
String[] preferredActivities = context.getResources().getStringArray(
com.android.internal.R.array.default_web_search_providers);
for (String componentName : preferredActivities) {
ComponentName component = ComponentName.unflattenFromString(componentName);
if (setPreferredActivity(context, component, Intent.ACTION_WEB_SEARCH)) {
return component;
}
} |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| For statement |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (cn.flattenToShortString().equals(GOOGLE_SEARCH_COMPONENT_NAME)) {
ComponentName enhancedGoogleSearch = ComponentName.unflattenFromString(
ENHANCED_GOOGLE_SEARCH_COMPONENT_NAME);
<<<<<<< HEAD
if (setPreferredActivity(context, enhancedGoogleSearch,
Intent.ACTION_WEB_SEARCH)) {
=======
if (setPreferredActivity(enhancedGoogleSearch, Intent.ACTION_WEB_SEARCH)) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
return enhancedGoogleSearch;
}
} |
| Solution content |
|---|
if (cn.flattenToShortString().equals(GOOGLE_SEARCH_COMPONENT_NAME)) {
ComponentName enhancedGoogleSearch = ComponentName.unflattenFromString(
ENHANCED_GOOGLE_SEARCH_COMPONENT_NAME);
if (setPreferredActivity(context, enhancedGoogleSearch,
Intent.ACTION_WEB_SEARCH)) {
return enhancedGoogleSearch;
}
} |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
* Sets the default searchable activity for web searches.
*/
public synchronized void setDefaultWebSearch(ComponentName component) {
<<<<<<< HEAD
setPreferredActivity(mContext, component, Intent.ACTION_WEB_SEARCH);
=======
setPreferredActivity(component, Intent.ACTION_WEB_SEARCH);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
buildSearchableList();
}
} |
| Solution content |
|---|
* Sets the default searchable activity for web searches.
*/
public synchronized void setDefaultWebSearch(ComponentName component) {
setPreferredActivity(mContext, component, Intent.ACTION_WEB_SEARCH);
buildSearchableList();
}
} |
| File |
|---|
| Searchables.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
* @hide becase eventually this should be able to change while
* running, so shouldn't be a constant.
*/
public static final int DENSITY_DEVICE = getDeviceDensity();
=======
public static final int DEVICE_DENSITY = getDeviceDensity();
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* The absolute width of the display in pixels. |
| Solution content |
|---|
* @hide becase eventually this should be able to change while
* running, so shouldn't be a constant.
*/
public static final int DENSITY_DEVICE = getDeviceDensity();
/**
* The absolute width of the display in pixels. |
| File |
|---|
| DisplayMetrics.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
*/
public void updateMetrics(CompatibilityInfo compatibilityInfo, int orientation,
int screenLayout) {
<<<<<<< HEAD
=======
int xOffset = 0;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (!compatibilityInfo.isConfiguredExpandable()) {
// Note: this assume that configuration is updated before calling
// updateMetrics method. |
| Solution content |
|---|
*/
public void updateMetrics(CompatibilityInfo compatibilityInfo, int orientation,
int screenLayout) {
if (!compatibilityInfo.isConfiguredExpandable()) {
// Note: this assume that configuration is updated before calling
// updateMetrics method. |
| File |
|---|
| DisplayMetrics.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (defaultWidth < widthPixels) {
// content/window's x offset in original pixels
<<<<<<< HEAD
=======
xOffset = ((widthPixels - defaultWidth) / 2);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
widthPixels = defaultWidth;
}
if (defaultHeight < heightPixels) { |
| Solution content |
|---|
if (defaultWidth < widthPixels) {
// content/window's x offset in original pixels
widthPixels = defaultWidth;
}
if (defaultHeight < heightPixels) { |
| File |
|---|
| DisplayMetrics.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
compatibilityInfo.setExpandable(true);
}
}
<<<<<<< HEAD
=======
compatibilityInfo.setVisibleRect(xOffset, widthPixels, heightPixels);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (compatibilityInfo.isScalingRequired()) {
float invertedRatio = compatibilityInfo.applicationInvertedScale;
density *= invertedRatio; |
| Solution content |
|---|
compatibilityInfo.setExpandable(true);
}
}
if (compatibilityInfo.isScalingRequired()) {
float invertedRatio = compatibilityInfo.applicationInvertedScale;
density *= invertedRatio; |
| File |
|---|
| DisplayMetrics.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
// The reason for this is that ro.sf.lcd_density is write-once and is
// set by the init process when it parses build.prop before anything else.
return SystemProperties.getInt("qemu.sf.lcd_density",
SystemProperties.getInt("ro.sf.lcd_density", DENSITY_DEFAULT));
=======
SystemProperties.getInt("ro.sf.lcd_density", DEFAULT_DENSITY));
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
} |
| Solution content |
|---|
// The reason for this is that ro.sf.lcd_density is write-once and is
// set by the init process when it parses build.prop before anything else.
return SystemProperties.getInt("qemu.sf.lcd_density",
SystemProperties.getInt("ro.sf.lcd_density", DENSITY_DEFAULT));
}
} |
| File |
|---|
| DisplayMetrics.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
package android.view; import android.content.Context; <<<<<<< HEAD ======= import android.content.res.CompatibilityInfo; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.content.res.CompatibilityInfo.Translator; import android.graphics.Canvas; import android.graphics.PixelFormat; |
| Solution content |
|---|
package android.view; import android.content.Context; import android.content.res.CompatibilityInfo.Translator; import android.graphics.Canvas; import android.graphics.PixelFormat; |
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
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.
<<<<<<< HEAD
if (mScaled) {
MotionEvent scaledBack = MotionEvent.obtain(event);
mTranslator.translateEventInScreenToAppWindow(event);
=======
if (mRequestedWidth < 0 && mTranslator != null) {
MotionEvent scaledBack = MotionEvent.obtain(event);
scaledBack.scale(mTranslator.applicationScale);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
try {
return super.dispatchTouchEvent(scaledBack);
} finally { |
| Solution content |
|---|
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 { |
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public void setWindowType(int type) {
mWindowType = type;
}
<<<<<<< HEAD
boolean mScaled = false;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private void updateWindow(boolean force) {
if (!mHaveFrame) { |
| Solution content |
|---|
public void setWindowType(int type) {
mWindowType = type;
}
boolean mScaled = false;
private void updateWindow(boolean force) {
if (!mHaveFrame) { |
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
if (!mHaveFrame) {
return;
}
<<<<<<< HEAD
ViewRoot viewRoot = (ViewRoot) getRootView().getParent();
mTranslator = viewRoot.mTranslator;
=======
mTranslator = ((ViewRoot)getRootView().getParent()).mTranslator;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
float appScale = mTranslator == null ? 1.0f : mTranslator.applicationScale;
|
| Solution content |
|---|
if (!mHaveFrame) {
return;
}
ViewRoot viewRoot = (ViewRoot) getRootView().getParent();
mTranslator = viewRoot.mTranslator;
float appScale = mTranslator == null ? 1.0f : mTranslator.applicationScale;
|
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// Use original size if the app specified the size of the view,
// and let the flinger to scale up.
<<<<<<< HEAD
if (mRequestedWidth <= 0 && mTranslator != null) {
myWidth *= appScale;
myHeight *= appScale;
mScaled = true;
} else {
mScaled = false;
=======
if (mRequestedWidth <= 0 && mTranslator != null && mTranslator.scalingRequired) {
myWidth *= appScale;
myHeight *= appScale;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
getLocationInWindow(mLocation); |
| Solution content |
|---|
// 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 *= appScale;
myHeight *= appScale;
mScaled = true;
} else {
mScaled = false;
}
getLocationInWindow(mLocation); |
| File |
|---|
| SurfaceView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (mView == null) {
mView = view;
mWindowAttributes.copyFrom(attrs);
<<<<<<< HEAD
attrs = mWindowAttributes;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
CompatibilityInfo compatibilityInfo =
mView.getContext().getResources().getCompatibilityInfo(); |
| Solution content |
|---|
if (mView == null) {
mView = view;
mWindowAttributes.copyFrom(attrs);
attrs = mWindowAttributes;
CompatibilityInfo compatibilityInfo =
mView.getContext().getResources().getCompatibilityInfo(); |
| File |
|---|
| ViewRoot.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
mAttachInfo.mRootView = view;
}
if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs);
<<<<<<< HEAD
if (!compatibilityInfo.supportsScreen()) {
attrs.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
}
mSoftInputMode = attrs.softInputMode;
mWindowAttributesChanged = true;
mAttachInfo.mRootView = view;
mAttachInfo.mScalingRequired = mTranslator == null ? false : true;
=======
mSoftInputMode = attrs.softInputMode;
mWindowAttributesChanged = true;
mAttachInfo.mScalingRequired =
mTranslator == null ? false : mTranslator.scalingRequired;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mAttachInfo.mApplicationScale =
mTranslator == null ? 1.0f : mTranslator.applicationScale;
if (panelParentView != null) { |
| Solution content |
|---|
}
if (DEBUG_LAYOUT) Log.d(TAG, "WindowLayout in setView:" + attrs);
if (!compatibilityInfo.supportsScreen()) {
attrs.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
}
mSoftInputMode = attrs.softInputMode;
mWindowAttributesChanged = true;
mAttachInfo.mRootView = view;
mAttachInfo.mScalingRequired = mTranslator == null ? false : true;
mAttachInfo.mApplicationScale =
mTranslator == null ? 1.0f : mTranslator.applicationScale;
if (panelParentView != null) { |
| File |
|---|
| ViewRoot.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (DEBUG_DRAW) {
Context cxt = mView.getContext();
Log.i(TAG, "Drawing: package:" + cxt.getPackageName() +
<<<<<<< HEAD
", metrics=" + cxt.getResources().getDisplayMetrics() +
", compatibilityInfo=" + cxt.getResources().getCompatibilityInfo());
=======
", metrics=" + mView.getContext().getResources().getDisplayMetrics());
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
int saveCount = canvas.save(Canvas.MATRIX_SAVE_FLAG);
try { |
| Solution content |
|---|
if (DEBUG_DRAW) {
Context cxt = mView.getContext();
Log.i(TAG, "Drawing: package:" + cxt.getPackageName() +
", metrics=" + cxt.getResources().getDisplayMetrics() +
", compatibilityInfo=" + cxt.getResources().getCompatibilityInfo());
}
int saveCount = canvas.save(Canvas.MATRIX_SAVE_FLAG);
try { |
| File |
|---|
| ViewRoot.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
* {@hide} */
public static final int FLAG_SHOW_WHEN_LOCKED = 0x00080000;
<<<<<<< HEAD
/** Window flag: special flag to limit the size of the window to be
* original size ([320x480] x density). Used to create window for applications
* running under compatibility mode.
*
* {@hide} */
public static final int FLAG_COMPATIBLE_WINDOW = 0x00100000;
=======
/** Window flag: special flag to let a window ignore the compatibility scaling.
* This is used by SurfaceView to create a window that does not scale the content.
*
* {@hide} */
public static final int FLAG_NO_COMPATIBILITY_SCALING = 0x00100000;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/** Window flag: a special option intended for system dialogs. When
* this flag is set, the window will demand focus unconditionally when |
| Solution content |
|---|
* {@hide} */
public static final int FLAG_SHOW_WHEN_LOCKED = 0x00080000;
/** Window flag: special flag to limit the size of the window to be
* original size ([320x480] x density). Used to create window for applications
* running under compatibility mode.
*
* {@hide} */
public static final int FLAG_COMPATIBLE_WINDOW = 0x00100000;
/** Window flag: a special option intended for system dialogs. When
* this flag is set, the window will demand focus unconditionally when |
| File |
|---|
| WindowManager.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
private static final int HTTP_NOT_FOUND = 404;
private static final int HTTP_PROXY_AUTH = 407;
<<<<<<< HEAD
private static HashSet |
| Solution content |
|---|
private static final int HTTP_NOT_FOUND = 404;
private static final int HTTP_PROXY_AUTH = 407;
private static HashSet |
| File |
|---|
| LoadListener.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Static initializer |
| Chunk |
|---|
| Conflicting content |
|---|
// This commits the headers without checking the response status code.
private void commitHeaders() {
<<<<<<< HEAD
if (mIsMainPageLoader && sCertificateMimeTypeMap.contains(mMimeType)) {
=======
if (mIsMainPageLoader && CERT_MIMETYPE.equals(mMimeType)) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// In the case of downloading certificate, we will save it to the
// Keystore in commitLoad. Do not call webcore.
return; |
| Solution content |
|---|
// This commits the headers without checking the response status code.
private void commitHeaders() {
if (mIsMainPageLoader && sCertificateMimeTypeMap.contains(mMimeType)) {
// In the case of downloading certificate, we will save it to the
// Keystore in commitLoad. Do not call webcore.
return; |
| File |
|---|
| LoadListener.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
private void commitLoad() {
if (mCancelled) return;
<<<<<<< HEAD
if (mIsMainPageLoader && sCertificateMimeTypeMap.contains(mMimeType)) {
=======
if (mIsMainPageLoader && CERT_MIMETYPE.equals(mMimeType)) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// In the case of downloading certificate, we will save it to the
// Keystore and stop the current loading so that it will not
// generate a new history page |
| Solution content |
|---|
private void commitLoad() {
if (mCancelled) return;
if (mIsMainPageLoader && sCertificateMimeTypeMap.contains(mMimeType)) {
// In the case of downloading certificate, we will save it to the
// Keystore and stop the current loading so that it will not
// generate a new history page |
| File |
|---|
| LoadListener.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
/**
* Issues a runnable to show the dropdown as soon as possible.
*
<<<<<<< HEAD
* @hide internal used only by SearchDialog
=======
* @hide internal used only by Search Dialog
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public void showDropDownAfterLayout() {
post(mShowDropDownRunnable); |
| Solution content |
|---|
/**
* Issues a runnable to show the dropdown as soon as possible.
*
* @hide internal used only by SearchDialog
*/
public void showDropDownAfterLayout() {
post(mShowDropDownRunnable); |
| File |
|---|
| AutoCompleteTextView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
/**
public void showDropDownAfterLayout() {
post(mShowDropDownRunnable);
}
* Ensures that the drop down is not obscuring the IME.
*
* @hide internal used only here and SearchDialog
*/
public void ensureImeVisible() {
mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
showDropDown();
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* |
| Solution content |
|---|
public void showDropDownAfterLayout() {
post(mShowDropDownRunnable);
}
/**
* Ensures that the drop down is not obscuring the IME.
*
* @hide internal used only here and SearchDialog
*/
public void ensureImeVisible() {
mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
showDropDown();
}
/**
* |
| File |
|---|
| AutoCompleteTextView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
p.flags = computeFlags(p.flags);
p.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
p.token = token;
<<<<<<< HEAD
p.softInputMode = mSoftInputMode;
=======
p.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
return p; |
| Solution content |
|---|
p.flags = computeFlags(p.flags);
p.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
p.token = token;
p.softInputMode = mSoftInputMode;
p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
return p; |
| File |
|---|
| PopupWindow.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
if (rule > 0) {
// The node this node depends on
final Node dependency = keyNodes.get(rule);
<<<<<<< HEAD
// Skip unknowns and self dependencies
if (dependency == null || dependency == node) {
=======
if (dependency == node) {
throw new IllegalStateException("A view cannot have a dependency" +
" on itself");
}
if (dependency == null) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
continue;
}
// Add the current node as a dependent |
| Solution content |
|---|
if (rule > 0) {
// The node this node depends on
final Node dependency = keyNodes.get(rule);
// Skip unknowns and self dependencies
if (dependency == null || dependency == node) {
continue;
}
// Add the current node as a dependent |
| File |
|---|
| RelativeLayout.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
private long mRadioDataUptime;
private long mRadioDataStart;
<<<<<<< HEAD
private int mBluetoothPingCount;
private int mBluetoothPingStart = -1;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/*
* Holds a SamplingTimer associated with each kernel wakelock name being tracked.
*/ |
| Solution content |
|---|
private long mRadioDataUptime;
private long mRadioDataStart;
private int mBluetoothPingCount;
private int mBluetoothPingStart = -1;
/*
* Holds a SamplingTimer associated with each kernel wakelock name being tracked.
*/ |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
dataTransfer[STATS_UNPLUGGED] = currentBytes;
}
<<<<<<< HEAD
/**
* Radio uptime in microseconds when transferring data. This value is very approximate.
* @return
*/
private long getCurrentRadioDataUptime() {
=======
private long getCurrentRadioDataUptimeMs() {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
try {
File awakeTimeFile = new File("/sys/devices/virtual/net/rmnet0/awake_time_ms");
if (!awakeTimeFile.exists()) return 0; |
| Solution content |
|---|
dataTransfer[STATS_UNPLUGGED] = currentBytes;
}
/**
* Radio uptime in microseconds when transferring data. This value is very approximate.
* @return
*/
private long getCurrentRadioDataUptime() {
try {
File awakeTimeFile = new File("/sys/devices/virtual/net/rmnet0/awake_time_ms");
if (!awakeTimeFile.exists()) return 0; |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
BufferedReader br = new BufferedReader(new FileReader(awakeTimeFile));
String line = br.readLine();
br.close();
<<<<<<< HEAD
return Long.parseLong(line) * 1000;
=======
return Long.parseLong(line);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} catch (NumberFormatException nfe) {
// Nothing
} catch (IOException ioe) { |
| Solution content |
|---|
BufferedReader br = new BufferedReader(new FileReader(awakeTimeFile));
String line = br.readLine();
br.close();
return Long.parseLong(line) * 1000;
} catch (NumberFormatException nfe) {
// Nothing
} catch (IOException ioe) { |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
return 0;
}
<<<<<<< HEAD
/**
* @deprecated use getRadioDataUptime
*/
public long getRadioDataUptimeMs() {
return getRadioDataUptime() / 1000;
}
/**
* Returns the duration that the cell radio was up for data transfers.
*/
public long getRadioDataUptime() {
if (mRadioDataStart == -1) {
return mRadioDataUptime;
} else {
return getCurrentRadioDataUptime() - mRadioDataStart;
}
}
private int getCurrentBluetoothPingCount() {
if (mBtHeadset != null) {
return mBtHeadset.getBatteryUsageHint();
}
return -1;
}
public int getBluetoothPingCount() {
if (mBluetoothPingStart == -1) {
return mBluetoothPingCount;
} else if (mBtHeadset != null) {
return getCurrentBluetoothPingCount() - mBluetoothPingStart;
}
return -1;
}
public void setBtHeadset(BluetoothHeadset headset) {
mBtHeadset = headset;
=======
public long getRadioDataUptimeMs() {
if (mRadioDataStart == -1) {
return mRadioDataUptime;
} else {
return getCurrentRadioDataUptimeMs() - mRadioDataStart;
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
public void doUnplug(long batteryUptime, long batteryRealtime) { |
| Solution content |
|---|
return 0;
}
/**
* @deprecated use getRadioDataUptime
*/
public long getRadioDataUptimeMs() {
return getRadioDataUptime() / 1000;
}
/**
* Returns the duration that the cell radio was up for data transfers.
*/
public long getRadioDataUptime() {
if (mRadioDataStart == -1) {
return mRadioDataUptime;
} else {
return getCurrentRadioDataUptime() - mRadioDataStart;
}
}
private int getCurrentBluetoothPingCount() {
if (mBtHeadset != null) {
return mBtHeadset.getBatteryUsageHint();
}
return -1;
}
public int getBluetoothPingCount() {
if (mBluetoothPingStart == -1) {
return mBluetoothPingCount;
} else if (mBtHeadset != null) {
return getCurrentBluetoothPingCount() - mBluetoothPingStart;
}
return -1;
}
public void setBtHeadset(BluetoothHeadset headset) {
mBtHeadset = headset;
}
public void doUnplug(long batteryUptime, long batteryRealtime) { |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method declaration |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
doDataUnplug(mTotalDataRx, NetStat.getTotalRxBytes());
doDataUnplug(mTotalDataTx, NetStat.getTotalTxBytes());
// Track radio awake time
<<<<<<< HEAD
mRadioDataStart = getCurrentRadioDataUptime();
mRadioDataUptime = 0;
// Track bt headset ping count
mBluetoothPingStart = getCurrentBluetoothPingCount();
mBluetoothPingCount = 0;
=======
mRadioDataStart = getCurrentRadioDataUptimeMs();
mRadioDataUptime = 0;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
public void doPlug(long batteryUptime, long batteryRealtime) { |
| Solution content |
|---|
doDataUnplug(mTotalDataRx, NetStat.getTotalRxBytes());
doDataUnplug(mTotalDataTx, NetStat.getTotalTxBytes());
// Track radio awake time
mRadioDataStart = getCurrentRadioDataUptime();
mRadioDataUptime = 0;
// Track bt headset ping count
mBluetoothPingStart = getCurrentBluetoothPingCount();
mBluetoothPingCount = 0;
}
public void doPlug(long batteryUptime, long batteryRealtime) { |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// Track bt headset ping count
doDataPlug(mTotalDataRx, NetStat.getTotalRxBytes());
doDataPlug(mTotalDataTx, NetStat.getTotalTxBytes());
// Track radio awake time
<<<<<<< HEAD
mRadioDataUptime = getRadioDataUptime();
mRadioDataStart = -1;
mBluetoothPingCount = getBluetoothPingCount();
mBluetoothPingStart = -1;
=======
mRadioDataUptime = getRadioDataUptimeMs();
mRadioDataStart = -1;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
public void noteStartGps(int uid) { |
| Solution content |
|---|
doDataPlug(mTotalDataRx, NetStat.getTotalRxBytes());
doDataPlug(mTotalDataTx, NetStat.getTotalTxBytes());
// Track radio awake time
mRadioDataUptime = getRadioDataUptime();
mRadioDataStart = -1;
// Track bt headset ping count
mBluetoothPingCount = getBluetoothPingCount();
mBluetoothPingStart = -1;
}
public void noteStartGps(int uid) { |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
mRadioDataUptime = in.readLong();
mRadioDataStart = -1;
<<<<<<< HEAD
mBluetoothPingCount = in.readInt();
mBluetoothPingStart = -1;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mKernelWakelockStats.clear();
int NKW = in.readInt();
for (int ikw = 0; ikw < NKW; ikw++) { |
| Solution content |
|---|
mRadioDataUptime = in.readLong();
mRadioDataStart = -1;
mBluetoothPingCount = in.readInt();
mBluetoothPingStart = -1;
mKernelWakelockStats.clear();
int NKW = in.readInt();
for (int ikw = 0; ikw < NKW; ikw++) { |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
out.writeLong(getTotalTcpBytesSent(STATS_UNPLUGGED));
// Write radio uptime for data
<<<<<<< HEAD
out.writeLong(getRadioDataUptime());
out.writeInt(getBluetoothPingCount());
=======
out.writeLong(getRadioDataUptimeMs());
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
out.writeInt(mKernelWakelockStats.size());
for (Map.Entry |
| Solution content |
|---|
out.writeLong(getTotalTcpBytesSent(STATS_UNPLUGGED));
// Write radio uptime for data
out.writeLong(getRadioDataUptime());
out.writeInt(getBluetoothPingCount());
out.writeInt(mKernelWakelockStats.size());
for (Map.Entry |
| File |
|---|
| BatteryStatsImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
import android.os.Parcel; import android.os.Parcelable; <<<<<<< HEAD import android.util.DisplayMetrics; ======= >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import java.io.OutputStream; import java.nio.Buffer; |
| Solution content |
|---|
import android.os.Parcel; import android.os.Parcelable; import android.util.DisplayMetrics; import java.io.OutputStream; import java.nio.Buffer; |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
*
* @see Bitmap#getDensityScale()
* @see Bitmap#setDensityScale(float)
<<<<<<< HEAD
=======
*
* @hide pending API council approval
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public static final float DENSITY_SCALE_UNKNOWN = -1.0f;
|
| Solution content |
|---|
*
* @see Bitmap#getDensityScale()
* @see Bitmap#setDensityScale(float)
*/
public static final float DENSITY_SCALE_UNKNOWN = -1.0f;
|
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* @see #setDensityScale(float)
* @see #isAutoScalingEnabled()
* @see #setAutoScalingEnabled(boolean)
<<<<<<< HEAD
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
=======
* @see android.util.DisplayMetrics#DEFAULT_DENSITY
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
* @see android.util.DisplayMetrics#density
* @see #DENSITY_SCALE_UNKNOWN
*/ |
| Solution content |
|---|
* @see #setDensityScale(float)
* @see #isAutoScalingEnabled()
* @see #setAutoScalingEnabled(boolean)
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#density
* @see #DENSITY_SCALE_UNKNOWN
*/ |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* @see #getDensityScale()
* @see #isAutoScalingEnabled()
* @see #setAutoScalingEnabled(boolean)
<<<<<<< HEAD
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
=======
* @see android.util.DisplayMetrics#DEFAULT_DENSITY
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
* @see android.util.DisplayMetrics#density
* @see #DENSITY_SCALE_UNKNOWN
*/ |
| Solution content |
|---|
* @see #getDensityScale()
* @see #isAutoScalingEnabled()
* @see #setAutoScalingEnabled(boolean)
* @see android.util.DisplayMetrics#DENSITY_DEFAULT
* @see android.util.DisplayMetrics#density
* @see #DENSITY_SCALE_UNKNOWN
*/ |
| File |
|---|
| Bitmap.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* false, then this field is ignored. If inPurgeable is true, then this
* field determines whether the bitmap can share a reference to the
* input data (inputstream, array, etc.) or if it must make a deep copy.
<<<<<<< HEAD
*/
public boolean inInputShareable;
/**
* Normally bitmap allocations count against the dalvik heap, which
* means they help trigger GCs when a lot have been allocated. However,
* in rare cases, the caller may want to allocate the bitmap outside of
* that heap. To request that, set inNativeAlloc to true. In these
* rare instances, it is solely up to the caller to ensure that OOM is
* managed explicitly by calling bitmap.recycle() as soon as such a
* bitmap is no longer needed.
*
* @hide pending API council approval
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
*/
public boolean inNativeAlloc;
|
| Solution content |
|---|
* false, then this field is ignored. If inPurgeable is true, then this
* field determines whether the bitmap can share a reference to the
* input data (inputstream, array, etc.) or if it must make a deep copy.
*/
public boolean inInputShareable;
/**
* Normally bitmap allocations count against the dalvik heap, which
* means they help trigger GCs when a lot have been allocated. However,
* in rare cases, the caller may want to allocate the bitmap outside of
* that heap. To request that, set inNativeAlloc to true. In these
* rare instances, it is solely up to the caller to ensure that OOM is
* managed explicitly by calling bitmap.recycle() as soon as such a
* bitmap is no longer needed.
*
* @hide pending API council approval
*/
public boolean inNativeAlloc;
|
| File |
|---|
| BitmapFactory.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
if (opts.inDensity == 0) {
opts.inDensity = density == TypedValue.DENSITY_DEFAULT ?
<<<<<<< HEAD
DisplayMetrics.DENSITY_DEFAULT : density;
}
float scale = opts.inDensity / (float) DisplayMetrics.DENSITY_DEFAULT;
=======
DisplayMetrics.DEFAULT_DENSITY : density;
}
float scale = opts.inDensity / (float) DisplayMetrics.DEFAULT_DENSITY;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (opts.inScaled || isNinePatch) {
bm.setDensityScale(1.0f); |
| Solution content |
|---|
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); |
| File |
|---|
| BitmapFactory.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
/** * Internal service helper that no-one should use directly. <<<<<<< HEAD * ======= * >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f * The way the scan currently works is: * - The Java MediaScannerService creates a MediaScanner (this class), and calls * MediaScanner.scanDirectories on it. |
| Solution content |
|---|
/** * Internal service helper that no-one should use directly. * * The way the scan currently works is: * - The Java MediaScannerService creates a MediaScanner (this class), and calls * MediaScanner.scanDirectories on it. |
| File |
|---|
| MediaScanner.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
}
// Inform the backup manager about a data change
<<<<<<< HEAD
if (backedUpDataChanged) {
mBackupManager.dataChanged();
}
=======
mBackupManager.dataChanged();
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// Now send the notification through the content framework.
String notify = uri.getQueryParameter("notify"); |
| Solution content |
|---|
}
// Inform the backup manager about a data change
if (backedUpDataChanged) {
mBackupManager.dataChanged();
}
// Now send the notification through the content framework.
String notify = uri.getQueryParameter("notify"); |
| File |
|---|
| SettingsProvider.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// Now propagate the newly-backed-up data to the transport
if (success) {
<<<<<<< HEAD
if (DEBUG) Log.v(TAG, "doBackup() success");
if (backupDataName.length() > 0) {
backupData =
ParcelFileDescriptor.open(backupDataName,
ParcelFileDescriptor.MODE_READ_ONLY);
if (!transport.performBackup(packInfo, backupData)) {
// STOPSHIP TODO: handle errors
Log.e(TAG, "Backup failure in performBackup()");
}
} else {
if (DEBUG) {
Log.i(TAG, "no backup data written; not calling transport");
}
}
// After successful transport, delete the now-stale data
// and juggle the files so that next time we supply the agent
// with the new state file it just created.
backupDataName.delete();
=======
if (DEBUG) Log.v(TAG, "doBackup() success; calling transport");
backupData =
ParcelFileDescriptor.open(backupDataName, ParcelFileDescriptor.MODE_READ_ONLY);
if (!transport.performBackup(packInfo, backupData)) {
// STOPSHIP TODO: handle errors
Log.e(TAG, "Backup failure in performBackup()");
}
// !!! TODO: After successful transport, delete the now-stale data
// and juggle the files so that next time the new state is passed
//backupDataName.delete();
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
newStateName.renameTo(savedStateName);
}
} catch (Exception e) { |
| Solution content |
|---|
// Now propagate the newly-backed-up data to the transport
if (success) {
if (DEBUG) Log.v(TAG, "doBackup() success");
if (backupDataName.length() > 0) {
backupData =
ParcelFileDescriptor.open(backupDataName,
ParcelFileDescriptor.MODE_READ_ONLY);
if (!transport.performBackup(packInfo, backupData)) {
// STOPSHIP TODO: handle errors
Log.e(TAG, "Backup failure in performBackup()");
}
} else {
if (DEBUG) {
Log.i(TAG, "no backup data written; not calling transport");
}
}
// After successful transport, delete the now-stale data
// and juggle the files so that next time we supply the agent
// with the new state file it just created.
backupDataName.delete();
newStateName.renameTo(savedStateName);
}
} catch (Exception e) { |
| File |
|---|
| BackupManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
} catch (RemoteException e) {
Log.d(TAG, "Restore observer died at restoreStarting");
mObserver = null;
<<<<<<< HEAD
}
}
if (!mTransport.startRestore(mToken, restorePackages.toArray(new PackageInfo[0]))) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error starting restore operation");
return;
}
String packageName = mTransport.nextRestorePackage();
if (packageName == null) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error getting first restore package");
return;
} else if (packageName.equals("")) {
Log.i(TAG, "No restore data available");
return;
} else if (!packageName.equals(PACKAGE_MANAGER_SENTINEL)) {
Log.e(TAG, "Expected restore data for \"" + PACKAGE_MANAGER_SENTINEL
+ "\", found only \"" + packageName + "\"");
return;
}
// Pull the Package Manager metadata from the restore set first
PackageManagerBackupAgent pmAgent = new PackageManagerBackupAgent(
mPackageManager, agentPackages);
processOneRestore(omPackage, 0, IBackupAgent.Stub.asInterface(pmAgent.onBind()));
// Verify that the backup set includes metadata. If not, we can't do
// signature/version verification etc, so we simply do not proceed with
// the restore operation.
if (!pmAgent.hasMetadata()) {
Log.i(TAG, "No restore metadata available, so not restoring settings");
return;
}
int count = 0;
for (;;) {
packageName = mTransport.nextRestorePackage();
if (packageName == null) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error getting next restore package");
return;
} else if (packageName.equals("")) {
break;
}
if (mObserver != null) {
++count;
try {
mObserver.onUpdate(count);
} catch (RemoteException e) {
Log.d(TAG, "Restore observer died in onUpdate");
mObserver = null;
}
}
Metadata metaInfo = pmAgent.getRestoredMetadata(packageName);
if (metaInfo == null) {
Log.e(TAG, "Missing metadata for " + packageName);
continue;
}
int flags = PackageManager.GET_SIGNATURES;
PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags);
if (metaInfo.versionCode > packageInfo.versionCode) {
Log.w(TAG, "Package " + packageName
+ " restore version [" + metaInfo.versionCode
+ "] is too new for installed version ["
+ packageInfo.versionCode + "]");
continue;
}
if (!signaturesMatch(metaInfo.signatures, packageInfo.signatures)) {
Log.w(TAG, "Signature mismatch restoring " + packageName);
continue;
}
if (DEBUG) Log.v(TAG, "Package " + packageName
+ " restore version [" + metaInfo.versionCode
+ "] is compatible with installed version ["
+ packageInfo.versionCode + "]");
// Now perform the actual restore
clearApplicationDataSynchronous(packageName);
IBackupAgent agent = bindToAgentSynchronous(
packageInfo.applicationInfo,
IApplicationThread.BACKUP_MODE_RESTORE);
if (agent == null) {
Log.w(TAG, "Can't find backup agent for " + packageName);
continue;
}
try {
processOneRestore(packageInfo, metaInfo.versionCode, agent);
} finally {
// unbind even on timeout or failure, just in case
mActivityManager.unbindBackupAgent(packageInfo.applicationInfo);
}
}
=======
}
}
if (!mTransport.startRestore(mToken, restorePackages.toArray(new PackageInfo[0]))) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error starting restore operation");
return;
}
String packageName = mTransport.nextRestorePackage();
if (packageName == null) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error getting first restore package");
return;
} else if (packageName.equals("")) {
Log.i(TAG, "No restore data available");
return;
} else if (!packageName.equals(PACKAGE_MANAGER_SENTINEL)) {
Log.e(TAG, "Expected restore data for \"" + PACKAGE_MANAGER_SENTINEL
+ "\", found only \"" + packageName + "\"");
return;
}
// Pull the Package Manager metadata from the restore set first
PackageManagerBackupAgent pmAgent = new PackageManagerBackupAgent(
mPackageManager, agentPackages);
processOneRestore(omPackage, 0, IBackupAgent.Stub.asInterface(pmAgent.onBind()));
// Verify that the backup set includes metadata. If not, we can't do
// signature/version verification etc, so we simply do not proceed with
// the restore operation.
if (!pmAgent.hasMetadata()) {
Log.i(TAG, "No restore metadata available, so not restoring settings");
return;
}
int count = 0;
for (;;) {
packageName = mTransport.nextRestorePackage();
if (packageName == null) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error getting next restore package");
return;
} else if (packageName.equals("")) {
break;
}
if (mObserver != null) {
++count;
try {
mObserver.onUpdate(count);
} catch (RemoteException e) {
Log.d(TAG, "Restore observer died in onUpdate");
mObserver = null;
}
}
Metadata metaInfo = pmAgent.getRestoredMetadata(packageName);
if (metaInfo == null) {
Log.e(TAG, "Missing metadata for " + packageName);
continue;
}
int flags = PackageManager.GET_SIGNATURES;
PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags);
if (metaInfo.versionCode > packageInfo.versionCode) {
Log.w(TAG, "Package " + packageName
+ " restore version [" + metaInfo.versionCode
+ "] is too new for installed version ["
+ packageInfo.versionCode + "]");
continue;
}
if (!signaturesMatch(metaInfo.signatures, packageInfo.signatures)) {
Log.w(TAG, "Signature mismatch restoring " + packageName);
continue;
}
if (DEBUG) Log.v(TAG, "Package " + packageName
+ " restore version [" + metaInfo.versionCode
+ "] is compatible with installed version ["
+ packageInfo.versionCode + "]");
// Now perform the actual restore
clearApplicationDataSynchronous(packageName);
IBackupAgent agent = bindToAgentSynchronous(
packageInfo.applicationInfo,
IApplicationThread.BACKUP_MODE_RESTORE);
if (agent == null) {
Log.w(TAG, "Can't find backup agent for " + packageName);
continue;
}
try {
processOneRestore(packageInfo, metaInfo.versionCode, agent);
} finally {
// unbind even on timeout or failure, just in case
mActivityManager.unbindBackupAgent(packageInfo.applicationInfo);
}
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// if we get this far, report success to the observer
error = 0;
} catch (NameNotFoundException e) { |
| Solution content |
|---|
} catch (RemoteException e) {
Log.d(TAG, "Restore observer died at restoreStarting");
mObserver = null;
}
}
if (!mTransport.startRestore(mToken, restorePackages.toArray(new PackageInfo[0]))) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error starting restore operation");
return;
}
String packageName = mTransport.nextRestorePackage();
if (packageName == null) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error getting first restore package");
return;
} else if (packageName.equals("")) {
Log.i(TAG, "No restore data available");
return;
} else if (!packageName.equals(PACKAGE_MANAGER_SENTINEL)) {
Log.e(TAG, "Expected restore data for \"" + PACKAGE_MANAGER_SENTINEL
+ "\", found only \"" + packageName + "\"");
return;
}
// Pull the Package Manager metadata from the restore set first
PackageManagerBackupAgent pmAgent = new PackageManagerBackupAgent(
mPackageManager, agentPackages);
processOneRestore(omPackage, 0, IBackupAgent.Stub.asInterface(pmAgent.onBind()));
// Verify that the backup set includes metadata. If not, we can't do
// signature/version verification etc, so we simply do not proceed with
// the restore operation.
if (!pmAgent.hasMetadata()) {
Log.i(TAG, "No restore metadata available, so not restoring settings");
return;
}
int count = 0;
for (;;) {
packageName = mTransport.nextRestorePackage();
if (packageName == null) {
// STOPSHIP TODO: Handle the failure somehow?
Log.e(TAG, "Error getting next restore package");
return;
} else if (packageName.equals("")) {
break;
}
if (mObserver != null) {
++count;
try {
mObserver.onUpdate(count);
} catch (RemoteException e) {
Log.d(TAG, "Restore observer died in onUpdate");
mObserver = null;
}
}
Metadata metaInfo = pmAgent.getRestoredMetadata(packageName);
if (metaInfo == null) {
Log.e(TAG, "Missing metadata for " + packageName);
continue;
}
int flags = PackageManager.GET_SIGNATURES;
PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags);
if (metaInfo.versionCode > packageInfo.versionCode) {
Log.w(TAG, "Package " + packageName
+ " restore version [" + metaInfo.versionCode
+ "] is too new for installed version ["
+ packageInfo.versionCode + "]");
continue;
}
if (!signaturesMatch(metaInfo.signatures, packageInfo.signatures)) {
Log.w(TAG, "Signature mismatch restoring " + packageName);
continue;
}
if (DEBUG) Log.v(TAG, "Package " + packageName
+ " restore version [" + metaInfo.versionCode
+ "] is compatible with installed version ["
+ packageInfo.versionCode + "]");
// Now perform the actual restore
clearApplicationDataSynchronous(packageName);
IBackupAgent agent = bindToAgentSynchronous(
packageInfo.applicationInfo,
IApplicationThread.BACKUP_MODE_RESTORE);
if (agent == null) {
Log.w(TAG, "Can't find backup agent for " + packageName);
continue;
}
try {
processOneRestore(packageInfo, metaInfo.versionCode, agent);
} finally {
// unbind even on timeout or failure, just in case
mActivityManager.unbindBackupAgent(packageInfo.applicationInfo);
}
}
// if we get this far, report success to the observer
error = 0;
} catch (NameNotFoundException e) { |
| File |
|---|
| BackupManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| For statement |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
}
<<<<<<< HEAD
// now find the given package in the set of candidate apps
for (ApplicationInfo app : apps) {
if (app.packageName.equals(packageName)) {
if (DEBUG) Log.v(TAG, "Found the app - running clear process");
// found it; fire off the clear request
synchronized (mQueueLock) {
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_CLEAR,
new ClearParams(getTransport(mCurrentTransport), info));
mBackupHandler.sendMessage(msg);
}
break;
=======
// now find the given package in the set of candidate apps
for (ApplicationInfo app : apps) {
if (app.packageName.equals(packageName)) {
if (DEBUG) Log.v(TAG, "Found the app - running clear process");
// found it; fire off the clear request
synchronized (mQueueLock) {
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_CLEAR,
new ClearParams(getTransport(mCurrentTransport), info));
mBackupHandler.sendMessage(msg);
}
break;
}
}
}
// Run a backup pass immediately for any applications that have declared
// that they have pending updates.
public void backupNow() throws RemoteException {
mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "backupNow");
if (DEBUG) Log.v(TAG, "Scheduling immediate backup pass");
synchronized (mQueueLock) {
try {
if (DEBUG) Log.v(TAG, "sending immediate backup broadcast");
mRunBackupIntent.send();
} catch (PendingIntent.CanceledException e) {
// should never happen
Log.e(TAG, "run-backup intent cancelled!");
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
} |
| Solution content |
|---|
}
}
}
// now find the given package in the set of candidate apps
for (ApplicationInfo app : apps) {
if (app.packageName.equals(packageName)) {
if (DEBUG) Log.v(TAG, "Found the app - running clear process");
// found it; fire off the clear request
synchronized (mQueueLock) {
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_CLEAR,
new ClearParams(getTransport(mCurrentTransport), info));
mBackupHandler.sendMessage(msg);
}
break;
}
}
} |
| File |
|---|
| BackupManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Break statement |
| Comment |
| For statement |
| If statement |
| Method invocation |
| Method signature |
| Synchronized statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
// Run a backup pass immediately for any applications that have declared
// that they have pending updates.
public void backupNow() throws RemoteException {
mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "backupNow");
if (DEBUG) Log.v(TAG, "Scheduling immediate backup pass");
synchronized (mQueueLock) {
try {
if (DEBUG) Log.v(TAG, "sending immediate backup broadcast");
mRunBackupIntent.send();
} catch (PendingIntent.CanceledException e) {
// should never happen
Log.e(TAG, "run-backup intent cancelled!");
}
}
}
// Enable/disable the backup service
public void setBackupEnabled(boolean enable) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"setBackupEnabled");
boolean wasEnabled = mEnabled;
synchronized (this) {
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.BACKUP_ENABLED, enable ? 1 : 0);
mEnabled = enable;
}
synchronized (mQueueLock) {
=======
// Enable/disable the backup service
public void setBackupEnabled(boolean enable) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"setBackupEnabled");
boolean wasEnabled = mEnabled;
synchronized (this) {
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.BACKUP_ENABLED, enable ? 1 : 0);
mEnabled = enable;
}
synchronized (mQueueLock) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (enable && !wasEnabled && mProvisioned) {
// if we've just been enabled, start scheduling backup passes
startBackupAlarmsLocked(BACKUP_INTERVAL); |
| Solution content |
|---|
}
}
// Run a backup pass immediately for any applications that have declared
// that they have pending updates.
public void backupNow() throws RemoteException {
mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "backupNow");
if (DEBUG) Log.v(TAG, "Scheduling immediate backup pass");
synchronized (mQueueLock) {
try {
if (DEBUG) Log.v(TAG, "sending immediate backup broadcast");
mRunBackupIntent.send();
} catch (PendingIntent.CanceledException e) {
// should never happen
Log.e(TAG, "run-backup intent cancelled!");
}
}
}
// Enable/disable the backup service
public void setBackupEnabled(boolean enable) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"setBackupEnabled");
boolean wasEnabled = mEnabled;
synchronized (this) {
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.BACKUP_ENABLED, enable ? 1 : 0);
mEnabled = enable;
}
synchronized (mQueueLock) {
if (enable && !wasEnabled && mProvisioned) {
// if we've just been enabled, start scheduling backup passes
startBackupAlarmsLocked(BACKUP_INTERVAL); |
| File |
|---|
| BackupManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method declaration |
| Method invocation |
| Method signature |
| Synchronized statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
import android.os.Message; import android.os.Power; import android.os.RemoteException; <<<<<<< HEAD import android.os.SystemProperties; ======= >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.os.Vibrator; import android.provider.Settings; import android.text.TextUtils; |
| Solution content |
|---|
import android.os.Message; import android.os.Power; import android.os.RemoteException; import android.os.SystemProperties; import android.os.Vibrator; import android.provider.Settings; import android.text.TextUtils; |
| File |
|---|
| NotificationManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
mSettingsObserver = new SettingsObserver(mHandler);
mSettingsObserver.observe();
<<<<<<< HEAD
}
void systemReady() {
// no beeping until we're basically done booting
mSystemReady = true;
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
// Toasts |
| Solution content |
|---|
mSettingsObserver = new SettingsObserver(mHandler);
mSettingsObserver.observe();
}
void systemReady() {
// no beeping until we're basically done booting
mSystemReady = true;
}
// Toasts |
| File |
|---|
| NotificationManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
sendAccessibilityEvent(notification, pkg);
=======
sendAccessibilityEventTypeNotificationChangedDoCheck(notification, pkg);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} else {
if (old != null && old.statusBarKey != null) { |
| Solution content |
|---|
}
}
sendAccessibilityEvent(notification, pkg);
} else {
if (old != null && old.statusBarKey != null) { |
| File |
|---|
| NotificationManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
idOut[0] = id;
}
<<<<<<< HEAD
private void sendAccessibilityEvent(Notification notification, CharSequence packageName) {
=======
private void sendAccessibilityEventTypeNotificationChangedDoCheck(Notification notification,
CharSequence packageName) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
AccessibilityManager manager = AccessibilityManager.getInstance(mContext);
if (!manager.isEnabled()) {
return; |
| Solution content |
|---|
idOut[0] = id;
}
private void sendAccessibilityEvent(Notification notification, CharSequence packageName) {
AccessibilityManager manager = AccessibilityManager.getInstance(mContext);
if (!manager.isEnabled()) {
return; |
| File |
|---|
| NotificationManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
// to accidentally lose.
private void updateAdbNotification() {
if (mAdbEnabled && mBatteryPlugged == BatteryManager.BATTERY_PLUGGED_USB) {
<<<<<<< HEAD
if ("0".equals(SystemProperties.get("persist.adb.notify"))) {
return;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (!mAdbNotificationShown) {
NotificationManager notificationManager = (NotificationManager) mContext
.getSystemService(Context.NOTIFICATION_SERVICE); |
| Solution content |
|---|
// to accidentally lose.
private void updateAdbNotification() {
if (mAdbEnabled && mBatteryPlugged == BatteryManager.BATTERY_PLUGGED_USB) {
if ("0".equals(SystemProperties.get("persist.adb.notify"))) {
return;
}
if (!mAdbNotificationShown) {
NotificationManager notificationManager = (NotificationManager) mContext
.getSystemService(Context.NOTIFICATION_SERVICE); |
| File |
|---|
| NotificationManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
if (!mNoDexOpt) {
return false;
}
<<<<<<< HEAD
PackageParser.Package p;
synchronized (mPackages) {
p = mPackages.get(packageName);
if (p == null || p.mDidDexOpt) {
return false;
}
}
synchronized (mInstallLock) {
return performDexOptLI(p, false) == DEX_OPT_PERFORMED;
}
}
static final int DEX_OPT_SKIPPED = 0;
static final int DEX_OPT_PERFORMED = 1;
static final int DEX_OPT_FAILED = -1;
private int performDexOptLI(PackageParser.Package pkg, boolean forceDex) {
boolean performed = false;
if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0 && mInstaller != null) {
String path = pkg.mScanPath;
int ret = 0;
try {
if (forceDex || dalvik.system.DexFile.isDexOptNeeded(path)) {
ret = mInstaller.dexopt(path, pkg.applicationInfo.uid,
!pkg.mForwardLocked);
pkg.mDidDexOpt = true;
performed = true;
}
} catch (FileNotFoundException e) {
Log.w(TAG, "Apk not found for dexopt: " + path);
ret = -1;
} catch (IOException e) {
Log.w(TAG, "Exception reading apk: " + path, e);
ret = -1;
}
if (ret < 0) {
//error from installer
return DEX_OPT_FAILED;
}
}
=======
PackageParser.Package p;
synchronized (mPackages) {
p = mPackages.get(packageName);
if (p == null || p.mDidDexOpt) {
return false;
}
}
synchronized (mInstallLock) {
return performDexOptLI(p, false) == DEX_OPT_PERFORMED;
}
static final int DEX_OPT_SKIPPED = 0;
static final int DEX_OPT_PERFORMED = 1;
static final int DEX_OPT_FAILED = -1;
private int performDexOptLI(PackageParser.Package pkg, boolean forceDex) {
boolean performed = false;
if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0 && mInstaller != null) {
String path = pkg.mScanPath;
int ret = 0;
try {
if (forceDex || dalvik.system.DexFile.isDexOptNeeded(path)) {
ret = mInstaller.dexopt(path, pkg.applicationInfo.uid,
!pkg.mForwardLocked);
pkg.mDidDexOpt = true;
performed = true;
}
} catch (FileNotFoundException e) {
Log.w(TAG, "Apk not found for dexopt: " + path);
ret = -1;
} catch (IOException e) {
Log.w(TAG, "Exception reading apk: " + path, e);
ret = -1;
}
if (ret < 0) {
//error from installer
return DEX_OPT_FAILED;
}
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
return performed ? DEX_OPT_PERFORMED : DEX_OPT_SKIPPED;
}
|
| Solution content |
|---|
if (!mNoDexOpt) {
return false;
}
PackageParser.Package p;
synchronized (mPackages) {
p = mPackages.get(packageName);
if (p == null || p.mDidDexOpt) {
return false;
}
}
synchronized (mInstallLock) {
return performDexOptLI(p, false) == DEX_OPT_PERFORMED;
}
}
static final int DEX_OPT_SKIPPED = 0;
static final int DEX_OPT_PERFORMED = 1;
static final int DEX_OPT_FAILED = -1;
private int performDexOptLI(PackageParser.Package pkg, boolean forceDex) {
boolean performed = false;
if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0 && mInstaller != null) {
String path = pkg.mScanPath;
int ret = 0;
try {
if (forceDex || dalvik.system.DexFile.isDexOptNeeded(path)) {
ret = mInstaller.dexopt(path, pkg.applicationInfo.uid,
!pkg.mForwardLocked);
pkg.mDidDexOpt = true;
performed = true;
}
} catch (FileNotFoundException e) {
Log.w(TAG, "Apk not found for dexopt: " + path);
ret = -1;
} catch (IOException e) {
Log.w(TAG, "Exception reading apk: " + path, e);
ret = -1;
}
if (ret < 0) {
//error from installer
return DEX_OPT_FAILED;
}
}
return performed ? DEX_OPT_PERFORMED : DEX_OPT_SKIPPED;
}
|
| File |
|---|
| PackageManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method signature |
| Synchronized statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
mSystemReady = true;
// Read the compatibilty setting when the system is ready.
<<<<<<< HEAD
boolean compatibilityModeEnabled = android.provider.Settings.System.getInt(
mContext.getContentResolver(),
android.provider.Settings.System.COMPATIBILITY_MODE, 1) == 1;
PackageParser.setCompatibilityModeEnabled(compatibilityModeEnabled);
if (DEBUG_SETTINGS) {
Log.d(TAG, "compatibility mode:" + compatibilityModeEnabled);
=======
mCompatibilityModeEnabled = android.provider.Settings.System.getInt(
mContext.getContentResolver(),
android.provider.Settings.System.COMPATIBILITY_MODE, 1) == 1;
if (DEBUG_SETTINGS) {
Log.d(TAG, "compatibility mode:" + mCompatibilityModeEnabled);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
|
| Solution content |
|---|
mSystemReady = true;
// Read the compatibilty setting when the system is ready.
boolean compatibilityModeEnabled = android.provider.Settings.System.getInt(
mContext.getContentResolver(),
android.provider.Settings.System.COMPATIBILITY_MODE, 1) == 1;
PackageParser.setCompatibilityModeEnabled(compatibilityModeEnabled);
if (DEBUG_SETTINGS) {
Log.d(TAG, "compatibility mode:" + compatibilityModeEnabled);
}
}
|
| File |
|---|
| PackageManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// and data partition. Just let the most recent version
// take precedence.
return p;
<<<<<<< HEAD
} else {
// Let the app continue with previous uid if code path changes.
reportSettingsProblem(Log.WARN,
"Package " + name + " codePath changed from " + p.codePath
+ " to " + codePath + "; Retaining data and using new code from " +
codePath);
p.codePath = codePath;
p.resourcePath = resourcePath;
p.codePathString = codePath.toString();
p.resourcePathString = resourcePath.toString();
=======
} else if ((p.pkg != null) && (p.pkg.applicationInfo != null)) {
// Let the app continue with previous uid if code path changes.
reportSettingsProblem(Log.WARN,
"Package " + name + " codePath changed from " + p.codePath
+ " to " + codePath + "; Retaining data and using new code");
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
} else if (p.sharedUser != sharedUser) {
reportSettingsProblem(Log.WARN, |
| Solution content |
|---|
// and data partition. Just let the most recent version
// take precedence.
return p;
} else {
// Let the app continue with previous uid if code path changes.
reportSettingsProblem(Log.WARN,
"Package " + name + " codePath changed from " + p.codePath
+ " to " + codePath + "; Retaining data and using new code from " +
codePath);
p.codePath = codePath;
p.resourcePath = resourcePath;
p.codePathString = codePath.toString();
p.resourcePathString = resourcePath.toString();
}
} else if (p.sharedUser != sharedUser) {
reportSettingsProblem(Log.WARN, |
| File |
|---|
| PackageManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
=======
final Configuration mTempConfiguration = new Configuration();
int screenLayout = Configuration.SCREENLAYOUT_UNDEFINED;
<<<<<<< HEAD
// The frame use to limit the size of the app running in compatibility mode.
Rect mCompatibleScreenFrame = new Rect();
// The surface used to fill the outer rim of the app running in compatibility mode.
Surface mBackgroundFillerSurface = null;
boolean mBackgroundFillerShown = false;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
public static WindowManagerService main(Context context,
PowerManagerService pm, boolean haveInputMethods) {
WMThread thr = new WMThread(context, pm, haveInputMethods); |
| Solution content |
|---|
final Configuration mTempConfiguration = new Configuration();
int screenLayout = Configuration.SCREENLAYOUT_UNDEFINED;
// The frame use to limit the size of the app running in compatibility mode.
Rect mCompatibleScreenFrame = new Rect();
// The surface used to fill the outer rim of the app running in compatibility mode.
Surface mBackgroundFillerSurface = null;
boolean mBackgroundFillerShown = false;
public static WindowManagerService main(Context context,
PowerManagerService pm, boolean haveInputMethods) {
WMThread thr = new WMThread(context, pm, haveInputMethods); |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
config.orientation = orientation;
<<<<<<< HEAD
DisplayMetrics dm = new DisplayMetrics();
mDisplay.getMetrics(dm);
CompatibilityInfo.updateCompatibleScreenFrame(dm, orientation, mCompatibleScreenFrame);
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (screenLayout == Configuration.SCREENLAYOUT_UNDEFINED) {
// Note we only do this once because at this point we don't
// expect the screen to change in this way at runtime, and want |
| Solution content |
|---|
}
config.orientation = orientation;
DisplayMetrics dm = new DisplayMetrics();
mDisplay.getMetrics(dm);
CompatibilityInfo.updateCompatibleScreenFrame(dm, orientation, mCompatibleScreenFrame);
if (screenLayout == Configuration.SCREENLAYOUT_UNDEFINED) {
// Note we only do this once because at this point we don't
// expect the screen to change in this way at runtime, and want |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// Note we only do this once because at this point we don't
// expect the screen to change in this way at runtime, and want
// to avoid all of this computation for every config change.
<<<<<<< HEAD
=======
DisplayMetrics dm = new DisplayMetrics();
mDisplay.getMetrics(dm);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
int longSize = dw;
int shortSize = dh;
if (longSize < shortSize) { |
| Solution content |
|---|
// Note we only do this once because at this point we don't
// expect the screen to change in this way at runtime, and want
// to avoid all of this computation for every config change.
int longSize = dw;
int shortSize = dh;
if (longSize < shortSize) { |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
longSize = (int)(longSize/dm.density);
shortSize = (int)(shortSize/dm.density);
<<<<<<< HEAD
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// These semi-magic numbers define our compatibility modes for
// applications with different screens. Don't change unless you
// make sure to test lots and lots of apps! |
| Solution content |
|---|
}
longSize = (int)(longSize/dm.density);
shortSize = (int)(shortSize/dm.density);
// These semi-magic numbers define our compatibility modes for
// applications with different screens. Don't change unless you
// make sure to test lots and lots of apps! |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Blank |
| Chunk |
|---|
| Conflicting content |
|---|
final int result = dispatchPointer(null, ev, pid, uid);
if (sync) {
mKeyWaiter.waitForNextEventTarget(null, null, null, false, true, pid, uid);
<<<<<<< HEAD
}
Binder.restoreCallingIdentity(ident);
switch (result) {
case INJECT_NO_PERMISSION:
throw new SecurityException(
"Injecting to another application requires INJECT_EVENT permission");
case INJECT_SUCCEEDED:
return true;
}
=======
}
Binder.restoreCallingIdentity(ident);
switch (result) {
case INJECT_NO_PERMISSION:
throw new SecurityException(
"Injecting to another application requires INJECT_EVENT permission");
case INJECT_SUCCEEDED:
return true;
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
return false;
}
|
| Solution content |
|---|
final int result = dispatchPointer(null, ev, pid, uid);
if (sync) {
mKeyWaiter.waitForNextEventTarget(null, null, null, false, true, pid, uid);
}
Binder.restoreCallingIdentity(ident);
switch (result) {
case INJECT_NO_PERMISSION:
throw new SecurityException(
"Injecting to another application requires INJECT_EVENT permission");
case INJECT_SUCCEEDED:
return true;
}
return false;
}
|
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Switch statement |
| Chunk |
|---|
| Conflicting content |
|---|
w = mAttrs.width == mAttrs.FILL_PARENT ? pw : mRequestedWidth;
h = mAttrs.height== mAttrs.FILL_PARENT ? ph : mRequestedHeight;
}
<<<<<<< HEAD
=======
final Rect container = mContainingFrame;
container.set(pf);
final Rect display = mDisplayFrame;
display.set(df);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
final Rect content = mContentFrame;
content.set(cf); |
| Solution content |
|---|
w = mAttrs.width == mAttrs.FILL_PARENT ? pw : mRequestedWidth;
h = mAttrs.height== mAttrs.FILL_PARENT ? ph : mRequestedHeight;
}
final Rect content = mContentFrame;
content.set(cf); |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
/**
* Return true if the window is opaque and fully drawn.
*/
boolean isOpaqueDrawn() {
return mAttrs.format == PixelFormat.OPAQUE && mSurface != null
&& mAnimation == null && !mDrawPending && !mCommitDrawPending;
}
boolean needsBackgroundFiller(int screenWidth, int screenHeight) {
return
// only if the application is requesting compatible window
(mAttrs.flags & FLAG_COMPATIBLE_WINDOW) != 0 &&
// only if it's visible
mHasDrawn && mViewVisibility == View.VISIBLE &&
// and only if the application fills the compatible screen
mFrame.left <= mCompatibleScreenFrame.left &&
mFrame.top <= mCompatibleScreenFrame.top &&
mFrame.right >= mCompatibleScreenFrame.right &&
mFrame.bottom >= mCompatibleScreenFrame.bottom &&
// and starting window do not need background filler
mAttrs.type != mAttrs.TYPE_APPLICATION_STARTING;
}
boolean isFullscreen(int screenWidth, int screenHeight) {
return mFrame.left <= 0 && mFrame.top <= 0 &&
mFrame.right >= screenWidth && mFrame.bottom >= screenHeight;
=======
boolean isFullscreenOpaque(int screenWidth, int screenHeight) {
if (mAttrs.format != PixelFormat.OPAQUE || mSurface == null
|| mAnimation != null || mDrawPending || mCommitDrawPending) {
return false;
}
if (mFrame.left <= 0 && mFrame.top <= 0 &&
mFrame.right >= screenWidth && mFrame.bottom >= screenHeight) {
return true;
}
return false;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
void removeLocked() { |
| Solution content |
|---|
}
}
/**
* Return true if the window is opaque and fully drawn.
*/
boolean isOpaqueDrawn() {
return mAttrs.format == PixelFormat.OPAQUE && mSurface != null
&& mAnimation == null && !mDrawPending && !mCommitDrawPending;
}
boolean needsBackgroundFiller(int screenWidth, int screenHeight) {
return
// only if the application is requesting compatible window
(mAttrs.flags & FLAG_COMPATIBLE_WINDOW) != 0 &&
// only if it's visible
mHasDrawn && mViewVisibility == View.VISIBLE &&
// and only if the application fills the compatible screen
mFrame.left <= mCompatibleScreenFrame.left &&
mFrame.top <= mCompatibleScreenFrame.top &&
mFrame.right >= mCompatibleScreenFrame.right &&
mFrame.bottom >= mCompatibleScreenFrame.bottom &&
// and starting window do not need background filler
mAttrs.type != mAttrs.TYPE_APPLICATION_STARTING;
}
boolean isFullscreen(int screenWidth, int screenHeight) {
return mFrame.left <= 0 && mFrame.top <= 0 &&
mFrame.right >= screenWidth && mFrame.bottom >= screenHeight;
}
void removeLocked() { |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method declaration |
| Method signature |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// apps, and use it if exists.
WindowManager.LayoutParams animParams = null;
int animSrc = 0;
<<<<<<< HEAD
animParams = findCompatibleWindowParams(openingTokenList1);
if (animParams == null) {
animParams = findCompatibleWindowParams(closingTokenList2);
}
if (animParams != null) {
return animParams;
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
//Log.i(TAG, "Looking for animations...");
for (int i=order.size()-1; i>=0; i--) {
AppWindowToken wtoken = order.get(i); |
| Solution content |
|---|
// apps, and use it if exists.
WindowManager.LayoutParams animParams = null;
int animSrc = 0;
animParams = findCompatibleWindowParams(openingTokenList1);
if (animParams == null) {
animParams = findCompatibleWindowParams(closingTokenList2);
}
if (animParams != null) {
return animParams;
}
//Log.i(TAG, "Looking for animations...");
for (int i=order.size()-1; i>=0; i--) {
AppWindowToken wtoken = order.get(i); |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return animParams;
}
<<<<<<< HEAD
private static LayoutParams findCompatibleWindowParams(ArrayList |
| Solution content |
|---|
return animParams;
}
private static LayoutParams findCompatibleWindowParams(ArrayList |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
if (!dimming) {
//Log.i(TAG, "DIM BEHIND: " + w);
dimming = true;
<<<<<<< HEAD
if (mDimAnimator == null) {
mDimAnimator = new DimAnimator(mFxSession);
=======
mDimShown = true;
if (mDimSurface == null) {
if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM "
+ mDimSurface + ": CREATE");
try {
mDimSurface = new Surface(mFxSession, 0,
-1, 16, 16,
PixelFormat.OPAQUE,
Surface.FX_SURFACE_DIM);
} catch (Exception e) {
Log.e(TAG, "Exception creating Dim surface", e);
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
mDimAnimator.show(dw, dh);
} |
| Solution content |
|---|
if (!dimming) {
//Log.i(TAG, "DIM BEHIND: " + w);
dimming = true;
if (mDimAnimator == null) {
mDimAnimator = new DimAnimator(mFxSession);
}
mDimAnimator.show(dw, dh);
} |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
if (mDimAnimator != null && mDimAnimator.mDimShown) {
animating |= mDimAnimator.updateSurface(dimming, currentTime, mDisplayFrozen);
=======
if (mDimShown && mLastDimAnimTime != 0) {
mDimCurrentAlpha += mDimDeltaPerMs
* (currentTime-mLastDimAnimTime);
boolean more = true;
if (mDisplayFrozen) {
// If the display is frozen, there is no reason to animate.
more = false;
} else if (mDimDeltaPerMs > 0) {
if (mDimCurrentAlpha > mDimTargetAlpha) {
more = false;
}
} else if (mDimDeltaPerMs < 0) {
if (mDimCurrentAlpha < mDimTargetAlpha) {
more = false;
}
} else {
more = false;
}
// Do we need to continue animating?
if (more) {
if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM "
+ mDimSurface + ": alpha=" + mDimCurrentAlpha);
mLastDimAnimTime = currentTime;
mDimSurface.setAlpha(mDimCurrentAlpha);
animating = true;
} else {
mDimCurrentAlpha = mDimTargetAlpha;
mLastDimAnimTime = 0;
if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM "
+ mDimSurface + ": final alpha=" + mDimCurrentAlpha);
mDimSurface.setAlpha(mDimCurrentAlpha);
if (!dimming) {
if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM " + mDimSurface
+ ": HIDE");
try {
mDimSurface.hide();
} catch (RuntimeException e) {
Log.w(TAG, "Illegal argument exception hiding dim surface");
}
mDimShown = false;
}
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
if (!blurring && mBlurShown) { |
| Solution content |
|---|
}
}
if (mDimAnimator != null && mDimAnimator.mDimShown) {
animating |= mDimAnimator.updateSurface(dimming, currentTime, mDisplayFrozen);
}
if (!blurring && mBlurShown) { |
| File |
|---|
| WindowManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
<<<<<<< HEAD
private void reportResumedActivity(HistoryRecord r) {
//Log.i(TAG, "**** REPORT RESUME: " + r);
final int identHash = System.identityHashCode(r);
updateUsageStats(r, true);
int i = mWatchers.beginBroadcast();
while (i > 0) {
i--;
IActivityWatcher w = mWatchers.getBroadcastItem(i);
if (w != null) {
try {
w.activityResuming(identHash);
} catch (RemoteException e) {
}
}
}
mWatchers.finishBroadcast();
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* Ensure that the top activity in the stack is resumed.
* |
| Solution content |
|---|
}
}
private void reportResumedActivity(HistoryRecord r) {
//Log.i(TAG, "**** REPORT RESUME: " + r);
final int identHash = System.identityHashCode(r);
updateUsageStats(r, true);
int i = mWatchers.beginBroadcast();
while (i > 0) {
i--;
IActivityWatcher w = mWatchers.getBroadcastItem(i);
if (w != null) {
try {
w.activityResuming(identHash);
} catch (RemoteException e) {
}
}
}
mWatchers.finishBroadcast();
}
/**
* Ensure that the top activity in the stack is resumed.
* |
| File |
|---|
| ActivityManagerService.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
&& mBatteryThreshold > BATTERY_THRESHOLD_WARNING))) {
// Broadcast the low battery warning
mSentLowBatteryBroadcast = true;
<<<<<<< HEAD
Intent batIntent = new Intent(Intent.ACTION_BATTERY_LOW);
batIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
mContext.sendBroadcast(batIntent);
=======
mContext.sendBroadcast(new Intent(Intent.ACTION_BATTERY_LOW));
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (SHOW_LOW_BATTERY_WARNING) {
if (false) { |
| Solution content |
|---|
&& mBatteryThreshold > BATTERY_THRESHOLD_WARNING))) {
// Broadcast the low battery warning
mSentLowBatteryBroadcast = true;
Intent batIntent = new Intent(Intent.ACTION_BATTERY_LOW);
batIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
mContext.sendBroadcast(batIntent);
if (SHOW_LOW_BATTERY_WARNING) {
if (false) { |
| File |
|---|
| StatusBarPolicy.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
} else if (mBatteryThreshold < BATTERY_THRESHOLD_WARNING) {
if (mSentLowBatteryBroadcast == true) {
mSentLowBatteryBroadcast = false;
<<<<<<< HEAD
Intent batIntent = new Intent(Intent.ACTION_BATTERY_OKAY);
batIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
mContext.sendBroadcast(batIntent);
=======
mContext.sendBroadcast(new Intent(Intent.ACTION_BATTERY_OKAY));
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
if (SHOW_LOW_BATTERY_WARNING) {
if (mLowBatteryDialog != null) { |
| Solution content |
|---|
} else if (mBatteryThreshold < BATTERY_THRESHOLD_WARNING) {
if (mSentLowBatteryBroadcast == true) {
mSentLowBatteryBroadcast = false;
Intent batIntent = new Intent(Intent.ACTION_BATTERY_OKAY);
batIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
mContext.sendBroadcast(batIntent);
}
if (SHOW_LOW_BATTERY_WARNING) {
if (mLowBatteryDialog != null) { |
| File |
|---|
| StatusBarPolicy.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
* ar.userObject contains the orignal value of result.obj
* ar.result is null on success and failure
*/
<<<<<<< HEAD
void sendBurstDtmf(String dtmfString, int on, int off, Message result);
=======
void sendBurstDtmf(String dtmfString, Message result);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* smscPDU is smsc address in PDU form GSM BCD format prefixed |
| Solution content |
|---|
* ar.userObject contains the orignal value of result.obj
* ar.result is null on success and failure
*/
void sendBurstDtmf(String dtmfString, int on, int off, Message result);
/**
* smscPDU is smsc address in PDU form GSM BCD format prefixed |
| File |
|---|
| CommandsInterface.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method interface |
| Chunk |
|---|
| Conflicting content |
|---|
* back to caller.
*
* @param dtmfString is string representing the dialing digit(s) in the active call
<<<<<<< HEAD
* @param on the DTMF ON length in milliseconds, or 0 for default
* @param off the DTMF OFF length in milliseconds, or 0 for default
* @param onCompelte is the callback message when the action is processed by BP
*
*/
void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete);
=======
* @param onCompelte is the callback message when the action is processed by BP
*
*/
void sendBurstDtmf(String dtmfString, Message onComplete);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
/**
* Sets the radio power on/off state (off is sometimes |
| Solution content |
|---|
* back to caller.
*
* @param dtmfString is string representing the dialing digit(s) in the active call
* @param on the DTMF ON length in milliseconds, or 0 for default
* @param off the DTMF OFF length in milliseconds, or 0 for default
* @param onCompelte is the callback message when the action is processed by BP
*
*/
void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete);
/**
* Sets the radio power on/off state (off is sometimes |
| File |
|---|
| Phone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method interface |
| Chunk |
|---|
| Conflicting content |
|---|
return null;
}
<<<<<<< HEAD
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete) {
=======
public void sendBurstDtmf(String dtmfString, Message onComplete) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
} |
| Solution content |
|---|
return null;
}
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete) {
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
} |
| File |
|---|
| PhoneBase.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
return mActivePhone.getCdmaEriIconMode();
}
<<<<<<< HEAD
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){
mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete);
=======
public void sendBurstDtmf(String dtmfString, Message onComplete){
mActivePhone.sendBurstDtmf(dtmfString,onComplete);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
public void exitEmergencyCallbackMode(){ |
| Solution content |
|---|
return mActivePhone.getCdmaEriIconMode();
}
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){
mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete);
}
public void exitEmergencyCallbackMode(){ |
| File |
|---|
| PhoneProxy.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
}
public void
<<<<<<< HEAD
sendBurstDtmf(String dtmfString, int on, int off, Message result) {
RILRequest rr = RILRequest.obtain(RIL_REQUEST_CDMA_BURST_DTMF, result);
rr.mp.writeInt(3);
rr.mp.writeString(dtmfString);
rr.mp.writeString(Integer.toString(on));
rr.mp.writeString(Integer.toString(off));
=======
sendBurstDtmf(String dtmfString, Message result) {
RILRequest rr = RILRequest.obtain(RIL_REQUEST_CDMA_BURST_DTMF, result);
rr.mp.writeString(dtmfString);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
+ " : " + dtmfString); |
| Solution content |
|---|
public void
}
sendBurstDtmf(String dtmfString, int on, int off, Message result) {
RILRequest rr = RILRequest.obtain(RIL_REQUEST_CDMA_BURST_DTMF, result);
rr.mp.writeInt(3);
rr.mp.writeString(dtmfString);
rr.mp.writeString(Integer.toString(on));
rr.mp.writeString(Integer.toString(off));
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
+ " : " + dtmfString); |
| File |
|---|
| RIL.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
*
* |
| Solution content |
|---|
*
* |
| File |
|---|
| TelephonyIntents.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
* |
| Solution content |
|---|
* |
| File |
|---|
| TelephonyIntents.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
*
This is a protected intent that can only be sent * by the system. ======= >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f * * */ |
| Solution content |
|---|
*
This is a protected intent that can only be sent * by the system. * * */ |
| File |
|---|
| TelephonyIntents.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
import android.app.ActivityManagerNative; import android.content.Context; <<<<<<< HEAD import android.content.ContentValues; import android.content.Intent; import android.content.res.Configuration; import android.content.SharedPreferences; import android.database.SQLException; import android.net.Uri; ======= import android.content.Intent; import android.content.SharedPreferences; >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import android.os.AsyncResult; import android.os.Handler; import android.os.Looper; |
| Solution content |
|---|
import android.app.ActivityManagerNative; import android.content.Context; import android.content.ContentValues; import android.content.Intent; import android.content.res.Configuration; import android.content.SharedPreferences; import android.database.SQLException; import android.net.Uri; import android.os.AsyncResult; import android.os.Handler; import android.os.Looper; |
| File |
|---|
| CDMAPhone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import com.android.internal.telephony.TelephonyIntents; import com.android.internal.telephony.TelephonyProperties; <<<<<<< HEAD import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA; import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC; import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY; ======= >>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f import java.util.List; import java.util.Timer; import java.util.TimerTask; |
| Solution content |
|---|
import com.android.internal.telephony.TelephonyIntents; import com.android.internal.telephony.TelephonyProperties; import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA; import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC; import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY; import java.util.List; import java.util.Timer; import java.util.TimerTask; |
| File |
|---|
| CDMAPhone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
String inEcm=SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false");
mIsPhoneInECMState = inEcm.equals("true");
<<<<<<< HEAD
// Sets operator alpha property by retrieving from build-time system property
String operatorAlpha = SystemProperties.get("ro.cdma.home.operator.alpha");
setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha);
// Sets operator numeric property by retrieving from build-time system property
String operatorNumeric = SystemProperties.get("ro.cdma.home.operator.numeric");
setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, operatorNumeric);
// Sets iso country property by retrieving from build-time system property
setIsoCountryProperty(operatorNumeric);
// Sets current entry in the telephony carrier table
updateCurrentCarrierInProvider(operatorNumeric);
// Updates MCC MNC device configuration information
updateMccMncConfiguration(operatorNumeric);
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// Notify voicemails.
notifier.notifyMessageWaitingChanged(this);
} |
| Solution content |
|---|
String inEcm=SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false");
mIsPhoneInECMState = inEcm.equals("true");
// Sets operator alpha property by retrieving from build-time system property
String operatorAlpha = SystemProperties.get("ro.cdma.home.operator.alpha");
setSystemProperty(PROPERTY_ICC_OPERATOR_ALPHA, operatorAlpha);
// Sets operator numeric property by retrieving from build-time system property
String operatorNumeric = SystemProperties.get("ro.cdma.home.operator.numeric");
setSystemProperty(PROPERTY_ICC_OPERATOR_NUMERIC, operatorNumeric);
// Sets iso country property by retrieving from build-time system property
setIsoCountryProperty(operatorNumeric);
// Sets current entry in the telephony carrier table
updateCurrentCarrierInProvider(operatorNumeric);
// Updates MCC MNC device configuration information
updateMccMncConfiguration(operatorNumeric);
// Notify voicemails.
notifier.notifyMessageWaitingChanged(this);
} |
| File |
|---|
| CDMAPhone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
}
public String getSubscriberId() {
return mSST.getImsi();
=======
// Subscriber ID is the combination of MCC+MNC+MIN as CDMA IMSI
// TODO(Moto): Replace with call to mRuimRecords.getIMSI_M() when implemented.
if ((getServiceState().getOperatorNumeric() != null) && (getCdmaMIN() != null)) {
return (getServiceState().getOperatorNumeric() + getCdmaMIN());
} else {
return null;
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
public boolean canConference() { |
| Solution content |
|---|
}
public String getSubscriberId() {
return mSST.getImsi();
}
public boolean canConference() { |
| File |
|---|
| CDMAPhone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Return statement |
| Chunk |
|---|
| Conflicting content |
|---|
mCM.stopDtmf(null);
}
<<<<<<< HEAD
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete) {
=======
public void sendBurstDtmf(String dtmfString, Message onComplete) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
boolean check = true;
for (int itr = 0;itr < dtmfString.length(); itr++) {
if (!PhoneNumberUtils.is12Key(dtmfString.charAt(itr))) { |
| Solution content |
|---|
mCM.stopDtmf(null);
}
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete) {
boolean check = true;
for (int itr = 0;itr < dtmfString.length(); itr++) {
if (!PhoneNumberUtils.is12Key(dtmfString.charAt(itr))) { |
| File |
|---|
| CDMAPhone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
}
}
if ((mCT.state == Phone.State.OFFHOOK)&&(check)) {
<<<<<<< HEAD
mCM.sendBurstDtmf(dtmfString, on, off, onComplete);
=======
mCM.sendBurstDtmf(dtmfString, onComplete);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
}
|
| Solution content |
|---|
}
}
if ((mCT.state == Phone.State.OFFHOOK)&&(check)) {
mCM.sendBurstDtmf(dtmfString, on, off, onComplete);
}
}
|
| File |
|---|
| CDMAPhone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
editor.commit();
}
<<<<<<< HEAD
/**
* Sets PROPERTY_ICC_OPERATOR_ISO_COUNTRY property
*
*/
private void setIsoCountryProperty(String operatorNumeric) {
if (TextUtils.isEmpty(operatorNumeric)) {
setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, "");
} else {
String iso = "";
try {
iso = MccTable.countryCodeForMcc(Integer.parseInt(
operatorNumeric.substring(0,3)));
} catch (NumberFormatException ex) {
Log.w(LOG_TAG, "countryCodeForMcc error" + ex);
} catch (StringIndexOutOfBoundsException ex) {
Log.w(LOG_TAG, "countryCodeForMcc error" + ex);
}
setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, iso);
}
}
/**
* Sets the "current" field in the telephony provider according to the build-time
* operator numeric property
*
* @return true for success; false otherwise.
*/
// TODO(Moto): move this method into PhoneBase, since it looks identical to
// the one in GsmPhone
private boolean updateCurrentCarrierInProvider(String operatorNumeric) {
if (!TextUtils.isEmpty(operatorNumeric)) {
try {
Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
ContentValues map = new ContentValues();
map.put(Telephony.Carriers.NUMERIC, operatorNumeric);
getContext().getContentResolver().insert(uri, map);
return true;
} catch (SQLException e) {
Log.e(LOG_TAG, "Can't store current operator", e);
}
}
return false;
}
/**
* Updates MCC and MNC device configuration information for application retrieving
* correct version of resources
*
*/
private void updateMccMncConfiguration(String operatorNumeric) {
if (operatorNumeric.length() >= 5) {
Configuration config = new Configuration();
config.mcc = Integer.parseInt(operatorNumeric.substring(0,3));
config.mnc = Integer.parseInt(operatorNumeric.substring(3));
try {
ActivityManagerNative.getDefault().updateConfiguration(config);
} catch (RemoteException e) {
Log.e(LOG_TAG, "Can't update configuration", e);
}
}
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} |
| Solution content |
|---|
editor.commit();
}
/**
* Sets PROPERTY_ICC_OPERATOR_ISO_COUNTRY property
*
*/
private void setIsoCountryProperty(String operatorNumeric) {
if (TextUtils.isEmpty(operatorNumeric)) {
setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, "");
} else {
String iso = "";
try {
iso = MccTable.countryCodeForMcc(Integer.parseInt(
operatorNumeric.substring(0,3)));
} catch (NumberFormatException ex) {
Log.w(LOG_TAG, "countryCodeForMcc error" + ex);
} catch (StringIndexOutOfBoundsException ex) {
Log.w(LOG_TAG, "countryCodeForMcc error" + ex);
}
setSystemProperty(PROPERTY_ICC_OPERATOR_ISO_COUNTRY, iso);
}
}
/**
* Sets the "current" field in the telephony provider according to the build-time
* operator numeric property
*
* @return true for success; false otherwise.
*/
// TODO(Moto): move this method into PhoneBase, since it looks identical to
// the one in GsmPhone
private boolean updateCurrentCarrierInProvider(String operatorNumeric) {
if (!TextUtils.isEmpty(operatorNumeric)) {
try {
Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
ContentValues map = new ContentValues();
map.put(Telephony.Carriers.NUMERIC, operatorNumeric);
getContext().getContentResolver().insert(uri, map);
return true;
} catch (SQLException e) {
Log.e(LOG_TAG, "Can't store current operator", e);
}
}
return false;
}
/**
* Updates MCC and MNC device configuration information for application retrieving
* correct version of resources
*
*/
private void updateMccMncConfiguration(String operatorNumeric) {
if (operatorNumeric.length() >= 5) {
Configuration config = new Configuration();
config.mcc = Integer.parseInt(operatorNumeric.substring(0,3));
config.mnc = Integer.parseInt(operatorNumeric.substring(3));
try {
ActivityManagerNative.getDefault().updateConfiguration(config);
} catch (RemoteException e) {
Log.e(LOG_TAG, "Can't update configuration", e);
}
}
}
} |
| File |
|---|
| CDMAPhone.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
try {
registrationState = Integer.parseInt(states[0]);
radioTechnology = Integer.parseInt(states[3]);
<<<<<<< HEAD
baseStationId = Integer.parseInt(states[4]);
=======
baseStationId = Integer.parseInt(states[4], 16);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
baseStationLatitude = Integer.parseInt(states[5], 16);
baseStationLongitude = Integer.parseInt(states[6], 16);
cssIndicator = Integer.parseInt(states[7]); |
| Solution content |
|---|
try {
registrationState = Integer.parseInt(states[0]);
radioTechnology = Integer.parseInt(states[3]);
baseStationId = Integer.parseInt(states[4]);
baseStationLatitude = Integer.parseInt(states[5], 16);
baseStationLongitude = Integer.parseInt(states[6], 16);
cssIndicator = Integer.parseInt(states[7]); |
| File |
|---|
| CdmaServiceStateTracker.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// values are -1 if not available
newCellLoc.setCellLocationData(baseStationId, baseStationLatitude,
<<<<<<< HEAD
baseStationLongitude, systemId, networkId);
=======
baseStationLongitude);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
if (reasonForDenial == 0) {
mRegistrationDeniedReason = ServiceStateTracker.REGISTRATION_DENIED_GEN; |
| Solution content |
|---|
// values are -1 if not available
newCellLoc.setCellLocationData(baseStationId, baseStationLatitude,
baseStationLongitude, systemId, networkId);
if (reasonForDenial == 0) {
mRegistrationDeniedReason = ServiceStateTracker.REGISTRATION_DENIED_GEN; |
| File |
|---|
| CdmaServiceStateTracker.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
} else {
newSS.setOperatorName(opNames[0], opNames[1], opNames[2]);
}
<<<<<<< HEAD
=======
if (!(opNames[2].equals(currentCarrier))) {
// TODO(Moto): jsh asks, "This uses the MCC+MNC of the current registered
// network to set the "current" entry in the APN table. But the correct
// entry should be the MCC+MNC that matches the subscribed operator
// (eg, phone issuer). These can be different when roaming."
try {
// Set the current field of the telephony provider according to
// the CDMA's operator
Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
ContentValues map = new ContentValues();
map.put(Telephony.Carriers.NUMERIC, opNames[2]);
cr.insert(uri, map);
// save current carrier for the next time check
currentCarrier = opNames[2];
} catch (SQLException e) {
Log.e(LOG_TAG, "Can't store current operator", e);
}
} else {
Log.i(LOG_TAG, "current carrier is not changed");
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} else {
Log.w(LOG_TAG, "error parsing opNames");
} |
| Solution content |
|---|
}
} else {
newSS.setOperatorName(opNames[0], opNames[1], opNames[2]);
}
} else {
Log.w(LOG_TAG, "error parsing opNames"); |
| File |
|---|
| CdmaServiceStateTracker.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
if (cdmaSubscription != null && cdmaSubscription.length >= 4) {
mMdn = cdmaSubscription[0];
<<<<<<< HEAD
// TODO: Only grabbing the first SID/NID for now.
if (cdmaSubscription[1] != null) {
String[] sid = cdmaSubscription[1].split(",");
mHomeSystemId = sid.length > 0 ? Integer.parseInt(sid[0]) : 0;
}
if (cdmaSubscription[2] != null) {
String[] nid = cdmaSubscription[2].split(",");
mHomeNetworkId = nid.length > 0 ? Integer.parseInt(nid[0]) : 0;
}
=======
mHomeSystemId = Integer.parseInt(cdmaSubscription[1], 16);
mHomeNetworkId = Integer.parseInt(cdmaSubscription[2], 16);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mMin = cdmaSubscription[3];
} else { |
| Solution content |
|---|
if (cdmaSubscription != null && cdmaSubscription.length >= 4) {
mMdn = cdmaSubscription[0];
// TODO: Only grabbing the first SID/NID for now.
if (cdmaSubscription[1] != null) {
String[] sid = cdmaSubscription[1].split(",");
mHomeSystemId = sid.length > 0 ? Integer.parseInt(sid[0]) : 0;
}
if (cdmaSubscription[2] != null) {
String[] nid = cdmaSubscription[2].split(",");
mHomeNetworkId = nid.length > 0 ? Integer.parseInt(nid[0]) : 0;
}
mMin = cdmaSubscription[3];
} else { |
| File |
|---|
| CdmaServiceStateTracker.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
return mMin;
}
<<<<<<< HEAD
/**
* Returns IMSI as MCC + MNC + MIN
*/
/*package*/ String getImsi() {
// TODO(Moto): When RUIM is enabled, IMSI will come from RUIM
// not build-time props. Moto will provide implementation
// for RUIM-ready case later.
String operatorNumeric = SystemProperties.get(PROPERTY_ICC_OPERATOR_NUMERIC, "");
if (!TextUtils.isEmpty(operatorNumeric) && getCdmaMin() != null) {
return (operatorNumeric + getCdmaMin());
} else {
return null;
}
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} |
| Solution content |
|---|
return mMin;
}
/**
* Returns IMSI as MCC + MNC + MIN
*/
/*package*/ String getImsi() {
// TODO(Moto): When RUIM is enabled, IMSI will come from RUIM
// not build-time props. Moto will provide implementation
// for RUIM-ready case later.
String operatorNumeric = SystemProperties.get(PROPERTY_ICC_OPERATOR_NUMERIC, "");
if (!TextUtils.isEmpty(operatorNumeric) && getCdmaMin() != null) {
return (operatorNumeric + getCdmaMin());
} else {
return null;
}
}
} |
| File |
|---|
| CdmaServiceStateTracker.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
private String mImsi;
private String mMyMobileNumber;
<<<<<<< HEAD
=======
private String mSid;
private String mNid;
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private String mMin2Min1;
private String mPrlVersion; |
| Solution content |
|---|
private String mImsi;
private String mMyMobileNumber;
private String mMin2Min1;
private String mPrlVersion; |
| File |
|---|
| RuimRecords.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
adnCache.reset();
<<<<<<< HEAD
=======
phone.setSystemProperty(TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, null);
phone.setSystemProperty(TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY, null);
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
// recordsRequested is set to false indicating that the SIM
// read requests made so far are not valid. This is set to
// true only when fresh set of read requests are made. |
| Solution content |
|---|
adnCache.reset();
// recordsRequested is set to false indicating that the SIM
// read requests made so far are not valid. This is set to
// true only when fresh set of read requests are made. |
| File |
|---|
| RuimRecords.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
recordsRequested = false;
}
<<<<<<< HEAD
public String getMdnNumber() {
return mMyMobileNumber;
}
public String getCdmaMin() {
return mMin2Min1;
}
/** Returns null if RUIM is not yet ready */
public String getPrlVersion() {
return mPrlVersion;
}
=======
/** Returns null if RUIM is not yet ready */
public String getIMSI_M() {
// TODO(Moto): mImsi is not initialized, fix.
return mImsi;
}
public String getMdnNumber() {
return mMyMobileNumber;
}
public String getCdmaMin() {
return mMin2Min1;
}
/** Returns null if RUIM is not yet ready */
public String getPrlVersion() {
return mPrlVersion;
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
@Override
public void setVoiceMailNumber(String alphaTag, String voiceNumber, Message onComplete){
// In CDMA this is Operator/OEM dependent |
| Solution content |
|---|
recordsRequested = false;
}
public String getMdnNumber() {
return mMyMobileNumber;
}
public String getCdmaMin() {
return mMin2Min1;
}
/** Returns null if RUIM is not yet ready */
public String getPrlVersion() {
return mPrlVersion;
}
@Override
public void setVoiceMailNumber(String alphaTag, String voiceNumber, Message onComplete){
// In CDMA this is Operator/OEM dependent |
| File |
|---|
| RuimRecords.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
m_ota_commited = false;
}
mMyMobileNumber = localTemp[0];
<<<<<<< HEAD
=======
mSid = localTemp[1];
mNid = localTemp[2];
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
mMin2Min1 = localTemp[3];
mPrlVersion = localTemp[4];
|
| Solution content |
|---|
m_ota_commited = false;
}
mMyMobileNumber = localTemp[0];
mMin2Min1 = localTemp[3];
mPrlVersion = localTemp[4];
|
| File |
|---|
| RuimRecords.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Array access |
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
lastFailCause = FailCause.NONE;
receivedDisconnectReq = false;
<<<<<<< HEAD
phone.mCM.setupDataCall(Integer.toString(RILConstants.GSM_PHONE),
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), apn.apn, apn.user,
=======
phone.mCM.setupDataCall(Integer.toString(RILConstants.GSM_PHONE), null, apn.apn, apn.user,
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
apn.password, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
}
|
| Solution content |
|---|
lastFailCause = FailCause.NONE;
receivedDisconnectReq = false;
phone.mCM.setupDataCall(Integer.toString(RILConstants.GSM_PHONE),
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), apn.apn, apn.user,
apn.password, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
}
|
| File |
|---|
| PdpConnection.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
* ar.userObject contains the orignal value of result.obj
* ar.result is null on success and failure
*/
public void sendBurstDtmf(String dtmfString, int on, int off, Message result) {
=======
public void sendBurstDtmf(String dtmfString, Message result) {
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
resultSuccess(result, null);
}
|
| Solution content |
|---|
* ar.userObject contains the orignal value of result.obj
* ar.result is null on success and failure
*/
public void sendBurstDtmf(String dtmfString, int on, int off, Message result) {
resultSuccess(result, null);
}
|
| File |
|---|
| SimulatedCommands.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
}
// Checks that the search UI is not visible.
<<<<<<< HEAD
=======
// This checks both the SearchManager and the SearchManagerService,
// since SearchManager keeps a local variable for the visibility.
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
private void assertSearchNotVisible() {
SearchManager searchManager = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE); |
| Solution content |
|---|
}
// Checks that the search UI is not visible.
private void assertSearchNotVisible() {
SearchManager searchManager = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE); |
| File |
|---|
| SearchManagerTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
assertSearchNotVisible();
}
<<<<<<< HEAD
=======
@MediumTest
public void testSearchDialogState() throws Exception {
SearchManager searchManager = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE);
assertNotNull(searchManager);
Bundle searchState;
// search dialog not visible, so no state should be stored
searchState = searchManager.saveSearchDialog();
assertNull(searchState);
searchManager.startSearch("test search string", true, SEARCHABLE_ACTIVITY, null, false);
searchState = searchManager.saveSearchDialog();
assertNotNull(searchState);
searchManager.stopSearch();
}
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
} |
| Solution content |
|---|
assertSearchNotVisible();
}
} |
| File |
|---|
| SearchManagerTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
<<<<<<< HEAD
Context appContext = si.getActivityContext(mContext);
assertNotNull(appContext);
MoreAsserts.assertNotEqual(appContext, mContext);
assertEquals("Quick Search Box", appContext.getString(si.getHintId()));
assertEquals("Quick Search Box", appContext.getString(si.getLabelId()));
=======
assertEquals("Android Search", appContext.getString(si.getHintId()));
assertEquals("Google", appContext.getString(si.getLabelId()));
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
}
/** |
| Solution content |
|---|
Context appContext = si.getActivityContext(mContext);
assertNotNull(appContext);
MoreAsserts.assertNotEqual(appContext, mContext);
assertEquals("Quick Search Box", appContext.getString(si.getHintId()));
assertEquals("Quick Search Box", appContext.getString(si.getLabelId()));
}
/** |
| File |
|---|
| SearchablesTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// Run tests
runTestAndWaitUntilDone(activity, runner.mTestPath, runner.mTimeoutInMillis);
<<<<<<< HEAD
activity.clearCache();
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
dumpMemoryInfo();
// Kill activity |
| Solution content |
|---|
// Run tests
runTestAndWaitUntilDone(activity, runner.mTestPath, runner.mTimeoutInMillis);
activity.clearCache();
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
dumpMemoryInfo();
// Kill activity |
| File |
|---|
| LoadTestsAutoTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method invocation |
| Try statement |
| Chunk |
|---|
| Conflicting content |
|---|
break;
}
}
<<<<<<< HEAD
public void clearCache() {
mWebView.clearCache(true);
}
=======
>>>>>>> cf4550c3198d6b3d92cdc52707fe70d7cc0caa9f
@Override
protected void onCreate(Bundle icicle) { |
| Solution content |
|---|
break;
}
}
public void clearCache() {
mWebView.clearCache(true);
}
@Override
protected void onCreate(Bundle icicle) { |
| File |
|---|
| TestShellActivity.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Method declaration |