Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87bba1ee authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Move DeviceAdmin APIs to android.app.admin.

Also add ability for admins to hide themselves when not in use,
a facility for admins to not allow other admins to reset
their password, and debug dumping.
parent 8c49df4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ LOCAL_SRC_FILES += \
	core/java/android/app/IActivityWatcher.aidl \
	core/java/android/app/IAlarmManager.aidl \
	core/java/android/app/IBackupAgent.aidl \
    core/java/android/app/IDevicePolicyManager.aidl \
	core/java/android/app/IInstrumentationWatcher.aidl \
	core/java/android/app/INotificationManager.aidl \
	core/java/android/app/ISearchManager.aidl \
@@ -93,6 +92,7 @@ LOCAL_SRC_FILES += \
	core/java/android/app/IUiModeManager.aidl \
	core/java/android/app/IWallpaperManager.aidl \
	core/java/android/app/IWallpaperManagerCallback.aidl \
	core/java/android/app/admin/IDevicePolicyManager.aidl \
	core/java/android/backup/IBackupManager.aidl \
	core/java/android/backup/IRestoreObserver.aidl \
	core/java/android/backup/IRestoreSession.aidl \
+2826 −2799

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ import android.view.accessibility.AccessibilityManager;
import android.view.inputmethod.InputMethodManager;
import android.accounts.AccountManager;
import android.accounts.IAccountManager;
import android.app.admin.DevicePolicyManager;

import com.android.internal.os.IDropBoxManagerService;

+18 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package android.app;
package android.app.admin;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -149,6 +149,11 @@ public final class DeviceAdminInfo implements Parcelable {
     */
    final ResolveInfo mReceiver;
    
    /**
     * Whether this should be visible to the user.
     */
    boolean mVisible;
    
    /**
     * The policies this administrator needs access to.
     */
@@ -190,7 +195,10 @@ public final class DeviceAdminInfo implements Parcelable {
            }
            
            TypedArray sa = context.getResources().obtainAttributes(attrs,
                    com.android.internal.R.styleable.Wallpaper);
                    com.android.internal.R.styleable.DeviceAdmin);

            mVisible = sa.getBoolean(
                    com.android.internal.R.styleable.DeviceAdmin_visible, true);
            
            sa.recycle();
            
@@ -300,6 +308,14 @@ public final class DeviceAdminInfo implements Parcelable {
        return mReceiver.loadIcon(pm);
    }
    
    /**
     * Returns whether this device admin would like to be visible to the
     * user, even when it is not enabled.
     */
    public boolean isVisible() {
        return mVisible;
    }
    
    /**
     * Return true if the device admin has requested that it be able to use
     * the given policy control.  The possible policy identifier inputs are:
+2 −1
Original line number Diff line number Diff line
@@ -14,10 +14,11 @@
 * limitations under the License.
 */

package android.app;
package android.app.admin;

import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
Loading