* commit '846fe415350bd0668f8a2190d1c78cf07c97ef60': Rename UserId to UserHandle.
This commit is contained in:
@@ -32,7 +32,7 @@ import android.os.ServiceManager;
|
||||
import android.os.StrictMode;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.UserId;
|
||||
import android.os.UserHandle;
|
||||
import android.view.IWindowManager;
|
||||
import android.view.Surface;
|
||||
|
||||
@@ -953,7 +953,7 @@ public class Monkey {
|
||||
intent.addCategory(category);
|
||||
}
|
||||
List<ResolveInfo> mainApps = mPm.queryIntentActivities(intent, null, 0,
|
||||
UserId.myUserId());
|
||||
UserHandle.myUserId());
|
||||
if (mainApps == null || mainApps.size() == 0) {
|
||||
System.err.println("// Warning: no activities found for category " + category);
|
||||
continue;
|
||||
|
||||
@@ -24,7 +24,7 @@ import android.content.pm.IPackageManager;
|
||||
import android.graphics.Rect;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.UserId;
|
||||
import android.os.UserHandle;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
|
||||
@@ -140,7 +140,7 @@ public class MonkeySourceNetworkViews {
|
||||
try {
|
||||
AccessibilityNodeInfo node = event.getSource();
|
||||
String packageName = node.getPackageName().toString();
|
||||
ApplicationInfo appInfo = sPm.getApplicationInfo(packageName, 0, UserId.myUserId());
|
||||
ApplicationInfo appInfo = sPm.getApplicationInfo(packageName, 0, UserHandle.myUserId());
|
||||
Class<?> klass;
|
||||
klass = getIdClass(packageName, appInfo.sourceDir);
|
||||
return klass.getField(stringId).getInt(null);
|
||||
@@ -195,7 +195,7 @@ public class MonkeySourceNetworkViews {
|
||||
String packageName = node.getPackageName().toString();
|
||||
try{
|
||||
Class<?> klass;
|
||||
ApplicationInfo appInfo = sPm.getApplicationInfo(packageName, 0, UserId.myUserId());
|
||||
ApplicationInfo appInfo = sPm.getApplicationInfo(packageName, 0, UserHandle.myUserId());
|
||||
klass = getIdClass(packageName, appInfo.sourceDir);
|
||||
StringBuilder fieldBuilder = new StringBuilder();
|
||||
Field[] fields = klass.getFields();
|
||||
|
||||
@@ -150,7 +150,11 @@ public class FragmentLayout extends Activity {
|
||||
// Execute a transaction, replacing any existing fragment
|
||||
// with this one inside the frame.
|
||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.details, details);
|
||||
if (index == 0) {
|
||||
ft.replace(R.id.details, details);
|
||||
} else {
|
||||
ft.replace(R.id.a_item, details);
|
||||
}
|
||||
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
@@ -153,7 +153,11 @@ public class FragmentLayoutSupport extends FragmentActivity {
|
||||
// Execute a transaction, replacing any existing fragment
|
||||
// with this one inside the frame.
|
||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.details, details);
|
||||
if (index == 0) {
|
||||
ft.replace(R.id.details, details);
|
||||
} else {
|
||||
ft.replace(R.id.a_item, details);
|
||||
}
|
||||
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user