PRODUCT_COPY_FILES +=
diff --git a/frameworks/base/api/current.txt b/frameworks/base/api/current.txt
old mode 100644
new mode 100755
index e909181..094de39
--- a/frameworks/base/api/current.txt
+++ b/frameworks/base/api/current.txt
@@ -7613,6 +7613,21 @@ package android.app.blob {
}
+package android.app.rockemd {
+
+ public class RockemdSmartApi {
+ method @NonNull public String getApiVersion();
+ }
+
+}
+
package android.app.job {
public class JobInfo implements android.os.Parcelable {
@@ -10193,6 +10208,7 @@ package android.content {
field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
field public static final String INPUT_METHOD_SERVICE = "input_method";
field public static final String INPUT_SERVICE = "input";
+ field public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
field public static final String IPSEC_SERVICE = "ipsec";
field public static final String JOB_SCHEDULER_SERVICE = "jobscheduler";
field public static final String KEYGUARD_SERVICE = "keyguard";
diff --git a/frameworks/base/core/java/android/app/SystemServiceRegistry.java b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
old mode 100644
new mode 100755
index e599a5c..5868a2b
--- a/frameworks/base/core/java/android/app/SystemServiceRegistry.java
+++ b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
@@ -43,6 +43,8 @@ import android.app.usage.IUsageStatsManager;
import android.app.usage.NetworkStatsManager;
import android.app.usage.StorageStatsManager;
import android.app.usage.UsageStatsManager;
+import android.app.rockemd.IRockemdSmartApi;
+import android.app.rockemd.RockemdSmartApi;
import android.appwidget.AppWidgetManager;
import android.bluetooth.BluetoothManager;
import android.companion.CompanionDeviceManager;
@@ -786,6 +788,15 @@ public final class SystemServiceRegistry {
return new UserManager(ctx, service);
}});
+ registerService(Context.ROCKEMD_SMARTAPI_SERVICE, RockemdSmartApi.class,
+ new CachedServiceFetcher() {
+ @Override
+ public RockemdSmartApi createService(ContextImpl ctx) {
+ IBinder b = ServiceManager.getService(Context.ROCKEMD_SMARTAPI_SERVICE);
+ IRockemdSmartApi service = IRockemdSmartApi.Stub.asInterface(b);
+ return new RockemdSmartApi(ctx, service);
+ }});
+
registerService(Context.APP_OPS_SERVICE, AppOpsManager.class,
new CachedServiceFetcher() {
@Override
diff --git a/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl b/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl
new file mode 100755
index 0000000..e0861de
--- /dev/null
+++ b/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl
@@ -0,0 +1,14 @@
+package android.app.rockemd;
+
+/** {@hide} */
+interface IRockemdSmartApi
+{
+ String getApiVersion();
+}
No newline at end of file
diff --git a/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java b/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java
new file mode 100755
index 0000000..79c2422
--- /dev/null
+++ b/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java
@@ -0,0 +1,115 @@
+package android.app.rockemd;
+
+import android.content.Context;
+import android.os.RemoteException;
+import android.util.Slog;
+
+import android.annotation.SystemService;
+import android.annotation.SystemApi;
+import android.annotation.NonNull;
+
+import java.util.Objects;
+
+@SystemService(Context.ROCKEMD_SMARTAPI_SERVICE)
+public class RockemdSmartApi {
+ private final Context mContext;
+ private final IRockemdSmartApi mService;
+
+ /** {@hide} */
+ public RockemdSmartApi(Context context, IRockemdSmartApi service) {
+ mContext = Objects.requireNonNull(context);
+ mService = Objects.requireNonNull(service);
+ }
+
+ @NonNull
+ public String getApiVersion() {
+ if (mService != null) {
+ try {
+ return mService.getApiVersion();
+ } catch (RemoteException e) {
+ Slog.e("getApiVersion", "RemoteException " + e);
+ }
+ }
+ return null;
+ }
+
+}
No newline at end of file
diff --git a/frameworks/base/core/java/android/content/Context.java b/frameworks/base/core/java/android/content/Context.java
old mode 100644
new mode 100755
index 8472144..c346ebc
--- a/frameworks/base/core/java/android/content/Context.java
+++ b/frameworks/base/core/java/android/content/Context.java
@@ -3421,6 +3421,7 @@ public abstract class Context {
WIFI_RTT_RANGING_SERVICE,
NSD_SERVICE,
AUDIO_SERVICE,
+ ROCKEMD_SMARTAPI_SERVICE,
AUTH_SERVICE,
FINGERPRINT_SERVICE,
//@hide: FACE_SERVICE,
@@ -3944,6 +3945,12 @@ public abstract class Context {
public static final String VIBRATOR_SERVICE = "vibrator";
/**
+ * ROCKEMD_SMARTAPI_SERVICE
+ */
+ @SuppressLint("ServiceName")
+ public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
+
+ /**
* Use with {@link #getSystemService(String)} to retrieve a {@link
* android.app.StatusBarManager} for interacting with the status bar.
*
diff --git a/frameworks/base/non-updatable-api/current.txt b/frameworks/base/non-updatable-api/current.txt
old mode 100644
new mode 100755
index f0d6871..8e93bca
--- a/frameworks/base/non-updatable-api/current.txt
+++ b/frameworks/base/non-updatable-api/current.txt
@@ -7613,6 +7613,21 @@ package android.app.blob {
}
+package android.app.rockemd {
+
+ public class RockemdSmartApi {
+ method @NonNull public String getApiVersion();
+ }
+
+}
+
package android.app.job {
public class JobInfo implements android.os.Parcelable {
@@ -10193,6 +10208,7 @@ package android.content {
field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
field public static final String INPUT_METHOD_SERVICE = "input_method";
field public static final String INPUT_SERVICE = "input";
+ field public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
field public static final String IPSEC_SERVICE = "ipsec";
field public static final String JOB_SCHEDULER_SERVICE = "jobscheduler";
field public static final String KEYGUARD_SERVICE = "keyguard";
diff --git a/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java b/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java
new file mode 100755
index 0000000..86c0c33
--- /dev/null
+++ b/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java
@@ -0,0 +1,167 @@
+package com.android.server.rockemd;
+
+import android.app.rockemd.IRockemdSmartApi;
+import android.content.Context;
+import android.os.Build;
+import android.os.UserHandle;
+import android.os.SystemProperties;
+import android.util.Slog;
+import java.util.List;
+import android.content.Intent;
+import android.app.ActivityManager;
+import android.provider.Settings;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public class RockemdSmartApiService extends IRockemdSmartApi.Stub {
+ private Context mContext;
+ private static final String TAG = "RockemdSmartApiService";
+ public static final boolean DEBUG = true;
+
+ public RockemdSmartApiService(Context context) {
+ mContext = context;
+ Slog.d(TAG, "================RockemdSmartApiService=======================");
+ }
+
+
+ /*
+ *
+ * getApiVersion
+ */
+ public String getApiVersion() {
+ if (DEBUG)
+ Slog.d(TAG, "===================getApiVersion==================");
+ String Version = SystemProperties.get("ro.product.apiversion");
+ return Version;
+ }
+
+
+
+}
No newline at end of file
diff --git a/frameworks/base/services/java/com/android/server/SystemServer.java b/frameworks/base/services/java/com/android/server/SystemServer.java
index 72ebc90..c4fee60 100755
--- a/frameworks/base/services/java/com/android/server/SystemServer.java
+++ b/frameworks/base/services/java/com/android/server/SystemServer.java
@@ -180,6 +180,7 @@ import com.android.server.webkit.WebViewUpdateService;
import com.android.server.wm.ActivityTaskManagerService;
import com.android.server.wm.WindowManagerGlobalLock;
import com.android.server.wm.WindowManagerService;
+import com.android.server.rockemd.RockemdSmartApiService;
import dalvik.system.VMRuntime;
@@ -1132,6 +1133,12 @@ public final class SystemServer {
mSystemServiceManager.startService(DropBoxManagerService.class);
t.traceEnd();
PRODUCT_COPY_FILES +=
diff --git a/frameworks/base/api/current.txt b/frameworks/base/api/current.txt
old mode 100644
new mode 100755
index e909181..094de39
--- a/frameworks/base/api/current.txt
+++ b/frameworks/base/api/current.txt
@@ -7613,6 +7613,21 @@ package android.app.blob {
}
+package android.app.rockemd {
+
+ public class RockemdSmartApi {
+ method @NonNull public String getApiVersion();
+ }
+
+}
+
package android.app.job {
public class JobInfo implements android.os.Parcelable {
@@ -10193,6 +10208,7 @@ package android.content {
field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
field public static final String INPUT_METHOD_SERVICE = "input_method";
field public static final String INPUT_SERVICE = "input";
+ field public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
field public static final String IPSEC_SERVICE = "ipsec";
field public static final String JOB_SCHEDULER_SERVICE = "jobscheduler";
field public static final String KEYGUARD_SERVICE = "keyguard";
diff --git a/frameworks/base/core/java/android/app/SystemServiceRegistry.java b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
old mode 100644
new mode 100755
index e599a5c..5868a2b
--- a/frameworks/base/core/java/android/app/SystemServiceRegistry.java
+++ b/frameworks/base/core/java/android/app/SystemServiceRegistry.java
@@ -43,6 +43,8 @@ import android.app.usage.IUsageStatsManager;
import android.app.usage.NetworkStatsManager;
import android.app.usage.StorageStatsManager;
import android.app.usage.UsageStatsManager;
+import android.app.rockemd.IRockemdSmartApi;
+import android.app.rockemd.RockemdSmartApi;
import android.appwidget.AppWidgetManager;
import android.bluetooth.BluetoothManager;
import android.companion.CompanionDeviceManager;
@@ -786,6 +788,15 @@ public final class SystemServiceRegistry {
return new UserManager(ctx, service);
}});
+ registerService(Context.ROCKEMD_SMARTAPI_SERVICE, RockemdSmartApi.class,
+ new CachedServiceFetcher() {
+ @Override
+ public RockemdSmartApi createService(ContextImpl ctx) {
+ IBinder b = ServiceManager.getService(Context.ROCKEMD_SMARTAPI_SERVICE);
+ IRockemdSmartApi service = IRockemdSmartApi.Stub.asInterface(b);
+ return new RockemdSmartApi(ctx, service);
+ }});
+
registerService(Context.APP_OPS_SERVICE, AppOpsManager.class,
new CachedServiceFetcher() {
@Override
diff --git a/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl b/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl
new file mode 100755
index 0000000..e0861de
--- /dev/null
+++ b/frameworks/base/core/java/android/app/rockemd/IRockemdSmartApi.aidl
@@ -0,0 +1,14 @@
+package android.app.rockemd;
+
+/** {@hide} */
+interface IRockemdSmartApi
+{
+ String getApiVersion();
+}
No newline at end of file
diff --git a/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java b/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java
new file mode 100755
index 0000000..79c2422
--- /dev/null
+++ b/frameworks/base/core/java/android/app/rockemd/RockemdSmartApi.java
@@ -0,0 +1,115 @@
+package android.app.rockemd;
+
+import android.content.Context;
+import android.os.RemoteException;
+import android.util.Slog;
+
+import android.annotation.SystemService;
+import android.annotation.SystemApi;
+import android.annotation.NonNull;
+
+import java.util.Objects;
+
+@SystemService(Context.ROCKEMD_SMARTAPI_SERVICE)
+public class RockemdSmartApi {
+ private final Context mContext;
+ private final IRockemdSmartApi mService;
+
+ /** {@hide} */
+ public RockemdSmartApi(Context context, IRockemdSmartApi service) {
+ mContext = Objects.requireNonNull(context);
+ mService = Objects.requireNonNull(service);
+ }
+
+ @NonNull
+ public String getApiVersion() {
+ if (mService != null) {
+ try {
+ return mService.getApiVersion();
+ } catch (RemoteException e) {
+ Slog.e("getApiVersion", "RemoteException " + e);
+ }
+ }
+ return null;
+ }
+
+}
No newline at end of file
diff --git a/frameworks/base/core/java/android/content/Context.java b/frameworks/base/core/java/android/content/Context.java
old mode 100644
new mode 100755
index 8472144..c346ebc
--- a/frameworks/base/core/java/android/content/Context.java
+++ b/frameworks/base/core/java/android/content/Context.java
@@ -3421,6 +3421,7 @@ public abstract class Context {
WIFI_RTT_RANGING_SERVICE,
NSD_SERVICE,
AUDIO_SERVICE,
+ ROCKEMD_SMARTAPI_SERVICE,
AUTH_SERVICE,
FINGERPRINT_SERVICE,
//@hide: FACE_SERVICE,
@@ -3944,6 +3945,12 @@ public abstract class Context {
public static final String VIBRATOR_SERVICE = "vibrator";
/**
+ * ROCKEMD_SMARTAPI_SERVICE
+ */
+ @SuppressLint("ServiceName")
+ public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
+
+ /**
* Use with {@link #getSystemService(String)} to retrieve a {@link
* android.app.StatusBarManager} for interacting with the status bar.
*
diff --git a/frameworks/base/non-updatable-api/current.txt b/frameworks/base/non-updatable-api/current.txt
old mode 100644
new mode 100755
index f0d6871..8e93bca
--- a/frameworks/base/non-updatable-api/current.txt
+++ b/frameworks/base/non-updatable-api/current.txt
@@ -7613,6 +7613,21 @@ package android.app.blob {
}
+package android.app.rockemd {
+
+ public class RockemdSmartApi {
+ method @NonNull public String getApiVersion();
+ }
+
+}
+
package android.app.job {
public class JobInfo implements android.os.Parcelable {
@@ -10193,6 +10208,7 @@ package android.content {
field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
field public static final String INPUT_METHOD_SERVICE = "input_method";
field public static final String INPUT_SERVICE = "input";
+ field public static final String ROCKEMD_SMARTAPI_SERVICE = "rockemdsmartapi";
field public static final String IPSEC_SERVICE = "ipsec";
field public static final String JOB_SCHEDULER_SERVICE = "jobscheduler";
field public static final String KEYGUARD_SERVICE = "keyguard";
diff --git a/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java b/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java
new file mode 100755
index 0000000..86c0c33
--- /dev/null
+++ b/frameworks/base/services/core/java/com/android/server/rockemd/RockemdSmartApiService.java
@@ -0,0 +1,167 @@
+package com.android.server.rockemd;
+
+import android.app.rockemd.IRockemdSmartApi;
+import android.content.Context;
+import android.os.Build;
+import android.os.UserHandle;
+import android.os.SystemProperties;
+import android.util.Slog;
+import java.util.List;
+import android.content.Intent;
+import android.app.ActivityManager;
+import android.provider.Settings;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public class RockemdSmartApiService extends IRockemdSmartApi.Stub {
+ private Context mContext;
+ private static final String TAG = "RockemdSmartApiService";
+ public static final boolean DEBUG = true;
+
+ public RockemdSmartApiService(Context context) {
+ mContext = context;
+ Slog.d(TAG, "================RockemdSmartApiService=======================");
+ }
+
+
+ /*
+ *
+ * getApiVersion
+ */
+ public String getApiVersion() {
+ if (DEBUG)
+ Slog.d(TAG, "===================getApiVersion==================");
+ String Version = SystemProperties.get("ro.product.apiversion");
+ return Version;
+ }
+
+
+
+}
No newline at end of file
diff --git a/frameworks/base/services/java/com/android/server/SystemServer.java b/frameworks/base/services/java/com/android/server/SystemServer.java
index 72ebc90..c4fee60 100755
--- a/frameworks/base/services/java/com/android/server/SystemServer.java
+++ b/frameworks/base/services/java/com/android/server/SystemServer.java
@@ -180,6 +180,7 @@ import com.android.server.webkit.WebViewUpdateService;
import com.android.server.wm.ActivityTaskManagerService;
import com.android.server.wm.WindowManagerGlobalLock;
import com.android.server.wm.WindowManagerService;
+import com.android.server.rockemd.RockemdSmartApiService;
import dalvik.system.VMRuntime;
@@ -1132,6 +1133,12 @@ public final class SystemServer {
mSystemServiceManager.startService(DropBoxManagerService.class);
t.traceEnd();