From 3dbb8baa4b2f154b512fd48b4f162af98ecfcb22 Mon Sep 17 00:00:00 2001
From: Bruno Martins <bgcngm@gmail.com>
Date: Tue, 9 Jul 2019 22:31:00 +0100
Subject: [PATCH] onclite: Doze: Migrate to androidx

Change-Id: Ifaa67283a3437549a2304088a0ce377b399da19f
Signed-off-by: Dhina17 <dhinalogu@gmail.com>
---
 doze/Android.mk                                       |  7 +------
 doze/proguard.flags                                   |  5 -----
 .../lineageos/settings/doze/DozeSettingsFragment.java | 11 +++++------
 doze/src/org/lineageos/settings/doze/Utils.java       |  2 +-
 4 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/doze/Android.mk b/doze/Android.mk
index 76a8405..90539d3 100644
--- a/doze/Android.mk
+++ b/doze/Android.mk
@@ -13,12 +13,7 @@ LOCAL_PRIVILEGED_MODULE := true
 LOCAL_USE_AAPT2 := true
 
 LOCAL_STATIC_ANDROID_LIBRARIES := \
-    android-support-v4 \
-    android-support-v13 \
-    android-support-v7-recyclerview \
-    android-support-v7-preference \
-    android-support-v7-appcompat \
-    android-support-v14-preference
+    androidx.preference_preference
 
 LOCAL_RESOURCE_DIR := \
     $(LOCAL_PATH)/res \
diff --git a/doze/proguard.flags b/doze/proguard.flags
index b1cabdb..f6d7a5b 100644
--- a/doze/proguard.flags
+++ b/doze/proguard.flags
@@ -1,8 +1,3 @@
--keepclasseswithmembers class * {
-    public <init>(android.content.Context, android.util.AttributeSet);
-}
-
--keep class ** extends android.support.v14.preference.PreferenceFragment
 -keep class org.lineageos.settings.doze.* {
   *;
 }
diff --git a/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java b/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java
index fd1756e..6040e38 100644
--- a/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java
+++ b/doze/src/org/lineageos/settings/doze/DozeSettingsFragment.java
@@ -22,15 +22,14 @@ import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.app.DialogFragment;
-import android.content.Context;
 import android.content.DialogInterface;
 import android.content.SharedPreferences;
 import android.os.Bundle;
-import android.support.v14.preference.PreferenceFragment;
-import android.support.v14.preference.SwitchPreference;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.PreferenceCategory;
-import android.support.v7.preference.Preference.OnPreferenceChangeListener;
+import androidx.preference.PreferenceFragment;
+import androidx.preference.SwitchPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.Preference.OnPreferenceChangeListener;
 import android.view.LayoutInflater;
 import android.view.MenuItem;
 import android.view.View;
diff --git a/doze/src/org/lineageos/settings/doze/Utils.java b/doze/src/org/lineageos/settings/doze/Utils.java
index 9cd7fdd..910db0f 100644
--- a/doze/src/org/lineageos/settings/doze/Utils.java
+++ b/doze/src/org/lineageos/settings/doze/Utils.java
@@ -21,7 +21,7 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.os.UserHandle;
-import android.support.v7.preference.PreferenceManager;
+import androidx.preference.PreferenceManager;
 import android.provider.Settings;
 import android.util.Log;
 
-- 
GitLab