diff --git a/api/lineage_current.txt b/api/lineage_current.txt index 2a92efef..568aa9e3 100644 --- a/api/lineage_current.txt +++ b/api/lineage_current.txt @@ -196,54 +196,6 @@ package lineageos.app { field public static final java.lang.String SERVICE_INTERFACE = "lineageos.app.CustomTileListenerService"; } - public class LiveLockScreenInfo implements android.os.Parcelable { - ctor public LiveLockScreenInfo(android.content.ComponentName, int); - ctor public LiveLockScreenInfo(); - method public lineageos.app.LiveLockScreenInfo clone(); - method public int describeContents(); - method public void writeToParcel(android.os.Parcel, int); - field public static final android.os.Parcelable.Creator CREATOR; - field public static final int PRIORITY_DEFAULT = 0; // 0x0 - field public static final int PRIORITY_HIGH = 1; // 0x1 - field public static final int PRIORITY_LOW = -1; // 0xffffffff - field public static final int PRIORITY_MAX = 2; // 0x2 - field public static final int PRIORITY_MIN = -2; // 0xfffffffe - field public android.content.ComponentName component; - field public int priority; - } - - public static class LiveLockScreenInfo.Builder { - ctor public LiveLockScreenInfo.Builder(); - method public lineageos.app.LiveLockScreenInfo build(); - method public lineageos.app.LiveLockScreenInfo.Builder setComponent(android.content.ComponentName); - method public lineageos.app.LiveLockScreenInfo.Builder setPriority(int); - } - - public class LiveLockScreenManager { - method public void cancel(int); - method public lineageos.app.LiveLockScreenInfo getDefaultLiveLockScreen(); - method public static lineageos.app.LiveLockScreenManager getInstance(android.content.Context); - method public void setDefaultLiveLockScreen(lineageos.app.LiveLockScreenInfo); - method public boolean show(int, lineageos.app.LiveLockScreenInfo); - field public static final java.lang.String SERVICE_INTERFACE = "lineageos.app.LiveLockScreenManagerService"; - } - - public class PartnerInterface { - method public java.lang.String getCurrentHotwordPackageName(); - method public static lineageos.app.PartnerInterface getInstance(android.content.Context); - method public void rebootDevice(); - method public void setAirplaneModeEnabled(boolean); - method public void setMobileDataEnabled(boolean); - method public boolean setZenMode(int); - method public boolean setZenModeWithDuration(int, long); - method public void shutdownDevice(); - field public static final java.lang.String MODIFY_NETWORK_SETTINGS_PERMISSION = "lineageos.permission.MODIFY_NETWORK_SETTINGS"; - field public static final java.lang.String MODIFY_SOUND_SETTINGS_PERMISSION = "lineageos.permission.MODIFY_SOUND_SETTINGS"; - field public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; // 0x1 - field public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; // 0x2 - field public static final int ZEN_MODE_OFF = 0; // 0x0 - } - public final class Profile implements java.lang.Comparable android.os.Parcelable { ctor public Profile(java.lang.String); method public void addSecondaryUuid(java.util.UUID); @@ -709,7 +661,6 @@ package lineageos.platform { field public static final java.lang.String ACCESS_WEATHER_MANAGER = "lineageos.permission.ACCESS_WEATHER_MANAGER"; field public static final java.lang.String BIND_WEATHER_PROVIDER_SERVICE = "lineageos.permission.BIND_WEATHER_PROVIDER_SERVICE"; field public static final java.lang.String HARDWARE_ABSTRACTION_ACCESS = "lineageos.permission.HARDWARE_ABSTRACTION_ACCESS"; - field public static final java.lang.String LIVE_LOCK_SCREEN_MANAGER_ACCESS = "lineageos.permission.LIVE_LOCK_SCREEN_MANAGER_ACCESS"; field public static final java.lang.String MANAGE_ALARMS = "lineageos.permission.MANAGE_ALARMS"; field public static final java.lang.String MANAGE_LIVEDISPLAY = "lineageos.permission.MANAGE_LIVEDISPLAY"; field public static final java.lang.String MANAGE_PERSISTENT_STORAGE = "lineageos.permission.MANAGE_PERSISTENT_STORAGE"; diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/LiveLockScreenServiceBroker.java b/lineage/lib/main/java/org/lineageos/platform/internal/LiveLockScreenServiceBroker.java deleted file mode 100644 index a8ec8dab..00000000 --- a/lineage/lib/main/java/org/lineageos/platform/internal/LiveLockScreenServiceBroker.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.lineageos.platform.internal; - -import android.annotation.Nullable; -import android.content.ComponentName; -import android.content.Context; -import android.content.Intent; -import android.content.ServiceConnection; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.os.Binder; -import android.os.Handler; -import android.os.IBinder; -import android.os.IInterface; -import android.os.Message; -import android.os.RemoteCallbackList; -import android.os.RemoteException; -import android.os.SystemClock; -import android.text.TextUtils; -import android.util.Slog; - -import com.android.server.SystemService; - -import lineageos.app.LineageContextConstants; -import lineageos.app.ILiveLockScreenChangeListener; -import lineageos.app.ILiveLockScreenManager; -import lineageos.app.ILiveLockScreenManagerProvider; -import lineageos.app.LiveLockScreenInfo; -import lineageos.app.LiveLockScreenManager; -import lineageos.platform.Manifest; -import lineageos.providers.LineageSettings; - -import org.lineageos.platform.internal.common.BrokeredServiceConnection; - -import java.util.List; - -/** - * Live lock screen service broker for connecting clients to a backing Live lock screen manager - * service. - * - * @hide - */ -public class LiveLockScreenServiceBroker extends - BrokerableLineageSystemService { - private static final String TAG = LiveLockScreenServiceBroker.class.getSimpleName(); - private static final boolean DEBUG = false; - - private static final String DEPRECATED_THIRD_PARTY_KEYGUARD_PERMISSION = - "android.permission.THIRD_PARTY_KEYGUARD"; - - private Context mContext; - - // Cached change listeners - private final RemoteCallbackList mChangeListeners = - new RemoteCallbackList<>(); - - private LiveLockScreenInfo mDefaultLlsInfo; - - /** - * ILiveLockScreenManager implementation to use when no backing service can be found. - */ - private final ILiveLockScreenManagerProvider mServiceStubForFailure = - new ILiveLockScreenManagerProvider() { - @Override - public void enqueueLiveLockScreen(String pkg, int id, LiveLockScreenInfo lls, - int[] idReceived, int userid) throws RemoteException { - } - - @Override - public void cancelLiveLockScreen(String pkg, int id, int userId) throws RemoteException { - } - - @Override - public LiveLockScreenInfo getCurrentLiveLockScreen() throws RemoteException { - return null; - } - - @Override - public void updateDefaultLiveLockScreen(LiveLockScreenInfo llsInfo) throws RemoteException { - - } - - @Override - public boolean getLiveLockScreenEnabled() throws RemoteException { - return false; - } - - @Override - public boolean registerChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - return false; - } - - @Override - public boolean unregisterChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - return false; - } - - @Override - public IBinder asBinder() { - return null; - } - }; - - private final class BinderService extends ILiveLockScreenManager.Stub { - - @Override - public void enqueueLiveLockScreen(String pkg, int id, - LiveLockScreenInfo lls, int[] idReceived, int userId) throws RemoteException { - getBrokeredService().enqueueLiveLockScreen(pkg, id, lls, idReceived, userId); - } - - @Override - public void cancelLiveLockScreen(String pkg, int id, int userId) throws RemoteException { - getBrokeredService().cancelLiveLockScreen(pkg, id, userId); - } - - @Override - public LiveLockScreenInfo getCurrentLiveLockScreen() throws RemoteException { - return getBrokeredService().getCurrentLiveLockScreen(); - } - - @Override - public LiveLockScreenInfo getDefaultLiveLockScreen() throws RemoteException { - enforcePrivateAccessPermission(); - return getDefaultLiveLockScreenInternal(); - } - - @Override - public void setDefaultLiveLockScreen(LiveLockScreenInfo llsInfo) throws RemoteException { - enforcePrivateAccessPermission(); - setDefaultLiveLockScreenInternal(llsInfo); - } - - @Override - public void setLiveLockScreenEnabled(boolean enabled) throws RemoteException { - enforcePrivateAccessPermission(); - setLiveLockScreenEnabledInternal(enabled); - } - - @Override - public boolean getLiveLockScreenEnabled() throws RemoteException { - return getBrokeredService().getLiveLockScreenEnabled(); - } - - @Override - public boolean registerChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - boolean registered = getBrokeredService().registerChangeListener(listener); - if (registered) { - mChangeListeners.register(listener); - } - return registered; - } - - @Override - public boolean unregisterChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - boolean unregistered = getBrokeredService().unregisterChangeListener(listener); - if (unregistered) { - mChangeListeners.unregister(listener); - } - return unregistered; - } - } - - public LiveLockScreenServiceBroker(Context context) { - super(context); - mContext = context; - setBrokeredServiceConnection(mServiceConnection); - } - - @Override - public String getFeatureDeclaration() { - return LineageContextConstants.Features.LIVE_LOCK_SCREEN; - } - - @Override - public void onStart() { - if (DEBUG) Slog.d(TAG, "service started"); - publishBinderService(LineageContextConstants.LINEAGE_LIVE_LOCK_SCREEN_SERVICE, new BinderService()); - } - - @Override - protected ILiveLockScreenManagerProvider getIBinderAsIInterface(IBinder service) { - return ILiveLockScreenManagerProvider.Stub.asInterface(service); - } - - @Override - public ILiveLockScreenManagerProvider getDefaultImplementation() { - return mServiceStubForFailure; - } - - private BrokeredServiceConnection mServiceConnection = new BrokeredServiceConnection() { - @Override - public void onBrokeredServiceConnected() { - // If any change listeners are cached, register them with the newly connected - // service. - try { - int N = mChangeListeners.beginBroadcast(); - ILiveLockScreenManagerProvider iLiveLockScreenManagerProvider = - getBrokeredService(); - if (iLiveLockScreenManagerProvider != null && N > 0) { - for (int i = 0; i < N; i++) { - iLiveLockScreenManagerProvider - .registerChangeListener(mChangeListeners.getBroadcastItem(i)); - } - } - } catch (RemoteException e) { - /* ignore */ - } finally { - mChangeListeners.finishBroadcast(); - } - } - - @Override - public void onBrokeredServiceDisconnected() { - - } - }; - - @Override - protected String getComponentFilteringPermission() { - // Live lock screen service has its own vertical providing permission - return Manifest.permission.LIVE_LOCK_SCREEN_MANAGER_PROVIDER; - } - - @Override - protected ComponentName getServiceComponent() { - PackageManager pm = mContext.getPackageManager(); - Intent intent = new Intent(LiveLockScreenManager.SERVICE_INTERFACE); - List resolveInfos = pm.queryIntentServices(intent, 0); - for (ResolveInfo info : resolveInfos) { - if (info != null) { - if (info.serviceInfo.isEnabled()) { - return new ComponentName(info.serviceInfo.packageName, info.serviceInfo.name); - } - } - } - return null; - } - - @Override - public void onBootPhase(int phase) { - if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) { - if (DEBUG) Slog.d(TAG, "Third party apps ready"); - - // Initialize the default LLS component - String defComponent = LineageSettings.Secure.getString(mContext.getContentResolver(), - LineageSettings.Secure.DEFAULT_LIVE_LOCK_SCREEN_COMPONENT); - if (!TextUtils.isEmpty(defComponent)) { - mDefaultLlsInfo = new LiveLockScreenInfo.Builder() - .setComponent(ComponentName.unflattenFromString(defComponent)) - .build(); - } - } - super.onBootPhase(phase); - } - - /** - * Enforces the - * {@link lineageos.platform.Manifest.permission#LIVE_LOCK_SCREEN_MANAGER_ACCESS_PRIVATE} - * permission. - */ - private void enforcePrivateAccessPermission() { - mContext.enforceCallingPermission( - Manifest.permission.LIVE_LOCK_SCREEN_MANAGER_ACCESS_PRIVATE, null); - } - - private LiveLockScreenInfo getDefaultLiveLockScreenInternal() { - return mDefaultLlsInfo; - } - - private void setDefaultLiveLockScreenInternal(LiveLockScreenInfo llsInfo) { - if (llsInfo != null && llsInfo.component != null) { - // Check that the package this component belongs to has the third party keyguard perm - final PackageManager pm = mContext.getPackageManager(); - final boolean hasThirdPartyKeyguardPermission = pm.checkPermission( - Manifest.permission.THIRD_PARTY_KEYGUARD, - llsInfo.component.getPackageName()) == PackageManager.PERMISSION_GRANTED - || pm.checkPermission(DEPRECATED_THIRD_PARTY_KEYGUARD_PERMISSION, - llsInfo.component.getPackageName()) == PackageManager.PERMISSION_GRANTED; - if (!hasThirdPartyKeyguardPermission) { - Slog.e(TAG, "Package " + llsInfo.component.getPackageName() + - " does not have " + Manifest.permission.THIRD_PARTY_KEYGUARD); - return; - } - } - - long token = Binder.clearCallingIdentity(); - try { - LineageSettings.Secure.putString(mContext.getContentResolver(), - LineageSettings.Secure.DEFAULT_LIVE_LOCK_SCREEN_COMPONENT, - (llsInfo != null && llsInfo.component != null) - ? llsInfo.component.flattenToString() - : ""); - } finally { - Binder.restoreCallingIdentity(token); - } - - mDefaultLlsInfo = llsInfo; - try { - getBrokeredService().updateDefaultLiveLockScreen(llsInfo); - } catch (RemoteException e) { - /* ignore */ - } - } - - private void setLiveLockScreenEnabledInternal(boolean enabled) { - long token = Binder.clearCallingIdentity(); - LineageSettings.Secure.putInt(mContext.getContentResolver(), - LineageSettings.Secure.LIVE_LOCK_SCREEN_ENABLED, enabled ? 1 : 0); - Binder.restoreCallingIdentity(token); - } -} diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/PartnerInterfaceService.java b/lineage/lib/main/java/org/lineageos/platform/internal/PartnerInterfaceService.java deleted file mode 100644 index b83ec345..00000000 --- a/lineage/lib/main/java/org/lineageos/platform/internal/PartnerInterfaceService.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Copyright (c) 2011-2015 CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.lineageos.platform.internal; - -import android.app.INotificationManager; -import android.content.ContentResolver; -import android.content.Context; -import android.content.Intent; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.media.IAudioService; -import android.net.Uri; -import android.os.IBinder; - -import android.os.IPowerManager; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.os.UserHandle; -import android.provider.Settings; -import android.telephony.TelephonyManager; -import android.util.Log; -import com.android.server.SystemService; -import lineageos.app.LineageContextConstants; -import lineageos.app.IPartnerInterface; -import lineageos.app.PartnerInterface; -import lineageos.media.MediaRecorder; - -import java.io.ByteArrayInputStream; -import java.security.PublicKey; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.security.interfaces.RSAPublicKey; - -/** @hide */ - -public class PartnerInterfaceService extends LineageSystemService { - - private static final String TAG = "LineageSettingsService"; - - private Context mContext; - private TelephonyManager mTelephonyManager; - private INotificationManager mNotificationManager; - private IAudioService mAudioService; - - public PartnerInterfaceService(Context context) { - super(context); - mContext = context; - publishBinderService(LineageContextConstants.LINEAGE_PARTNER_INTERFACE, mService); - } - - @Override - public String getFeatureDeclaration() { - return LineageContextConstants.Features.PARTNER; - } - - @Override - public void onStart() { - mTelephonyManager = (TelephonyManager) - mContext.getSystemService(Context.TELEPHONY_SERVICE); - mNotificationManager = INotificationManager.Stub.asInterface( - ServiceManager.getService(Context.NOTIFICATION_SERVICE)); - IBinder b = ServiceManager.getService(android.content.Context.AUDIO_SERVICE); - mAudioService = IAudioService.Stub.asInterface(b); - } - - private void enforceModifyNetworkSettingsPermission() { - mContext.enforceCallingOrSelfPermission(PartnerInterface.MODIFY_NETWORK_SETTINGS_PERMISSION, - "You do not have permissions to change system network settings."); - } - - private void enforceModifySoundSettingsPermission() { - mContext.enforceCallingOrSelfPermission(PartnerInterface.MODIFY_SOUND_SETTINGS_PERMISSION, - "You do not have permissions to change system sound settings."); - } - - private void enforceShutdownPermission() { - mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REBOOT, - "You do not have permissions to shut down the device."); - } - - private void enforceCaptureHotwordPermission() { - mContext.enforceCallingOrSelfPermission(MediaRecorder.CAPTURE_AUDIO_HOTWORD_PERMISSION, - "You do not have permission to query the hotword input package name."); - } - - private final IBinder mService = new IPartnerInterface.Stub() { - - @Override - public void setAirplaneModeEnabled(boolean enabled) { - enforceModifyNetworkSettingsPermission(); - /* - * We need to clear the caller's identity in order to - * allow this method call to modify settings - * not allowed by the caller's permissions. - */ - long token = clearCallingIdentity(); - setAirplaneModeEnabledInternal(enabled); - restoreCallingIdentity(token); - } - - @Override - public void setMobileDataEnabled(boolean enabled) { - enforceModifyNetworkSettingsPermission(); - /* - * We need to clear the caller's identity in order to - * allow this method call to modify settings - * not allowed by the caller's permissions. - */ - long token = clearCallingIdentity(); - setMobileDataEnabledInternal(enabled); - restoreCallingIdentity(token); - } - - @Override - public void shutdown() { - enforceShutdownPermission(); - /* - * We need to clear the caller's identity in order to - * allow this method call to modify settings - * not allowed by the caller's permissions. - */ - long token = clearCallingIdentity(); - shutdownInternal(false); - restoreCallingIdentity(token); - } - - @Override - public void reboot() { - enforceShutdownPermission(); - /* - * We need to clear the caller's identity in order to - * allow this method call to modify settings - * not allowed by the caller's permissions. - */ - long token = clearCallingIdentity(); - shutdownInternal(true); - restoreCallingIdentity(token); - } - - @Override - public boolean setZenMode(int mode) { - enforceModifySoundSettingsPermission(); - /* - * We need to clear the caller's identity in order to - * allow this method call to modify settings - * not allowed by the caller's permissions. - */ - long token = clearCallingIdentity(); - boolean success = setZenModeInternal(mode, -1); - restoreCallingIdentity(token); - return success; - } - - @Override - public boolean setZenModeWithDuration(int mode, long durationMillis) { - enforceModifySoundSettingsPermission(); - /* - * We need to clear the caller's identity in order to - * allow this method call to modify settings - * not allowed by the caller's permissions. - */ - long token = clearCallingIdentity(); - boolean success = setZenModeInternal(mode, durationMillis); - restoreCallingIdentity(token); - return success; - } - - @Override - public String getCurrentHotwordPackageName() { - enforceCaptureHotwordPermission(); - long token = clearCallingIdentity(); - String packageName = getHotwordPackageNameInternal(); - restoreCallingIdentity(token); - return packageName; - } - }; - - private void setAirplaneModeEnabledInternal(boolean enabled) { - // Change the system setting - Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.AIRPLANE_MODE_ON, - enabled ? 1 : 0); - - // Post the intent - Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); - intent.putExtra("state", enabled); - mContext.sendBroadcastAsUser(intent, UserHandle.ALL); - } - - private void setMobileDataEnabledInternal(boolean enabled) { - mTelephonyManager.setDataEnabled(enabled); - } - - private void shutdownInternal(boolean reboot) { - IPowerManager pm = IPowerManager.Stub.asInterface( - ServiceManager.getService(Context.POWER_SERVICE)); - try { - if (reboot) { - pm.reboot(false, null, false); - } else { - pm.shutdown(false, "User requested", false); - } - } catch (RemoteException e) { - Log.d(TAG, "Unable to shutdown."); - } - } - - private boolean setZenModeInternal(int mode, long durationMillis) { - int zenModeValue = -1; - Uri zenModeConditionUri = null; - switch(mode) { - case PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS: - zenModeValue = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS; - zenModeConditionUri = createZenModeConditionUri(durationMillis); - break; - case PartnerInterface.ZEN_MODE_OFF: - zenModeValue = Settings.Global.ZEN_MODE_OFF; - // Leaving the condition Uri to null signifies "indefinitely" - // durationMillis is ignored - break; - case PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS: - zenModeValue = Settings.Global.ZEN_MODE_NO_INTERRUPTIONS; - zenModeConditionUri = createZenModeConditionUri(durationMillis); - break; - default: - // Invalid mode parameter - Log.w(TAG, "setZenMode() called with invalid mode: " + mode); - return false; - } - - try { - mNotificationManager.setZenMode(zenModeValue, zenModeConditionUri, "setZenMode (PartnerInterface)"); - } catch (RemoteException e) { - // An error occurred, return false since the - // condition failed to set. - Log.e(TAG, "setZenMode() failed for mode: " + mode); - return false; - } - return true; - } - - private Uri createZenModeConditionUri(long durationMillis) { - // duration values that mean "indefinitely" - if (durationMillis == Long.MAX_VALUE || durationMillis < 0) { - return null; - } - final long endTimeMillis = System.currentTimeMillis() + durationMillis; - // long overflow also means "indefinitely" - if (endTimeMillis < 0) { - Log.w(TAG, "createZenModeCondition duration exceeds the max numerical limit. Defaulting to Indefinite"); - return null; - } - return android.service.notification.ZenModeConfig.toCountdownConditionId(endTimeMillis); - } - - public String getHotwordPackageNameInternal() { - String packageName = null; - try { - packageName = mAudioService.getCurrentHotwordInputPackageName(); - } catch (RemoteException e) { - Log.e(TAG, "getHotwordPackageName() failed."); - } - return packageName; - } -} - diff --git a/lineage/res/AndroidManifest.xml b/lineage/res/AndroidManifest.xml index c712c948..d2beafe8 100644 --- a/lineage/res/AndroidManifest.xml +++ b/lineage/res/AndroidManifest.xml @@ -162,26 +162,6 @@ android:description="@string/permdesc_perfAccessDesc" android:protectionLevel="signature|privileged" /> - - - - - - - - - toegang na prestasie bestuurder Laat \'n toep toe om toegang na die prestasie diens te verkry. Moet nooit nodig wees vir normale programme nie. - - toegang na lewendige slotskerm se bestuurder diens - - Laat \'n toepassing toegang die lewendige Slotskerm se bestuurder diens. - - toegang na lewendige slotskerm se bestuurder diens - - Laat stelsel toepassings toegang na die lewendige slotskerm se bestuurder diens. - - toegang na lewendige slotskerm se bestuurder diens - - Laat \'n diens toegang na die lewendige slotskerm se bestuurder diens. lees weer Laat \'n toep toe om inhoud te lees vanaf die weer verskaffer. diff --git a/lineage/res/res/values-am/strings.xml b/lineage/res/res/values-am/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-am/strings.xml +++ b/lineage/res/res/values-am/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-ar/strings.xml b/lineage/res/res/values-ar/strings.xml index f435f423..a2cdec4a 100644 --- a/lineage/res/res/values-ar/strings.xml +++ b/lineage/res/res/values-ar/strings.xml @@ -124,18 +124,6 @@ الوصول إلى مدير الأداء السماح للتطبيق بالوصول إلى خدمة الأداء. ينبغي ألا يكون ضرورياً للتطبيقات العادية. - - الوصول إلى خدمة مدير شاشة القفل المباشرة - - يسمح لتطبيق معين بالوصول إلى خدمة مدير شاشة التأمين المباشرة. - - الوصول إلى خدمة مدير شاشة التأمين المباشرة - - يسمح لتطبيقات النظام معين بالوصول إلى خدمة مدير شاشة التأمين المباشرة. - - توفير خدمة مدير شاشة التأمين المباشرة - - يسمح لخدمة معينة لتوفير خدمة مدير شاشة التأمين المباشرة. قراءة الطقس يسمح لتطبيق معين بقراءة المحتوى من موفر الطقس. diff --git a/lineage/res/res/values-as-rIN/strings.xml b/lineage/res/res/values-as-rIN/strings.xml index 0d454360..5b107c01 100644 --- a/lineage/res/res/values-as-rIN/strings.xml +++ b/lineage/res/res/values-as-rIN/strings.xml @@ -112,12 +112,6 @@ - - - - - - diff --git a/lineage/res/res/values-ast-rES/strings.xml b/lineage/res/res/values-ast-rES/strings.xml index b5127cf4..0bf1f5d2 100644 --- a/lineage/res/res/values-ast-rES/strings.xml +++ b/lineage/res/res/values-ast-rES/strings.xml @@ -120,13 +120,6 @@ acceder al xestor de rindimientu Permite qu\'una aplicación acceda al serviciu de rindimientu. Enxamás debería precisase p\'aplicaciones normales. - - acceder al serviciu de pantalles de bloquéu animaes - - - - - modificar base de datos d\'usu de datos diff --git a/lineage/res/res/values-az-rAZ/strings.xml b/lineage/res/res/values-az-rAZ/strings.xml index a84fb77f..8a54ce70 100644 --- a/lineage/res/res/values-az-rAZ/strings.xml +++ b/lineage/res/res/values-az-rAZ/strings.xml @@ -112,12 +112,6 @@ - - - - - - diff --git a/lineage/res/res/values-be-rBY/strings.xml b/lineage/res/res/values-be-rBY/strings.xml index 4d508a1b..77602f34 100644 --- a/lineage/res/res/values-be-rBY/strings.xml +++ b/lineage/res/res/values-be-rBY/strings.xml @@ -124,12 +124,6 @@ доступ да менеджара прадукцыйнасці Дадатак зможа атрымваць доступ да службы прадукцыйнасці. Гэты дазвол не выкарыстоўваецца звычайнымі дадаткамі. - - - - - - Абнавіць звесткі аб надвор’і diff --git a/lineage/res/res/values-be/strings.xml b/lineage/res/res/values-be/strings.xml index 3613372f..b5f5fd86 100644 --- a/lineage/res/res/values-be/strings.xml +++ b/lineage/res/res/values-be/strings.xml @@ -127,12 +127,6 @@ доступ да менеджара прадукцыйнасці Дадатак зможа атрымваць доступ да службы прадукцыйнасці. Гэты дазвол не выкарыстоўваецца звычайнымі дадаткамі. - - - - - - Абнавіць звесткі аб надвор’і diff --git a/lineage/res/res/values-bg/strings.xml b/lineage/res/res/values-bg/strings.xml index 98e832f8..bea062df 100644 --- a/lineage/res/res/values-bg/strings.xml +++ b/lineage/res/res/values-bg/strings.xml @@ -129,18 +129,6 @@ Достъп до диспечера за производителност Осигурява на приложението достъп до диспечера за производителност. Не е необходимо за нормални приложения. - - Достъп до анимиран заключен екран - - Позволява на приложението достъп до анимиран заключен на екран. - - Достъп до анимиран заключен екран - - Позволява на системното приложение достъп до анимиран заключен на екран. - - Осигурява достъп до анимиран заключен екран - - Позволи достъп на услуга до анимиран заключен на екран. прочети прогнозата Разрешава на приложението да чете данни от доставчика на време. diff --git a/lineage/res/res/values-bn-rBD/strings.xml b/lineage/res/res/values-bn-rBD/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-bn-rBD/strings.xml +++ b/lineage/res/res/values-bn-rBD/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-br-rFR/strings.xml b/lineage/res/res/values-br-rFR/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-br-rFR/strings.xml +++ b/lineage/res/res/values-br-rFR/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-bs-rBA/strings.xml b/lineage/res/res/values-bs-rBA/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-bs-rBA/strings.xml +++ b/lineage/res/res/values-bs-rBA/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-ca/strings.xml b/lineage/res/res/values-ca/strings.xml index 931e90b7..c2e90a7c 100644 --- a/lineage/res/res/values-ca/strings.xml +++ b/lineage/res/res/values-ca/strings.xml @@ -129,18 +129,6 @@ accés a l\'administrador de rendiment Permet a una aplicació accedir al servei de rendiment. Normalment no hauria de ser necessari en les aplicacions normals. - - accedir al servei d\'administració de bloqueig de pantalla animat - - Permet a una aplicació accedir al servei d\'administració de bloqueig de pantalla animat. - - accedir al servei d\'administració de bloqueig de pantalla animat - - Permet a les aplicacions del sistema accedir al servei d\'administració de bloqueig de pantalla animat. - - proveir el servei d\'administració de bloqueig de pantalla animat - - Permet a un servei proveir el servei d\'administració de bloqueig de pantalla animat. llegir el temps Permet a una aplicació llegir els continguts del proveïdor meteorològic. diff --git a/lineage/res/res/values-cs/strings.xml b/lineage/res/res/values-cs/strings.xml index 3eb64ebe..dabd5ee8 100644 --- a/lineage/res/res/values-cs/strings.xml +++ b/lineage/res/res/values-cs/strings.xml @@ -129,18 +129,6 @@ přístup ke správci výkonu Umožňuje přistupovat ke službě výkonu. Toto oprávnění by neměla vyžadovat žádná normální aplikace. - - přístup ke službě správce živého zámku obrazovky - - Umožní přistupovat ke správci služby živého zámku obrazovky. - - přístup ke službě správce živého zámku obrazovky - - Umožní systému přistupovat ke správci služby živého zámku obrazovky. - - poskytovat správce služby živého zámku obrazovky - - Umožní poskytovat správce služby živého zámku obrazovky. číst počasí Umožní číst obsah od poskytovatele počasí. diff --git a/lineage/res/res/values-csb-rPL/strings.xml b/lineage/res/res/values-csb-rPL/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-csb-rPL/strings.xml +++ b/lineage/res/res/values-csb-rPL/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-cy/strings.xml b/lineage/res/res/values-cy/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-cy/strings.xml +++ b/lineage/res/res/values-cy/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-da/strings.xml b/lineage/res/res/values-da/strings.xml index c2255396..2d2a0211 100644 --- a/lineage/res/res/values-da/strings.xml +++ b/lineage/res/res/values-da/strings.xml @@ -129,18 +129,6 @@ tilgå ydelsesmanager Tillader en app at tilgå ydelsestjenesten. Bør aldrig være nødvendigt for alm. apps. - - tilgå manager service for levende skærmlås - - Tillader en app at tilgå manager service for levende skærmlås. - - tilgå manager service for levende skærmlås - - Tillader system apps at tilgå manager servicen for levende skærmlås. - - udbyd manager service for levende skærmlås - - Tillader en tjeneste at udbyde manager service for levende skærmlås. læs vejret Tillader en app at læse indholdet fra en vejr-udbyder. diff --git a/lineage/res/res/values-de/strings.xml b/lineage/res/res/values-de/strings.xml index a95cfa50..60d63baf 100644 --- a/lineage/res/res/values-de/strings.xml +++ b/lineage/res/res/values-de/strings.xml @@ -129,18 +129,6 @@ Zugriff auf Leistungsmanager Ermöglicht einer App den Zugriff auf den Leistungsdienst. Wird für normale Apps nicht benötigt. - - auf Verwaltungsdienst der animierten Bildschirmsperre zugreifen - - Ermöglicht einer App, auf den Verwaltungdienst der animierten Bildschirmsperre zuzugreifen. - - auf Verwaltungsdienst der animierten Bildschirmsperre zugreifen - - Ermöglicht System-Apps den Zugriff auf den Verwaltungsdienst der animierten Bildschirmsperre. - - Verwaltungsdienst für animierte Bildschirmsperre anbieten - - Ermöglicht einer App, auf den Verwaltungsdienst der animierten Bildschirmsperre zuzugreifen. Wetter auslesen Ermöglicht einer App, Inhalte des Wetterdatenanbieters auszulesen. diff --git a/lineage/res/res/values-el/strings.xml b/lineage/res/res/values-el/strings.xml index 2909afdc..bfd641e1 100644 --- a/lineage/res/res/values-el/strings.xml +++ b/lineage/res/res/values-el/strings.xml @@ -129,18 +129,6 @@ πρόσβαση στην υπηρεσία επιδόσεων Επιτρέπει σε μια εφαρμογή την πρόσβαση στην υπηρεσία επιδόσεων. Δεν πρέπει να απαιτείται από κανονικές εφαρμογές. - - πρόσβαση στην υπηρεσία διαχείρισης ζωντανών ταπετσαριών οθόνης κλειδώματος - - Επιτρέπει σε μια εφαρμογή να έχει πρόσβαση στην υπηρεσία διαχείρισης ζωντανών ταπετσαριών οθόνης κλειδώματος. - - πρόσβαση στην υπηρεσία διαχείρισης ζωντανών ταπετσαριών οθόνης κλειδώματος - - Επιτρέπει την πρόσβαση στην υπηρεσία διαχείρισης ζωντανών ταπετσαριών οθόνης κλειδώματος σε εφαρμογές συστήματος. - - παροχή υπηρεσίας διαχείρισης ζωντανών ταπετσαριών οθόνης κλειδώματος - - Επιτρέπει σε μια υπηρεσία να παρέχει την υπηρεσία διαχείρισης ζωντανών ταπετσαριών οθόνης κλειδώματος. ανάγνωση καιρού Επιτρέπει σε μια εφαρμογή να διαβάσει περιεχόμενο από την υπηρεσία παροχής καιρού. diff --git a/lineage/res/res/values-en-rAU/strings.xml b/lineage/res/res/values-en-rAU/strings.xml index ddaf9373..2fbff05c 100644 --- a/lineage/res/res/values-en-rAU/strings.xml +++ b/lineage/res/res/values-en-rAU/strings.xml @@ -129,18 +129,6 @@ access performance manager Allows an app to access the performance service. Should never be needed for normal apps. - - access live lock screen manager service - - Allows an app to access the live lock screen manager service. - - access live lock screen manager service - - Allows system apps to access the live lock screen manager service. - - provide live lock screen manager service - - Allows a service to provide the live lock screen manager service. read weather Allows an app to read content from the weather provider. diff --git a/lineage/res/res/values-en-rGB/strings.xml b/lineage/res/res/values-en-rGB/strings.xml index c7e789ee..0ff69bc3 100644 --- a/lineage/res/res/values-en-rGB/strings.xml +++ b/lineage/res/res/values-en-rGB/strings.xml @@ -129,18 +129,6 @@ access performance manager Allows an app to access the performance service. Should never be needed for normal apps. - - access live lock screen manager service - - Allows an app to access the live lock screen manager service. - - access live lock screen manager service - - Allows system apps to access the live lock screen manager service. - - provide live lock screen manager service - - Allows a service to provide the live lock screen manager service. read weather Allows an app to read content from the weather provider. diff --git a/lineage/res/res/values-en-rIN/strings.xml b/lineage/res/res/values-en-rIN/strings.xml index b0118f54..30724e08 100644 --- a/lineage/res/res/values-en-rIN/strings.xml +++ b/lineage/res/res/values-en-rIN/strings.xml @@ -129,18 +129,6 @@ access performance manager Allows an app to access the performance service. Should never be needed for normal apps. - - access live lock screen manager service - - Allows an app to access the live lock screen manager service. - - access live lock screen manager service - - Allows system apps to access the live lock screen manager service. - - provide live lock screen manager service - - Allows a service to provide the live lock screen manager service. read weather Allows an app to read content from the weather provider. diff --git a/lineage/res/res/values-en-rPT/strings.xml b/lineage/res/res/values-en-rPT/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-en-rPT/strings.xml +++ b/lineage/res/res/values-en-rPT/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-eo/strings.xml b/lineage/res/res/values-eo/strings.xml index c47fa6aa..f45c7c6e 100644 --- a/lineage/res/res/values-eo/strings.xml +++ b/lineage/res/res/values-eo/strings.xml @@ -49,12 +49,6 @@ - - - - - - diff --git a/lineage/res/res/values-es-rCO/strings.xml b/lineage/res/res/values-es-rCO/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-es-rCO/strings.xml +++ b/lineage/res/res/values-es-rCO/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-es-rMX/strings.xml b/lineage/res/res/values-es-rMX/strings.xml index 039eb48d..9acfcf2b 100644 --- a/lineage/res/res/values-es-rMX/strings.xml +++ b/lineage/res/res/values-es-rMX/strings.xml @@ -71,12 +71,6 @@ acceder al supervisor de rendimiento Permite que la aplicación acceda al servicio de rendimiento. No debería ser necesario para aplicaciones normales. - - - - - - diff --git a/lineage/res/res/values-es-rUS/strings.xml b/lineage/res/res/values-es-rUS/strings.xml index 08682961..baa99225 100644 --- a/lineage/res/res/values-es-rUS/strings.xml +++ b/lineage/res/res/values-es-rUS/strings.xml @@ -129,18 +129,6 @@ acceso al gestor de rendimiento Permite que la aplicación acceda al servicio de rendimiento. Nunca debería ser necesario para aplicaciones normales. - - acceder al gestor de servicio de pantalla de bloqueo animada - - Permite que una aplicación acceda al servicio de gestión de la pantalla de bloqueo animada. - - acceder al gestor de servicio de la pantalla de bloqueo animada - - Permite que las aplicaciones de sistema accedan al servicio de gestión de la pantalla de bloqueo animada. - - proporcionar servicio de gestión de la pantalla de bloqueo animada - - Permite que un servicio provea el servicio de gestión de la pantalla de bloqueo animada. leer datos climáticos Permite a una aplicación leer contenido desde el proveedor climático. diff --git a/lineage/res/res/values-es/strings.xml b/lineage/res/res/values-es/strings.xml index a9bc6f90..918f10d2 100644 --- a/lineage/res/res/values-es/strings.xml +++ b/lineage/res/res/values-es/strings.xml @@ -129,18 +129,6 @@ acceder al supervisor de rendimiento Permite que la aplicación acceda al servicio de rendimiento. Nunca debería ser necesario para aplicaciones normales. - - acceder al administrador de servicio de la pantalla de bloqueo animada - - Permite que una aplicación acceda al servicio de administración de la pantalla de bloqueo animada. - - acceder al administrador de servicio de pantalla de bloqueo animada - - Permite que las aplicaciones de sistema accedan al servicio de administración de pantalla de bloqueo animada. - - proporcionar servicio de administración de pantalla de bloqueo animada - - Permite que un servicio provea el servicio de administración de pantalla de bloqueo animada. leer el tiempo Permite una aplicación leer contenido desde el proveedor de clima. diff --git a/lineage/res/res/values-et-rEE/strings.xml b/lineage/res/res/values-et-rEE/strings.xml index a954536a..e35147fa 100644 --- a/lineage/res/res/values-et-rEE/strings.xml +++ b/lineage/res/res/values-et-rEE/strings.xml @@ -75,12 +75,6 @@ - - - - - - diff --git a/lineage/res/res/values-eu-rES/strings.xml b/lineage/res/res/values-eu-rES/strings.xml index c7df8d6c..68551c23 100644 --- a/lineage/res/res/values-eu-rES/strings.xml +++ b/lineage/res/res/values-eu-rES/strings.xml @@ -129,18 +129,6 @@ errendimendu kudeatzailea atzitu Errendimendu kudeatzailea atzitzea ahalbidetzen dio aplikazioari. Aplikazio arruntek ez dute hau behar. - - blokeo pantaila bizien kudeaketa zerbitzua atzitzea - - Blokeo pantaila bizien kudeaketa zerbitzua atzitzea ahalbidetzen dio aplikazioari. - - blokeo pantaila bizien kudeaketa zerbitzua atzitzea - - Blokeo pantaila bizien kudeaketa zerbitzua atzitzea ahalbidetzen die sistemako aplikazioei. - - blokeo pantaila bizien kudeaketa zerbitzua ematea - - Blokeo pantaila bizien kudeaketa zerbitzua ematea ahalbidetzen dio zerbitzu bati. eguraldia irakurri Eguraldi hornitzailetik edukia irakurtzea ahalbidetzen dio aplikazioari. diff --git a/lineage/res/res/values-fa/strings.xml b/lineage/res/res/values-fa/strings.xml index cb92910b..3a1f8e60 100644 --- a/lineage/res/res/values-fa/strings.xml +++ b/lineage/res/res/values-fa/strings.xml @@ -91,12 +91,6 @@ - - - - - - diff --git a/lineage/res/res/values-fi/strings.xml b/lineage/res/res/values-fi/strings.xml index c757119e..3c743c10 100644 --- a/lineage/res/res/values-fi/strings.xml +++ b/lineage/res/res/values-fi/strings.xml @@ -129,18 +129,6 @@ pääse suorituskyvyn hallintaan Sallii sovelluksen pääsyn suorityskyvyn hallinnan palveluun. Tavalliset sovellukset eivät koskaan tarvitse tätä. - - käytä live-lukitusnäytön hallintapalvelua - - Sallii sovelluksen käyttää live-lukitusnäytön hallintapalvelua. - - käytä live-lukitusnäytön hallintapalvelua - - Sallii järjestelmän käyttää live-lukitusnäytön hallintapalvelua. - - käytä live-lukitusnäytön hallintapalveluna - - Sallii palvelua käytettävän live-lukitusnäytön hallintapalveluna. lue säätä Sallii sovelluksen lukea sisältöä säätarjoajalta. diff --git a/lineage/res/res/values-fil-rPH/strings.xml b/lineage/res/res/values-fil-rPH/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-fil-rPH/strings.xml +++ b/lineage/res/res/values-fil-rPH/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-fr-rCA/strings.xml b/lineage/res/res/values-fr-rCA/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-fr-rCA/strings.xml +++ b/lineage/res/res/values-fr-rCA/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-fr/strings.xml b/lineage/res/res/values-fr/strings.xml index 1ac1d315..7e81560e 100644 --- a/lineage/res/res/values-fr/strings.xml +++ b/lineage/res/res/values-fr/strings.xml @@ -129,18 +129,6 @@ accéder au gestionnaire de performance Permet à l\'application d\'accéder au service de performance. Une application normale ne devrait pas en avoir besoin. - - accès au service de gestion de l\'écran de verrouillage animé - - Autorise une application à accéder au service de gestionnaire d\'écran de verrouillage. - - accès au service de gestion de l\'écran de verrouillage animé - - Permet aux applications systèmes d\'accéder au service de gestion de l\'écran de verrouillage animé. - - fournir un service de gestion de l\'écran de verrouillage animé - - Permet à un service de fournir le service de gestion de l\'écran de verrouillage animé. lire la météo Autorise une application à lire le contenu du fournisseur météo. diff --git a/lineage/res/res/values-frp-rIT/strings.xml b/lineage/res/res/values-frp-rIT/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-frp-rIT/strings.xml +++ b/lineage/res/res/values-frp-rIT/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-fy-rNL/strings.xml b/lineage/res/res/values-fy-rNL/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-fy-rNL/strings.xml +++ b/lineage/res/res/values-fy-rNL/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-ga-rIE/strings.xml b/lineage/res/res/values-ga-rIE/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-ga-rIE/strings.xml +++ b/lineage/res/res/values-ga-rIE/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-gd-rGB/strings.xml b/lineage/res/res/values-gd-rGB/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-gd-rGB/strings.xml +++ b/lineage/res/res/values-gd-rGB/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-gl-rES/strings.xml b/lineage/res/res/values-gl-rES/strings.xml index 1d4cac43..3d98749b 100644 --- a/lineage/res/res/values-gl-rES/strings.xml +++ b/lineage/res/res/values-gl-rES/strings.xml @@ -129,18 +129,6 @@ acceso ao xestor de rendemento Permite que unha aplicación acceda ao servizo de rendemento. Non debería ser necesario para aplicación normais. - - acceder ao administrador de servizos de pantalla animada bloqueada - - Permite a un aplicativo acceder ao servizo de administración de pantalla animada bloqueada. - - acceder ao administrador de servizo de pantalla animada bloqueada - - Permite ás aplicacións do sistema acceder ao servizo de administración de pantalla animada bloqueada. - - fornecer o servizo de administración de pantalla de bloqueo - - Permite a un servizo fornecer o servizo de administración de pantalla animada bloqueada. ler o tempo Permite que unha aplicación ler o contido desde o fornecedor de clima. diff --git a/lineage/res/res/values-gu-rIN/strings.xml b/lineage/res/res/values-gu-rIN/strings.xml index 0e8d0440..a60b62e4 100644 --- a/lineage/res/res/values-gu-rIN/strings.xml +++ b/lineage/res/res/values-gu-rIN/strings.xml @@ -114,12 +114,6 @@ ઍક્સેસ કામગીરી મેનેજર ઍપ ને કામગીરી સેવા ઍક્સેસ કરવાની છૂટ આપે છે. સામાન્ય એપ્સ માટે ક્યારેય જરૂર પડવી જોઈએ નહી. - - - - - - diff --git a/lineage/res/res/values-hi/strings.xml b/lineage/res/res/values-hi/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-hi/strings.xml +++ b/lineage/res/res/values-hi/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-hr/strings.xml b/lineage/res/res/values-hr/strings.xml index 69e8007d..0bf13ff0 100644 --- a/lineage/res/res/values-hr/strings.xml +++ b/lineage/res/res/values-hr/strings.xml @@ -128,18 +128,6 @@ pristup upravitelju performansi Dopušta aplikaciji pristup servisu performansi. Za obične aplikacije nikada ne bi trebao biti potreban. - - pristup upravitelju usluge aktivnog zaključanog zaslona - - Omogućuje aplikaciji pristup usluzi aktivnog zaključanog zaslona. - - pristup upravitelju usluge aktivnog zaključanog zaslona - - Dopušta sistemskim aplikacijama pristup usluzi aktivnog zaključanog zaslona. - - pružanje usluge upravitelju aktivnog zaključanog zaslona - - Dopuštenje usluge dobavljača za uslugu menadžeru aktivnog zaključanog zaslona. čitanje vremenske prognoze Dopušta aplikaciji čitati sadržaj vremenske prognoze. diff --git a/lineage/res/res/values-hu/strings.xml b/lineage/res/res/values-hu/strings.xml index 6c918ba6..5fa1156e 100644 --- a/lineage/res/res/values-hu/strings.xml +++ b/lineage/res/res/values-hu/strings.xml @@ -129,18 +129,6 @@ hozzáférés a teljesítmény kezelőhöz Lehetővé teszi az alkalmazás számára, hogy hozzáférjen a teljesítmény szolgáltatáshoz. Általános alkalmazásoknak soha nem kell ilyen engedély. - - hozzáférés élő zárképernyő-kezelő szolgáltatáshoz - - Lehetővé teszi az alkalmazás számára az élő zárképernyő-kezelő szolgáltatás elérését. - - hozzáférés élő zárképernyő-kezelő szolgáltatáshoz - - Lehetővé teszi a rendszeralkalmazások számára az élő zárképernyő-kezelő szolgáltatás elérését. - - élő zárképernyő-kezelő szolgáltatás biztosítása - - Lehetővé teszi a szolgáltatás számára az élő zárképernyő-kezelő szolgáltatás biztosítását. időjárás olvasása Lehetővé teszi az alkalmazás számára az időjárás szolgáltatói tartalom olvasását. diff --git a/lineage/res/res/values-hy-rAM/strings.xml b/lineage/res/res/values-hy-rAM/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-hy-rAM/strings.xml +++ b/lineage/res/res/values-hy-rAM/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-in/strings.xml b/lineage/res/res/values-in/strings.xml index ee7314d3..5517fcca 100644 --- a/lineage/res/res/values-in/strings.xml +++ b/lineage/res/res/values-in/strings.xml @@ -127,18 +127,6 @@ akses pengelola kinerja Izinkan aplikasi untuk mengakses layanan kinerja. Tidak dibutuhkan untuk aplikasi biasa. - - akses layanan manajer untuk layar kunci hidup - - Izinkan aplikasi untuk mengakses layanan manajer untuk layar kunci hidup. - - akses layanan manajer untuk layar kunci hidup - - Izinkan aplikasi sistem untuk mengakses layanan manajer untuk layar kunci hidup. - - sediakan layanan manajer untuk layar kunci hidup - - Izinkan layanan untuk menyediakan layanan manajer untuk layar kunci hidup. baca cuaca Izinkan aplikasi untuk membaca konten dari penyedia cuaca. diff --git a/lineage/res/res/values-is-rIS/strings.xml b/lineage/res/res/values-is-rIS/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-is-rIS/strings.xml +++ b/lineage/res/res/values-is-rIS/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-it/strings.xml b/lineage/res/res/values-it/strings.xml index 33325559..f778aba5 100644 --- a/lineage/res/res/values-it/strings.xml +++ b/lineage/res/res/values-it/strings.xml @@ -129,18 +129,6 @@ accesso gestione performance Consente ad un\'app di accedere alla gestione performances. Non dovrebbe essere mai richiesto per le normali app. - - accesso al servizio gestione blocco schermo animato - - Consenti ad un\'app di accedere al servizio di gestione del blocco schermo animato. - - accesso al servizio gestione blocco schermo animato - - Consenti alle app di sistema di accedere al servizio di gestione del blocco schermo animato. - - accedi al servizio di gestione schermata di blocco animata - - Consenti ad un servizio di accedere al servizio di gestione del blocco schermo animato. leggi meteo Consenti ad un\'app di leggere contenuti dal provider meteo. diff --git a/lineage/res/res/values-iw/strings.xml b/lineage/res/res/values-iw/strings.xml index 573b1342..220dcf67 100644 --- a/lineage/res/res/values-iw/strings.xml +++ b/lineage/res/res/values-iw/strings.xml @@ -129,18 +129,6 @@ גש למנהל הביצועים מאפשר ליישום לגשת לשירות ניהול הביצועים. לא אמור להידרש ליישומים רגילים לעולם. - - גישה לשירות ניהול מסך הנעילה החי - - מאפשר ליישום לגשת לשירות ניהול מסך הנעילה החי. - - גש לשירות ניהול מסך הנעילה החי - - מאפשר ליישומי מערכת לגשת לשירות ניהול מסך הנעילה החי. - - מתן שירות ניהול מסך נעילה חי - - מאפשר לשירות לספק את שירות הניהול למסך נעילה חי. קרא את מזג האוויר מאפשר ליישום לקרוא תוכן של ספק מידע על מזג האוויר. diff --git a/lineage/res/res/values-ja/strings.xml b/lineage/res/res/values-ja/strings.xml index 7f15d855..06da0a2c 100644 --- a/lineage/res/res/values-ja/strings.xml +++ b/lineage/res/res/values-ja/strings.xml @@ -129,18 +129,6 @@ パフォーマンスマネージャーへのアクセス パフォーマンスサービスへのアクセスをアプリに許可します。通常のアプリで必要とされることはありません。 - - ライブロック画面マネージャサービスへのアクセス - - ライブロック画面マネージャサービスへのアクセスをアプリに許可します。 - - ライブロック画面マネージャサービスへのアクセス - - ライブロック画面マネージャサービスへのアクセスをシステムアプリに許可します。 - - ライブロック画面マネージャサービスの提供 - - ライブロック画面マネージャサービスの提供をサービスに許可します。 天気の読み取り 天気プロバイダからのコンテンツの読み取りをアプリに許可します。 diff --git a/lineage/res/res/values-ka-rGE/strings.xml b/lineage/res/res/values-ka-rGE/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-ka-rGE/strings.xml +++ b/lineage/res/res/values-ka-rGE/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-kk-rKZ/strings.xml b/lineage/res/res/values-kk-rKZ/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-kk-rKZ/strings.xml +++ b/lineage/res/res/values-kk-rKZ/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-km-rKH/strings.xml b/lineage/res/res/values-km-rKH/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-km-rKH/strings.xml +++ b/lineage/res/res/values-km-rKH/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-kn-rIN/strings.xml b/lineage/res/res/values-kn-rIN/strings.xml index c9618170..4892113a 100644 --- a/lineage/res/res/values-kn-rIN/strings.xml +++ b/lineage/res/res/values-kn-rIN/strings.xml @@ -112,12 +112,6 @@ - - - - - - diff --git a/lineage/res/res/values-ko/strings.xml b/lineage/res/res/values-ko/strings.xml index d3b51fc3..fc974eca 100644 --- a/lineage/res/res/values-ko/strings.xml +++ b/lineage/res/res/values-ko/strings.xml @@ -129,18 +129,6 @@ 성능 관리자에 액세스 앱이 성능 서비스에 접근할 수 있도록 허용합니다. 일반 앱에서는 필요 없는 권한입니다. - - 라이브 잠금 화면 관리자 서비스에 접근 - - 앱이 라이브 잠금 화면 관리자 서비스에 접근할 수 있도록 허용합니다. - - 라이브 잠금 화면 관리자 서비스에 접근 - - 시스템 앱이 라이브 잠금 화면 관리자 서비스에 접근할 수 있도록 허용합니다. - - 라이브 잠금 화면 관리자 서비스 제공 - - 앱이 라이브 잠금 화면 관리자 서비스를 제공할 수 있도록 허용합니다. 날씨 확인 앱이 날씨 제공자로부터 날씨를 확인할 수 있도록 허용합니다. diff --git a/lineage/res/res/values-ku/strings.xml b/lineage/res/res/values-ku/strings.xml index 3ad397cd..5d472569 100644 --- a/lineage/res/res/values-ku/strings.xml +++ b/lineage/res/res/values-ku/strings.xml @@ -51,12 +51,6 @@ - - - - - - diff --git a/lineage/res/res/values-ky-rKG/strings.xml b/lineage/res/res/values-ky-rKG/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-ky-rKG/strings.xml +++ b/lineage/res/res/values-ky-rKG/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-lb/strings.xml b/lineage/res/res/values-lb/strings.xml index 09753b44..2beb4aef 100644 --- a/lineage/res/res/values-lb/strings.xml +++ b/lineage/res/res/values-lb/strings.xml @@ -79,12 +79,6 @@ - - - - - - diff --git a/lineage/res/res/values-lo-rLA/strings.xml b/lineage/res/res/values-lo-rLA/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-lo-rLA/strings.xml +++ b/lineage/res/res/values-lo-rLA/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-lt/strings.xml b/lineage/res/res/values-lt/strings.xml index 5f3398df..1110cba1 100644 --- a/lineage/res/res/values-lt/strings.xml +++ b/lineage/res/res/values-lt/strings.xml @@ -91,12 +91,6 @@ - - - - - - diff --git a/lineage/res/res/values-lv/strings.xml b/lineage/res/res/values-lv/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-lv/strings.xml +++ b/lineage/res/res/values-lv/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-mk-rMK/strings.xml b/lineage/res/res/values-mk-rMK/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-mk-rMK/strings.xml +++ b/lineage/res/res/values-mk-rMK/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-ml-rIN/strings.xml b/lineage/res/res/values-ml-rIN/strings.xml index abed3096..5fc0a7c1 100644 --- a/lineage/res/res/values-ml-rIN/strings.xml +++ b/lineage/res/res/values-ml-rIN/strings.xml @@ -112,12 +112,6 @@ - - - - - - diff --git a/lineage/res/res/values-mn-rMN/strings.xml b/lineage/res/res/values-mn-rMN/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-mn-rMN/strings.xml +++ b/lineage/res/res/values-mn-rMN/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-mr-rIN/strings.xml b/lineage/res/res/values-mr-rIN/strings.xml index 73c01f30..b020a797 100644 --- a/lineage/res/res/values-mr-rIN/strings.xml +++ b/lineage/res/res/values-mr-rIN/strings.xml @@ -114,12 +114,6 @@ प्रवेश कामगिरी व्यवस्थापक अॅप ला टॉर्च सेवा ऍक्सेस करण्याची परवानगी देते. सामान्य अॅपसाठी कधीही गरज भासू नये. - - - - - - diff --git a/lineage/res/res/values-ms-rMY/strings.xml b/lineage/res/res/values-ms-rMY/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-ms-rMY/strings.xml +++ b/lineage/res/res/values-ms-rMY/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-my-rMM/strings.xml b/lineage/res/res/values-my-rMM/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-my-rMM/strings.xml +++ b/lineage/res/res/values-my-rMM/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-nb/strings.xml b/lineage/res/res/values-nb/strings.xml index c6a6ccfc..d7172a1e 100644 --- a/lineage/res/res/values-nb/strings.xml +++ b/lineage/res/res/values-nb/strings.xml @@ -129,18 +129,6 @@ tilgang til ytelsesadministrereren Tillater en app å få tilgang til ytelses-tjenesten. Dette skulle aldri vært nødvendig for normale apper. - - tilgang til levende skjermlås administrerings-tjenesten - - Tillater en app å få tilgang til levende skjermlås administrerings-tjenesten. - - tilgang til levende skjermlås administrerings-tjenesten - - Tillater systemapper å få tilgang til levende skjermlås administrerings-tjenesten. - - forsyne levende skjermlås administrerings-tjenesten - - Tillater en tjeneste å forsyne levende skjermlås administrerings-tjenesten. lese vær Tillater en app å lese av innholdet fra værleverandøren. diff --git a/lineage/res/res/values-ne-rNP/strings.xml b/lineage/res/res/values-ne-rNP/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-ne-rNP/strings.xml +++ b/lineage/res/res/values-ne-rNP/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-nl/strings.xml b/lineage/res/res/values-nl/strings.xml index 3b64e4c4..80cb1d99 100644 --- a/lineage/res/res/values-nl/strings.xml +++ b/lineage/res/res/values-nl/strings.xml @@ -129,18 +129,6 @@ Toegang tot prestatiebeheer Hiermee kan de app toegang krijgen tot de prestatieservice. Nooit vereist voor normale apps. - - toegang tot geanimeerd vergrendelingsschermbeheer - - Hiermee kan de app toegang krijgen tot het geanimeerd vergrendelingsschermbeheer. - - toegang tot geanimeerd vergrendelingsschermbeheer - - Hiermee kunnen systeemapps toegang krijgen tot het geanimeerd vergrendelingsschermbeheer. - - geanimeerd vergrendelingsschermbeheer aanbieden - - Hiermee kan een service het geanimeerd vergrendelingsschermbeheer aanbieden. weer lezen Hiermee kan de app de inhoud van de weeraanbieder lezen. diff --git a/lineage/res/res/values-oc-rFR/strings.xml b/lineage/res/res/values-oc-rFR/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-oc-rFR/strings.xml +++ b/lineage/res/res/values-oc-rFR/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-or-rIN/strings.xml b/lineage/res/res/values-or-rIN/strings.xml index af45adf5..665b30c8 100644 --- a/lineage/res/res/values-or-rIN/strings.xml +++ b/lineage/res/res/values-or-rIN/strings.xml @@ -112,12 +112,6 @@ - - - - - - diff --git a/lineage/res/res/values-pa-rIN/strings.xml b/lineage/res/res/values-pa-rIN/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-pa-rIN/strings.xml +++ b/lineage/res/res/values-pa-rIN/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-pl/strings.xml b/lineage/res/res/values-pl/strings.xml index a82b1025..c0fb8be5 100644 --- a/lineage/res/res/values-pl/strings.xml +++ b/lineage/res/res/values-pl/strings.xml @@ -129,18 +129,6 @@ dostęp do menedżera wydajności Umożliwia aplikacji dostęp do usługi wydajności (nie powinno być wymagane przez standardowe aplikacje). - - dostęp do usługi menadżera animowanego ekranu blokady - - Zezwala aplikacji na dostęp do usługi menedżera animowanego ekranu blokady. - - dostęp do usługi menadżera animowanego ekranu blokady - - Zezwala systemowym aplikacjom na dostęp do usługi menedżera animowanego ekranu blokady. - - dostarcza usługę menadżera animowanego ekranu blokady - - Zezwala usłudze na dostarczenie dostępu do usługi menedżera animowanego ekranu blokady. odczyt pogody Umożliwia aplikacji odczyt danych od dostawcy pogody. diff --git a/lineage/res/res/values-pt-rBR/strings.xml b/lineage/res/res/values-pt-rBR/strings.xml index 4372f093..79ab2aa8 100644 --- a/lineage/res/res/values-pt-rBR/strings.xml +++ b/lineage/res/res/values-pt-rBR/strings.xml @@ -129,18 +129,6 @@ acessar o gerenciador de desempenho Permite que um aplicativo acesse o serviço de desempenho. Nunca deve ser necessário para aplicativos normais. - - acesso ao serviço de gerenciamento da tela de bloqueio animada - - Permite que um aplicativo acesse o serviço de gerenciamento da tela de bloqueio animada. - - acesso ao serviço de gerenciamento da tela de bloqueio animada - - Permite que os aplicativos do sistema acessem o serviço de gerenciamento da tela de bloqueio animada. - - fornecer o serviço de gerenciador de tela de bloqueio animada - - Permite que um serviço forneça o serviço de gerenciador de tela de bloqueio animada. ler previsão do tempo Permite que um aplicativo leia o conteúdo do provedor da previsão do tempo. diff --git a/lineage/res/res/values-pt-rPT/strings.xml b/lineage/res/res/values-pt-rPT/strings.xml index 7ee70164..9ac5f77c 100644 --- a/lineage/res/res/values-pt-rPT/strings.xml +++ b/lineage/res/res/values-pt-rPT/strings.xml @@ -129,18 +129,6 @@ aceder ao gestor de desempenho Permite que uma aplicação aceda ao serviço de desempenho. Nunca deverá ser necessário para aplicações normais. - - aceder ao serviço de gestão do ecrã de bloqueio animado - - Permite que uma aplicação aceda ao serviço de gestão do ecrã de bloqueio animado. - - aceder ao serviço de gestão do ecrã de bloqueio animado - - Permite que uma aplicação de sistema aceda ao serviço de gestão do ecrã de bloqueio animado. - - fornecer o serviço de gestão do ecrã de bloqueio animado - - Permite que um serviço forneça o serviço de gestão do ecrã de bloqueio animado. ler a meteorologia Permite que uma aplicação leia conteúdo através do fornecedor de meteorologia. diff --git a/lineage/res/res/values-rm/strings.xml b/lineage/res/res/values-rm/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-rm/strings.xml +++ b/lineage/res/res/values-rm/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-ro/strings.xml b/lineage/res/res/values-ro/strings.xml index d8f17b21..8a0827ac 100644 --- a/lineage/res/res/values-ro/strings.xml +++ b/lineage/res/res/values-ro/strings.xml @@ -129,18 +129,6 @@ acces la managerul de performanță Permite unei aplicații să acceseze serviciul de performanță. Aplicațiile normale nu au nevoie de aceasta. - - acces la serviciul managerului live lockscreen - - Permite unei aplicații să acceseze serviciul managerului live lockscreen. - - acces la serviciul managerului live lockscreen - - Permite aplicațiilor de sistem să acceseze serviciul managerului live lockscreen. - - furnizează serviciul managerului live lockscreen - - Permite unui serviciu să furnizeze serviciul managerului live lockscreen. citește vremea Permite unei aplicații să citească conținutul furnizorului de vreme. diff --git a/lineage/res/res/values-ru/strings.xml b/lineage/res/res/values-ru/strings.xml index 0da7d69b..71dda6eb 100644 --- a/lineage/res/res/values-ru/strings.xml +++ b/lineage/res/res/values-ru/strings.xml @@ -129,18 +129,6 @@ доступ к менеджеру производительности Приложение сможет получать доступ к службе производительности. Это разрешение не используется обычными приложениями. - - доступ к управлению живым экраном блокировки - - Приложение сможет получать доступ к службе управления живым экраном блокировки. - - доступ к управлению живым экраном блокировки - - Позволяет системным приложениям получить доступ к управлению живым экраном блокировки. - - предоставить доступ к управлению живым экраном блокировки - - Позволяет службе предоставить доступ к управлению живым экраном блокировки. чтение данных о погоде Приложение сможет считывать данные от поставщика погоды. diff --git a/lineage/res/res/values-si-rLK/strings.xml b/lineage/res/res/values-si-rLK/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-si-rLK/strings.xml +++ b/lineage/res/res/values-si-rLK/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-sk/strings.xml b/lineage/res/res/values-sk/strings.xml index 00296d5e..84953b47 100644 --- a/lineage/res/res/values-sk/strings.xml +++ b/lineage/res/res/values-sk/strings.xml @@ -129,18 +129,6 @@ prístup k správe výkonu Umožňuje aplikácii prístup k správe výkonu. Toto povolenie nie je bežné pre štandardné aplikácie. - - prístup k službe správcu živých uzamykacích obrazoviek - - Umožní aplikácii prístup k správcovi služby živých uzamykacích obrazoviek. - - prístup k službe správcu živých uzamykacích obrazoviek - - Umožní systémovým aplikáciám prístup k správcovi služby živých uzamykacích obrazoviek. - - poskytnúť správcu služby živých uzamykacích obrazoviek - - Umožní službe poskytnúť správcu služby živých uzamykacích obrazoviek. čítať počasie Umožní aplikácii čítať obsah z poskytovateľa počasia. diff --git a/lineage/res/res/values-sl/strings.xml b/lineage/res/res/values-sl/strings.xml index 2d68dce6..e03bd1ab 100644 --- a/lineage/res/res/values-sl/strings.xml +++ b/lineage/res/res/values-sl/strings.xml @@ -129,18 +129,6 @@ dostop do upravljalnika zmogljivosti Dovoli aplikaciji dostop do storitve zmogljivosti. Navadno ni potrebno za običajne aplikacije. - - dostop do storitve upravljanja živega zaklenjenega zaslona - - Dovoli aplikaciji dostop do storitve upravljanja živega zaklenjenega zaslona. - - dostop do storitve upravljanja živega zaklenjenega zaslona - - Dovoli sistemskim aplikacijam dostop do storitve upravljanja živega zaklenjenega zaslona. - - priskrba storitev upravljanja živega zaklenjenega zaslona - - Dovoli storitvi, da priskrbi storitev upravljanja živega zaklenjenega zaslona. branje vremena Dovoli aplikaciji branje vsebine iz ponudnika vremena. diff --git a/lineage/res/res/values-sq-rAL/strings.xml b/lineage/res/res/values-sq-rAL/strings.xml index 64524040..118138e6 100644 --- a/lineage/res/res/values-sq-rAL/strings.xml +++ b/lineage/res/res/values-sq-rAL/strings.xml @@ -108,12 +108,6 @@ - - - - - - lexo motin përditëso ofruesin e të dhënave të motit diff --git a/lineage/res/res/values-sr-rCS/strings.xml b/lineage/res/res/values-sr-rCS/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-sr-rCS/strings.xml +++ b/lineage/res/res/values-sr-rCS/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-sr/strings.xml b/lineage/res/res/values-sr/strings.xml index cc0557d8..8b715261 100644 --- a/lineage/res/res/values-sr/strings.xml +++ b/lineage/res/res/values-sr/strings.xml @@ -129,18 +129,6 @@ приступ менаџеру перформанси Апликација може да приступа услузи перформанси. Ова дозвола није потребна нормалним апликацијама. - - приступ менаџеру анимираног закључаног екрана - - Апликација може да приступа менаџеру анимираног закључаног екрана. - - приступ менаџеру анимираног закључаног екрана - - Системске апликације могу да приступају менаџеру анимираног закључаног екрана. - - обезбеђивање приступа менаџеру анимираног закључаног екрана - - Обезбеђује услугу која може да приступа менаџеру анимираног закључаног екрана. читање временске прогнозе Апликација може да чита садржај временске прогнозе. diff --git a/lineage/res/res/values-sv/strings.xml b/lineage/res/res/values-sv/strings.xml index 15dd5dae..ca824663 100644 --- a/lineage/res/res/values-sv/strings.xml +++ b/lineage/res/res/values-sv/strings.xml @@ -118,12 +118,6 @@ komma åt prestandahanteraren Ger en app åtkomst till prestandatjänsten. Ska aldrig behövas för vanliga appar. - - - - - - uppdatera väderleverantör diff --git a/lineage/res/res/values-sw/strings.xml b/lineage/res/res/values-sw/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-sw/strings.xml +++ b/lineage/res/res/values-sw/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-ta-rIN/strings.xml b/lineage/res/res/values-ta-rIN/strings.xml index f070503c..dc5d58b4 100644 --- a/lineage/res/res/values-ta-rIN/strings.xml +++ b/lineage/res/res/values-ta-rIN/strings.xml @@ -112,12 +112,6 @@ - - - - - - diff --git a/lineage/res/res/values-te-rIN/strings.xml b/lineage/res/res/values-te-rIN/strings.xml index 798e5f5f..deaa142a 100644 --- a/lineage/res/res/values-te-rIN/strings.xml +++ b/lineage/res/res/values-te-rIN/strings.xml @@ -112,12 +112,6 @@ - - - - - - diff --git a/lineage/res/res/values-th/strings.xml b/lineage/res/res/values-th/strings.xml index 93c97e2b..816088f8 100644 --- a/lineage/res/res/values-th/strings.xml +++ b/lineage/res/res/values-th/strings.xml @@ -124,18 +124,6 @@ ตัวจัดการประสิทธิภาพการเข้าถึง อนุญาตให้แอปเข้าถึงบริการด้านประสิทธิภาพ ซึ่งไม่จำเป็นสำหรับแอปปกติ - - เข้าถึงบริการหน้าจอล็อคแบบเคลื่อนไหว - - อนุญาตให้แอพสามารถเข้าจัดการ บริการหน้าจอล็อคแบบเคลื่อนไหว - - เข้าถึงบริการหน้าจอล็อคแบบเคลื่อนไหว - - อนุญาตให้แอประบบสามารถเข้าใช้งาน บริการหน้าจอล็อคแบบเคลื่อนไหว - - ให้การบริการ หน้าจอล็อคแบบเคลื่อนไหว - - อนุญาตให้บริการสามารถจัดการบริการหน้าจอล็อคแบบเคลื่อนไหว อ่านสภาพอากาศ อนุญาตให้แอปอ่านเนื้อหาจากบริการรายงานสภาพอากาศ diff --git a/lineage/res/res/values-tr/strings.xml b/lineage/res/res/values-tr/strings.xml index 2bbe15e6..9d3199ab 100644 --- a/lineage/res/res/values-tr/strings.xml +++ b/lineage/res/res/values-tr/strings.xml @@ -129,18 +129,6 @@ performans yöneticisine erişim Bir uygulamanın performans hizmetine erişimine izin verir. Normal uygulamalar için gerekli değildir. - - canlı kilit ekranı yöneticisi hizmetine erişme - - Bir uygulamanın canlı kilit ekranı yöneticisi hizmetine erişmesine izin verir. - - canlı kilit ekranı yöneticisi hizmetine erişme - - Sistem uygulamalarının, canlı kilit ekranı yönetici hizmetine erişimine izin verir. - - canlı kilit ekranı yönetici hizmeti sağlama - - Bir hizmetin canlı kilit ekranı yönetici hizmeti sağlamasına izin verir. hava durumunu oku Bir uygulamanın hava durumu sağlayıcısından içerik okumasına izin verir. diff --git a/lineage/res/res/values-ug/strings.xml b/lineage/res/res/values-ug/strings.xml index 37b5e325..6e54e3d4 100644 --- a/lineage/res/res/values-ug/strings.xml +++ b/lineage/res/res/values-ug/strings.xml @@ -114,12 +114,6 @@ ئىقتىدار باشقۇرغۇچنى زىيارەت قىلىش بىر ئەپنىڭ ئىقتىدار مۇلازىمىتىگە كىرىشىگە رۇخسەت قىلىش. نورمال ئەپ بۇنداق ھوقۇققا ھەرگىز ئېھتىياجلىق ئەمەس. - - - - - - diff --git a/lineage/res/res/values-uk/strings.xml b/lineage/res/res/values-uk/strings.xml index 1d522dc6..bf8fb19e 100644 --- a/lineage/res/res/values-uk/strings.xml +++ b/lineage/res/res/values-uk/strings.xml @@ -129,18 +129,6 @@ доступ до менеджера продуктивності Дозволяє додатку отримувати доступ до менеджера продуктивності. Цей дозвіл не потрібний звичайним додаткам. - - доступ до сервісу живого екрану блокування - - Надає додатку доступ до сервісу керування живим екраном блокування. - - доступ до сервісу живого екрану блокування - - Надає системним додаткам доступ до сервісу керування живим екраном блокування. - - доступ до сервісу живого екрану блокування - - Дозволяє додатку доступ до сервісу живого екрану блокування. читати погоду Дозволити додатку читати дані від провайдера погоди. diff --git a/lineage/res/res/values-ur-rPK/strings.xml b/lineage/res/res/values-ur-rPK/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-ur-rPK/strings.xml +++ b/lineage/res/res/values-ur-rPK/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-uz-rUZ/strings.xml b/lineage/res/res/values-uz-rUZ/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-uz-rUZ/strings.xml +++ b/lineage/res/res/values-uz-rUZ/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values-vi/strings.xml b/lineage/res/res/values-vi/strings.xml index 3d0e740c..853aac80 100644 --- a/lineage/res/res/values-vi/strings.xml +++ b/lineage/res/res/values-vi/strings.xml @@ -129,18 +129,6 @@ truy cập trình quản lý hiệu quả hoạt động Cho phép một ứng dụng truy cập dịch vụ hiệu quả hoạt động. Ứng dụng bình thường không bao giờ cần quyền này. - - truy cập dịch vụ quản lý màn hình khóa động - - Cho phép ứng dụng truy cập vào dịch vụ quản lý màn hình khóa động. - - truy cập dịch vụ quản lý màn hình khóa động - - Cho phép các ứng dụng của hệ thống truy cập vào dịch vụ quản lý màn hình khóa động. - - cung cấp dịch vụ quản lý màn hình khóa động - - Cho phép dịch vụ cung cấp dịch vụ quản lý màn hình khóa động. đọc thời tiết Cho phép ứng dụng đọc nội dung từ nhà cung cấp thời tiết. diff --git a/lineage/res/res/values-zh-rCN/strings.xml b/lineage/res/res/values-zh-rCN/strings.xml index 4bbc0721..2d099411 100644 --- a/lineage/res/res/values-zh-rCN/strings.xml +++ b/lineage/res/res/values-zh-rCN/strings.xml @@ -129,18 +129,6 @@ 访问性能管理器 允许应用访问性能服务。普通应用不应需要此权限。 - - 访问活动锁屏管理器服务 - - 允许应用访问活动锁屏管理器服务。 - - 访问活动锁屏管理器服务 - - 允许系统应用访问活动锁屏管理器服务。 - - 提供活动锁屏管理器服务 - - 允许服务提供活动锁屏管理器服务。 读取天气 允许应用读取来自天气提供商的内容。 diff --git a/lineage/res/res/values-zh-rHK/strings.xml b/lineage/res/res/values-zh-rHK/strings.xml index 66a123f5..d842b7be 100644 --- a/lineage/res/res/values-zh-rHK/strings.xml +++ b/lineage/res/res/values-zh-rHK/strings.xml @@ -52,12 +52,6 @@ - - - - - - diff --git a/lineage/res/res/values-zh-rTW/strings.xml b/lineage/res/res/values-zh-rTW/strings.xml index ee9ddcca..6b29c2b0 100644 --- a/lineage/res/res/values-zh-rTW/strings.xml +++ b/lineage/res/res/values-zh-rTW/strings.xml @@ -129,18 +129,6 @@ 存取效能管理員 允許應用程式存取效能服務 。一般應用程式不需使用。 - - 存取活動鎖定畫面管理員服務 - - 允許應用程式存取活動鎖定畫面管理員服務。 - - 存取活動鎖定畫面管理員服務 - - 允許系統應用程式存取活動鎖定畫面管理員服務。 - - 提供活動鎖定畫面管理員服務 - - 允許服務提供活動鎖定畫面管理員服務。 讀取天氣資料 允許應用程式從天氣資訊供應商讀取資料內容 diff --git a/lineage/res/res/values-zu/strings.xml b/lineage/res/res/values-zu/strings.xml index a2da064c..81dd8893 100644 --- a/lineage/res/res/values-zu/strings.xml +++ b/lineage/res/res/values-zu/strings.xml @@ -48,12 +48,6 @@ - - - - - - diff --git a/lineage/res/res/values/strings.xml b/lineage/res/res/values/strings.xml index 8adfec3f..980545da 100644 --- a/lineage/res/res/values/strings.xml +++ b/lineage/res/res/values/strings.xml @@ -162,18 +162,6 @@ Allows an app to access the performance service. Should never be needed for normal apps. - - access live lock screen manager service - - Allows an app to access the live lock screen manager service. - - access live lock screen manager service - - Allows system apps to access the live lock screen manager service. - - provide live lock screen manager service - - Allows a service to provide the live lock screen manager service. read weather diff --git a/packages/LineageSettingsProvider/src/org/lineageos/lineagesettings/LineageDatabaseHelper.java b/packages/LineageSettingsProvider/src/org/lineageos/lineagesettings/LineageDatabaseHelper.java index 09d9defa..033385d5 100644 --- a/packages/LineageSettingsProvider/src/org/lineageos/lineagesettings/LineageDatabaseHelper.java +++ b/packages/LineageSettingsProvider/src/org/lineageos/lineagesettings/LineageDatabaseHelper.java @@ -385,10 +385,6 @@ public class LineageDatabaseHelper extends SQLiteOpenHelper{ LineageSettings.Secure.PROTECTED_COMPONENT_MANAGERS, R.string.def_protected_component_managers); - loadStringSetting(stmt, - LineageSettings.Secure.ENABLED_EVENT_LIVE_LOCKS_KEY, - R.string.def_enabled_event_lls_components); - final String provisionedFlag = Settings.Global.getString(mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED); loadSetting(stmt, LineageSettings.Secure.LINEAGE_SETUP_WIZARD_COMPLETED, provisionedFlag); diff --git a/sdk/res/res/values/attrs.xml b/sdk/res/res/values/attrs.xml index 7e67bb6a..16f991c0 100644 --- a/sdk/res/res/values/attrs.xml +++ b/sdk/res/res/values/attrs.xml @@ -15,14 +15,6 @@ limitations under the License. --> - - - - - - - - diff --git a/sdk/src/java/lineageos/app/BaseLiveLockManagerService.java b/sdk/src/java/lineageos/app/BaseLiveLockManagerService.java deleted file mode 100644 index c8becbdf..00000000 --- a/sdk/src/java/lineageos/app/BaseLiveLockManagerService.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package lineageos.app; - -import android.annotation.NonNull; -import android.app.AppGlobals; -import android.app.Service; -import android.content.Intent; -import android.content.pm.ApplicationInfo; -import android.content.pm.PackageManager; -import android.os.Binder; -import android.os.IBinder; -import android.os.RemoteCallbackList; -import android.os.RemoteException; -import android.os.UserHandle; -import android.util.Log; - -import lineageos.platform.Manifest; - -/** - * Base Live lock screen manager service to be extended by applications that implement the - * {@link LiveLockScreenManager#SERVICE_INTERFACE} - * - * @hide - */ -abstract public class BaseLiveLockManagerService extends Service - implements ILiveLockScreenManagerProvider { - private static final String TAG = BaseLiveLockManagerService.class.getSimpleName(); - - private final RemoteCallbackList mChangeListeners = - new RemoteCallbackList<>(); - - @Override - public final IBinder onBind(Intent intent) { - return mService; - } - - @Override - public final IBinder asBinder() { - return mService; - } - - @Override - abstract public void enqueueLiveLockScreen(String pkg, int id, LiveLockScreenInfo lls, - int[] idReceived, int userId) throws RemoteException; - - @Override - abstract public void cancelLiveLockScreen(String pkg, int id, int userId) - throws RemoteException; - - @Override - abstract public LiveLockScreenInfo getCurrentLiveLockScreen() throws RemoteException; - - @Override - abstract public void updateDefaultLiveLockScreen(LiveLockScreenInfo llsInfo) - throws RemoteException; - - @Override - public boolean getLiveLockScreenEnabled() throws RemoteException { - return false; - } - - @Override - public final boolean registerChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - return mChangeListeners.register(listener); - } - - @Override - public final boolean unregisterChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - return mChangeListeners.unregister(listener); - } - - /** - * This method should be called whenever there is an update to the current Live lock screen - * to be displayed. - * - * @param llsInfo LiveLockScreenInfo for the current Live lock screen - */ - protected final void notifyChangeListeners(LiveLockScreenInfo llsInfo) { - int N = mChangeListeners.beginBroadcast(); - for (int i = 0; i < N; i++) { - ILiveLockScreenChangeListener listener = mChangeListeners.getBroadcastItem(i); - try { - listener.onLiveLockScreenChanged(llsInfo); - } catch (RemoteException e) { - Log.w(TAG, "Unable to notifiy change listener", e); - } - } - mChangeListeners.finishBroadcast(); - } - - /** - * Returns true if the caller has been granted the - * {@link lineageos.platform.Manifest.permission#LIVE_LOCK_SCREEN_MANAGER_ACCESS_PRIVATE} - * permission. - * - * @return - */ - private final boolean hasPrivatePermissions() { - return checkCallingPermission(Manifest.permission - .LIVE_LOCK_SCREEN_MANAGER_ACCESS_PRIVATE) == PackageManager.PERMISSION_GRANTED; - } - - /** - * Enforces the {@link lineageos.platform.Manifest.permission#LIVE_LOCK_SCREEN_MANAGER_ACCESS} - * permission. - */ - protected final void enforceAccessPermission() { - if (hasPrivatePermissions()) return; - - enforceCallingPermission(Manifest.permission.LIVE_LOCK_SCREEN_MANAGER_ACCESS, - null); - } - - /** - * Enforces the - * {@link lineageos.platform.Manifest.permission#LIVE_LOCK_SCREEN_MANAGER_ACCESS_PRIVATE} - * permission. - */ - protected final void enforcePrivateAccessPermission() { - enforceCallingPermission( - Manifest.permission.LIVE_LOCK_SCREEN_MANAGER_ACCESS_PRIVATE, null); - } - - /** - * Enforces the LLS being shown/canceled is from the calling package or from a system app that - * has the - * {@link lineageos.platform.Manifest.permission#LIVE_LOCK_SCREEN_MANAGER_ACCESS_PRIVATE} - * permission. - * - * @param pkg Package name of caller - * @param llsInfo Live lock screen info with component to check - */ - protected final void enforceSamePackageOrSystem(String pkg, - @NonNull LiveLockScreenInfo llsInfo) { - // only apps with the private permission can show/cancel live lock screens from other - // packages - if (hasPrivatePermissions()) return; - - if (llsInfo.component != null && !llsInfo.component.getPackageName().equals(pkg)) { - throw new SecurityException("Modifying Live lock screen from different packages not " + - "allowed. Calling package: " + pkg + " LLS package: " + - llsInfo.component.getPackageName()); - } - - final int uid = Binder.getCallingUid(); - try { - ApplicationInfo ai = AppGlobals.getPackageManager().getApplicationInfo( - pkg, 0, UserHandle.getCallingUserId()); - if (ai == null) { - throw new SecurityException("Unknown package " + pkg); - } - if (!UserHandle.isSameApp(ai.uid, uid)) { - throw new SecurityException("Calling uid " + uid + " gave package" - + pkg + " which is owned by uid " + ai.uid); - } - } catch (RemoteException re) { - throw new SecurityException("Unknown package " + pkg + "\n" + re); - } - } - - private final IBinder mService = new ILiveLockScreenManagerProvider.Stub() { - @Override - public void enqueueLiveLockScreen(String pkg, int id, LiveLockScreenInfo llsInfo, - int[] idReceived, int userId) throws RemoteException { - enforceAccessPermission(); - enforceSamePackageOrSystem(pkg, llsInfo); - BaseLiveLockManagerService.this.enqueueLiveLockScreen(pkg, id, llsInfo, idReceived, - userId); - } - - @Override - public void cancelLiveLockScreen(String pkg, int id, int userId) throws RemoteException { - enforceAccessPermission(); - BaseLiveLockManagerService.this.cancelLiveLockScreen(pkg, id, userId); - } - - @Override - public LiveLockScreenInfo getCurrentLiveLockScreen() throws RemoteException { - enforceAccessPermission(); - return BaseLiveLockManagerService.this.getCurrentLiveLockScreen(); - } - - @Override - public void updateDefaultLiveLockScreen(LiveLockScreenInfo llsInfo) throws RemoteException { - enforcePrivateAccessPermission(); - BaseLiveLockManagerService.this.updateDefaultLiveLockScreen(llsInfo); - } - - @Override - public boolean getLiveLockScreenEnabled() throws RemoteException { - enforceAccessPermission(); - return BaseLiveLockManagerService.this.getLiveLockScreenEnabled(); - } - - @Override - public boolean registerChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - enforcePrivateAccessPermission(); - return BaseLiveLockManagerService.this.registerChangeListener(listener); - } - - @Override - public boolean unregisterChangeListener( - ILiveLockScreenChangeListener listener) throws RemoteException { - enforcePrivateAccessPermission(); - return BaseLiveLockManagerService.this.unregisterChangeListener(listener); - } - }; -} diff --git a/sdk/src/java/lineageos/app/ILiveLockScreenChangeListener.aidl b/sdk/src/java/lineageos/app/ILiveLockScreenChangeListener.aidl deleted file mode 100644 index 6c359aa6..00000000 --- a/sdk/src/java/lineageos/app/ILiveLockScreenChangeListener.aidl +++ /dev/null @@ -1,27 +0,0 @@ -/* -** Copyright (C) 2016 The CyanogenMod Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -package lineageos.app; - -import lineageos.app.LiveLockScreenInfo; - -/** - * Listener interface for notifying clients that the current Live lock screen has changed. - * @hide - */ -interface ILiveLockScreenChangeListener { - void onLiveLockScreenChanged(in LiveLockScreenInfo llsInfo); -} \ No newline at end of file diff --git a/sdk/src/java/lineageos/app/ILiveLockScreenManager.aidl b/sdk/src/java/lineageos/app/ILiveLockScreenManager.aidl deleted file mode 100644 index 570295de..00000000 --- a/sdk/src/java/lineageos/app/ILiveLockScreenManager.aidl +++ /dev/null @@ -1,73 +0,0 @@ -/* -** Copyright (C) 2016 The CyanogenMod Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -package lineageos.app; - -import lineageos.app.ILiveLockScreenChangeListener; -import lineageos.app.LiveLockScreenInfo; - -/** @hide */ -interface ILiveLockScreenManager { - - /** - * Enqueue a Live lock screen to be displayed. - */ - void enqueueLiveLockScreen(String pkg, int id, in LiveLockScreenInfo lls, - inout int[] idReceived, int userId); - - /** - * Cancel displaying a Live lock screen. - */ - void cancelLiveLockScreen(String pkg, int id, int userId); - - /** - * Get the current Live lock screen that should be displayed. - */ - LiveLockScreenInfo getCurrentLiveLockScreen(); - - /** - * Get the default Live lock screen. This is the Live lock screen that should be displayed - * when no other Live lock screens are queued. - */ - LiveLockScreenInfo getDefaultLiveLockScreen(); - - /** - * Set the default Live lock screen. This is the Live lock screen that should be displayed - * when no other Live lock screens are queued. - */ - void setDefaultLiveLockScreen(in LiveLockScreenInfo llsInfo); - - /** - * Set whether Live lock screen feature is enabled. - */ - oneway void setLiveLockScreenEnabled(boolean enabled); - - /** - * Get the enabled state of the Live lock screen feature. - */ - boolean getLiveLockScreenEnabled(); - - /** - * Registers an ILiveLockScreenChangeListener that will be called when the current Live lock - * screen changes. - */ - boolean registerChangeListener(in ILiveLockScreenChangeListener listener); - - /** - * Unregisters a previously registered ILiveLockScreenChangeListener. - */ - boolean unregisterChangeListener(in ILiveLockScreenChangeListener listener); -} \ No newline at end of file diff --git a/sdk/src/java/lineageos/app/ILiveLockScreenManagerProvider.aidl b/sdk/src/java/lineageos/app/ILiveLockScreenManagerProvider.aidl deleted file mode 100644 index 1236a4ae..00000000 --- a/sdk/src/java/lineageos/app/ILiveLockScreenManagerProvider.aidl +++ /dev/null @@ -1,65 +0,0 @@ -/* -** Copyright (C) 2016 The CyanogenMod Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -package lineageos.app; - -import lineageos.app.ILiveLockScreenChangeListener; -import lineageos.app.LiveLockScreenInfo; - -/** - * Interface to be implemented by services that support the - * {@link LiveLockScreenManager#SERVICE_INTERFACE} - * @hide - */ -interface ILiveLockScreenManagerProvider { - - /** - * Enqueue a Live lock screen to be displayed. - */ - void enqueueLiveLockScreen(String pkg, int id, in LiveLockScreenInfo lls, - inout int[] idReceived, int userId); - - /** - * Cancel displaying a Live lock screen. - */ - void cancelLiveLockScreen(String pkg, int id, int userId); - - /** - * Get the current Live lock screen that should be displayed. - */ - LiveLockScreenInfo getCurrentLiveLockScreen(); - - /** - * Called when the default Live lock screen has changed. - */ - oneway void updateDefaultLiveLockScreen(in LiveLockScreenInfo llsInfo); - - /** - * Get the enabled state of the Live lock screen feature. - */ - boolean getLiveLockScreenEnabled(); - - /** - * Registers an ILiveLockScreenChangeListener that will be called when the current Live lock - * screen changes. - */ - boolean registerChangeListener(in ILiveLockScreenChangeListener listener); - - /** - * Unregisters a previously registered ILiveLockScreenChangeListener. - */ - boolean unregisterChangeListener(in ILiveLockScreenChangeListener listener); -} diff --git a/sdk/src/java/lineageos/app/IPartnerInterface.aidl b/sdk/src/java/lineageos/app/IPartnerInterface.aidl deleted file mode 100644 index 9be61d05..00000000 --- a/sdk/src/java/lineageos/app/IPartnerInterface.aidl +++ /dev/null @@ -1,30 +0,0 @@ -/* //device/java/android/android/app/IProfileManager.aidl -** -** Copyright (C) 2015 The CyanogenMod Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -package lineageos.app; - -/** {@hide} */ -interface IPartnerInterface -{ - void setAirplaneModeEnabled(boolean enabled); - void setMobileDataEnabled(boolean enabled); - boolean setZenMode(int mode); - void shutdown(); - void reboot(); - String getCurrentHotwordPackageName(); - boolean setZenModeWithDuration(int mode, long durationMillis); -} diff --git a/sdk/src/java/lineageos/app/LineageContextConstants.java b/sdk/src/java/lineageos/app/LineageContextConstants.java index 69f033ad..2798f7c5 100644 --- a/sdk/src/java/lineageos/app/LineageContextConstants.java +++ b/sdk/src/java/lineageos/app/LineageContextConstants.java @@ -53,17 +53,6 @@ public final class LineageContextConstants { */ public static final String LINEAGE_PROFILE_SERVICE = "profile"; - /** - * Use with {@link android.content.Context#getSystemService} to retrieve a - * {@link lineageos.app.PartnerInterface} interact with system settings. - * - * @see android.content.Context#getSystemService - * @see lineageos.app.PartnerInterface - * - * @hide - */ - public static final String LINEAGE_PARTNER_INTERFACE = "lineagepartnerinterface"; - /** * Use with {@link android.content.Context#getSystemService} to retrieve a * {@link lineageos.app.LineageTelephonyManager} to manage the phone and @@ -107,11 +96,6 @@ public final class LineageContextConstants { */ public static final String LINEAGE_ICON_CACHE_SERVICE = "lineageiconcache"; - /** - * @hide - */ - public static final String LINEAGE_LIVE_LOCK_SCREEN_SERVICE = "lineagelivelockscreen"; - /** * Use with {@link android.content.Context#getSystemService} to retrieve a * {@link lineageos.weather.LineageWeatherManager} to manage the weather service @@ -191,22 +175,6 @@ public final class LineageContextConstants { @SdkConstant(SdkConstant.SdkConstantType.FEATURE) public static final String PERFORMANCE = "org.lineageos.performance"; - /** - * Feature for {@link PackageManager#getSystemAvailableFeatures} and - * {@link PackageManager#hasSystemFeature}: The device includes the lineage partner service - * utilized by the lineage sdk. - */ - @SdkConstant(SdkConstant.SdkConstantType.FEATURE) - public static final String PARTNER = "org.lineageos.partner"; - - /* - * Feature for {@link PackageManager#getSystemAvailableFeatures} and - * {@link PackageManager#hasSystemFeature}: The device includes the Live lock screen - * feature. - */ - @SdkConstant(SdkConstant.SdkConstantType.FEATURE) - public static final String LIVE_LOCK_SCREEN = "org.lineageos.livelockscreen"; - /** * Feature for {@link PackageManager#getSystemAvailableFeatures} and * {@link PackageManager#hasSystemFeature}: The device includes the lineage weather weather diff --git a/sdk/src/java/lineageos/app/LiveLockScreenInfo.aidl b/sdk/src/java/lineageos/app/LiveLockScreenInfo.aidl deleted file mode 100644 index 7758a069..00000000 --- a/sdk/src/java/lineageos/app/LiveLockScreenInfo.aidl +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package lineageos.app; - -parcelable LiveLockScreenInfo; diff --git a/sdk/src/java/lineageos/app/LiveLockScreenInfo.java b/sdk/src/java/lineageos/app/LiveLockScreenInfo.java deleted file mode 100644 index 23b9d146..00000000 --- a/sdk/src/java/lineageos/app/LiveLockScreenInfo.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package lineageos.app; - -import android.annotation.NonNull; -import android.content.ComponentName; -import android.os.Parcel; -import android.os.Parcelable; - -import android.text.TextUtils; - -import lineageos.os.Build; -import lineageos.os.Concierge; -import lineageos.os.Concierge.ParcelInfo; - -/** - * Data structure defining a Live lock screen. - */ -public class LiveLockScreenInfo implements Parcelable { - - /** - * Default Live lock screen {@link #priority}. - */ - public static final int PRIORITY_DEFAULT = 0; - - /** - * Lower {@link #priority}, for items that are less important. - */ - public static final int PRIORITY_LOW = -1; - - /** - * Lowest {@link #priority}. - */ - public static final int PRIORITY_MIN = -2; - - /** - * Higher {@link #priority}, for items that are more important - */ - public static final int PRIORITY_HIGH = 1; - - /** - * Highest {@link #priority}. - */ - public static final int PRIORITY_MAX = 2; - - /** - * The component, which implements - * {@link lineageos.externalviews.KeyguardExternalViewProviderService}, to display for this - * live lock screen. - */ - public ComponentName component; - - /** - * Relative priority for this Live lock screen. - */ - public int priority; - - /** - * Constructs a LiveLockScreenInfo object with the given values. - * You might want to consider using {@link Builder} instead. - */ - public LiveLockScreenInfo(@NonNull ComponentName component, int priority) { - this.component = component; - this.priority = priority; - } - - /** - * Constructs a LiveLockScreenInfo object with default values. - * You might want to consider using {@link Builder} instead. - */ - public LiveLockScreenInfo() - { - this.component = null; - this.priority = PRIORITY_DEFAULT; - } - - private LiveLockScreenInfo(Parcel source) { - // Read parcelable version via the Concierge - ParcelInfo parcelInfo = Concierge.receiveParcel(source); - int parcelableVersion = parcelInfo.getParcelVersion(); - - this.priority = source.readInt(); - String component = source.readString(); - this.component = !TextUtils.isEmpty(component) - ? ComponentName.unflattenFromString(component) - : null; - - // Complete parcel info for the concierge - parcelInfo.complete(); - } - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - // Tell the concierge to prepare the parcel - ParcelInfo parcelInfo = Concierge.prepareParcel(dest); - - dest.writeInt(priority); - dest.writeString(component != null ? component.flattenToString() : ""); - - // Complete the parcel info for the concierge - parcelInfo.complete(); - } - - @Override - public String toString() { - return "LiveLockScreenInfo: priority=" + priority + - ", component=" + component; - } - - @Override - public LiveLockScreenInfo clone() { - LiveLockScreenInfo that = new LiveLockScreenInfo(); - cloneInto(that); - return that; - } - - /** - * Copy all (or if heavy is false, all except Bitmaps and RemoteViews) members - * of this into that. - * @hide - */ - public void cloneInto(LiveLockScreenInfo that) { - that.component = this.component.clone(); - that.priority = this.priority; - } - - public static final Parcelable.Creator CREATOR = - new Parcelable.Creator() { - @Override - public LiveLockScreenInfo createFromParcel(Parcel source) { - return new LiveLockScreenInfo(source); - } - - @Override - public LiveLockScreenInfo[] newArray(int size) { - return new LiveLockScreenInfo[0]; - } - }; - - /** - * Builder class for {@link LiveLockScreenInfo} objects. Provides a convenient way to set - * various fields of a {@link LiveLockScreenInfo}. - */ - public static class Builder { - private int mPriority; - private ComponentName mComponent; - - public Builder setPriority(int priority) { - if (priority < PRIORITY_MIN || priority > PRIORITY_MAX) { - throw new IllegalArgumentException("Invalid priorty given (" + priority + "): " + - PRIORITY_MIN + " <= priority <= " + PRIORITY_MIN); - } - mPriority = priority; - return this; - } - - public Builder setComponent(@NonNull ComponentName component) { - if (component == null) { - throw new IllegalArgumentException( - "Cannot call setComponent with a null component"); - } - mComponent = component; - return this; - } - - public LiveLockScreenInfo build() { - return new LiveLockScreenInfo(mComponent, mPriority); - } - } -} diff --git a/sdk/src/java/lineageos/app/LiveLockScreenManager.java b/sdk/src/java/lineageos/app/LiveLockScreenManager.java deleted file mode 100644 index 6c9d0650..00000000 --- a/sdk/src/java/lineageos/app/LiveLockScreenManager.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package lineageos.app; - -import android.annotation.NonNull; -import android.annotation.Nullable; -import android.annotation.SdkConstant; -import android.content.Context; -import android.os.IBinder; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.os.UserHandle; -import android.util.Log; - -/** - * Manages enabling/disabling Live lock screens as well as what Live lock screen to display when - * enabled. - */ -public class LiveLockScreenManager { - private static final String TAG = LiveLockScreenManager.class.getSimpleName(); - private static ILiveLockScreenManager sService; - private static LiveLockScreenManager sInstance; - - private Context mContext; - - /** - * The {@link android.content.Intent} that must be declared as handled by the service. - */ - @SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION) - public static final String SERVICE_INTERFACE - = "lineageos.app.LiveLockScreenManagerService"; - - private LiveLockScreenManager(Context context) { - mContext = context; - sService = getService(); - if (context.getPackageManager().hasSystemFeature( - LineageContextConstants.Features.LIVE_LOCK_SCREEN) && sService == null) { - Log.wtf(TAG, "Unable to get LiveLockScreenManagerService. " + - "The service either crashed, was not started, or the interface has " + - "been called to early in SystemServer init"); - } - } - - private ILiveLockScreenManager getService() { - if (sService == null) { - IBinder b = ServiceManager.getService(LineageContextConstants.LINEAGE_LIVE_LOCK_SCREEN_SERVICE); - if (b != null) { - sService = ILiveLockScreenManager.Stub.asInterface(b); - } - } - - return sService; - } - - private void logServiceException(Exception e) { - Log.w(TAG, "Unable to access LiveLockScreenServiceBroker", e); - } - - public static LiveLockScreenManager getInstance(Context context) { - if (sInstance == null) { - sInstance = new LiveLockScreenManager(context); - } - - return sInstance; - } - - /** - * Requests a Live lock screen, defined in {@param lls}, to be displayed with the given id. - * @param id An identifier for this notification unique within your application. - * @param llsInfo A {@link LiveLockScreenInfo} object describing what Live lock screen to show - * the user. - * @return True if the Live lock screen was successfully received by the backing service - */ - public boolean show(int id, @NonNull final LiveLockScreenInfo llsInfo) { - int[] idOut = new int[1]; - String pkg = mContext.getPackageName(); - boolean success = true; - try { - sService.enqueueLiveLockScreen(pkg, id, llsInfo, idOut, UserHandle.myUserId()); - if (id != idOut[0]) { - Log.w(TAG, "show: id corrupted: sent " + id + ", got back " + idOut[0]); - success = false; - } - } catch (RemoteException e) { - logServiceException(e); - success = false; - } - - return success; - } - - /** - * Cancels a previously shown Live lock screen. - * @param id An identifier for this notification unique within your application. - */ - public void cancel(int id) { - String pkg = mContext.getPackageName(); - try { - sService.cancelLiveLockScreen(pkg, id, UserHandle.myUserId()); - } catch (RemoteException e) { - logServiceException(e); - } - } - - /** - * Sets the default Live lock screen to display when no other Live lock screens are queued - * up for display. - *

- * This is not available to third party applications. - *

- */ - public void setDefaultLiveLockScreen(@Nullable LiveLockScreenInfo llsInfo) { - try { - sService.setDefaultLiveLockScreen(llsInfo); - } catch (RemoteException e) { - logServiceException(e); - } - } - - /** - * Gets the default Live lock screen that is displayed when no other Live lock screens are - * queued up for display. - *

- * This is not available to third party applications. - *

- */ - public LiveLockScreenInfo getDefaultLiveLockScreen() { - try { - return sService.getDefaultLiveLockScreen(); - } catch (RemoteException e) { - logServiceException(e); - } - - return null; - } - - /** @hide */ - public LiveLockScreenInfo getCurrentLiveLockScreen() { - LiveLockScreenInfo lls = null; - try { - lls = sService.getCurrentLiveLockScreen(); - } catch (RemoteException e) { - logServiceException(e); - } - - return lls; - } - - /** @hide */ - public boolean getLiveLockScreenEnabled() { - try { - return sService.getLiveLockScreenEnabled(); - } catch (RemoteException e) { - logServiceException(e); - } - - return false; - } - - /** @hide */ - public void setLiveLockScreenEnabled(boolean enabled) { - try { - sService.setLiveLockScreenEnabled(enabled); - } catch (RemoteException e) { - logServiceException(e); - } - } -} diff --git a/sdk/src/java/lineageos/app/PartnerInterface.java b/sdk/src/java/lineageos/app/PartnerInterface.java deleted file mode 100644 index 8e253669..00000000 --- a/sdk/src/java/lineageos/app/PartnerInterface.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2015 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package lineageos.app; - -import android.content.Context; -import android.os.IBinder; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.util.Log; - -/** - *

- * The PartnerInterface allows applications to interact with a subset of system settings. - *

- */ -public class PartnerInterface { - /** - * Turn off zen mode. This restores the original ring and interruption - * settings that the user had set before zen mode was enabled. - * - * @see #setZenMode - */ - public static final int ZEN_MODE_OFF = 0; - /** - * Sets zen mode to important interruptions mode, so that - * only notifications that the user has chosen in Settings - * to be of high importance will cause the user's device to notify them. - * - * This condition is held indefinitely until changed again. - * - * @see #setZenMode and #setZenModeWithDuration - */ - public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; - /** - * Sets zen mode so that no interruptions will be allowed. The device is - * effectively silenced indefinitely, until the mode is changed again. - * - * @see #setZenMode and #setZenModeWithDuration - */ - public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; - - - private static IPartnerInterface sService; - - private Context mContext; - - /** - * Allows an application to change network settings, - * such as enabling or disabling airplane mode. - */ - public static final String MODIFY_NETWORK_SETTINGS_PERMISSION = - "lineageos.permission.MODIFY_NETWORK_SETTINGS"; - - /** - * Allows an application to change system sound settings, such as the zen mode. - */ - public static final String MODIFY_SOUND_SETTINGS_PERMISSION = - "lineageos.permission.MODIFY_SOUND_SETTINGS"; - - private static final String TAG = "PartnerInterface"; - - private static PartnerInterface sPartnerInterfaceInstance; - - private PartnerInterface(Context context) { - Context appContext = context.getApplicationContext(); - if (appContext != null) { - mContext = appContext; - } else { - mContext = context; - } - sService = getService(); - if (context.getPackageManager().hasSystemFeature( - LineageContextConstants.Features.PARTNER) && sService == null) { - throw new RuntimeException("Unable to get PartnerInterfaceService. The service" + - " either crashed, was not started, or the interface has been called to early" + - " in SystemServer init"); - } - } - - /** - * Get or create an instance of the {@link lineageos.app.PartnerInterface} - * @param context - * @return {@link PartnerInterface} - */ - public static PartnerInterface getInstance(Context context) { - if (sPartnerInterfaceInstance == null) { - sPartnerInterfaceInstance = new PartnerInterface(context); - } - return sPartnerInterfaceInstance; - } - - /** @hide */ - static public IPartnerInterface getService() { - if (sService != null) { - return sService; - } - IBinder b = ServiceManager.getService(LineageContextConstants.LINEAGE_PARTNER_INTERFACE); - if (b != null) { - sService = IPartnerInterface.Stub.asInterface(b); - return sService; - } else { - return null; - } - } - - /** - * Turns on or off airplane mode. - * - * You will need {@link #MODIFY_NETWORK_SETTINGS_PERMISSION} - * to utilize this functionality. - * @param enabled if true, sets airplane mode to enabled, otherwise disables airplane mode. - */ - public void setAirplaneModeEnabled(boolean enabled) { - if (sService == null) { - return; - } - try { - sService.setAirplaneModeEnabled(enabled); - } catch (RemoteException e) { - Log.e(TAG, e.getLocalizedMessage(), e); - } - } - - /** - * Turns on or off mobile network. - * - * You will need {@link #MODIFY_NETWORK_SETTINGS_PERMISSION} - * to utilize this functionality. - * @param enabled if true, sets mobile network to enabled, otherwise disables mobile network. - */ - public void setMobileDataEnabled(boolean enabled) { - if (sService == null) { - return; - } - try { - sService.setMobileDataEnabled(enabled); - } catch (RemoteException e) { - Log.e(TAG, e.getLocalizedMessage(), e); - } - } - - /** - * Set the zen mode for the device. - * - * You will need {@link #MODIFY_SOUND_SETTINGS_PERMISSION} - * to utilize this functionality. - * - * @see #ZEN_MODE_IMPORTANT_INTERRUPTIONS - * @see #ZEN_MODE_NO_INTERRUPTIONS - * @see #ZEN_MODE_OFF - * @param mode The zen mode to set the device to. - * One of {@link #ZEN_MODE_IMPORTANT_INTERRUPTIONS}, - * {@link #ZEN_MODE_NO_INTERRUPTIONS} or - * {@link #ZEN_MODE_OFF}. - */ - public boolean setZenMode(int mode) { - if (sService == null) { - return false; - } - try { - return sService.setZenMode(mode); - } catch (RemoteException e) { - Log.e(TAG, e.getLocalizedMessage(), e); - } - return false; - } - - /** - * Set the zen mode for the device, allow a duration parameter - * - * You will need {@link #MODIFY_SOUND_SETTINGS_PERMISSION} - * to utilize this functionality. - * - * @see #ZEN_MODE_IMPORTANT_INTERRUPTIONS - * @see #ZEN_MODE_NO_INTERRUPTIONS - * @param mode The zen mode to set the device to. - * One of {@link #ZEN_MODE_IMPORTANT_INTERRUPTIONS}, - * {@link #ZEN_MODE_NO_INTERRUPTIONS}. - * If using {@link #ZEN_MODE_OFF}, the duration will be ignored - * @param durationMillis The duration in milliseconds, - * if duration + System.currentTimeMillis() results in - * long overflow, duration will be "indefinitely". - * all durationMillis < 0 will mean "indefinitely". - * - */ - public boolean setZenModeWithDuration(int mode, long durationMillis) { - if (sService == null) { - return false; - } - try { - return sService.setZenModeWithDuration(mode, durationMillis); - } catch (RemoteException e) { - Log.e(TAG, e.getLocalizedMessage(), e); - } - return false; - } - - /** - * Shuts down the device, immediately. - * - * You will need {@link android.Manifest.permission.REBOOT} - * to utilize this functionality. - */ - public void shutdownDevice() { - if (sService == null) { - return; - } - try { - sService.shutdown(); - } catch (RemoteException e) { - Log.e(TAG, e.getLocalizedMessage(), e); - } - } - - /** - * Reboots the device, immediately. - * - * You will need {@link android.Manifest.permission.REBOOT} - * to utilize this functionality. - */ - public void rebootDevice() { - if (sService == null) { - return; - } - try { - sService.reboot(); - } catch (RemoteException e) { - Log.e(TAG, e.getLocalizedMessage(), e); - } - } - - /** - * Retrieves the package name of the application that currently holds the - * {@link lineageos.media.MediaRecorder.AudioSource#HOTWORD} input. - * @return The package name or null if no application currently holds the HOTWORD input. - */ - public String getCurrentHotwordPackageName() { - if (sService == null) { - return null; - } - try { - return sService.getCurrentHotwordPackageName(); - } catch (RemoteException e) { - Log.e(TAG, e.getLocalizedMessage(), e); - } - return null; - } -} diff --git a/sdk/src/java/lineageos/content/Intent.java b/sdk/src/java/lineageos/content/Intent.java index b245da59..6f4f9250 100644 --- a/sdk/src/java/lineageos/content/Intent.java +++ b/sdk/src/java/lineageos/content/Intent.java @@ -95,13 +95,6 @@ public class Intent { */ public static final String ACTION_APP_FAILURE = "lineageos.intent.action.APP_FAILURE"; - /** - * Implicit action to open live lock screen settings. - * @hide - */ - public static final String ACTION_OPEN_LIVE_LOCKSCREEN_SETTINGS = - "lineageos.intent.action.OPEN_LIVE_LOCKSCREEN_SETTINGS"; - /** * Broadcast action: lid state changed * @hide diff --git a/sdk/src/java/lineageos/os/Build.java b/sdk/src/java/lineageos/os/Build.java index 2d1258e2..56e79d67 100644 --- a/sdk/src/java/lineageos/os/Build.java +++ b/sdk/src/java/lineageos/os/Build.java @@ -99,7 +99,6 @@ public class Build { *
  • Hardware Abstraction Framework Access via * {@link lineageos.hardware.LineageHardwareManager} (Not for use by 3rd parties) *
  • MSIM API via {@link lineageos.app.LineageTelephonyManager} - *
  • Interface for partners via {@link lineageos.app.PartnerInterface} *
  • Introductory Settings Provider {@link lineageos.providers.LineageSettings} *
  • AlarmClock API via {@link lineageos.alarmclock.LineageOSAlarmClock} * diff --git a/sdk/src/java/lineageos/providers/LineageSettings.java b/sdk/src/java/lineageos/providers/LineageSettings.java index dfd7fe05..f12c5ec7 100644 --- a/sdk/src/java/lineageos/providers/LineageSettings.java +++ b/sdk/src/java/lineageos/providers/LineageSettings.java @@ -2829,20 +2829,6 @@ public final class LineageSettings { */ public static final String PROTECTED_COMPONENT_MANAGERS = "protected_component_managers"; - /** - * Whether live lock screen is currently enabled/disabled by the user. - * Boolean settings. 0 = off, 1 = on - * @hide - */ - public static final String LIVE_LOCK_SCREEN_ENABLED = "live_lock_screen_enabled"; - - /** - * The user selected Live lock screen to display - * @hide - */ - public static final String DEFAULT_LIVE_LOCK_SCREEN_COMPONENT = - "default_live_lock_screen_component"; - /** * Whether keyguard will direct show security view (0 = false, 1 = true) * @hide @@ -2868,12 +2854,6 @@ public final class LineageSettings { */ public static final String DISPLAY_GAMMA_CALIBRATION_PREFIX = "display_gamma_"; - /** - * Enabled live lockscreen components. Delimited by "|" - * @hide - */ - public static final String ENABLED_EVENT_LIVE_LOCKS_KEY = "live_lockscreens_events_enabled"; - /** * Current active & enabled Weather Provider Service * diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml index a6aeec62..174a1600 100644 --- a/tests/AndroidManifest.xml +++ b/tests/AndroidManifest.xml @@ -40,13 +40,6 @@ - - - - - - diff --git a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java deleted file mode 100644 index 1c4f4034..00000000 --- a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoBuilderTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.lineageos.tests.livelockscreen.unit; - -import android.content.ComponentName; -import android.test.AndroidTestCase; -import android.test.suitebuilder.annotation.SmallTest; - -import lineageos.app.LiveLockScreenInfo; - -public class LiveLockScreenInfoBuilderTest extends AndroidTestCase { - - @SmallTest - public void testConstructor() { - LiveLockScreenInfo llsInfo = new LiveLockScreenInfo.Builder().build(); - assertNotNull(llsInfo); - } - - @SmallTest - public void testBuildWithComponent() { - ComponentName cn = new ComponentName("package", "class"); - - LiveLockScreenInfo llsInfo = new LiveLockScreenInfo.Builder() - .setComponent(cn) - .build(); - - assertNotNull(llsInfo); - assertEquals(cn, llsInfo.component); - } - - @SmallTest - public void testBuildWithNullComponentThrowsException() { - ComponentName cn = null; - - LiveLockScreenInfo.Builder builder = new LiveLockScreenInfo.Builder(); - try { - builder.setComponent(cn); - throw new AssertionError("Failed to set null component"); - } catch (IllegalArgumentException e) { - /* EXPECTED */ - } - } - - @SmallTest - public void testBuildWithPriority() { - int priority = LiveLockScreenInfo.PRIORITY_HIGH; - - LiveLockScreenInfo llsInfo = new LiveLockScreenInfo.Builder() - .setPriority(priority) - .build(); - - assertNotNull(llsInfo); - assertEquals(priority, llsInfo.priority); - } - - @SmallTest - public void testBuildWithGreaterThanMaxPriority() { - int priority = LiveLockScreenInfo.PRIORITY_MAX + 1; - - LiveLockScreenInfo.Builder builder = new LiveLockScreenInfo.Builder(); - try { - builder.setPriority(priority); - throw new AssertionError("Failed to set priority greater than max"); - } catch (IllegalArgumentException e) { - /* EXPECTED */ - } - } - - @SmallTest - public void testBuildWithLessThanMinPriority() { - int priority = LiveLockScreenInfo.PRIORITY_MIN - 1; - - LiveLockScreenInfo.Builder builder = new LiveLockScreenInfo.Builder(); - try { - builder.setPriority(priority); - throw new AssertionError("Failed to set priority greater than max"); - } catch (IllegalArgumentException e) { - /* EXPECTED */ - } - } -} diff --git a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java deleted file mode 100644 index 01a1c9bd..00000000 --- a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenInfoTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.lineageos.tests.livelockscreen.unit; - -import android.content.ComponentName; -import android.os.Parcel; -import android.test.AndroidTestCase; -import android.test.suitebuilder.annotation.SmallTest; - -import lineageos.app.LiveLockScreenInfo; - -public class LiveLockScreenInfoTest extends AndroidTestCase { - - @SmallTest - public void testConstructor() { - LiveLockScreenInfo llsInfo = new LiveLockScreenInfo.Builder().build(); - assertNotNull(llsInfo); - } - - @SmallTest - public void testNonNullComponentFromParcel() { - ComponentName cn = new ComponentName("package", "class"); - - LiveLockScreenInfo llsInfo = new LiveLockScreenInfo.Builder() - .setComponent(cn) - .build(); - - // Write to parcel - Parcel parcel = Parcel.obtain(); - llsInfo.writeToParcel(parcel, 0); - - // Set data position of parcel to 0 - parcel.setDataPosition(0); - - // Verify un-parceled LiveLockScreenInfo - LiveLockScreenInfo llsFromParcel = LiveLockScreenInfo.CREATOR.createFromParcel(parcel); - - assertNotNull(llsFromParcel); - assertEquals(cn, llsFromParcel.component); - } - - @SmallTest - public void testNullComponentFromParcel() { - ComponentName cn = null; - - LiveLockScreenInfo llsInfo = new LiveLockScreenInfo.Builder().build(); - llsInfo.component = cn; - - // Write to parcel - Parcel parcel = Parcel.obtain(); - llsInfo.writeToParcel(parcel, 0); - - // Set data position of parcel to 0 - parcel.setDataPosition(0); - - // Verify un-parceled LiveLockScreenInfo - LiveLockScreenInfo llsFromParcel = LiveLockScreenInfo.CREATOR.createFromParcel(parcel); - - assertNotNull(llsFromParcel); - assertEquals(cn, llsFromParcel.component); - } - - @SmallTest - public void testPriorityFromParcel() { - int priority = LiveLockScreenInfo.PRIORITY_HIGH; - - LiveLockScreenInfo llsInfo = new LiveLockScreenInfo.Builder() - .setPriority(priority) - .build(); - - // Write to parcel - Parcel parcel = Parcel.obtain(); - llsInfo.writeToParcel(parcel, 0); - - // Set data position of parcel to 0 - parcel.setDataPosition(0); - - // Verify un-parceled LiveLockScreenInfo - LiveLockScreenInfo llsFromParcel = LiveLockScreenInfo.CREATOR.createFromParcel(parcel); - - assertNotNull(llsFromParcel); - assertEquals(priority, llsFromParcel.priority); - } -} diff --git a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java b/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java deleted file mode 100644 index 8923276a..00000000 --- a/tests/src/org/lineageos/tests/livelockscreen/unit/LiveLockScreenManagerTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2016 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.lineageos.tests.livelockscreen.unit; - -import android.content.Context; -import android.content.pm.PackageManager; -import android.os.RemoteException; -import android.os.UserHandle; -import android.test.AndroidTestCase; -import android.test.mock.MockPackageManager; -import lineageos.app.LineageContextConstants; -import lineageos.app.ILiveLockScreenManager; -import lineageos.app.LiveLockScreenInfo; -import lineageos.app.LiveLockScreenManager; -import org.lineageos.tests.common.MockIBinderStubForInterface; -import org.mockito.Mockito; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; - -import java.lang.reflect.Field; - -public class LiveLockScreenManagerTest extends AndroidTestCase { - private LiveLockScreenManager mManager; - private ILiveLockScreenManager mManagerInterface; - private Context mMockContext; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - PackageManager packageManager = Mockito.mock(MockPackageManager.class); - Mockito.doReturn(true).when(packageManager).hasSystemFeature( - LineageContextConstants.Features.LIVE_LOCK_SCREEN); - - // Something else is initializing the manager - Field f = LiveLockScreenManager.class.getDeclaredField("sInstance"); - f.setAccessible(true); - f.set(null, null); - - mMockContext = Mockito.mock(Context.class); - Mockito.doReturn(packageManager).when(mMockContext).getPackageManager(); - mManager = LiveLockScreenManager.getInstance(mMockContext); - f = LiveLockScreenManager.class.getDeclaredField("sService"); - f.setAccessible(true); - - mManagerInterface = MockIBinderStubForInterface - .getMockInterface(ILiveLockScreenManager.Stub.class); - f.set(mManager, mManagerInterface); - - Mockito.verify(mMockContext, Mockito.times(1)).getPackageManager(); - Mockito.verify(packageManager, Mockito.times(1)).hasSystemFeature( - Mockito.eq(LineageContextConstants.Features.LIVE_LOCK_SCREEN)); - assertNotNull (mManager); - } - - public void testGetDefaultLiveLockScreen() throws RemoteException { - mManager.getDefaultLiveLockScreen(); - - Mockito.verify(mManagerInterface, Mockito.times(1)) - .getDefaultLiveLockScreen(); - Mockito.verifyNoMoreInteractions(mManagerInterface); - } - - public void testSetDefaultLiveLockScreen() throws RemoteException { - LiveLockScreenInfo liveLockScreenInfo = Mockito.mock(LiveLockScreenInfo.class); - mManager.setDefaultLiveLockScreen(liveLockScreenInfo); - - Mockito.verify(mManagerInterface, Mockito.times(1)) - .setDefaultLiveLockScreen(Mockito.eq(liveLockScreenInfo)); - Mockito.verifyNoMoreInteractions(mManagerInterface); - } - - private boolean testEnqueue(boolean success) throws Exception { - String testPackage = "com.testpackage"; - Mockito.doReturn(testPackage).when(mMockContext).getPackageName(); - - if (!success) { - Mockito.doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - int[] idOut = (int[]) invocation.getArguments()[3]; - idOut[0] = 1; - return invocation; - } - }).when(mManagerInterface).enqueueLiveLockScreen(Mockito.anyString(), - Mockito.anyInt(), Mockito.any(LiveLockScreenInfo.class), - Mockito.any(int[].class), Mockito.anyInt()); - } - - LiveLockScreenInfo liveLockScreenInfo = Mockito.mock(LiveLockScreenInfo.class); - boolean result = mManager.show(0, liveLockScreenInfo); - - Mockito.verify(mManagerInterface, Mockito.times(1)).enqueueLiveLockScreen(Mockito.eq(testPackage), - Mockito.eq(0), Mockito.eq(liveLockScreenInfo), Mockito.any(int[].class), - Mockito.eq(UserHandle.myUserId())); - Mockito.verifyNoMoreInteractions(mManagerInterface); - - return result; - } - - public void testShowLockscreen() throws Exception { - assertEquals(testEnqueue(true), true); - assertEquals(testEnqueue(false), false); - } - - public void testCancel() throws Exception { - String testPackage = "com.testpackage"; - Mockito.doReturn(testPackage).when(mMockContext).getPackageName(); - - LiveLockScreenInfo liveLockScreenInfo = Mockito.mock(LiveLockScreenInfo.class); - mManager.cancel(0); - - Mockito.verify(mManagerInterface, Mockito.times(1)).cancelLiveLockScreen( - Mockito.eq(testPackage), Mockito.eq(0), Mockito.eq(UserHandle.myUserId())); - Mockito.verifyNoMoreInteractions(mManagerInterface); - } -} diff --git a/tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java b/tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java deleted file mode 100644 index 49462792..00000000 --- a/tests/src/org/lineageos/tests/settings/LineagePartnerInterfaceTest.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.lineageos.tests.settings; - -import org.lineageos.tests.TestActivity; -import lineageos.app.PartnerInterface; - -/** - * Tests functionality added in {@link lineageos.app.PartnerInterface} - */ -public class LineagePartnerInterfaceTest extends TestActivity { - - // Zen Mode to 15 minutes - private static final long ZEN_MODE_DURATION_15_MINUTES_MS = 15 * 60000; - PartnerInterface mPartnerInterface; - @Override - protected String tag() { - return null; - } - - @Override - protected Test[] tests() { - mPartnerInterface = PartnerInterface.getInstance(this); - return mTests; - } - - private Test[] mTests = new Test[] { - new Test("Test set airplane mode to on") { - public void run() { - mPartnerInterface.setAirplaneModeEnabled(true); - } - }, - new Test("Test set airplane mode to off") { - public void run() { - mPartnerInterface.setAirplaneModeEnabled(false); - } - }, - new Test("Test set mobile data to on") { - public void run() { - mPartnerInterface.setMobileDataEnabled(true); - } - }, - new Test("Test set mobile data to off") { - public void run() { - mPartnerInterface.setMobileDataEnabled(false); - } - }, - new Test("Test reboot the device") { - public void run() { - mPartnerInterface.rebootDevice(); - } - }, - new Test("Test shutdown the device") { - public void run() { - mPartnerInterface.shutdownDevice(); - } - }, - new Test("Test set zen mode to important interruptions") { - public void run() { - mPartnerInterface.setZenMode(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS); - } - }, - new Test("Test set zen mode to important interruptions with 15 mins duration") { - public void run() { - mPartnerInterface.setZenModeWithDuration(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS, ZEN_MODE_DURATION_15_MINUTES_MS); - } - }, - new Test("Test set zen mode to no interruptions") { - public void run() { - mPartnerInterface.setZenMode(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS); - } - }, - new Test("Test set zen mode to no interruptions with 15 mins duration") { - public void run() { - mPartnerInterface.setZenModeWithDuration(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS, ZEN_MODE_DURATION_15_MINUTES_MS); - } - }, - new Test("Test turn zen mode off") { - public void run() { - mPartnerInterface.setZenMode(PartnerInterface.ZEN_MODE_OFF); - } - }, - }; -} diff --git a/tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java b/tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java deleted file mode 100644 index 9d693c83..00000000 --- a/tests/src/org/lineageos/tests/settings/unit/LineagePartnerInterfaceTest.java +++ /dev/null @@ -1,380 +0,0 @@ -/** - * Copyright (c) 2015, The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.lineageos.tests.settings.unit; - -import android.app.INotificationManager; -import android.content.Context; -import android.media.AudioAttributes; -import android.media.AudioFormat; -import android.media.AudioManager; -import android.media.AudioRecord; -import android.media.MediaRecorder; -import android.net.Uri; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.service.notification.Condition; -import android.service.notification.IConditionListener; -import android.test.AndroidTestCase; -import android.test.FlakyTest; -import android.test.suitebuilder.annotation.SmallTest; -import android.provider.Settings; -import android.text.format.DateUtils; -import android.util.Log; - -import lineageos.app.LineageContextConstants; -import lineageos.app.PartnerInterface; - -import java.util.List; - -/** - * Unit test for PartnerInterface - */ -public class LineagePartnerInterfaceTest extends AndroidTestCase { - - private static final String TAG = "LineagePartnerInterfaceTest"; - - private PartnerInterface mPartnerInterface; - - @Override - protected void setUp() throws Exception { - super.setUp(); - // Only run this if we support partner interfaces - org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature( - LineageContextConstants.Features.PARTNER)); - mPartnerInterface = PartnerInterface.getInstance(getContext()); - - setupAirplaneModeTests(); - setupZenModeTests(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - teardownAirplaneModeTests(); - teardownZenModeTests(); - } - - @SmallTest - public void testPartnerInterfaceExists() { - assertNotNull(mPartnerInterface); - } - - @SmallTest - public void testPartnerInterfaceAvailable() { - assertNotNull(mPartnerInterface.getService()); - } - - ///////////////////////////////////////////////////// - // Airplane Mode tests - - private boolean mAirplaneModeEnabled; - private void setupAirplaneModeTests() { - // Remember the initial state - mAirplaneModeEnabled = getAirplaneModeEnabled(); - } - - private void teardownAirplaneModeTests() { - // Restore airplane mode - mPartnerInterface.setAirplaneModeEnabled(mAirplaneModeEnabled); - } - @SmallTest - public void testSetAirplaneModeOn() { - mPartnerInterface.setAirplaneModeEnabled(true); - assertTrue(getAirplaneModeEnabled()); - } - - @SmallTest - public void testSetAirplaneModeOff() { - mPartnerInterface.setAirplaneModeEnabled(false); - assertTrue(getAirplaneModeEnabled() == false); - } - - private boolean getAirplaneModeEnabled() { - return Settings.Global.getInt(getContext().getContentResolver(), - Settings.Global.AIRPLANE_MODE_ON, 0) == 1; - } - - ///////////////////////////////////////////////////// - // Zen Mode Testing: - // Allow the tests below for now, but in the future - // implement a valid method for restoring the zen mode - // setting, e.g. in tearDownZenModeTests - - // Because it's not possible to get & restore zen mode - // duration, these tests will contaminate system state - // whenver they're run. Ideally testing should instead - // be done in another suite, such as using Mokito - // https://corner.squareup.com/2012/10/mockito-android.html - // - // However because of the complexity, for now allow - // these unit tests as-is. - // - // THESE WILL WIPE OUT any duration-based zen modes in - // effect! - private static final long DURATION_30s_MS = 30 * DateUtils.SECOND_IN_MILLIS; - private static final long DURATION_TOLERANCE_MS = 5; //5 ms in tolerance due to latency - private static final long DURATION_TEST_MAX_MS = DateUtils.MINUTE_IN_MILLIS; //Allow 1 minute max for unit testing - - private INotificationManager mNotificationManager; - private CountdownConditionListener mConditionListener; - - private void setupZenModeTests() { - mNotificationManager = INotificationManager.Stub.asInterface( - ServiceManager.getService(Context.NOTIFICATION_SERVICE)); - - /* - mConditionListener = new CountdownConditionListener(); - try { - mNotificationManager.requestZenModeConditions(mConditionListener, Condition.FLAG_RELEVANT_ALWAYS); - } catch (RemoteException e) { - fail("requestZenModeConditions exception " + e); - } - */ - } - - private void teardownZenModeTests() { - // For now, restore the zen mode to the system default - mPartnerInterface.setZenMode(PartnerInterface.ZEN_MODE_OFF); - } - - @SmallTest - public void testSetZenModeImportantInterruptions() { - mPartnerInterface.setZenMode(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS); - assertEquals(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS, getZenMode()); - } - - @FlakyTest(tolerance = 5) - @SmallTest - public void testSetZenModeImportantInterruptionsWithDurations() { - // 0 duration - testZenModeWithDuration(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS, 0); - - // Indefinitely - testZenModeWithDuration(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS, Long.MAX_VALUE); - testZenModeWithDuration(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS, -1); - - // normal duration values (1, 5s) - // NOTE: these tests do not return until duration has passed. Use with care! - testZenModeWithDuration(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS, DateUtils.SECOND_IN_MILLIS); - testZenModeWithDuration(PartnerInterface.ZEN_MODE_IMPORTANT_INTERRUPTIONS, 5 * DateUtils.SECOND_IN_MILLIS); - } - - @SmallTest - public void testSetZenModeNoInterruptions() { - mPartnerInterface.setZenMode(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS); - assertEquals(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS, getZenMode()); - } - - @FlakyTest(tolerance = 5) - @SmallTest - public void testSetZenModeNoInterruptionsWithDurations() { - // 0 duration - testZenModeWithDuration(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS, 0); - - // Indefinitely - testZenModeWithDuration(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS, Long.MAX_VALUE); - testZenModeWithDuration(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS, -1); - - // normal duration values (1, 5s) - // NOTE: these tests do not return until duration has passed. Use with care! - testZenModeWithDuration(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS, DateUtils.SECOND_IN_MILLIS); - testZenModeWithDuration(PartnerInterface.ZEN_MODE_NO_INTERRUPTIONS, 5 * DateUtils.SECOND_IN_MILLIS); - } - - @SmallTest - public void testSetZenModeOff() { - mPartnerInterface.setZenMode(PartnerInterface.ZEN_MODE_OFF); - assertEquals(PartnerInterface.ZEN_MODE_OFF, getZenMode()); - } - - private final static int BUFFER_ELEMENTS_TO_REC = 1024; - private final static int BYTES_PER_ELEMENT = 2; - private static final int RECORDER_SAMPLERATE = 41000; - private static final int RECORDER_CHANNELS = AudioFormat.CHANNEL_IN_MONO; - private static final int RECORDER_AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT; - - private static int[] mSampleRates = new int[] { 8000, 11025, 22050, 44100 }; - public AudioRecord findAudioRecord() { - for (int rate : mSampleRates) { - for (short audioFormat : new short[] { AudioFormat.ENCODING_PCM_8BIT, - AudioFormat.ENCODING_PCM_16BIT }) { - for (short channelConfig : new short[] { AudioFormat.CHANNEL_IN_MONO, - AudioFormat.CHANNEL_IN_STEREO }) { - try { - Log.d(TAG, "Attempting rate " + rate + "Hz, bits: " + audioFormat + ", channel: " - + channelConfig); - int bufferSize = AudioRecord.getMinBufferSize(rate, channelConfig, audioFormat); - - if (bufferSize != AudioRecord.ERROR_BAD_VALUE) { - AudioRecord recorder = new AudioRecord( - lineageos.media.MediaRecorder.AudioSource.HOTWORD, - rate, channelConfig, audioFormat, bufferSize); - - if (recorder.getState() == AudioRecord.STATE_INITIALIZED) - return recorder; - } - } catch (Exception e) { - Log.e(TAG, rate + "Exception, keep trying.",e); - } - } - } - } - return null; - } - - @SmallTest - public void testGetCurrentHotwordPackageName() { - // make sure no one is actively stealing this as we attempt to - assertNull(mPartnerInterface.getCurrentHotwordPackageName()); - - // find first viable audio record - final AudioRecord audioRecorder = findAudioRecord(); - - audioRecorder.startRecording(); - assertEquals(mContext.getPackageName(), mPartnerInterface.getCurrentHotwordPackageName()); - audioRecorder.stop(); - } - - /** - * testZenModeWithDuration: sets Zen Mode with duration and blocks - * until the duration is verified. Use with care! This does not - * return until after durationMillis - * @param mode - * @param durationMillis - */ - private void testZenModeWithDuration(int mode, long durationMillis) { - - final long startTimeMillis = System.currentTimeMillis(); - mPartnerInterface.setZenModeWithDuration(mode, durationMillis); - final int actualZenMode = getZenMode(); - - // check zen mode is correct - if (durationMillis == 0) { - assertTrue(actualZenMode == mode || actualZenMode == PartnerInterface.ZEN_MODE_OFF); - } else { - assertEquals(mode, actualZenMode); - } - // skip durations that are indefinite - if (actualZenMode == PartnerInterface.ZEN_MODE_OFF || durationMillis < 0 || durationMillis == Long.MAX_VALUE) { - return; - } - // check duration is correct - final long zenDuration = getZenModeDuration(startTimeMillis); - assertTrue(Math.abs(zenDuration - durationMillis) <= DURATION_TOLERANCE_MS); //Allow a tolerance - } - - /** - * getZenModeDuration: Blocking call to wait for ZenMode duration. - * @param startTimeMillis - start time of the duration - * @return - */ - private long getZenModeDuration(long startTimeMillis) { - // NOTE: waits for the next duration to be triggered - return mConditionListener.waitForDuration(startTimeMillis); - } - - private int getZenMode() { - int zenMode = -1; - try { - zenMode = mNotificationManager.getZenMode(); - } catch (RemoteException rex) { - fail("INotificationManager.getZenMode() " + rex.getMessage()); - return -1; - } - Log.d(TAG, "getZenMode returning " + zenMode); - return zenMode; - } - /** - * CountdownConditionListener - * This class is passed to blocks until the Countdown is received - */ - private static class CountdownConditionListener - extends IConditionListener.Stub { - - private static long INVALID_ENDTIME = -1; - private long mEndTime = INVALID_ENDTIME; - - public CountdownConditionListener() { - } - - /** - * waitForDuration: blocks until onConditionReceived - * This CountdownConditionListener was previously passed - * to the - * @return - * the duration of - */ - public synchronized long waitForDuration(long startTimeMillis) { - Log.d(TAG, "waitForDuration"); - // If we have a stale endtime, then discard it - if (mEndTime < startTimeMillis) { - mEndTime = INVALID_ENDTIME; - } - // If no valid endtime, then block and wait for the current - // duration to expire. The wait ends when - // onConditionsReceived is called - if (mEndTime == INVALID_ENDTIME) { - try { - // wait no more than DURATION_TEST_MAX_MS - wait(DURATION_TEST_MAX_MS); - } catch (InterruptedException iex) { - Log.e(TAG, "waitForDuration", iex); - - return -1; - } - } - if (mEndTime == INVALID_ENDTIME) { - Log.d(TAG, "waitForDuration found invalid endtime. Did you exceed the max duration (" + DURATION_TEST_MAX_MS + " ms)?"); - return -1; - } - - Log.d(TAG, "waitForDuration returning endtime:" + mEndTime + " duration:" + (mEndTime - startTimeMillis)); - final long duration = mEndTime - startTimeMillis; - - // Reset endtime to show that it's been consumed - mEndTime = INVALID_ENDTIME; - return duration; - } - - /** - * onConditionReceived: called when a condition is triggered - * @param conditions - conditions that triggered - * This is actually just the Alarm endtime that CountdownConditionProvider - * previously submitted - * @throws RemoteException - */ - @Override - public synchronized void onConditionsReceived(Condition[] conditions) throws RemoteException { - // CountdownConditionProvider only triggers 1 condition at a time - mEndTime = parseEndTime(conditions[0].id); - notify(); - } - - private long parseEndTime(Uri conditionUri) { - final List pathSegments = conditionUri.getPathSegments(); - return Long.decode(pathSegments.get(pathSegments.size() - 1)); - } - - // Private method for debugging - private void logConditions(Condition[] conditions) { - for (int i = 0; i < conditions.length; i++) { - Log.d(TAG, "condition[" + i + "]:" + conditions[i].id); - } - } - } -} - diff --git a/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java b/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java index 7329c207..ce98bf6f 100644 --- a/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java +++ b/tests/src/org/lineageos/tests/versioning/unit/apiv2/ApiV2PriorReleaseInterfaces.java @@ -51,18 +51,6 @@ public class ApiV2PriorReleaseInterfaces { profilesMap.put("resetAll", 19); } - //PartnerInterface Aidl (IPartnerInterface) - static { - Map partnerMap = getInternalInterfaceMap("IPartnerInterface"); - // APRICOT + BOYSENBERRY + CANTALOUPE - partnerMap.put("setAirplaneModeEnabled", 1); - partnerMap.put("setMobileDataEnabled", 2); - partnerMap.put("setZenMode", 3); - partnerMap.put("shutdown", 4); - partnerMap.put("reboot", 5); - partnerMap.put("getCurrentHotwordPackageName", 6); - } - //LineageHardwareManager Aidl (ILineageHardwareService) static { Map hardwareMap = getInternalInterfaceMap("ILineageHardwareService"); diff --git a/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java b/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java index 3ba836e0..8321dd22 100644 --- a/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java +++ b/tests/src/org/lineageos/tests/versioning/unit/apiv4/ApiV4PriorReleaseInterfaces.java @@ -31,14 +31,6 @@ public class ApiV4PriorReleaseInterfaces { profilesMap.put("isEnabled", 20); } - //PartnerInterface Aidl (IPartnerInterface) - static { - Map partnerMap = getInternalInterfaceMap("IPartnerInterface"); - // APRICOT + BOYSENBERRY + CANTALOUPE to 6 - // DRAGONFRUIT BEGIN - partnerMap.put("setZenModeWithDuration", 7); - } - //LineageHardwareManager Aidl (ILineageHardwareService) static { Map hardwareMap = getInternalInterfaceMap("ILineageHardwareService"); diff --git a/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java b/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java index 7adefe08..74cbaea1 100644 --- a/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java +++ b/tests/src/org/lineageos/tests/versioning/unit/apiv5/ApiV5PriorReleaseInterfaces.java @@ -59,44 +59,6 @@ public class ApiV5PriorReleaseInterfaces { kgExtViewProviderMap.put("onLockscreenSlideOffsetChanged", 11); } - //LiveLockscreenManager Aidl (ILiveLockScreenManager) - static { - Map llScreenManagerMap = - getInternalInterfaceMap("ILiveLockScreenManager"); - //ELDERBERRY BEGIN - llScreenManagerMap.put("enqueueLiveLockScreen", 1); - llScreenManagerMap.put("cancelLiveLockScreen", 2); - llScreenManagerMap.put("getCurrentLiveLockScreen", 3); - llScreenManagerMap.put("getDefaultLiveLockScreen", 4); - llScreenManagerMap.put("setDefaultLiveLockScreen", 5); - llScreenManagerMap.put("setLiveLockScreenEnabled", 6); - llScreenManagerMap.put("getLiveLockScreenEnabled ", 7); - llScreenManagerMap.put("registerChangeListener", 8); - llScreenManagerMap.put("unregisterChangeListener", 9); - } - - //BaseLiveLockManagerService Aidl (ILiveLockScreenManagerProvider) - static { - Map llManagerProvider = - getInternalInterfaceMap("ILiveLockScreenManagerProvider"); - //ELDERBERRY BEGIN - llManagerProvider.put("enqueueLiveLockScreen", 1); - llManagerProvider.put("cancelLiveLockScreen", 2); - llManagerProvider.put("getCurrentLiveLockScreen", 3); - llManagerProvider.put("updateDefaultLiveLockScreen", 4); - llManagerProvider.put("getLiveLockScreenEnabled ", 5); - llManagerProvider.put("registerChangeListener", 6); - llManagerProvider.put("unregisterChangeListener", 7); - } - - //LiveLockScreenChangeListener Aidl (ILiveLockScreenChangeListener) - static{ - Map llChangeListener = - getInternalInterfaceMap("ILiveLockScreenChangeListener"); - //ELDERBERRY BEGIN - llChangeListener.put("onLiveLockScreenChanged", 1); - } - //LineageAudioManager Aidl (ILineageAudioService) static { Map lineageAudioService =