Коммит ccedbf13 создал по автору Radch-enko's avatar Radch-enko
Просмотр файлов

Feature: add device admin support and lock task mode configuration

- Added `AdminReceiver` class to support device administration functionality.
- Updated `AndroidManifest.xml` with `AdminReceiver` declaration and `lockTaskMode` attribute for locking tasks.
- Introduced `device_admin_receiver.xml` with supported admin policies.
владелец cfa103e8
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="BookingApp" android:label="BookingApp"
android:name=".App" android:name=".App"
android:theme="@android:style/Theme.Material.NoActionBar"> android:theme="@android:style/Theme.Material.NoActionBar"
android:lockTaskMode="if_whitelisted">
<activity <activity
android:name=".AppActivity" android:name=".AppActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
...@@ -18,6 +19,19 @@ ...@@ -18,6 +19,19 @@
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<receiver
android:name=".AdminReceiver"
android:exported="true"
android:permission="android.permission.BIND_DEVICE_ADMIN">
<meta-data
android:name="android.app.device_admin"
android:resource="@xml/device_admin_receiver" />
<intent-filter>
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
<action android:name="android.intent.action.PROFILE_PROVISIONING_COMPLETE" />
</intent-filter>
</receiver>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
package band.effective.office.tablet
import android.app.admin.DeviceAdminReceiver
import android.content.ComponentName
import android.content.Context
class AdminReceiver : DeviceAdminReceiver() {
companion object {
fun getComponentName(context: Context): ComponentName {
return ComponentName(context.applicationContext, AdminReceiver::class.java)
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2016 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<device-admin>
<uses-policies>
<limit-password />
<watch-login />
<reset-password />
<force-lock />
<wipe-data />
<expire-password />
<encrypted-storage />
<disable-camera />
<disable-keyguard-features />
<reset-password />
<wipe-data />
<expire-password />
<set-global-proxy />
</uses-policies>
</device-admin>
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать