summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Amith Yamasani <yamasani@google.com> 2013-06-27 15:12:01 -0700
committer The Android Automerger <android-build@android.com> 2013-06-28 14:37:13 -0700
commit937db2d48f1af5f82cbdfc4e2c1bb02a58f9e4bf (patch)
tree21d4791d2f21bed6ff69356e905f276ea97a5994
parentf63fdf8680b4f17b815a4173924c063983abfdf2 (diff)
When a new user AID is generated, dump it to dropbox
Bug: 9595851 Change-Id: I6fde757eed84d7914db180e80c9d68448b3e5780
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 659651b887c4..017750443736 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -43,6 +43,7 @@ import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
+import android.os.DropBoxManager;
import android.os.FileObserver;
import android.os.ParcelFileDescriptor;
import android.os.SystemProperties;
@@ -107,6 +108,9 @@ public class SettingsProvider extends ContentProvider {
*/
static final HashSet<String> sSecureGlobalKeys;
static final HashSet<String> sSystemGlobalKeys;
+
+ private static final String DROPBOX_TAG_USERLOG = "restricted_profile_ssaid";
+
static {
// Keys (name column) from the 'secure' table that are now in the owner user's 'global'
// table, shared across all users
@@ -486,6 +490,16 @@ public class SettingsProvider extends ContentProvider {
}
Slog.d(TAG, "Generated and saved new ANDROID_ID [" + newAndroidIdValue
+ "] for user " + userHandle);
+ // Write a dropbox entry if it's a restricted profile
+ if (mUserManager.getUserInfo(userHandle).isRestricted()) {
+ DropBoxManager dbm = (DropBoxManager)
+ getContext().getSystemService(Context.DROPBOX_SERVICE);
+ if (dbm != null && dbm.isTagEnabled(DROPBOX_TAG_USERLOG)) {
+ dbm.addText(DROPBOX_TAG_USERLOG, System.currentTimeMillis()
+ + ",restricted_profile_ssaid,"
+ + newAndroidIdValue + "\n");
+ }
+ }
}
return true;
} finally {