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

Commit e95c0fd0 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7262953 from 1de72903 to rvc-qpr3-release

Change-Id: I583350e00ace8e0f841321c386aed6b16885b1dd
parents fd131189 1de72903
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -377,6 +377,21 @@ public abstract class ActivityManagerInternal {
     */
    public abstract boolean hasRunningForegroundService(int uid, int foregroundServiceType);

    /**
     * Returns {@code true} if the given notification channel currently has a
     * notification associated with a foreground service.  This is an AMS check
     * because that is the source of truth for the FGS state.
     */
    public abstract boolean hasForegroundServiceNotification(String pkg, @UserIdInt int userId,
            String channelId);

    /**
     * If the given app has any FGSs whose notifications are in the given channel,
     * stop them.
     */
    public abstract void stopForegroundServicesForChannel(String pkg, @UserIdInt int userId,
            String channelId);

    /**
     * Registers the specified {@code processObserver} to be notified of future changes to
     * process state.
+61 −38
Original line number Diff line number Diff line
@@ -41,6 +41,15 @@ import java.util.List;
public class InstallSuccess extends AlertActivity {
    private static final String LOG_TAG = InstallSuccess.class.getSimpleName();

    @Nullable
    private PackageUtil.AppSnippet mAppSnippet;

    @Nullable
    private String mAppPackageName;

    @Nullable
    private Intent mLaunchIntent;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -55,40 +64,55 @@ public class InstallSuccess extends AlertActivity {
            Intent intent = getIntent();
            ApplicationInfo appInfo =
                    intent.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO);
            mAppPackageName = appInfo.packageName;
            Uri packageURI = intent.getData();

            // Set header icon and title
            PackageUtil.AppSnippet as;
            PackageManager pm = getPackageManager();

            if ("package".equals(packageURI.getScheme())) {
                as = new PackageUtil.AppSnippet(pm.getApplicationLabel(appInfo),
                mAppSnippet = new PackageUtil.AppSnippet(pm.getApplicationLabel(appInfo),
                        pm.getApplicationIcon(appInfo));
            } else {
                File sourceFile = new File(packageURI.getPath());
                as = PackageUtil.getAppSnippet(this, appInfo, sourceFile);
                mAppSnippet = PackageUtil.getAppSnippet(this, appInfo, sourceFile);
            }

            mLaunchIntent = getPackageManager().getLaunchIntentForPackage(mAppPackageName);

            bindUi();
        }
    }

            mAlert.setIcon(as.icon);
            mAlert.setTitle(as.label);
    @Override
    protected void onResume() {
        super.onResume();
        bindUi();
    }

    private void bindUi() {
        if (mAppSnippet == null) {
            return;
        }

        mAlert.setIcon(mAppSnippet.icon);
        mAlert.setTitle(mAppSnippet.label);
        mAlert.setView(R.layout.install_content_view);
        mAlert.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.launch), null,
                null);
        mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.done),
                (ignored, ignored2) -> {
                        if (appInfo.packageName != null) {
                            Log.i(LOG_TAG, "Finished installing " + appInfo.packageName);
                    if (mAppPackageName != null) {
                        Log.i(LOG_TAG, "Finished installing " + mAppPackageName);
                    }
                    finish();
                }, null);
        setupAlert();
        requireViewById(R.id.install_success).setVisibility(View.VISIBLE);
        // Enable or disable "launch" button
            Intent launchIntent = getPackageManager().getLaunchIntentForPackage(
                    appInfo.packageName);
        boolean enabled = false;
            if (launchIntent != null) {
                List<ResolveInfo> list = getPackageManager().queryIntentActivities(launchIntent,
        if (mLaunchIntent != null) {
            List<ResolveInfo> list = getPackageManager().queryIntentActivities(mLaunchIntent,
                    0);
            if (list != null && list.size() > 0) {
                enabled = true;
@@ -99,7 +123,7 @@ public class InstallSuccess extends AlertActivity {
        if (enabled) {
            launchButton.setOnClickListener(view -> {
                try {
                        startActivity(launchIntent);
                    startActivity(mLaunchIntent);
                } catch (ActivityNotFoundException | SecurityException e) {
                    Log.e(LOG_TAG, "Could not start activity", e);
                }
@@ -110,4 +134,3 @@ public class InstallSuccess extends AlertActivity {
        }
    }
}
}
+2 −2
Original line number Diff line number Diff line
@@ -17,6 +17,6 @@

<resources xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="enabled_by_admin" msgid="6630472777476410137">"Ingeschakeld door beheerder"</string>
    <string name="disabled_by_admin" msgid="4023569940620832713">"Uitgeschakeld door beheerder"</string>
    <string name="enabled_by_admin" msgid="6630472777476410137">"Aangezet door beheerder"</string>
    <string name="disabled_by_admin" msgid="4023569940620832713">"Uitgezet door beheerder"</string>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@
    <string name="immediately_destroy_activities_summary" msgid="6289590341144557614">"Obustavlja se svaka aktivnost čim je korisnik napusti"</string>
    <string name="app_process_limit_title" msgid="8361367869453043007">"Ograničenje procesa u pozadini"</string>
    <string name="show_all_anrs" msgid="9160563836616468726">"Prikaži ANR-e u pozadini"</string>
    <string name="show_all_anrs_summary" msgid="8562788834431971392">"Prikaz dijaloga \"Aplikacija ne reagira\" za aplikacije pokrenute u pozadini"</string>
    <string name="show_all_anrs_summary" msgid="8562788834431971392">"Prikaz dijaloškog okvira \"Aplikacija ne reagira\" za aplikacije pokrenute u pozadini"</string>
    <string name="show_notification_channel_warnings" msgid="3448282400127597331">"Prikaži upozorenja kanala obavještenja"</string>
    <string name="show_notification_channel_warnings_summary" msgid="68031143745094339">"Prikaz upozorenja na ekranu kada aplikacija pošalje obavještenje bez važećeg kanala"</string>
    <string name="force_allow_on_external" msgid="9187902444231637880">"Nametni aplikacije na vanjskoj pohrani"</string>
+3 −3
Original line number Diff line number Diff line
@@ -59,9 +59,9 @@
    <item msgid="6421717003037072581">"HDCP-controle altijd gebruiken"</item>
  </string-array>
  <string-array name="bt_hci_snoop_log_entries">
    <item msgid="695678520785580527">"Uitgeschakeld"</item>
    <item msgid="6336372935919715515">"Gefilterd ingeschakeld"</item>
    <item msgid="2779123106632690576">"Ingeschakeld"</item>
    <item msgid="695678520785580527">"Uitgezet"</item>
    <item msgid="6336372935919715515">"Gefilterd staat aan"</item>
    <item msgid="2779123106632690576">"Aangezet"</item>
  </string-array>
  <string-array name="bluetooth_avrcp_versions">
    <item msgid="6603880723315236832">"AVRCP 1.5 (standaard)"</item>
Loading