Skip to content

Commit

Permalink
DeviceOwner: Bump dependencies
Browse files Browse the repository at this point in the history
- SDK version 29
- AndroidX
  • Loading branch information
yaraki committed Sep 24, 2019
1 parent f022dfc commit 0d580d3
Show file tree
Hide file tree
Showing 20 changed files with 97 additions and 298 deletions.
73 changes: 20 additions & 53 deletions DeviceOwner/Application/build.gradle
@@ -1,68 +1,35 @@

buildscript {
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
}
}
/*
* Copyright (C) 2019 Google LLC
*
* 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.
*/

apply plugin: 'com.android.application'

repositories {
google()
jcenter()
}

dependencies {


implementation "com.android.support:support-v4:28.0.0"
implementation "com.android.support:support-v13:28.0.0"
implementation "com.android.support:cardview-v7:28.0.0"
implementation "com.android.support:appcompat-v7:28.0.0"






}

// The sample build uses multiple directories to
// keep boilerplate and common code separate from
// the main sample code.
List<String> dirs = [
'main', // main sample code; look here for the interesting stuff.
'common', // components that are reused by multiple samples
'template'] // boilerplate code that is generated by the sample template process

android {
compileSdkVersion 28
compileSdkVersion 29

defaultConfig {
minSdkVersion 21
targetSdkVersion 28
targetSdkVersion 29
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

sourceSets {
main {
dirs.each { dir ->
java.srcDirs "src/${dir}/java"
res.srcDirs "src/${dir}/res"
}
}
androidTest.setRoot('tests')
androidTest.java.srcDirs = ['tests/src']

}

dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
}
14 changes: 8 additions & 6 deletions DeviceOwner/Application/src/main/AndroidManifest.xml
Expand Up @@ -15,23 +15,25 @@
limitations under the License.
-->
<manifest
package="com.example.android.deviceowner"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.android.deviceowner"
android:versionCode="1"
android:versionName="1.0">

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.DeviceOwner">
android:theme="@style/Theme.DeviceOwner"
tools:ignore="GoogleAppIndexingWarning">

<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Expand All @@ -42,9 +44,9 @@
android:permission="android.permission.BIND_DEVICE_ADMIN">
<meta-data
android:name="android.app.device_admin"
android:resource="@xml/device_owner_receiver"/>
android:resource="@xml/device_owner_receiver" />
<intent-filter>
<action android:name="android.app.action.PROFILE_PROVISIONING_COMPLETE"/>
<action android:name="android.app.action.PROFILE_PROVISIONING_COMPLETE" />
</intent-filter>
</receiver>

Expand Down
Expand Up @@ -27,8 +27,8 @@
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.provider.Settings;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Expand Up @@ -17,8 +17,8 @@
package com.example.android.deviceowner;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Expand Up @@ -19,8 +19,8 @@
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;

public class MainActivity extends AppCompatActivity {
Expand All @@ -30,7 +30,7 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_real);
setContentView(R.layout.activity_main);
if (savedInstanceState == null) {
DevicePolicyManager manager =
(DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
Expand Down
Expand Up @@ -15,10 +15,9 @@
limitations under the License.
-->
<FrameLayout
android:id="@+id/container"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.android.deviceowner.MainActivity"
tools:ignore="MergeRootFrame"/>
tools:context="com.example.android.deviceowner.MainActivity" />
Expand Up @@ -29,53 +29,53 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:layout_margin="@dimen/spacing_medium"
android:text="@string/label_global_settings"
android:textAppearance="?android:attr/textAppearanceLarge"/>

<Switch
android:id="@+id/switch_auto_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:paddingEnd="@dimen/margin_medium"
android:paddingStart="@dimen/margin_medium"
android:layout_margin="@dimen/spacing_medium"
android:paddingEnd="@dimen/spacing_medium"
android:paddingStart="@dimen/spacing_medium"
android:text="@string/label_auto_time"
android:textAppearance="?android:attr/textAppearanceMedium"/>

<Switch
android:id="@+id/switch_auto_time_zone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:paddingEnd="@dimen/margin_medium"
android:paddingStart="@dimen/margin_medium"
android:layout_margin="@dimen/spacing_medium"
android:paddingEnd="@dimen/spacing_medium"
android:paddingStart="@dimen/spacing_medium"
android:text="@string/label_auto_time_zone"
android:textAppearance="?android:attr/textAppearanceMedium"/>

<Space
android:layout_width="match_parent"
android:layout_height="@dimen/margin_medium"/>
android:layout_height="@dimen/spacing_medium"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:layout_margin="@dimen/spacing_medium"
android:text="@string/label_launcher"
android:textAppearance="?android:attr/textAppearanceLarge"/>

<Spinner
android:id="@+id/available_launchers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginTop="@dimen/margin_medium"/>
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginTop="@dimen/spacing_medium"/>

<Button
android:id="@+id/set_preferred_launcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_medium"
android:text="@string/set_as_preferred"/>

</LinearLayout>
Expand Down
Expand Up @@ -25,7 +25,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:layout_margin="@dimen/spacing_medium"
android:text="@string/set_up_instruction"
android:textAppearance="?android:attr/textAppearanceMedium"/>

Expand Down

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions DeviceOwner/Application/src/main/res/values-v21/base-colors.xml

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions DeviceOwner/Application/src/main/res/values/base-strings.xml

This file was deleted.

0 comments on commit 0d580d3

Please sign in to comment.