├── settings.gradle ├── screenshots ├── main.png └── big_icon.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── Application ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── tile.9.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ │ ├── base-colors.xml │ │ │ └── base-template-styles.xml │ │ ├── values-v11 │ │ │ └── template-styles.xml │ │ ├── values │ │ │ ├── ids.xml │ │ │ ├── base-strings.xml │ │ │ ├── template-dimens.xml │ │ │ ├── template-styles.xml │ │ │ └── strings.xml │ │ ├── values-sw600dp │ │ │ ├── template-dimens.xml │ │ │ └── template-styles.xml │ │ ├── xml │ │ │ └── enforcer_device_admin_receiver.xml │ │ └── layout │ │ │ ├── fragment_item_add.xml │ │ │ ├── item.xml │ │ │ ├── fragment_status.xml │ │ │ ├── activity_main_real.xml │ │ │ ├── fragment_setup_profile.xml │ │ │ └── fragment_app_restriction_enforcer.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── apprestrictionenforcer │ │ │ ├── Constants.java │ │ │ ├── EasyTextWatcher.java │ │ │ ├── EnableProfileActivity.java │ │ │ ├── EnforcerDeviceAdminReceiver.java │ │ │ ├── ItemAddFragment.java │ │ │ ├── MainActivity.java │ │ │ ├── SetupProfileFragment.java │ │ │ ├── StatusFragment.java │ │ │ └── AppRestrictionEnforcerFragment.java │ │ └── AndroidManifest.xml └── build.gradle ├── README.md ├── .google └── packaging.yaml ├── CONTRIBUTING.md ├── CONTRIB.md ├── gradlew.bat ├── gradlew └── LICENSE /settings.gradle: -------------------------------------------------------------------------------- 1 | include 'Application' 2 | -------------------------------------------------------------------------------- /screenshots/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/screenshots/main.png -------------------------------------------------------------------------------- /screenshots/big_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/screenshots/big_icon.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Application/src/main/res/drawable-hdpi/tile.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/Application/src/main/res/drawable-hdpi/tile.9.png -------------------------------------------------------------------------------- /Application/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/Application/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Application/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/Application/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Application/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/Application/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Application/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-AppRestrictionEnforcer/master/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | Android AppRestrictionEnforcer Sample 3 | ===================================== 4 | 5 | This repo has been migrated to [github.com/android/enterprise][1]. Please check that repo for future updates. Thank you! 6 | 7 | [1]: https://github.com/android/enterprise 8 | 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Sep 09 09:42:15 JST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip -------------------------------------------------------------------------------- /.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | 2 | # GOOGLE SAMPLE PACKAGING DATA 3 | # 4 | # This file is used by Google as part of our samples packaging process. 5 | # End users may safely ignore this file. It has no relevance to other systems. 6 | --- 7 | status: PUBLISHED 8 | technologies: [Android] 9 | categories: [Device Admin] 10 | languages: [Java] 11 | solutions: [Mobile] 12 | github: android-AppRestrictionEnforcer 13 | level: ADVANCED 14 | icon: screenshots/big_icon.png 15 | apiRefs: 16 | - android:android.app.admin.DevicePolicyManager 17 | - android:android.content.RestrictionEntry 18 | - android:android.content.RestrictionsManager 19 | license: apache2 20 | -------------------------------------------------------------------------------- /Application/src/main/res/values-v21/base-colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Application/src/main/res/values-v11/template-styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Application/src/main/res/values-sw600dp/template-dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | @dimen/margin_huge 22 | @dimen/margin_medium 23 | 24 | 25 | -------------------------------------------------------------------------------- /Application/src/main/res/values-sw600dp/template-styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Application/src/main/res/xml/enforcer_device_admin_receiver.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Application/src/main/java/com/example/android/apprestrictionenforcer/Constants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.apprestrictionenforcer; 18 | 19 | public interface Constants { 20 | 21 | /** 22 | * Package name of the AppRestrictionSchema sample. 23 | */ 24 | String PACKAGE_NAME_APP_RESTRICTION_SCHEMA = "com.example.android.apprestrictionschema"; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Application/src/main/res/values/base-strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | AppRestrictionEnforcer 20 | 21 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Application/src/main/res/layout/fragment_item_add.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 |