Merge "Change ANDROID_ID for Instant Apps" into oc-dev am: 904e6cad28

am: 97eecf8d09

Change-Id: Ibbea27ef27bfaa43649d0ff86e23f0ffd559d7f6
This commit is contained in:
Chad Brubaker
2017-04-20 13:34:06 +00:00
committed by android-build-merger
9 changed files with 113 additions and 0 deletions

View File

@@ -2630,4 +2630,13 @@ public class ApplicationPackageManager extends PackageManager {
throw e.rethrowAsRuntimeException();
}
}
@Override
public String getInstantAppAndroidId(String packageName, UserHandle user) {
try {
return mPM.getInstantAppAndroidId(packageName, user.getIdentifier());
} catch (RemoteException e) {
throw e.rethrowAsRuntimeException();
}
}
}

View File

@@ -634,4 +634,6 @@ interface IPackageManager {
ComponentName getInstantAppResolverSettingsComponent();
ComponentName getInstantAppInstallerComponent();
String getInstantAppAndroidId(String packageName, int userId);
}

View File

@@ -6322,4 +6322,12 @@ public abstract class PackageManager {
*/
@SystemApi
public abstract ComponentName getInstantAppInstallerComponent();
/**
* Return the Android Id for a given Instant App.
*
* @see {@link android.provider.Settings.Secure#ANDROID_ID}
* @hide
*/
public abstract String getInstantAppAndroidId(String packageName, @NonNull UserHandle user);
}

View File

@@ -5082,6 +5082,10 @@ public final class Settings {
* (available on certain devices running Android 4.2 or higher), each user appears as a
* completely separate device, so the {@code ANDROID_ID} value is unique to each
* user.</p>
*
* <p class="note"><strong>Note:</strong> If the caller is an Instant App the id is scoped
* to the Instant App, it is generated when the Instant App is first installed and reset if
* the user clears the Instant App.
*/
public static final String ANDROID_ID = "android_id";