Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dafa6424 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Move PrintRecommendationService to systemAPI

It is using system APIs, but we might want to update it via the play
store.

Hence, replace all internal APIs used with support lib APIs. There is
no replacement for @Immutable, but this is just a informational
annotation, so it can just be removed.

As system-api is tied to a specific platform version, remove all
minSDK/targetSDK settings in the manifest.

Change-Id: Ia8f9c718fd688db295c7bc3bfe05e2074f9bd413
Fixes: 78162439
Test: Looked at print service recommendations
parent c18178a9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -17,11 +17,16 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_USE_AAPT2 := true

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := PrintRecommendationService
LOCAL_PRIVATE_PLATFORM_APIS := true

LOCAL_SDK_VERSION := system_current

LOCAL_STATIC_JAVA_LIBRARIES := androidx.annotation_annotation
LOCAL_STATIC_ANDROID_LIBRARIES := androidx.core_core

include $(BUILD_PACKAGE)

+2 −5
Original line number Diff line number Diff line
@@ -18,11 +18,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.printservice.recommendation"
    android:versionCode="3"
    android:versionName="1.2.0">

    <uses-sdk android:minSdkVersion="24"
        android:targetSdkVersion="25" />
    android:versionCode="4"
    android:versionName="1.3.0">

    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
+3 −3
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@

package com.android.printservice.recommendation;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;

import java.net.InetAddress;
import java.util.List;
+4 −5
Original line number Diff line number Diff line
@@ -16,11 +16,10 @@

package com.android.printservice.recommendation;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.StringRes;

import com.android.internal.util.Preconditions;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.core.util.Preconditions;

import java.net.InetAddress;
import java.util.Collections;
+3 −2
Original line number Diff line number Diff line
@@ -18,12 +18,13 @@ package com.android.printservice.recommendation.plugin.google;

import static com.android.printservice.recommendation.util.MDNSUtils.ATTRIBUTE_TY;

import android.annotation.NonNull;
import android.annotation.StringRes;
import android.content.Context;
import android.util.ArrayMap;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;

import com.android.printservice.recommendation.PrintServicePlugin;
import com.android.printservice.recommendation.R;
import com.android.printservice.recommendation.util.MDNSFilteredDiscovery;
Loading