From d361d393299e31b771e5a10653d4185cd6b0759e Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 28 Dec 2020 17:48:09 +0530 Subject: [PATCH 1/3] update ui skd , icons --- Android.mk | 8 ++++++-- proguard.flags | 1 + res/layout/structured_name_editor_view.xml | 2 +- src/com/android/contacts/editor/EditorUiUtils.java | 6 +++--- src/com/android/contacts/editor/RawContactEditorView.java | 2 +- .../contacts/quickcontact/QuickContactActivity.java | 8 ++++---- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Android.mk b/Android.mk index 2a3a4857bf..7e0b1e4a5a 100644 --- a/Android.mk +++ b/Android.mk @@ -23,11 +23,15 @@ LOCAL_STATIC_ANDROID_LIBRARIES := \ androidx.palette_palette \ androidx.legacy_legacy-support-v4 +LOCAL_JAVA_LIBRARIES := voip-common + LOCAL_STATIC_JAVA_LIBRARIES := \ android-common \ com.android.vcard \ guava \ - libphonenumber + libphonenumber \ + org.lineageos.platform.sdk \ + LOCAL_USE_AAPT2 := true @@ -43,7 +47,7 @@ LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.contacts LOCAL_PROGUARD_FLAG_FILES := proguard.flags -LOCAL_SDK_VERSION := current +LOCAL_PRIVATE_PLATFORM_APIS := true LOCAL_MIN_SDK_VERSION := 21 include $(BUILD_PACKAGE) diff --git a/proguard.flags b/proguard.flags index 782aa7eea1..3847e9b23c 100644 --- a/proguard.flags +++ b/proguard.flags @@ -118,3 +118,4 @@ -keepclassmembers class * { @com.google.common.annotations.VisibleForTesting *; } +-dontwarn lineageos.** \ No newline at end of file diff --git a/res/layout/structured_name_editor_view.xml b/res/layout/structured_name_editor_view.xml index f5b2a675da..201fe094ca 100644 --- a/res/layout/structured_name_editor_view.xml +++ b/res/layout/structured_name_editor_view.xml @@ -31,7 +31,7 @@ diff --git a/src/com/android/contacts/editor/EditorUiUtils.java b/src/com/android/contacts/editor/EditorUiUtils.java index 35f107ecdd..9b52e997d0 100644 --- a/src/com/android/contacts/editor/EditorUiUtils.java +++ b/src/com/android/contacts/editor/EditorUiUtils.java @@ -157,7 +157,7 @@ public class EditorUiUtils { switch (mimeType) { case StructuredName.CONTENT_ITEM_TYPE: return ResourcesCompat.getDrawable(context.getResources(), - R.drawable.quantum_ic_person_vd_theme_24, null); + lineageos.platform.R.drawable.ic_person_stroked, null); case StructuredPostal.CONTENT_ITEM_TYPE: return ResourcesCompat.getDrawable(context.getResources(), R.drawable.quantum_ic_place_vd_theme_24, null); @@ -166,10 +166,10 @@ public class EditorUiUtils { R.drawable.quantum_ic_dialer_sip_vd_theme_24, null); case Phone.CONTENT_ITEM_TYPE: return ResourcesCompat.getDrawable(context.getResources(), - R.drawable.quantum_ic_phone_vd_theme_24, null); + lineageos.platform.R.drawable.ic_phone, null); case Im.CONTENT_ITEM_TYPE: return ResourcesCompat.getDrawable(context.getResources(), - R.drawable.quantum_ic_message_vd_theme_24, null); + lineageos.platform.R.drawable.ic_message, null); case Event.CONTENT_ITEM_TYPE: return ResourcesCompat.getDrawable(context.getResources(), R.drawable.quantum_ic_event_vd_theme_24, null); diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java index 19da5bc81c..5328723045 100644 --- a/src/com/android/contacts/editor/RawContactEditorView.java +++ b/src/com/android/contacts/editor/RawContactEditorView.java @@ -661,7 +661,7 @@ public class RawContactEditorView extends LinearLayout implements View.OnClickLi primary = mCurrentRawContactDelta.getPrimaryEntry(StructuredName.CONTENT_ITEM_TYPE); final String name = primary != null ? primary.getAsString(StructuredName.DISPLAY_NAME) : getContext().getString(R.string.missing_name); - final Drawable nameDrawable = context.getDrawable(R.drawable.quantum_ic_person_vd_theme_24); + final Drawable nameDrawable = context.getDrawable(lineageos.platform.R.drawable.ic_person_stroked) final String nameContentDescription = res.getString(R.string.header_name_entry); bindData(nameDrawable, nameContentDescription, name, /* type */ null, /* isFirstEntry */ true); diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 81a8946947..1952d50f90 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -1186,7 +1186,7 @@ public class QuickContactActivity extends ContactsActivity { */ private void initializeNoContactDetailCard(boolean areAllRawContactsSimAccounts) { final Drawable phoneIcon = ResourcesCompat.getDrawable(getResources(), - R.drawable.quantum_ic_phone_vd_theme_24, null).mutate(); + lineageos.platform.R.drawable.ic_phone, null).mutate(); final Entry phonePromptEntry = new Entry(CARD_ENTRY_ID_EDIT_CONTACT, phoneIcon, getString(R.string.quickcontact_add_phone_number), /* subHeader = */ null, /* subHeaderIcon = */ null, /* text = */ null, @@ -1200,7 +1200,7 @@ public class QuickContactActivity extends ContactsActivity { /* thirdAction = */ Entry.ACTION_NONE, /* thirdExtras = */ null, /* shouldApplyThirdIconColor = */ true, - R.drawable.quantum_ic_phone_vd_theme_24); + lineageos.platform.R.drawable.ic_phone); final List> promptEntries = new ArrayList<>(); promptEntries.add(new ArrayList(1)); @@ -1569,7 +1569,7 @@ public class QuickContactActivity extends ContactsActivity { primaryContentDescription.append(header); phoneContentDescription = com.android.contacts.util.ContactDisplayUtils .getTelephoneTtsSpannable(primaryContentDescription.toString(), header); - iconResourceId = R.drawable.quantum_ic_phone_vd_theme_24; + iconResourceId = lineageos.platform.R.drawable.ic_phone; icon = res.getDrawable(iconResourceId); if (PhoneCapabilityTester.isPhone(context)) { intent = CallUtil.getCallIntent(phone.getNumber()); @@ -1579,7 +1579,7 @@ public class QuickContactActivity extends ContactsActivity { Uri.fromParts(ContactsUtils.SCHEME_SMSTO, phone.getNumber(), null)); alternateIntent.putExtra(EXTRA_ACTION_TYPE, ActionType.SMS); - alternateIcon = res.getDrawable(R.drawable.quantum_ic_message_vd_theme_24); + alternateIcon = res.getDrawable(lineageos.platform.R.drawable.ic_message); alternateContentDescription.append(res.getString(R.string.sms_custom, header)); smsContentDescription = com.android.contacts.util.ContactDisplayUtils .getTelephoneTtsSpannable(alternateContentDescription.toString(), header); -- GitLab From 62283d7de7398d64eb6f6d56ad7b84d9220153e5 Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 28 Dec 2020 17:56:39 +0530 Subject: [PATCH 2/3] update toolbar text color --- src/com/android/contacts/activities/PeopleActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java index 42a8278d9d..dc6efff619 100644 --- a/src/com/android/contacts/activities/PeopleActivity.java +++ b/src/com/android/contacts/activities/PeopleActivity.java @@ -1337,7 +1337,7 @@ public class PeopleActivity extends AppCompatContactsActivity implements //getSupportActionBar().setBackgroundDrawable(new ColorDrawable(color_accent)); getSupportActionBar().getThemedContext(); - mToolbar.setTitleTextColor(color_default_blue1); + mToolbar.setTitleTextColor(color_default_primary_text); return color; } -- GitLab From 0142e2432ac7715dd11fba8c61a726c265c94b8a Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 28 Dec 2020 18:51:14 +0530 Subject: [PATCH 3/3] update toolbar text color :bug fix --- src/com/android/contacts/editor/RawContactEditorView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java index 5328723045..fc41ae99b7 100644 --- a/src/com/android/contacts/editor/RawContactEditorView.java +++ b/src/com/android/contacts/editor/RawContactEditorView.java @@ -661,7 +661,7 @@ public class RawContactEditorView extends LinearLayout implements View.OnClickLi primary = mCurrentRawContactDelta.getPrimaryEntry(StructuredName.CONTENT_ITEM_TYPE); final String name = primary != null ? primary.getAsString(StructuredName.DISPLAY_NAME) : getContext().getString(R.string.missing_name); - final Drawable nameDrawable = context.getDrawable(lineageos.platform.R.drawable.ic_person_stroked) + final Drawable nameDrawable = context.getDrawable(lineageos.platform.R.drawable.ic_person_stroked); final String nameContentDescription = res.getString(R.string.header_name_entry); bindData(nameDrawable, nameContentDescription, name, /* type */ null, /* isFirstEntry */ true); -- GitLab