Removed ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS

This commit is contained in:
Electric
2020-05-10 20:17:55 +03:00
parent f4ac967636
commit e15c35a3f9
5 changed files with 11 additions and 22 deletions
@@ -1,14 +1,12 @@
package com.dosse.airpods;
import android.Manifest;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.PowerManager;
import android.provider.Settings;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
@@ -34,7 +32,8 @@ public class IntroActivity extends AppCompatActivity {
if (!Objects.requireNonNull(getSystemService(PowerManager.class)).isIgnoringBatteryOptimizations(getPackageName())) {
Intent intent = new Intent();
getSystemService(Context.POWER_SERVICE);
intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
/* This should not be used as it violates the Play Store Content Policy (https://developer.android.com/training/monitoring-device-state/doze-standby.html) */
// intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
intent.setData(Uri.parse("package:" + getPackageName()));
startActivity(intent);
}
@@ -29,7 +29,6 @@
android:layout_height="wrap_content"
android:layout_below="@id/leftPodImg"
android:gravity="center"
android:text="100%+"
android:textColor="@color/black" />
<ProgressBar
@@ -64,7 +63,6 @@
android:layout_height="wrap_content"
android:layout_below="@id/rightPodImg"
android:gravity="center"
android:text="100%+"
android:textColor="@color/black" />
<ProgressBar
@@ -99,7 +97,6 @@
android:layout_height="wrap_content"
android:layout_below="@id/podCaseImg"
android:gravity="center"
android:text="100%+"
android:textColor="@color/black" />
<ProgressBar
@@ -25,10 +25,8 @@
android:id="@+id/leftPodText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="0dp"
android:layout_toRightOf="@id/leftPodImg"
android:gravity="center_vertical"
android:text="100%+"
android:textColor="@color/black" />
<ProgressBar
@@ -58,10 +56,8 @@
android:id="@+id/rightPodText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="0dp"
android:layout_toRightOf="@id/rightPodImg"
android:gravity="center_vertical"
android:text="100%+"
android:textColor="@color/black" />
<ProgressBar
@@ -91,10 +87,8 @@
android:id="@+id/podCaseText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="0dp"
android:layout_toRightOf="@id/podCaseImg"
android:gravity="center_vertical"
android:text="100%+"
android:textColor="@color/black" />
<ProgressBar
+6 -5
View File
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#448aff</color>
<color name="colorPrimaryDark">#0d47a1</color>
<color name="colorAccent">#448aff</color>
<color name="white">#ffffff</color>
<color name="black">#000000</color>
<color name="colorPrimary" >#448AFF</color>
<color name="colorPrimaryDark" >#0D47A1</color>
<color name="colorAccent" >#448AFF</color>
<color name="white">#FFF</color>
<color name="black">#000</color>
</resources>
+3 -5
View File
@@ -1,11 +1,9 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary" >@color/colorPrimary</item>
<item name="colorPrimaryDark" >@color/colorPrimaryDark</item>
<item name="colorAccent" >@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">