• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Revisão970b19105d2c34fb8b92e5baf5decfd5c5bda7a6 (tree)
Hora2020-05-06 11:35:57
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Mensagem de Log

Android 9.0.0 release 56
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCXrBHQAAKCRDorT+BmrEO
eAyVAJ9gIHQ0nQ6uVhtKHVkJ1gKiOjr/ogCdGkl2P06F/nlURlpQg+BIDThFvzE=
=PSLI
-----END PGP SIGNATURE-----

Merge tag 'android-9.0.0_r56' into pie-x86

Android 9.0.0 release 56

Mudança Sumário

Diff

--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -1050,8 +1050,11 @@ public final class AssetManager implements AutoCloseable {
10501050 }
10511051 }
10521052
1053- if (mObject != 0) {
1054- nativeDestroy(mObject);
1053+ synchronized (this) {
1054+ if (mObject != 0) {
1055+ nativeDestroy(mObject);
1056+ mObject = 0;
1057+ }
10551058 }
10561059 }
10571060
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3116,6 +3116,11 @@
31163116 <permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"
31173117 android:protectionLevel="signature|privileged" />
31183118
3119+ <!-- Allows an application to manage the companion devices.
3120+ @hide -->
3121+ <permission android:name="android.permission.MANAGE_COMPANION_DEVICES"
3122+ android:protectionLevel="signature" />
3123+
31193124 <!-- @SystemApi Allows an application to use SurfaceFlinger's low level features.
31203125 <p>Not for use by third-party applications.
31213126 @hide
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -691,6 +691,17 @@ public class KeyStore {
691691 return onUserPasswordChanged(UserHandle.getUserId(Process.myUid()), newPassword);
692692 }
693693
694+ /**
695+ * Notify keystore about the latest user locked state. This is to support keyguard-bound key.
696+ */
697+ public void onUserLockedStateChanged(int userHandle, boolean locked) {
698+ try {
699+ mBinder.onKeyguardVisibilityChanged(locked, userHandle);
700+ } catch (RemoteException e) {
701+ Log.w(TAG, "Failed to update user locked state " + userHandle, e);
702+ }
703+ }
704+
694705 public int attestKey(
695706 String alias, KeymasterArguments params, KeymasterCertificateChain outChain) {
696707 try {
--- a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
@@ -629,6 +629,11 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
629629 + "associate USER_ID PACKAGE MAC_ADDRESS\n"
630630 + "disassociate USER_ID PACKAGE MAC_ADDRESS";
631631
632+ ShellCmd() {
633+ getContext().enforceCallingOrSelfPermission(
634+ android.Manifest.permission.MANAGE_COMPANION_DEVICES, "ShellCmd");
635+ }
636+
632637 @Override
633638 public int onCommand(String cmd) {
634639 switch (cmd) {
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -7582,7 +7582,7 @@ public class ActivityManagerService extends IActivityManager.Stub
75827582 }
75837583
75847584 @GuardedBy("this")
7585- private final boolean attachApplicationLocked(IApplicationThread thread,
7585+ private boolean attachApplicationLocked(@NonNull IApplicationThread thread,
75867586 int pid, int callingUid, long startSeq) {
75877587
75887588 // Find the application record that is being attached... either via
@@ -7963,6 +7963,9 @@ public class ActivityManagerService extends IActivityManager.Stub
79637963
79647964 @Override
79657965 public final void attachApplication(IApplicationThread thread, long startSeq) {
7966+ if (thread == null) {
7967+ throw new SecurityException("Invalid application interface");
7968+ }
79667969 synchronized (this) {
79677970 int callingPid = Binder.getCallingPid();
79687971 final int callingUid = Binder.getCallingUid();
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -3934,6 +3934,11 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
39343934
39353935 final boolean navigateUpToLocked(ActivityRecord srec, Intent destIntent, int resultCode,
39363936 Intent resultData) {
3937+ if (srec.app == null || srec.app.thread == null) {
3938+ // Nothing to do if the caller is not attached, because this method should be called
3939+ // from an alive activity.
3940+ return false;
3941+ }
39373942 final TaskRecord task = srec.getTask();
39383943 final ArrayList<ActivityRecord> activities = task.mActivities;
39393944 final int start = activities.indexOf(srec);
@@ -3985,14 +3990,14 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
39853990 }
39863991
39873992 if (parent != null && foundParentInTask) {
3993+ final int callingUid = srec.info.applicationInfo.uid;
39883994 final int parentLaunchMode = parent.info.launchMode;
39893995 final int destIntentFlags = destIntent.getFlags();
39903996 if (parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE ||
39913997 parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TASK ||
39923998 parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TOP ||
39933999 (destIntentFlags & Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
3994- parent.deliverNewIntentLocked(srec.info.applicationInfo.uid, destIntent,
3995- srec.packageName);
4000+ parent.deliverNewIntentLocked(callingUid, destIntent, srec.packageName);
39964001 } else {
39974002 try {
39984003 ActivityInfo aInfo = AppGlobals.getPackageManager().getActivityInfo(
@@ -4005,10 +4010,10 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
40054010 .setActivityInfo(aInfo)
40064011 .setResultTo(parent.appToken)
40074012 .setCallingPid(-1)
4008- .setCallingUid(parent.launchedFromUid)
4009- .setCallingPackage(parent.launchedFromPackage)
4013+ .setCallingUid(callingUid)
4014+ .setCallingPackage(srec.packageName)
40104015 .setRealCallingPid(-1)
4011- .setRealCallingUid(parent.launchedFromUid)
4016+ .setRealCallingUid(callingUid)
40124017 .setComponentSpecified(true)
40134018 .execute();
40144019 foundParentInTask = res == ActivityManager.START_SUCCESS;
--- a/services/core/java/com/android/server/am/ActivityStartController.java
+++ b/services/core/java/com/android/server/am/ActivityStartController.java
@@ -328,6 +328,9 @@ public class ActivityStartController {
328328 } else {
329329 callingPid = callingUid = -1;
330330 }
331+ boolean forceNewTask = false;
332+ final int filterCallingUid = ActivityStarter.computeResolveFilterUid(
333+ callingUid, realCallingUid, UserHandle.USER_NULL);
331334 final long origId = Binder.clearCallingIdentity();
332335 try {
333336 synchronized (mService) {
@@ -347,11 +350,13 @@ public class ActivityStartController {
347350
348351 // Don't modify the client's object!
349352 intent = new Intent(intent);
353+ if (forceNewTask) {
354+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
355+ }
350356
351357 // Collect information about the target of the Intent.
352358 ActivityInfo aInfo = mSupervisor.resolveActivity(intent, resolvedTypes[i], 0,
353- null, userId, ActivityStarter.computeResolveFilterUid(
354- callingUid, realCallingUid, UserHandle.USER_NULL));
359+ null, userId, filterCallingUid);
355360 // TODO: New, check if this is correct
356361 aInfo = mService.getActivityInfoForUser(aInfo, userId);
357362
@@ -390,7 +395,17 @@ public class ActivityStartController {
390395 return res;
391396 }
392397
393- resultTo = outActivity[0] != null ? outActivity[0].appToken : null;
398+ final ActivityRecord started = outActivity[0];
399+ if (started != null && started.getUid() == filterCallingUid) {
400+ // Only the started activity which has the same uid as the source caller can
401+ // be the caller of next activity.
402+ resultTo = started.appToken;
403+ forceNewTask = false;
404+ } else {
405+ // Different apps not adjacent to the caller are forced to be new task.
406+ resultTo = null;
407+ forceNewTask = true;
408+ }
394409 }
395410 }
396411 } finally {
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -6991,6 +6991,7 @@ public class NotificationManagerService extends SystemService {
69916991
69926992 @VisibleForTesting
69936993 protected void simulatePackageSuspendBroadcast(boolean suspend, String pkg) {
6994+ checkCallerIsSystemOrShell();
69946995 // only use for testing: mimic receive broadcast that package is (un)suspended
69956996 // but does not actually (un)suspend the package
69966997 final Bundle extras = new Bundle();
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -17656,41 +17656,55 @@ public class PackageManagerService extends IPackageManager.Stub
1765617656 int count = 0;
1765717657 final String packageName = pkg.packageName;
1765817658
17659+ boolean handlesWebUris = false;
17660+ final boolean alreadyVerified;
1765917661 synchronized (mPackages) {
1766017662 // If this is a new install and we see that we've already run verification for this
1766117663 // package, we have nothing to do: it means the state was restored from backup.
17662- if (!replacing) {
17663- IntentFilterVerificationInfo ivi =
17664- mSettings.getIntentFilterVerificationLPr(packageName);
17665- if (ivi != null) {
17666- if (DEBUG_DOMAIN_VERIFICATION) {
17667- Slog.i(TAG, "Package " + packageName+ " already verified: status="
17668- + ivi.getStatusString());
17669- }
17670- return;
17664+ final IntentFilterVerificationInfo ivi =
17665+ mSettings.getIntentFilterVerificationLPr(packageName);
17666+ alreadyVerified = (ivi != null);
17667+ if (!replacing && alreadyVerified) {
17668+ if (DEBUG_DOMAIN_VERIFICATION) {
17669+ Slog.i(TAG, "Package " + packageName + " already verified: status="
17670+ + ivi.getStatusString());
1767117671 }
17672+ return;
1767217673 }
1767317674
17674- // If any filters need to be verified, then all need to be.
17675+ // If any filters need to be verified, then all need to be. In addition, we need to
17676+ // know whether an updating app has any web navigation intent filters, to re-
17677+ // examine handling policy even if not re-verifying.
1767517678 boolean needToVerify = false;
1767617679 for (PackageParser.Activity a : pkg.activities) {
1767717680 for (ActivityIntentInfo filter : a.intents) {
17681+ if (filter.handlesWebUris(true)) {
17682+ handlesWebUris = true;
17683+ }
1767817684 if (filter.needsVerification() && needsNetworkVerificationLPr(filter)) {
1767917685 if (DEBUG_DOMAIN_VERIFICATION) {
1768017686 Slog.d(TAG,
1768117687 "Intent filter needs verification, so processing all filters");
1768217688 }
1768317689 needToVerify = true;
17690+ // It's safe to break out here because filter.needsVerification()
17691+ // can only be true if filter.handlesWebUris(true) returns true, so
17692+ // we've already noted that.
1768417693 break;
1768517694 }
1768617695 }
1768717696 }
1768817697
17698+ // Note whether this app publishes any web navigation handling support at all,
17699+ // and whether there are any web-nav filters that fit the profile for running
17700+ // a verification pass now.
1768917701 if (needToVerify) {
1769017702 final int verificationId = mIntentFilterVerificationToken++;
1769117703 for (PackageParser.Activity a : pkg.activities) {
1769217704 for (ActivityIntentInfo filter : a.intents) {
17693- if (filter.handlesWebUris(true) && needsNetworkVerificationLPr(filter)) {
17705+ // Run verification against hosts mentioned in any web-nav intent filter,
17706+ // even if the filter matches non-web schemes as well
17707+ if (filter.handlesWebUris(false) && needsNetworkVerificationLPr(filter)) {
1769417708 if (DEBUG_DOMAIN_VERIFICATION) Slog.d(TAG,
1769517709 "Verification needed for IntentFilter:" + filter.toString());
1769617710 mIntentFilterVerifier.addOneIntentFilterVerification(
@@ -17703,13 +17717,23 @@ public class PackageManagerService extends IPackageManager.Stub
1770317717 }
1770417718
1770517719 if (count > 0) {
17720+ // count > 0 means that we're running a full verification pass
1770617721 if (DEBUG_DOMAIN_VERIFICATION) Slog.d(TAG, "Starting " + count
1770717722 + " IntentFilter verification" + (count > 1 ? "s" : "")
1770817723 + " for userId:" + userId);
1770917724 mIntentFilterVerifier.startVerifications(userId);
17725+ } else if (alreadyVerified && handlesWebUris) {
17726+ // App used autoVerify in the past, no longer does, but still handles web
17727+ // navigation starts.
17728+ if (DEBUG_DOMAIN_VERIFICATION) {
17729+ Slog.d(TAG, "App changed web filters but no longer verifying - resetting policy");
17730+ }
17731+ synchronized (mPackages) {
17732+ clearIntentFilterVerificationsLPw(packageName, userId);
17733+ }
1771017734 } else {
1771117735 if (DEBUG_DOMAIN_VERIFICATION) {
17712- Slog.d(TAG, "No filters or not all autoVerify for " + packageName);
17736+ Slog.d(TAG, "No web filters or no prior verify policy for " + packageName);
1771317737 }
1771417738 }
1771517739 }
@@ -20619,7 +20643,29 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
2061920643
2062020644 @Override
2062120645 public String getSystemTextClassifierPackageName() {
20622- return mContext.getString(R.string.config_defaultTextClassifierPackage);
20646+ return ensureSystemPackageName(mContext.getString(
20647+ R.string.config_defaultTextClassifierPackage));
20648+ }
20649+
20650+ @Nullable
20651+ private String ensureSystemPackageName(@Nullable String packageName) {
20652+ if (packageName == null) {
20653+ return null;
20654+ }
20655+ long token = Binder.clearCallingIdentity();
20656+ try {
20657+ if (getPackageInfo(packageName, MATCH_FACTORY_ONLY, UserHandle.USER_SYSTEM) == null) {
20658+ PackageInfo packageInfo = getPackageInfo(packageName, 0, UserHandle.USER_SYSTEM);
20659+ if (packageInfo != null) {
20660+ EventLog.writeEvent(0x534e4554, "145981139", packageInfo.applicationInfo.uid,
20661+ "");
20662+ }
20663+ return null;
20664+ }
20665+ } finally {
20666+ Binder.restoreCallingIdentity(token);
20667+ }
20668+ return packageName;
2062320669 }
2062420670
2062520671 @Override
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -1319,6 +1319,7 @@ public final class Settings {
13191319 return false;
13201320 }
13211321 ps.clearDomainVerificationStatusForUser(userId);
1322+ ps.setIntentFilterVerificationInfo(null);
13221323 return true;
13231324 }
13241325
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
@@ -19,8 +19,6 @@ package com.android.server.policy.keyguard;
1919 import android.app.ActivityManager;
2020 import android.content.Context;
2121 import android.os.RemoteException;
22-import android.os.ServiceManager;
23-import android.security.IKeystoreService;
2422 import android.util.Slog;
2523
2624 import com.android.internal.policy.IKeyguardService;
@@ -53,16 +51,11 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub {
5351 private final LockPatternUtils mLockPatternUtils;
5452 private final StateCallback mCallback;
5553
56- IKeystoreService mKeystoreService;
57-
5854 public KeyguardStateMonitor(Context context, IKeyguardService service, StateCallback callback) {
5955 mLockPatternUtils = new LockPatternUtils(context);
6056 mCurrentUserId = ActivityManager.getCurrentUser();
6157 mCallback = callback;
6258
63- mKeystoreService = IKeystoreService.Stub.asInterface(ServiceManager
64- .getService("android.security.keystore"));
65-
6659 try {
6760 service.addStateMonitorCallback(this);
6861 } catch (RemoteException e) {
@@ -95,11 +88,6 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub {
9588 mIsShowing = showing;
9689
9790 mCallback.onShowingChanged();
98- try {
99- mKeystoreService.onKeyguardVisibilityChanged(showing, mCurrentUserId);
100- } catch (RemoteException e) {
101- Slog.e(TAG, "Error informing keystore of screen lock", e);
102- }
10391 }
10492
10593 @Override // Binder interface
@@ -111,10 +99,6 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub {
11199 mCurrentUserId = userId;
112100 }
113101
114- private synchronized int getCurrentUser() {
115- return mCurrentUserId;
116- }
117-
118102 @Override // Binder interface
119103 public void onInputRestrictedStateChanged(boolean inputRestricted) {
120104 mInputRestricted = inputRestricted;
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -48,6 +48,7 @@ import android.os.UserHandle;
4848 import android.os.UserManager;
4949 import android.os.storage.StorageManager;
5050 import android.provider.Settings;
51+import android.security.KeyStore;
5152 import android.service.trust.TrustAgentService;
5253 import android.text.TextUtils;
5354 import android.util.ArraySet;
@@ -123,6 +124,33 @@ public class TrustManagerService extends SystemService {
123124 @GuardedBy("mUserIsTrusted")
124125 private final SparseBooleanArray mUserIsTrusted = new SparseBooleanArray();
125126
127+ /**
128+ * Stores the locked state for users on the device. There are three different type of users
129+ * which are handled slightly differently:
130+ * <ul>
131+ * <li> Users with real keyguard
132+ * These are users who can be switched to ({@link UserInfo#supportsSwitchToByUser()}). Their
133+ * locked state is derived by a combination of user secure state, keyguard state, trust agent
134+ * decision and biometric authentication result. These are updated via
135+ * {@link #refreshDeviceLockedForUser(int)} and result stored in {@link #mDeviceLockedForUser}.
136+ * <li> Managed profiles with unified challenge
137+ * Managed profile with unified challenge always shares the same locked state as their parent,
138+ * so their locked state is not recorded in {@link #mDeviceLockedForUser}. Instead,
139+ * {@link ITrustManager#isDeviceLocked(int)} always resolves their parent user handle and
140+ * queries its locked state instead.
141+ * <li> Managed profiles with separate challenge
142+ * Locked state for profile with separate challenge is determined by other parts of the
143+ * framework (mostly PowerManager) and pushed to TrustManagerService via
144+ * {@link ITrustManager#setDeviceLockedForUser(int, boolean)}. Although in a corner case when
145+ * the profile has a separate but empty challenge, setting its {@link #mDeviceLockedForUser} to
146+ * {@code false} is actually done by {@link #refreshDeviceLockedForUser(int)}.
147+ * </ul>
148+ * TODO: Rename {@link ITrustManager#setDeviceLockedForUser(int, boolean)} to
149+ * {@code setDeviceLockedForProfile} to better reflect its purpose. Unifying
150+ * {@code setDeviceLockedForProfile} and {@link #setDeviceLockedForUser} would also be nice.
151+ * At the moment they both update {@link #mDeviceLockedForUser} but have slightly different
152+ * side-effects: one notifies trust agents while the other sends out a broadcast.
153+ */
126154 @GuardedBy("mDeviceLockedForUser")
127155 private final SparseBooleanArray mDeviceLockedForUser = new SparseBooleanArray();
128156
@@ -412,6 +440,10 @@ public class TrustManagerService extends SystemService {
412440 }
413441 }
414442
443+ /**
444+ * Update the user's locked state. Only applicable to users with a real keyguard
445+ * ({@link UserInfo#supportsSwitchToByUser}) and unsecured managed profiles.
446+ */
415447 private void refreshDeviceLockedForUser(int userId) {
416448 if (userId != UserHandle.USER_ALL && userId < UserHandle.USER_SYSTEM) {
417449 Log.e(TAG, "refreshDeviceLockedForUser(userId=" + userId + "): Invalid user handle,"
@@ -465,6 +497,15 @@ public class TrustManagerService extends SystemService {
465497 }
466498 if (changed) {
467499 dispatchDeviceLocked(userId, locked);
500+
501+ KeyStore.getInstance().onUserLockedStateChanged(userId, locked);
502+ // Also update the user's profiles who have unified challenge, since they
503+ // share the same unlocked state (see {@link #isDeviceLocked(int)})
504+ for (int profileHandle : mUserManager.getEnabledProfileIds(userId)) {
505+ if (mLockPatternUtils.isManagedProfileWithUnifiedChallenge(profileHandle)) {
506+ KeyStore.getInstance().onUserLockedStateChanged(profileHandle, locked);
507+ }
508+ }
468509 }
469510 }
470511
@@ -987,6 +1028,10 @@ public class TrustManagerService extends SystemService {
9871028 return "0x" + Integer.toHexString(i);
9881029 }
9891030
1031+ /**
1032+ * Changes the lock status for the given user. This is only applicable to managed profiles,
1033+ * other users should be handled by Keyguard.
1034+ */
9901035 @Override
9911036 public void setDeviceLockedForUser(int userId, boolean locked) {
9921037 enforceReportPermission();
@@ -996,6 +1041,9 @@ public class TrustManagerService extends SystemService {
9961041 synchronized (mDeviceLockedForUser) {
9971042 mDeviceLockedForUser.put(userId, locked);
9981043 }
1044+
1045+ KeyStore.getInstance().onUserLockedStateChanged(userId, locked);
1046+
9991047 if (locked) {
10001048 try {
10011049 ActivityManager.getService().notifyLockedProfile(userId);
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStackTests.java
@@ -606,6 +606,19 @@ public class ActivityStackTests extends ActivityTestsBase {
606606 assertTrue(listener.changed);
607607 }
608608
609+ @Test
610+ public void testNavigateUpTo() {
611+ final ActivityRecord firstActivity = new ActivityBuilder(mService).setTask(mTask).build();
612+ final ActivityRecord secondActivity = new ActivityBuilder(mService).setTask(mTask)
613+ .setUid(firstActivity.getUid() + 1).build();
614+ secondActivity.app.thread = null;
615+ // This should do nothing from a non-attached caller (app.thread == null).
616+ assertFalse(mStack.navigateUpToLocked(secondActivity /* source record */,
617+ firstActivity.intent /* destIntent */, 0 /* resultCode */, null /* resultData */));
618+ assertFalse(secondActivity.finishing);
619+ assertFalse(firstActivity.finishing);
620+ }
621+
609622 private void verifyShouldSleepActivities(boolean focusedStack,
610623 boolean keyguardGoingAway, boolean displaySleeping, boolean expected) {
611624 mSupervisor.mFocusedStack = focusedStack ? mStack : null;
--- a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
@@ -192,6 +192,8 @@ public class ActivityTestsBase {
192192 aInfo.applicationInfo = new ApplicationInfo();
193193 aInfo.applicationInfo.packageName = mComponent.getPackageName();
194194 aInfo.applicationInfo.uid = mUid;
195+ aInfo.packageName = mComponent.getPackageName();
196+ aInfo.name = mComponent.getClassName();
195197 aInfo.flags |= mActivityFlags;
196198
197199 final ActivityRecord activity = new ActivityRecord(mService, null /* caller */,