diff options
| author | Svet Ganov <svetoslavganov@google.com> | 2016-09-09 16:01:32 -0700 |
|---|---|---|
| committer | Svetoslav Ganov <svetoslavganov@google.com> | 2016-09-11 18:44:38 +0000 |
| commit | 37e43275eeee064947f1b448cdf129bea39cf918 (patch) | |
| tree | ae0516b8882c867cd54c3a339978bb1630e61fe4 /core/java/android/app/ApplicationThreadNative.java | |
| parent | 1fd68ad92c56b59a4b2550c351e87e819f3486f9 (diff) | |
Move device serial behing a permission
Build serial is non-user resettable freely available deivice
identifier. It can be used by ad-netowrks to track the user
across apps which violates the user's privacy.
This change deprecates Build.SERIAL and adds a new Build.getSerial()
API which requires holding the read_phone_state permission.
The Build.SERIAL value is set to "undefined" for apps targeting
high enough SDK and for legacy app the value is still available.
bug:31402365
Change-Id: Iddd13430b2bd1d9ab4966e31038ecabdbdcec06d
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
| -rw-r--r-- | core/java/android/app/ApplicationThreadNative.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index 3063d98c27a3..e41c84169589 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -301,10 +301,11 @@ public abstract class ApplicationThreadNative extends Binder CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data); HashMap<String, IBinder> services = data.readHashMap(null); Bundle coreSettings = data.readBundle(); + String buildSerial = data.readString(); bindApplication(packageName, info, providers, testName, profilerInfo, testArgs, testWatcher, uiAutomationConnection, testMode, enableBinderTracking, trackAllocation, restrictedBackupMode, persistent, config, compatInfo, services, - coreSettings); + coreSettings, buildSerial); return true; } @@ -1058,7 +1059,8 @@ class ApplicationThreadProxy implements IApplicationThread { IUiAutomationConnection uiAutomationConnection, int debugMode, boolean enableBinderTracking, boolean trackAllocation, boolean restrictedBackupMode, boolean persistent, Configuration config, CompatibilityInfo compatInfo, - Map<String, IBinder> services, Bundle coreSettings) throws RemoteException { + Map<String, IBinder> services, Bundle coreSettings, String buildSerial) + throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeString(packageName); @@ -1088,6 +1090,7 @@ class ApplicationThreadProxy implements IApplicationThread { compatInfo.writeToParcel(data, 0); data.writeMap(services); data.writeBundle(coreSettings); + data.writeString(buildSerial); mRemote.transact(BIND_APPLICATION_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); |
