Loading core/java/android/app/ConnectionSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; /** @hide */ public class ConnectionSettings implements Parcelable { public final class ConnectionSettings implements Parcelable { private int mConnectionId; private int mValue; Loading core/java/android/app/Profile.java +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; public class Profile implements Parcelable { public final class Profile implements Parcelable { private String mName; private int mNameResId; Loading core/java/android/app/ProfileGroup.java +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ import android.util.Log; import java.io.IOException; import java.util.UUID; public class ProfileGroup implements Parcelable { public final class ProfileGroup implements Parcelable { private static final String TAG = "ProfileGroup"; private String mName; Loading core/java/android/app/StreamSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ import android.os.Parcelable; import java.io.IOException; /** @hide */ public class StreamSettings implements Parcelable{ public final class StreamSettings implements Parcelable{ private int mStreamId; private int mValue; Loading services/java/com/android/server/ProfileManagerService.java +8 −10 Original line number Diff line number Diff line Loading @@ -182,19 +182,16 @@ public class ProfileManagerService extends IProfileManager.Stub { if (doinit) { if (LOCAL_LOGV) Log.v(TAG, "setActiveProfile(Profile, boolean) - Running init"); // Call profile's "doSelect" mActiveProfile.doSelect(mContext); /* * Clearing the calling identity AFTER the profile doSelect * to reduce security risks based on an external class extending the * Profile class and embedding malicious code to be executed with "system" rights. * This isn't a fool-proof safety measure, but it's better than giving * the child class system-level access by simply calling setActiveProfile. * * We need to clear the permissions to broadcast INTENT_ACTION_PROFILE_SELECTED. * We need to clear the caller's identity in order to * - allow the profile switch to execute actions not included in the caller's permissions * - broadcast INTENT_ACTION_PROFILE_SELECTED */ long token = clearCallingIdentity(); // Call profile's "doSelect" mActiveProfile.doSelect(mContext); // Notify other applications of newly selected profile. Intent broadcast = new Intent(INTENT_ACTION_PROFILE_SELECTED); broadcast.putExtra("name", mActiveProfile.getName()); Loading @@ -202,6 +199,7 @@ public class ProfileManagerService extends IProfileManager.Stub { broadcast.putExtra("lastName", lastProfile.getName()); broadcast.putExtra("lastUuid", lastProfile.getUuid().toString()); mContext.sendBroadcast(broadcast); restoreCallingIdentity(token); persistIfDirty(); } Loading Loading
core/java/android/app/ConnectionSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; /** @hide */ public class ConnectionSettings implements Parcelable { public final class ConnectionSettings implements Parcelable { private int mConnectionId; private int mValue; Loading
core/java/android/app/Profile.java +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; public class Profile implements Parcelable { public final class Profile implements Parcelable { private String mName; private int mNameResId; Loading
core/java/android/app/ProfileGroup.java +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ import android.util.Log; import java.io.IOException; import java.util.UUID; public class ProfileGroup implements Parcelable { public final class ProfileGroup implements Parcelable { private static final String TAG = "ProfileGroup"; private String mName; Loading
core/java/android/app/StreamSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ import android.os.Parcelable; import java.io.IOException; /** @hide */ public class StreamSettings implements Parcelable{ public final class StreamSettings implements Parcelable{ private int mStreamId; private int mValue; Loading
services/java/com/android/server/ProfileManagerService.java +8 −10 Original line number Diff line number Diff line Loading @@ -182,19 +182,16 @@ public class ProfileManagerService extends IProfileManager.Stub { if (doinit) { if (LOCAL_LOGV) Log.v(TAG, "setActiveProfile(Profile, boolean) - Running init"); // Call profile's "doSelect" mActiveProfile.doSelect(mContext); /* * Clearing the calling identity AFTER the profile doSelect * to reduce security risks based on an external class extending the * Profile class and embedding malicious code to be executed with "system" rights. * This isn't a fool-proof safety measure, but it's better than giving * the child class system-level access by simply calling setActiveProfile. * * We need to clear the permissions to broadcast INTENT_ACTION_PROFILE_SELECTED. * We need to clear the caller's identity in order to * - allow the profile switch to execute actions not included in the caller's permissions * - broadcast INTENT_ACTION_PROFILE_SELECTED */ long token = clearCallingIdentity(); // Call profile's "doSelect" mActiveProfile.doSelect(mContext); // Notify other applications of newly selected profile. Intent broadcast = new Intent(INTENT_ACTION_PROFILE_SELECTED); broadcast.putExtra("name", mActiveProfile.getName()); Loading @@ -202,6 +199,7 @@ public class ProfileManagerService extends IProfileManager.Stub { broadcast.putExtra("lastName", lastProfile.getName()); broadcast.putExtra("lastUuid", lastProfile.getUuid().toString()); mContext.sendBroadcast(broadcast); restoreCallingIdentity(token); persistIfDirty(); } Loading