Loading api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -6267,7 +6267,6 @@ package android.service.attention { public abstract class AttentionService extends android.app.Service { ctor public AttentionService(); method public final void disableSelf(); method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); method public abstract void onCancelAttentionCheck(@NonNull android.service.attention.AttentionService.AttentionCallback); method public abstract void onCheckAttention(@NonNull android.service.attention.AttentionService.AttentionCallback); Loading core/java/android/attention/AttentionManagerInternal.java +0 −7 Original line number Diff line number Diff line Loading @@ -46,13 +46,6 @@ public abstract class AttentionManagerInternal { */ public abstract void cancelAttentionCheck(AttentionCallbackInternal callback); /** * Disables the dependants. * * Example: called if the service does not have sufficient permissions to perform the task. */ public abstract void disableSelf(); /** Internal interface for attention callback. */ public abstract static class AttentionCallbackInternal { /** Loading core/java/android/service/attention/AttentionService.java +0 −15 Original line number Diff line number Diff line Loading @@ -21,13 +21,11 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.app.Service; import android.attention.AttentionManagerInternal; import android.content.Intent; import android.os.IBinder; import android.os.RemoteException; import com.android.internal.util.Preconditions; import com.android.server.LocalServices; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -131,19 +129,6 @@ public abstract class AttentionService extends Service { return null; } /** * Disables the dependants. * * Example: called if the service does not have sufficient permissions to perform the task. */ public final void disableSelf() { AttentionManagerInternal attentionManager = LocalServices.getService( AttentionManagerInternal.class); if (attentionManager != null) { attentionManager.disableSelf(); } } /** * Checks the user attention and calls into the provided callback. * Loading services/core/java/com/android/server/attention/AttentionManagerService.java +0 −20 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.server.attention; import static android.provider.DeviceConfig.NAMESPACE_ATTENTION_MANAGER_SERVICE; import static android.provider.Settings.System.ADAPTIVE_SLEEP; import static android.service.attention.AttentionService.ATTENTION_FAILURE_CANCELLED; import static android.service.attention.AttentionService.ATTENTION_FAILURE_UNKNOWN; Loading Loading @@ -47,7 +46,6 @@ import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.provider.DeviceConfig; import android.provider.Settings; import android.service.attention.AttentionService; import android.service.attention.AttentionService.AttentionFailureCodes; import android.service.attention.AttentionService.AttentionSuccessCodes; Loading Loading @@ -275,19 +273,6 @@ public class AttentionManagerService extends SystemService { } } /** Disables service dependants. */ private void disableSelf() { final long identity = Binder.clearCallingIdentity(); try { if (DEBUG) { Slog.d(LOG_TAG, "Disabling self."); } Settings.System.putInt(mContext.getContentResolver(), ADAPTIVE_SLEEP, 0); } finally { Binder.restoreCallingIdentity(identity); } } @GuardedBy("mLock") private void freeIfInactiveLocked() { // If we are called here, it means someone used the API again - reset the timer then. Loading Loading @@ -418,11 +403,6 @@ public class AttentionManagerService extends SystemService { public void cancelAttentionCheck(AttentionCallbackInternal callbackInternal) { AttentionManagerService.this.cancelAttentionCheck(callbackInternal); } @Override public void disableSelf() { AttentionManagerService.this.disableSelf(); } } private static final class AttentionCheckCache { Loading services/core/java/com/android/server/pm/PackageManagerService.java +10 −2 Original line number Diff line number Diff line Loading @@ -20752,8 +20752,16 @@ public class PackageManagerService extends IPackageManager.Stub } @Override public String getAttentionServicePackageName() { return mContext.getString(R.string.config_defaultAttentionService); public @Nullable String getAttentionServicePackageName() { final String flattenedComponentName = mContext.getString(R.string.config_defaultAttentionService); if (flattenedComponentName != null) { ComponentName componentName = ComponentName.unflattenFromString(flattenedComponentName); if (componentName != null && componentName.getPackageName() != null) { return componentName.getPackageName(); } } return null; } private @Nullable String getDocumenterPackageName() { Loading
api/system-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -6267,7 +6267,6 @@ package android.service.attention { public abstract class AttentionService extends android.app.Service { ctor public AttentionService(); method public final void disableSelf(); method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); method public abstract void onCancelAttentionCheck(@NonNull android.service.attention.AttentionService.AttentionCallback); method public abstract void onCheckAttention(@NonNull android.service.attention.AttentionService.AttentionCallback); Loading
core/java/android/attention/AttentionManagerInternal.java +0 −7 Original line number Diff line number Diff line Loading @@ -46,13 +46,6 @@ public abstract class AttentionManagerInternal { */ public abstract void cancelAttentionCheck(AttentionCallbackInternal callback); /** * Disables the dependants. * * Example: called if the service does not have sufficient permissions to perform the task. */ public abstract void disableSelf(); /** Internal interface for attention callback. */ public abstract static class AttentionCallbackInternal { /** Loading
core/java/android/service/attention/AttentionService.java +0 −15 Original line number Diff line number Diff line Loading @@ -21,13 +21,11 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.app.Service; import android.attention.AttentionManagerInternal; import android.content.Intent; import android.os.IBinder; import android.os.RemoteException; import com.android.internal.util.Preconditions; import com.android.server.LocalServices; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -131,19 +129,6 @@ public abstract class AttentionService extends Service { return null; } /** * Disables the dependants. * * Example: called if the service does not have sufficient permissions to perform the task. */ public final void disableSelf() { AttentionManagerInternal attentionManager = LocalServices.getService( AttentionManagerInternal.class); if (attentionManager != null) { attentionManager.disableSelf(); } } /** * Checks the user attention and calls into the provided callback. * Loading
services/core/java/com/android/server/attention/AttentionManagerService.java +0 −20 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.server.attention; import static android.provider.DeviceConfig.NAMESPACE_ATTENTION_MANAGER_SERVICE; import static android.provider.Settings.System.ADAPTIVE_SLEEP; import static android.service.attention.AttentionService.ATTENTION_FAILURE_CANCELLED; import static android.service.attention.AttentionService.ATTENTION_FAILURE_UNKNOWN; Loading Loading @@ -47,7 +46,6 @@ import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.provider.DeviceConfig; import android.provider.Settings; import android.service.attention.AttentionService; import android.service.attention.AttentionService.AttentionFailureCodes; import android.service.attention.AttentionService.AttentionSuccessCodes; Loading Loading @@ -275,19 +273,6 @@ public class AttentionManagerService extends SystemService { } } /** Disables service dependants. */ private void disableSelf() { final long identity = Binder.clearCallingIdentity(); try { if (DEBUG) { Slog.d(LOG_TAG, "Disabling self."); } Settings.System.putInt(mContext.getContentResolver(), ADAPTIVE_SLEEP, 0); } finally { Binder.restoreCallingIdentity(identity); } } @GuardedBy("mLock") private void freeIfInactiveLocked() { // If we are called here, it means someone used the API again - reset the timer then. Loading Loading @@ -418,11 +403,6 @@ public class AttentionManagerService extends SystemService { public void cancelAttentionCheck(AttentionCallbackInternal callbackInternal) { AttentionManagerService.this.cancelAttentionCheck(callbackInternal); } @Override public void disableSelf() { AttentionManagerService.this.disableSelf(); } } private static final class AttentionCheckCache { Loading
services/core/java/com/android/server/pm/PackageManagerService.java +10 −2 Original line number Diff line number Diff line Loading @@ -20752,8 +20752,16 @@ public class PackageManagerService extends IPackageManager.Stub } @Override public String getAttentionServicePackageName() { return mContext.getString(R.string.config_defaultAttentionService); public @Nullable String getAttentionServicePackageName() { final String flattenedComponentName = mContext.getString(R.string.config_defaultAttentionService); if (flattenedComponentName != null) { ComponentName componentName = ComponentName.unflattenFromString(flattenedComponentName); if (componentName != null && componentName.getPackageName() != null) { return componentName.getPackageName(); } } return null; } private @Nullable String getDocumenterPackageName() {