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

Commit dccaa14f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-487b3a4e-6c35-49a5-a21b-805401f2196b" into cw-e-dev

* changes:
  [automerger] DO NOT MERGE Disable overlays while installer is resumed am: 287d1d11 am: 12d9a36d
  [automerger] DO NOT MERGE Disable overlays while installer is resumed am: 287d1d11
  DO NOT MERGE Disable overlays while installer is resumed
parents 05805a7b aa8260c2
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
*/
package com.android.packageinstaller;

import android.app.Activity;
import android.app.ActivityManagerNative;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -52,6 +51,8 @@ import android.widget.Button;
import android.widget.TabHost;
import android.widget.TextView;

import com.android.packageinstaller.permission.ui.OverlayTouchActivity;

import java.io.File;
import java.util.List;

@@ -65,7 +66,8 @@ import java.util.List;
 * Based on the user response the package is then installed by launching InstallAppConfirm
 * sub activity. All state transitions are handled in this activity
 */
public class PackageInstallerActivity extends Activity implements OnCancelListener, OnClickListener {
public class PackageInstallerActivity extends OverlayTouchActivity implements OnCancelListener,
        OnClickListener {
    private static final String TAG = "PackageInstaller";

    private int mSessionId = -1;
@@ -583,6 +585,25 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen
        }
    }

    @Override
    protected void onResume() {
        super.onResume();

        if (mOk != null) {
            mOk.setEnabled(mOkCanInstall);
        }
    }

    @Override
    protected void onPause() {
        super.onPause();

        if (mOk != null) {
            // Don't allow the install button to be clicked as there might be overlays
            mOk.setEnabled(false);
        }
    }

    /** Get the ApplicationInfo for the calling package, if available */
    private ApplicationInfo getSourceInfo() {
        String callingPackage = getCallingPackage();